agterm CLAUDE.md

agterm CLAUDE.md is an instructions file for coding agents from umputun/agterm. It costs 4,863 tokens per session, scanned B, original, MIT.

Project notes for agterm, a native macOS SwiftUI terminal built on libghostty with a sidebar that connects workspaces to terminal sessions.

In plain words
What is it for?
Changing terminal UI, workspace sessions, AppKit or SwiftUI behavior, control commands, settings, or Swift and C integration.
Why use it?
They identify the project's reference documents and set review expectations for UI, command-line control, preferences, and concurrency-sensitive bridge code.

Instructions file

Install

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.

agentmods
npx agentmods add instructions/umputun/agterm/claude-md
Clone the repo
git clone --depth 1 https://github.com/umputun/agterm

Wrote 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.

agentmods badge for agterm CLAUDE.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/umputun/agterm/claude-md.svg)](https://agentmods.dev/instructions/umputun/agterm/claude-md)
Your own site
<a href="https://agentmods.dev/instructions/umputun/agterm/claude-md"><img src="https://agentmods.dev/badge/instructions/umputun/agterm/claude-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 4,863 This file is loaded in full into every session.
When invoked 4,863 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.04863 $0.04863
Opus 5 $0.02431 $0.02431
Sonnet 5 $0.00973 $0.00973
Haiku 4.5 $0.00486 $0.00486

Measured today against content hash 61bf568753e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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 today.

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
CLAUDE.md · 262 lines

How it starts

The opening of the file, as written. The whole thing — 262 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.
  • 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 InterfaceElement and Settings > Interface. Never add that preference without approval.
  • Start Swift work with the relevant skills: swiftui-expert for UI/AppKit/Observation/rendering, swift-testing-expert for tests, and swift-concurrency for 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. Copy keymap.conf, ghostty.conf, and restore-denylist.conf when real custom behavior is required. Set only a short /tmp AGTERM_STATE_DIR so app and inherited CLI derive the same socket. Prepend the Debug app's Contents/MacOS to PATH for custom commands; login shells may restore the deployed CLI, so manual commands should use the Debug binary's full path.
  • 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.hasPriorState looks for settings.json, workspaces.json, or windows before 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 -g can leave the app running with no socket until a window renders. Activate the instance when the socket never appears.
  • agtermctl never reads AGTERM_SOCKET; it resolves --socket, then AGTERM_STATE_DIR, then ~/Library/Application Support/agterm. A shell inside the live terminal therefore defaults onto the live socket, and exporting a short AGTERM_STATE_DIR is 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.

Read the full file on GitHub · 262 lines

Changes

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.

  1. today Changed · +14 lines · +290 tokens per session 61bf568753e4
  2. 4d ago First seen · 248 lines · 4,573 tokens per session scan B 82aea0870793

Subscribe to this mod's changes

agterm CLAUDE.md is an instructions file published in the GitHub repository umputun/agterm (561 stars, last pushed today), licensed MIT. It adds 4,863 tokens to every session, about $0.0243 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-30.