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 instructions/mattflower/cc-focus/claude-mdgit clone --depth 1 https://github.com/MattFlower/cc-focusWrote 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/instructions/mattflower/cc-focus/claude-md)<a href="https://agentmods.dev/instructions/mattflower/cc-focus/claude-md"><img src="https://agentmods.dev/badge/instructions/mattflower/cc-focus/claude-md.svg" alt="Measured on agentmods" 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 | $0.00893 | $0.00893 |
| Opus 5 | $0.00447 | $0.00447 |
| Sonnet 5 | $0.00179 | $0.00179 |
| Haiku 4.5 | $0.00089 | $0.00089 |
Grade B, and why
cc-focus CLAUDE.md scanned grade B with 1 finding 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 4d 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.
- `install-hooks.sh` - Merges hook entries into ~/.claude/settings.json (preserves existing hooks) How it starts
The opening of the file, as written. The whole thing — 66 lines — stays where its author put it; the contents beside it link to each section on GitHub.
cc-focus
macOS menu bar status indicator for Claude Code sessions. Single-file Swift/AppKit app.
Architecture
Claude Code hooks (JSON on stdin)
→ cc-focus-hook.sh <event_type> # injects event_type, sends to socket
→ nc -U /tmp/cc-focus-$(id -u).sock
→ cc-focus.swift # NSStatusItem menu bar app
All logic is in cc-focus.swift (~350 lines). No external dependencies, no packages.
Files
cc-focus.swift- The entire app: socket listener, state machine, menu bar UIcc-focus-hook.sh- Shell hook that reads Claude Code JSON from stdin, injects event_type via python3, sends to Unix socketcc-focus-cli- CLI wrapper:cc-focus-cli setup/cc-focus-cli teardownfor hook managementInfo.plist- App bundle config (LSUIElement=true for no dock icon)build.sh- Compiles Swift and creates .app bundleinstall.sh- Builds, cleans up legacy installs, sets up hooksinstall-hooks.sh- Merges hook entries into ~/.claude/settings.json (preserves existing hooks)uninstall-hooks.sh- Removes cc-focus hooks from ~/.claude/settings.jsonuninstall.sh- Stops service, cleans up legacy installs, removes socket/hooks
Build & Test
bash build.sh # compile
bash install.sh # build + hooks (cleans up legacy installs)
bash uninstall.sh # full removal
brew services restart cc-focus # start/restart via Homebrew
brew services stop cc-focus # stop
Manual test events:
echo '{"event_type":"session_start","session_id":"test1","cwd":"/tmp"}' | nc -U /tmp/cc-focus-$(id -u).sock
echo '{"event_type":"stop","session_id":"test1","cwd":"/tmp"}' | nc -U /tmp/cc-focus-$(id -u).sock
echo '{"event_type":"session_end","session_id":"test1"}' | nc -U /tmp/cc-focus-$(id -u).sock
Key Design Decisions
- Stop hook for idle: The
Stophook (fires when Claude finishes its turn) maps to theidle(gray) state. ThePermissionRequesthook andidle_prompt/permission_promptNotification hooks map toneedsInput(red).PermissionRequestfires promptly when the permission dialog appears; theNotification/permission_prompthook fires with a delay and serves as a backup. - Notification events lack session_id:
Notificationhook events (permission_prompt, idle_prompt) don't includesession_id. The app falls back to extracting it fromtranscript_path. - Resume creates orphan sessions: When continuing a session, Claude fires two
session_startevents: a "startup" wrapper and a "resume". Only the resumed session gets asession_end. The app cleans up the orphaned wrapper when it sees a resume event. - isTemplate = false: The status item image must not be a template, otherwise macOS recolors the circle to match the menu bar theme.
- Compile with
-swift-version 5: Avoids Swift 6 strict concurrency requirements. - Debug logging:
cc-focus-hook.shwrites to/tmp/cc-focus-debug.log. Remove once stable.
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.
- 4d ago First seen · 66 lines · 893 tokens per session scan B 6d07361d572b
cc-focus CLAUDE.md is an instructions file published in the GitHub repository MattFlower/cc-focus (2 stars, last pushed 6mo ago), licensed MIT. It adds 893 tokens to every session, about $0.0045 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other instructions, from other repositories
vscode buildNext.instructions.md
Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).
spec-kit AGENTS.md
AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.
codex AGENTS.md
AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.
langchain AGENTS.md
AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.
vscode oss-third-party-notices.instructions.md
Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, applying the notice (cutover) and fallback chain (never fail the build).
next.js AGENTS.md
Instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.