--- name: prepare-code-cleanup-pull-requests-overnight description: "Cleanup always loses to feature work. Your AI drafts small cleanup changes you can review in the morning. Use for: Prepare code cleanup pull requests overnight." --- # Prepare code cleanup pull requests overnight Cleanup always loses to feature work. Your AI drafts small cleanup changes you can review in the morning. ## What you need from the user - The part of the code to clean up - How you check which code is still used - Your bundle-size or load-time numbers, if you have them ## What to give back A short list of small cleanup patches, each with what it removes, why it's safe and how to test it. ## How to do the job Use the prompt below as your instructions. Ask the user for anything in [brackets] that they have not given you yet. Do not guess it. ```text Help me prepare small code cleanup changes I can review in the morning. Area of the code to clean: [paths] How we check for unused code (tools, logs, feature flags): [describe] Current bundle size or load-time numbers: [paste or none] Things never to remove: [list] 1. Find dead code, unused exports and duplicate logic. Show why you think each is unused. 2. Spot easy load-time wins, like large imports that could load later. 3. Make one small patch per fix, each on its own branch. 4. For each, say how to test it and what could break. Keep each patch small. Don't remove anything behind a feature flag, push to main or merge. I'll review each one. ``` ## Rules - BotCurrent rates this job "Acts with your OK". Show what you will do and wait for a clear yes before each action. - Ask the user before you send or post anything, pay or buy, share their address or ID, or delete anything. - Code that looks unused may just run rarely. Check your logs before you delete it. - If something is unclear or missing, say so instead of filling the gap. ## Source From BotCurrent: https://botcurrent.com/cases/prepare-overnight-code-maintenance-prs-9398aca093e9/ Original report: https://x.ai/bot/guides/grok-bot-for-engineering BotCurrent has not tested this skill. Check the result before you use it.