Borrowing it
Nothing to install: this file belongs to umputun/agterm. 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/umputun/agterm/master/CLAUDE.mdgit clone --depth 1 https://github.com/umputun/agtermWrote 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/umputun/agterm/claude-md)<a href="https://agentmods.dev/instructions/umputun/agterm/claude-md"><img src="https://agentmods.dev/badge/instructions/umputun/agterm/claude-md/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/instructions/umputun/agterm/claude-md"><img src="https://agentmods.dev/badge/instructions/umputun/agterm/claude-md.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.07360 | $0.07360 |
| Opus 5.5 | $0.02944 | $0.02944 |
| Sonnet 5.5 | $0.01472 | $0.01472 |
| Haiku 4.5 | $0.00736 | $0.00736 |
Grade B, and why
agterm 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 yesterday.
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.
`~/.claude/settings.json`, and `~/.codex/`, which `AGTERM_STATE_DIR` does not isolate, and bake How it starts
The opening of the file, as written. The whole thing — 379 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agterm project notes
agterm is a native macOS SwiftUI terminal on libghostty with a workspace-to-session sidebar.
Read site/docs.html for product behavior and ARCHITECTURE.md for modules, surface ownership, and
C-boundary concurrency before changing the bridge.
README.md is the product synopsis, not the reference.
Working norms
- For nonstandard or risky UI requests, first explain the AppKit/SwiftUI cost and offer the standard alternative. Proceed if the user still prefers the custom behavior.
- Design every UI behavior to be consistent and unsurprising: a key or gesture does one thing for what the user is looking at and never reaches a layer hidden behind the visible one. A rule whose exceptions depend on state the user cannot see on screen is a defect: propose the single rule, and ask before adding a case. Existing behavior next to the change that breaks this rule is a defect to fix with it, not a pre-existing one: name it with its fix as a question, never as out of scope. A control that already exists elsewhere in the app (a search bar, a button, a picker) looks and behaves the same in the new place: reuse its component, and show the user the rendered result before writing tests.
- Judge any change that can leave a long-standing visual artifact by what the user is left looking at, never by whether the mechanism is sound. A panel, badge, marker or overlay that outlives the thing it describes is a defect however correct the code that posted it. Give it a way to clear itself, and put that in the control API rather than in a private timer inside one caller, or every other caller ships the same artifact.
- For every new capability, propose useful control API/CLI coverage: protocol command and arguments,
dispatch,
agtermctl, read-back, and tests. Control-native features count; skip only chrome with nothing meaningful to drive. - For each hideable titlebar/sidebar element, ask whether it should join host-free
InterfaceElementand Settings > Interface. Never add that preference without approval. A control enabled there stays visible and is disabled when it cannot act; never show or hide it by state. - The HTML overlay displays HTML over a session; it is not a browser. Following links, history and back are the browser's job, so link features that turn the overlay into one are declined. What a mouse-capturing program does with a click is that program's, not agterm's.
- A decline of a feature request that a custom command covers explains the extension model with the request
as the worked example: README's "bind X yourself",
site/docs.html#extend, the agent skill, the cookbook. It also points "can you add X" requests to Discussions ▸ Ideas instead of issues. - When adding a process that runs user commands or reparents a session, weigh its effect on macOS TCC
attribution per service, up front. The responsible process is not always TCC's authorization subject:
the #574 microphone test recorded
agterm-session-hostas responsible,com.umputun.agtermas the subject, and access allowed. Check each service rather than assuming one answer covers all of them. A passiveAXIsProcessTrustedfalse can also be a stale grant, not a code bug: a stored grant may require a specific old cdhash (an ad-hoc build's requirement is a bare cdhash), so verify the row's full requirement against the running binary before suspecting attribution. - Start Swift work with the relevant skills:
swiftui-expertfor UI/AppKit/Observation/rendering,swift-testing-expertfor tests, andswift-concurrencyfor actors, Sendable, async, and C callbacks. - “Show me” means build and launch a separate interactive Debug instance, not a screenshot. Use isolated state and socket paths, leave it running, and explain how to reach the feature.
- An isolated state dir also redirects config to
<stateDir>/config. Copykeymap.conf,ghostty.conf, andrestore-denylist.confwhen real custom behavior is required. Set only a short/tmpAGTERM_STATE_DIRso app and inherited CLI derive the same socket. Prepend the Debug app'sContents/MacOSto PATH for custom commands; login shells may restore the deployed CLI, so manual commands should use the Debug binary's full path. open -npasses the caller's environment to the app, including inheritedCLAUDE*markers and live-terminalAGTERM_*/GHOSTTY_*variables; aclaudestarted in that instance warns that transcript saving is off. Launch throughenv -u NAME ...naming every such variable, which dropsAGTERM_STATE_DIRtoo, so pass the isolated one back withopen -n --env AGTERM_STATE_DIR=...; verify withps eww -p <pid>.- A fresh isolated state dir reads as a first launch and opens the welcome alert.
mkdir -p "$AGTERM_STATE_DIR/windows"before launching to skip it:FirstRunWelcome.hasPriorStatelooks forsettings.json,workspaces.json, orwindowsbefore the app writes anything. Leave the marker out only when the welcome itself is under test. - The control socket binds from the window scene's task, so a backgrounded
open -n -gcan leave the app running with no socket until a window renders. If the socket is still absent 10 s after launch, activate the instance; never leave a socket wait unbounded. agtermctlnever readsAGTERM_SOCKET; it resolves--socket, thenAGTERM_STATE_DIR, then~/Library/Application Support/agterm. A shell inside the live terminal therefore defaults onto the live socket, and exporting a shortAGTERM_STATE_DIRis what keeps inherited commands off it.- After launching an instance for manual testing, do not touch it. For an assisted experiment, announce every action. Ask before acting when unclear.
- Put nontrivial work in an isolated worktree and remove it after merge. See the build section for artifact links and cleanup.
- Comments and docs are liabilities kept short. Keep only non-obvious constraints, rejected alternatives, or reasons the obvious implementation fails. Never narrate code, repeat a fact across surfaces, use a paragraph where a clause works, or preserve change history. Own each contract once and cross-reference it. If 25 lines of logic seem to need 100 lines of comment, fix the code.
- A doc comment longer than the body it documents is wrong. The usual cause is writing it to justify a review fix rather than to document the code, which belongs in the commit message.
- Test comments are rare and one line. Add one only when neither the test name nor setup reveals the goal. Never label arrange/act/assert, restate an assertion, or explain why a test exists.
- Review severity follows user-visible consequences: critical for data loss or broken primary paths, major for wrong results or broken secondary paths, minor otherwise. Documentation inaccuracies are never critical or major. Documentation-heavy review findings usually call for less prose.
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.
- yesterday Changed · +8 lines · +159 tokens per session d7d75dec98da
- 2d ago Changed · +8 lines · +146 tokens per session 4a89f469a438
- 3d ago Changed · +5 lines · +105 tokens per session 9f9937301bbe
- 8d ago Changed · +5 lines · +120 tokens per session fbfbb3192d62
- 10d ago Changed · +3 lines · +41 tokens per session ab73d2316108
- 17d ago Changed · +1 lines · +35 tokens per session 85a6d83dfa5c
- 19d ago Changed · +1 lines · +16 tokens per session a9bb55d1c048
- 21d ago Changed · +3 lines · +67 tokens per session 6a49dad15b01
- 22d ago Changed · +6 lines · +121 tokens per session bca793071ece
- 24d ago First seen · 339 lines · 6,550 tokens per session scan B 209b3beed6f8
agterm CLAUDE.md is an instructions file published in the GitHub repository umputun/agterm (727 stars, last pushed yesterday), licensed MIT. It adds 7,360 tokens to every session, about $0.0294 per session on Opus 5.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-30.
agterm CLAUDE.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agterm CLAUDE.mdumputun/agterm | Instructions file | 727 | yesterday | MIT | B | 7,360 | Claude Code |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | yesterday | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | yesterday | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | yesterday | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |