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/jingnanzhou/fellow/build-kbgit clone --depth 1 https://github.com/jingnanzhou/fellowWhat 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.00035 | $0.12849 |
| Opus 5 | $0.00017 | $0.06424 |
| Sonnet 5 | $0.00007 | $0.02570 |
| Haiku 4.5 | $0.00003 | $0.01285 |
Grade A, and why
build-kb 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.
How it starts
The opening of the file, as written. The whole thing — 1,368 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Build Knowledge Base
Extract comprehensive semantic knowledge from a codebase to enable intelligent coding context, architectural guardrails, and constraint enforcement.
Supports Incremental Updates: Only re-analyzes changed files for fast updates during active development.
Objective
Analyze a target project and extract comprehensive semantic knowledge:
-
Factual Knowledge (Phase 1 - AST-enhanced by default)
- What entities, models, and data structures exist
- 90% token reduction via AST parsing
-
Procedural Knowledge (Phase 2+4 - Unified by default) ⭐ DEFAULT
- How workflows and execution flows work
- Inter-function: Call graphs (100% coverage)
- Intra-function: CFG/DFG/PDG for critical functions (selective 8-10%)
- 54% token reduction vs traditional
-
Conceptual Knowledge (Phase 3 - Architecture-enhanced by default) ⭐ DEFAULT
- What the overall architecture and design patterns are
- 77% token reduction via generic architecture discovery
- Disable with
--no-architectureflag (for debugging only)
-
Semantic Index (Phase 5 - Optional)
- Searchable embeddings for efficient context retrieval
- 99.5% token reduction for context retrieval
- Enable with
--indexflag
Store this knowledge in the target project's .fellow-data/semantic/ directory for use by coding assistants.
Arguments
-
Project Path (optional): Path to target project
- If empty: Use current working directory
- If provided: Use specified path
-
Mode Flags (optional):
--full: Force complete re-extraction (ignore existing KB)--update: Force incremental update (default if KB exists)- No flag: Auto-detect (full if no KB, incremental if KB exists)
-
Optimization Flags (optional):
--no-ast: Disable AST-enhanced extraction (use traditional full-file reading)- AST extraction is enabled by default
- Uses AST parsing for Python, JavaScript/TypeScript, Java
- 90% token reduction for supported languages
- 10x faster extraction
- Falls back to traditional reading for other languages
- Use
--no-astonly for debugging or comparison purposes
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 · 1,368 lines · 0 tokens per session scan A a075f8e16ee7
build-kb is a command published in the GitHub repository jingnanzhou/fellow (4 stars, last pushed 7mo ago), licensed Apache-2.0. It adds 35 tokens to every session and 12,849 once invoked, about $0.0002 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
template
Manage issue templates for streamlined issue creation.
sync
Synchronize issues with a configured Dolt remote.
dep
Manage dependencies between issues.
decision
Record, list, and manage project decisions with rationale tracking.
prime
Load AI-optimized workflow context for beads issue tracking.
search
Search issues by text query.