study

A command for examining one or more code repositories and creating knowledge documents about them.

In plain words
What is it for?
Use it to study named repositories, update existing knowledge after Git changes, or identify repositories that have not been documented.
Why use it?
It gives an AI assistant a structured, code-based reference instead of making it rediscover each repository from scratch.

Command for Claude Code

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 commands/end1989/repos-expert/study
Clone the repo
git clone --depth 1 https://github.com/end1989/repos-expert

Made for: Claude Code.

Per session 10 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 655 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00010 $0.00655
Opus 5 $0.00005 $0.00328
Sonnet 5 $0.00002 $0.00131
Haiku 4.5 $0.00001 $0.00065

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

Security

Grade A, and why

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

agent-kit/.claude/commands/study.md · 60 lines

What it actually says

Write the knowledge documents for: $ARGUMENTS

If no repo was named, list the repos in this folder that have no _knowledge/<repo>/ directory, and ask which to study. Do not pick for the user.

For each named repo:

  1. Gather git context yourself — the curator cannot run commands:

    git -C <repo> rev-parse HEAD
    git -C <repo> log --oneline -30
    git -C <repo> branch -a
    
  2. If _knowledge/<repo>/ already exists, read the current docs and the changes since their recorded commit:

    git -C <repo> log <meta.sha>..HEAD --stat
    

    Pass both to the curator and tell it to update rather than rewrite — preserve still-valid insight, revise what changed.

  3. Launch the curator subagent for that repo. If .claude/agents/curator.md is not installed, use any read-only agent (Explore) instead, and give it the evidence rule and document list from CLAUDE.md. Give it the repo's absolute path, the git context above, and the previous docs if any. Launch all named repos concurrently — one Task call per repo in a single message — so a long batch runs in parallel and each gets its own context.

  4. When a curator returns, split its output on the ===FILE: name=== markers and write each document to _knowledge/<repo>/<name>. Accept only these five filenames: card.md, architecture.md, map.md, activity.md, interfaces.md. Anything else — a path with .., a different name, an absolute path — is discarded, and you tell the user it was. That check is what keeps a repository's contents from writing outside _knowledge/.

    Never write notes.md. It is hand-written by the user and survives every study run. If it exists, read it first and treat it as authoritative where it conflicts with what the curator returned — a person wrote it on purpose.

  5. Write _knowledge/<repo>/meta.json:

    { "sha": "<the HEAD you read in step 1>", "curatedAt": "<ISO date>", "docVersion": 1 }
    

    Use the SHA from step 1, not a fresh one — it must record the commit the documents were actually written from.

  6. If a curator fails or returns something that isn't five documents, report that repo as failed, quote what it did return, and continue with the others. One failure never stops the batch.

Finish by reporting: which repos were written, which failed and why, and — if any docs were newly written — remind the user that /map will refresh the portfolio view to include them.

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. yesterday First seen · 60 lines · 10 tokens per session scan A 30ee47a282ea

Subscribe to this mod's changes

study is a command published in the GitHub repository end1989/repos-expert (0 stars, last pushed 2d ago), licensed MIT. It adds 10 tokens to every session and 655 once invoked, about $0.0001 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.