Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add commands/fatihkan/badi/cleargit clone --depth 1 https://github.com/fatihkan/badiWhat it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00521 |
| Opus 5 | $0.00000 | $0.00260 |
| Sonnet 5 | $0.00000 | $0.00104 |
| Haiku 4.5 | $0.00000 | $0.00052 |
Grade A, and why
clear scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 89 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Context-clearing command. Provides a seamless transition across session boundaries. Target: under 30 seconds.
Required Tools
- Read (context files)
- Write (handoff note and memory update)
Procedure (6 Steps)
Step 1: Reset the Gates
- Clear the active file-watch list
- Reset temporary analysis results
- Close any open parallel work
- Clear in-session variables
Step 2: Summarize the Session (7 Components)
Build a summary covering these 7 components:
- Active Task: What task is being worked on right now?
- Status: What stage? (start/middle/done/blocked)
- Last Action: What was the most recent work?
- Next Step: What needs to happen immediately?
- Open Questions: Any questions awaiting answers?
- Changed Files: Files modified this session
- Key Context: Critical information the next session must know
Step 3: Write the Handoff Note
Create handoffs/handoff-[DDMMYY-HHMM].md:
# Handoff Note - [date time]
## Active Task
[task description]
## Current Status
[status detail]
## Recent Actions
- [action list]
## Next Steps
1. [step]
2. [step]
## Open Questions
- [questions]
## Changed Files
- [file list]
## Critical Context
[information that must not be lost]
Step 4: Update Memory
In memory.md:
- Update the latest task status
- Add the handoff note reference
- Update the timestamp
Step 5: Move Learnings
Transfer this session's learnings into knowledge-base.md:
- Technical knowledge
- Project decisions
- Process notes
Step 6: Auto-Continue
Prepare for the next session's start command:
- Point to the handoff note path
- Highlight the priority actions
- Offer a starting suggestion
Output Format
=== BADI CONTEXT CLEAR ===
Duration: [seconds]s
Handoff Note: handoffs/handoff-[date].md
Memory: UPDATED
Learnings: [count] items transferred
For the Next Session:
> [one-line starting suggestion]
===============================
Performance Target
- The whole operation must finish in under 30 seconds
- The memory file must not exceed 500 lines
- The handoff note must be concise and clear (no needless detail)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 89 lines · 0 tokens per session scan A 0767d0ffcc84
clear is a command published in the GitHub repository fatihkan/badi (7 stars, last pushed 16d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 521 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other commands, from other repositories
audit-agents-skills
Audit quality of agents, skills, and commands in a Claude Code project.
scaffold
Interactive coach that asks 4-5 questions to determine whether you need an agent, command, skill, hook, or rule — then generates a ready-to-use template. Usage: /scaffold (no arguments — starts the coaching session).
sonarqube
Analyze SonarCloud quality issues for a specific PR.
land-and-deploy
Merge PR, wait for CI, verify deploy, run canary — the complete landing pipeline.
methodology-advisor
Analyzes your codebase and asks 3 targeted questions to recommend the right AI-assisted development methodology stack.
investigate
Systematic root-cause debugging — find the cause before writing any fix.