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/lugassawan/swe-workbench/codebase-knowledgegit clone --depth 1 https://github.com/lugassawan/swe-workbenchWhat 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.00060 | $0.00380 |
| Opus 5 | $0.00030 | $0.00190 |
| Sonnet 5 | $0.00012 | $0.00076 |
| Haiku 4.5 | $0.00006 | $0.00038 |
Grade A, and why
codebase-knowledge 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 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.
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.
What it actually says
Produce a structured knowledge document for this codebase.
Step 1 — Parse arguments
From $ARGUMENTS, extract:
- Optional path — a token is treated as a path if it contains
/, starts with., or matches an existing directory in the repo; otherwise treat the entire argument string as natural-language context with no path scoping. If a path is identified, scope all phases to that path and its descendants; if absent, use the repo root. - Ticket ref — scan first: any token matching
#\d+,[A-Z]+-\d+, or anatlassian.net/GitHub URL is a ticket ref. Collect the first match and remove it from the remaining argument string before further parsing; ignore if none.
Step 2 — Ticket context (when a ref is present)
If a ticket ref was found in Step 1, invoke swe-workbench:ticket-context with that ref and prepend its summary to the context passed in Step 3.
Step 3 — Invoke workflow skill
Pass the parsed path (or . if absent) to swe-workbench:workflow-codebase-knowledge:
"Path:
<path>."
Append the ticket-context summary from Step 2 if present.
The skill handles all five phases (Scope → Module map → Public API surfaces → Patterns → Render) and produces the structured knowledge document. This command does not produce Plan-mode output — the sweep is read-only by definition.
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 First seen · 28 lines · 60 tokens per session scan A a19df0f70a97
codebase-knowledge is a command published in the GitHub repository lugassawan/swe-workbench (2 stars, last pushed yesterday), licensed MIT. It adds 60 tokens to every session and 380 once invoked, about $0.0003 per session on Opus 5. 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
dispatch-worker
Run one in-session-agent Worker tick (RFC-0041 §4.3.1).
release-tag
Create and push a version tag after a release PR has been merged.
OPSX: Fast Forward
Create a change and generate all artifacts needed for implementation in one go.
deploy
Build, test, deploy with staged rollout.
simplify
Reduce complexity without changing behavior — code simplification.
gum-schema
Print a JSON description of the active gum command tree, including command paths, aliases, arguments, and flags.