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/scottrbk/forgetful/encode-repogit clone --depth 1 https://github.com/ScottRBK/forgetfulWrote 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/commands/scottrbk/forgetful/encode-repo)<a href="https://agentmods.dev/commands/scottrbk/forgetful/encode-repo"><img src="https://agentmods.dev/badge/commands/scottrbk/forgetful/encode-repo.svg" alt="Measured on agentmods" 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 | $0.00009 | $0.04978 |
| Opus 5 | $0.00005 | $0.02489 |
| Sonnet 5 | $0.00002 | $0.00996 |
| Haiku 4.5 | $0.00001 | $0.00498 |
Grade A, and why
encode-repo 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 4d ago.
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 — 708 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Encode Repository
Systematically populate the Forgetful knowledge base with comprehensive project context using the Zettelkasten-inspired bootstrap protocol.
Purpose
Transform an undocumented or lightly-documented codebase into a rich, searchable knowledge repository. Use this when:
- Starting to use Forgetful for an existing project
- Onboarding a new project into the memory system
- Preparing a project for AI agent collaboration
- Creating institutional knowledge for team members
Arguments
$ARGUMENTS
Parse for:
- Project path: Directory to encode (default: current working directory)
- Project name: Override auto-detected name (optional)
- Phases: Specific phases to run (optional, default: all)
Phase 0: Discovery & Assessment (ALWAYS START HERE)
Step 1: Check for Existing Project
execute_forgetful_tool("list_projects", {})
Search for the project. If found:
- Note the
project_id(required for linking) - Review description, project_type, status
- Check notes field for operational details
Step 2: Assess Project Size & Scope
Explore the codebase to determine:
Project Size:
- Lines of code: Small <5K, Medium 5K-50K, Large >50K
- File count: Small <50, Medium 50-500, Large >500
Project Type:
- Simple app/script
- Standard web app
- Library/SDK
- Microservice
- Monorepo
- Integration/ETL
Step 3: Query Existing KB Coverage
execute_forgetful_tool("query_memory", {
"query": "<project-name> architecture overview",
"query_context": "Assessing existing knowledge base coverage for bootstrap",
"k": 10,
"include_links": true,
"project_ids": [<project_id if exists>]
})
Step 4: Analyze Current Codebase
Read key files:
- README.md
- pyproject.toml / package.json / Cargo.toml
- Main entry points
- Configuration files
Step 5: Gap Analysis
Compare KB vs Codebase:
- What's documented and current?
- What's documented but outdated?
- What's missing from KB?
- What memories reference non-existent code?
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.
- 4d ago First seen · 708 lines · 9 tokens per session scan A 56ed19fee5cb
encode-repo is a command published in the GitHub repository ScottRBK/forgetful (296 stars, last pushed 2d ago), licensed MIT. It adds 9 tokens to every session and 4,978 once invoked, about $0.0000 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-30.
Other commands, from other repositories
weekly
Weekly memory report — facts learned, procedures, repeated mistakes prevented.
compress
Save this Claude Code session to the vault and update the semantic memory index.
context
Search memories by keyword and show relevant context.
sync
Two-way sync between Nemp Memory and CLAUDE.md.
save
Save a key-value memory entry to persistent storage.
health
Run diagnostics on Nemp Memory health and integrity.