setup-git-lite
Skill34 starsChanged 3 months agoApache-2.0View on GitHub
Disable Claude Code built-in git instructions and inject a curated 280-tok minimum via SessionStart hook. Saves ~2,200 tok/session + ~1,700 tok/call.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- llms.txtllms.txt
- report-limitSkill
- s-compactSkill
- s-continueSkill
- setup-statuslineSkill
- usage-viewSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 28
If the subcommand is install or revert:
- Very specific: line 41
Only proceed on a literal yes.
- Distinctive: line 47
After (if required) passing the guard + confirmation, run:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Manage Claude Code's built-in includeGitInstructions token consumption.
Subcommand routing
Parse the first argument from $ARGUMENTS:
| Subcommand | Risk | AI-allowed | Behavior |
install | 🔴 destructive | ❌ user-only | Modifies ~/.claude/settings.json + shell profile. Requires explicit <command-name>super-token-saver:setup-git-lite</command-name> tag with <command-args>install</command-args> |
revert | 🔴 destructive | ❌ user-only | Aggressive cleanup. Same gating as install |
status | 🟢 safe | ✅ allowed | Read-only diagnostic |
dismiss-banner | 🟢 safe | ✅ allowed | Suppresses the recommendation banner (preferences.json flag) |
undismiss-banner | 🟢 safe | ✅ allowed | Re-enables the banner |
help | 🟢 safe | ✅ allowed | Prints usage |
| (empty) | 🟢 safe | ✅ allowed | Run status, then append one-line usage hint: "Subcommands: install, revert, status, dismiss-banner, undismiss-banner, help" |
Invocation guard — enforce for destructive subcommands only
If the subcommand is install or revert:
Verify explicit invocation: the triggering user message MUST contain
<command-name>super-token-saver:setup-git-lite</command-name>along with<command-args>install</command-args>(orrevert). If these tags are absent (i.e., you inferred the intent from natural-language context), STOP and respond:"This action modifies your global Claude Code settings and shell profile. Please invoke explicitly by typing
/setup-git-lite install(orrevert)."User confirmation before execution: even when the tag is present, print a one-line summary and ask for a literal "yes":
"Install will:
- Set
includeGitInstructions: falsein ~/.claude/settings.json - Append a marker block to your shell profile exporting CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS=1 Proceed? (type yes to confirm)"
Only proceed on a literal
yes. Any other response — cancel.- Set
Safe subcommands (status, dismiss-banner, undismiss-banner, help) skip the guard entirely.
Execution
After (if required) passing the guard + confirmation, run:
node ${CLAUDE_PLUGIN_ROOT}/scripts/setup-git-lite.js <subcommand>Relay stdout verbatim to the user. On non-zero exit, surface stderr.
Language
Detect the user's language from the conversation. Translate ALL user-facing output into that language. The script outputs English — you MUST translate before relaying. Keep technical identifiers verbatim (file paths, env var names, command names, setting keys).
Output conventions
status: translate stdout into the user's language, then relay.install: translate stdout, then add a short line pointing to README for the rationale.revert: translate stdout, then note "Your current shell env may still have the variable set — restart the shell or rununset CLAUDE_CODE_DISABLE_GIT_INSTRUCTIONS." (in the user's language).dismiss/undismiss: translate stdout, then relay.help: translate stdout, then relay.
Error handling
- Exit code 1 (general error): print stderr, suggest running
status. - Exit code 2 (unknown subcommand): surface the hint from the script, no further work.
Design reference
The hook content and behavior are documented in the super-token-saver README (Git instructions section). Key points for the user if they ask:
- Original CC built-in injects ~2,200 tokens per session (git status snapshot + full commit/PR workflow).
- Our replacement is ~280 tokens (11 override rules + compact git state line with file list).
- 88% token reduction, 95%+ of the safety rules preserved.
- Other style/workflow guidance is dropped because Claude's training already covers it (e.g., PR title conventions, HEREDOC format awareness, gh usage).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

