Borrowing it
Nothing to install: this file belongs to patwalls/headroom. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/patwalls/headroom/main/.claude/commands/lap.mdgit clone --depth 1 https://github.com/patwalls/headroomWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/patwalls/headroom/lap)<a href="https://agentmods.dev/commands/patwalls/headroom/lap"><img src="https://agentmods.dev/badge/commands/patwalls/headroom/lap/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/patwalls/headroom/lap"><img src="https://agentmods.dev/badge/commands/patwalls/headroom/lap.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What 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.1 | $0.00029 | $0.02699 |
| Opus 5.5 | $0.00012 | $0.01080 |
| Sonnet 5.5 | $0.00006 | $0.00540 |
| Haiku 4.5 | $0.00003 | $0.00270 |
Grade B, and why
lap scanned grade B with 2 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 2mo 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.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
- `cat ~/.claude/LOOPS_THROTTLE` gives a number of seconds. That is the MINIMUM delay Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Site live: !`curl -s -o /dev/null -w "%{http_code}" --max-time 10 https://headroom.walls.sh/health 2>/dev/null` · downloads: !`curl -s --max-time 10 "https://headroom.walls.sh/metrics?probe=1" 2>/dev/null | head -c 200 How it starts
The opening of the file, as written. The whole thing — 167 lines — stays where its author put it; the contents beside it link to each section on GitHub.
⏸ Pause guard (check FIRST, before anything)
If ~/.claude/LOOPS_PAUSED exists (test -f ~/.claude/LOOPS_PAUSED), Pat has paused all
loops (usually: out of credits). Say "loops are paused — not running this lap" and STOP
immediately. Do no work, schedule no wakeups. Pat resumes with /resume-loops in walls.
🐢 Throttle guard (check right after pause)
If ~/.claude/LOOPS_THROTTLE exists, Pat is low on credits — run FRUGAL this lap:
cat ~/.claude/LOOPS_THROTTLEgives a number of seconds. That is the MINIMUM delay before the next lap: when this lap ends and you schedule the next wakeup, set ScheduleWakeupdelaySecondsto AT LEAST that value.- Keep the lap small and cheap: do ONE small thing, do NOT escalate to opus/fable subagents (stay on the cheap session model), skip optional polish. Cleared with /unthrottle-loops (or /resume-loops) in walls.
💸 Token discipline (every lap, always)
The loop re-reads its whole context each lap, so wasted work compounds fast. Keep every lap cheap and bounded:
- One thing, one success test. Before starting, state in ONE line what this lap ships and the exact check that proves it done. Hit that test, then STOP — no second task, no gold-plating, no "while I'm here."
- Never spin. If an approach fails twice the same way, abandon it, log it as a blocker (a registry/VISION note), and end the lap. A third retry of a broken approach is banned — that is the #1 token sink.
- Read once, narrowly. Open only the files this lap needs, once. Do NOT re-read or re-grep what is already in context. Trust VISION.md's loop log as the state of the world instead of re-deriving it from the whole codebase.
- Cheap by default, escalate rarely. Stay on the session model. Spawn AT MOST one subagent per lap, and only for genuinely substantial/critical work — never fan out a swarm for a routine lap.
- Hand off small. End with a 2–3 line loop-log entry (shipped / fact learned / next) so the next lap can act from that summary, not from re-reading everything.
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.
- 2mo ago First seen · 167 lines · 29 tokens per session scan B 487b304e78ef
lap is a command published in the GitHub repository patwalls/headroom (11 stars, last pushed 4mo ago), licensed MIT. It adds 29 tokens to every session and 2,699 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it B with 2 findings (reads agent configuration directories, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
firebase-publish
Create or reuse a Firebase project, configure Hosting, and deploy the current static site. Never deletes.
p3-ux-wireframes
Creates wireframes (ASCII art) for the most important screens with interaction descriptions.
dare-llm-integration
Integração segura e eficiente com LLMs (Gemini, Claude, OpenAI, Ollama) em projetos DARE.
note
Zero-friction idea capture. Append, list, or promote notes to todos.
onboard
/anty:onboard — QUEST-Based Conversational Interview.
checklist
Generate a custom checklist for the current feature based on user requirements.