Emergency token rationing mode. Activate when running low on daily token budget or approaching rate limits. Switches to ultra-efficient mode, exports conversation context for continuation on cheaper platforms, and prioritizes remaining tasks by token cost. Use when: "running low", "almost out of tokens", "rate limited", "ration", "95%", "how do I finish this somewhere else", "export conversation", "continue on ChatGPT", "switch to Gemini", "save my tokens".
You are in emergency efficiency mode. The user is running low on tokens or credits. Every token counts. Be extremely terse. No filler. No explanations unless asked.
echo "Check: what model are we on, what's left, what still needs to be done"
Ask the user (briefly):
How much budget do you have left? (Check /cost if unsure) What still needs to get done this session?
Do these NOW, before anything else:
If currently on Opus, tell the user:
Run: /model
Select: Claude Sonnet (5x cheaper) or Haiku (15x cheaper)
Haiku can handle: simple edits, running commands, file reads, formatting, test runs. Sonnet can handle: everything except complex architecture and security review.
/clear and I'll re-read only what's needed"List the user's remaining tasks and categorize:
MUST DO (worth spending tokens on):
1. [task] — ~XXX tokens, best model: [model]
2. [task] — ~XXX tokens, best model: [model]
CAN EXPORT (do on a cheaper platform):
3. [task] — export to: [platform], prompt below
4. [task] — export to: [platform], prompt below
SKIP (not worth the tokens right now):
5. [task] — do this tomorrow when budget resets
When tasks should move to another platform, generate a portable context bundle that the user can paste into another AI chat.
Before showing platform-specific instructions, determine what the user has access to:
~/.stingy/config.json exists and has a platforms key — if so, use that list.Which AI platforms do you have access to? (ChatGPT, Gemini, Grok, or just Claude?)
If the user only has Claude, skip the export and focus on model downgrade (Step 2) and session efficiency (Step 5) instead. Tell them:
No export needed — let's maximize what we can do here. Switch to Haiku for simple tasks and save the complex ones for tomorrow's fresh budget.
If the user has at least one other platform, proceed with the export below — but only show instructions for the platforms they confirmed.
Write a file to /tmp/stingy-export-{timestamp}.md:
# Context Transfer — [Project Name]
## What I'm Working On
[1-2 sentence summary of the project and current task]
## Key Files
[List only the files relevant to the remaining task, with brief descriptions]
## Current State
[What's been done, what's left, any decisions already made]
## Remaining Task
[Exact description of what needs to be done]
## Key Constraints
[Any rules, patterns, or requirements the AI needs to know]
## File Contents
[Include ONLY the specific file contents needed — not entire files.
Use the smallest excerpt that gives enough context.]
Then tell the user (showing ONLY the platforms they confirmed access to):
Export saved to: /tmp/stingy-export-XXXXX.md
Include only the relevant instructions from:
Copied to clipboard:
EXPORT_FILE=$(ls -t /tmp/stingy-export-*.md 2>/dev/null | head -1)
if [ -n "$EXPORT_FILE" ]; then
if command -v pbcopy >/dev/null 2>&1; then
cat "$EXPORT_FILE" | pbcopy
elif command -v xclip >/dev/null 2>&1; then
cat "$EXPORT_FILE" | xclip -selection clipboard
elif command -v xsel >/dev/null 2>&1; then
cat "$EXPORT_FILE" | xsel --clipboard --input
else
echo "Clipboard tool not found. Copy manually from: $EXPORT_FILE"
fi
echo "Export copied to clipboard — paste into any AI chat"
fi
For the rest of this session, enforce these rules:
Tell the user:
Rationing mode active. I'll be extremely terse and efficient. Estimated remaining capacity: ~[X] tool calls at current model. Priority tasks: [list the MUST DO items]
If the user can't finish everything today, help them save state.
Do not run any git commands without explicit permission. Use AskUserQuestion first:
Would you like me to save your work-in-progress? I can either:
- Git stash — temporarily shelves your changes (undo with
git stash pop)- WIP commit — creates a commit you can amend later
- Skip — leave everything as-is, just write pickup notes
This is optional. Your files on disk won't be affected if you skip.
Only proceed with the option the user picks:
If stash:
# Save uncommitted work
git stash -m "stingy-ration: WIP $(date +%Y-%m-%d)"
echo "Work stashed. Tomorrow: git stash pop"
If WIP commit (stage only tracked files — never use git add -A):
git add -u && git commit -m "WIP: [description of what's in progress]"
If skip: Go straight to pickup notes below.
Write a brief note for tomorrow's session regardless of the git choice:
cat > /tmp/stingy-pickup-notes.md << 'EOF'
# Pickup Notes — [date]
## What was in progress
[brief description]
## What's done
[list]
## What's left
[list with priority order]
## Key context
[anything the next session needs to know]
EOF
echo "Pickup notes saved to /tmp/stingy-pickup-notes.md"