Skip to content

Instantly share code, notes, and snippets.

@eonist
Created October 24, 2025 21:14
Show Gist options
  • Save eonist/a63d4adfc4927f31b7a0741362d1a8c2 to your computer and use it in GitHub Desktop.
Save eonist/a63d4adfc4927f31b7a0741362d1a8c2 to your computer and use it in GitHub Desktop.
ts-prune-workflow.md

AI Coder Checklist: ts-prune Safe Removal

For Each Flagged Export

  1. Grep the codebase for the export name (check for dynamic imports, string refs, config files)[1][2]
  2. Only remove the export keyword - never delete the actual code (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️)
  3. If unsure, skip it and move to the next one

Process

  1. Work in small batches (5-10 exports at a time) - removing exports reveals new unused code[1]
  2. After each batch: Run tsc --noEmit to verify no type errors
  3. Build the app periodically to ensure nothing breaks
  4. Repeat - multiple passes needed since removal cascades

Rules

  • Never remove code, only the export keyword (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️)
  • Items marked (used in module) are safe - just remove export
  • When in doubt, search Perplexity for "ts-prune best practices" or specific issues

EXTREMLY IMPORTANT:

(⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) (⚠️️ DO NOT REMOVE ANY CODE, ONLY export word. EXTREMLY IMPORTANT ⚠️️) IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed! IF YOU REMOVE CODE. THIS SESSISION ENDS immediatly. and you have failed!

Prine prompt:

can you ts-prune server and plugin. one at the time. rules to follow: _resources/ts-prune-flow.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment