Temp
Make quick, reversible code changes for local testing. Every change is marked with a TEMP: comment so it can be found and undone later.
Modes
1. Make a temporary change (default)
Usage: temp always show questionnaire
- Search the codebase for code related to the user's description.
- Make the minimal change needed — flip a boolean, comment out a guard, force a condition, hardcode a value. Prefer the smallest diff possible.
- Mark every modified line with a comment containing
TEMP: and the reason. Use the appropriate comment syntax for the language.
Marking rules:
- Tell the user what was changed and how to undo (
temp undo).
2. Undo all temporary changes
Usage: temp undo
- Grep the project for
TEMP: markers.
- If no markers found, tell the user there are no temporary changes.
- For each file with markers, use
git checkout or git restore to revert the file. If the file has other unstaged changes mixed in, restore only the TEMP-marked lines manually by reading the original from git and editing surgically.
- Confirm what was reverted.
3. List current temporary changes
Usage: temp list
- Grep the project for
TEMP: markers.
- Display each one with file path, line number, and the marker text.
- If none found, say "No temporary changes active."
Examples
Example 1: Force a questionnaire to always show
User says: temp always show questionnaire
Actions:
- Search for questionnaire-related display logic (e.g.,
hasSeenQuestionnaire, showQuestionnaire, questionnaire + conditional).
- Find:
if (!user.hasCompletedQuestionnaire) { showQuestionnaire(); }
- Change to:
if (true) { showQuestionnaire(); } // TEMP: always show questionnaire (was: !user.hasCompletedQuestionnaire)
- Report the change.
Example 2: Disable auth check
User says: temp skip auth
Actions:
- Find auth middleware or guard.
- Comment out or force-pass the check, marking with
// TEMP: skip auth.
Example 3: Undo
User says: temp undo
Actions:
- Search the codebase for
TEMP: markers.
- Found markers in
src/components/Questionnaire.tsx:42 and src/middleware/auth.ts:15.
- Restore original code for each marked line (read original from git or use the
(was: ...) hint).
- Confirm: "Reverted 2 files, removed all TEMP markers."
Troubleshooting
Can't find relevant code
Cause: The description is too vague or uses different terminology than the codebase.
Solution: Ask the user for more specific terms, file names, or feature names to search for.
Undo reverts more than TEMP changes
Cause: The file had other unstaged modifications mixed with TEMP changes.
Solution: Instead of reverting the whole file, surgically restore only the TEMP-marked lines by reading the original from git show HEAD:<file> and editing just those lines back.
1---2name: temp3description: Make temporary code changes for testing that can be easily undone. Use when user says "temp", "temporary change", "temporarily enable/disable/show/hide", or needs to force a UI state, bypass a guard, or flip a feature flag for local testing. Also handles "temp undo" to revert all temporary changes, and "temp list" to show them.4---56<!-- Generated from https://github.com/nielsmadan/agentic-coding — edits here are overwritten. -->78# Temp910Make quick, reversible code changes for local testing. Every change is marked with a `TEMP:` comment so it can be found and undone later.1112## Modes1314### 1. Make a temporary change (default)1516Usage: `temp always show questionnaire`17181. Search the codebase for code related to the user's description.192. Make the **minimal** change needed — flip a boolean, comment out a guard, force a condition, hardcode a value. Prefer the smallest diff possible.203. Mark every modified line with a comment containing `TEMP:` and the reason. Use the appropriate comment syntax for the language.2122**Marking rules:**23- Add `// TEMP: <reason>` (or `# TEMP:`, `/* TEMP: */`, `-- TEMP:`, etc.) at the end of each changed line, or on the line above if end-of-line isn't practical.24- If commenting out code, wrap it like:25 ```26 // TEMP: always show questionnaire — commented out guard27 // if (!hasSeenQuestionnaire) {28 ```29- If changing a value:30 ```31 const showOnboarding = true; // TEMP: always show onboarding (was: false)32 ```33- Always include what the original value was when replacing a value, using `(was: ...)`.34354. Tell the user what was changed and how to undo (`temp undo`).3637### 2. Undo all temporary changes3839Usage: `temp undo`40411. Grep the project for `TEMP:` markers.422. If no markers found, tell the user there are no temporary changes.433. For each file with markers, use `git checkout` or `git restore` to revert the file. If the file has other unstaged changes mixed in, restore only the TEMP-marked lines manually by reading the original from git and editing surgically.444. Confirm what was reverted.4546### 3. List current temporary changes4748Usage: `temp list`49501. Grep the project for `TEMP:` markers.512. Display each one with file path, line number, and the marker text.523. If none found, say "No temporary changes active."5354## Examples5556### Example 1: Force a questionnaire to always show5758User says: `temp always show questionnaire`5960Actions:611. Search for questionnaire-related display logic (e.g., `hasSeenQuestionnaire`, `showQuestionnaire`, `questionnaire` + conditional).622. Find: `if (!user.hasCompletedQuestionnaire) { showQuestionnaire(); }`633. Change to: `if (true) { showQuestionnaire(); } // TEMP: always show questionnaire (was: !user.hasCompletedQuestionnaire)`644. Report the change.6566### Example 2: Disable auth check6768User says: `temp skip auth`6970Actions:711. Find auth middleware or guard.722. Comment out or force-pass the check, marking with `// TEMP: skip auth`.7374### Example 3: Undo7576User says: `temp undo`7778Actions:791. Search the codebase for `TEMP:` markers.802. Found markers in `src/components/Questionnaire.tsx:42` and `src/middleware/auth.ts:15`.813. Restore original code for each marked line (read original from git or use the `(was: ...)` hint).824. Confirm: "Reverted 2 files, removed all TEMP markers."8384## Troubleshooting8586### Can't find relevant code87**Cause:** The description is too vague or uses different terminology than the codebase.88**Solution:** Ask the user for more specific terms, file names, or feature names to search for.8990### Undo reverts more than TEMP changes91**Cause:** The file had other unstaged modifications mixed with TEMP changes.92**Solution:** Instead of reverting the whole file, surgically restore only the TEMP-marked lines by reading the original from `git show HEAD:<file>` and editing just those lines back.