/forgetful-encode-repo
Encode a repository into the Forgetful knowledge base — bootstrap the project, its entities, memories, and documents from the codebase itself. Use when bringing a new repo under Forgetful or refreshing a stale encoding. Re-encoding is an update pass: query-before-create makes it
$ npx -y skills add ScottRBK/forgetful --skill forgetful-encode-repo --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/forgetful-encode-repo
Context preview
The summary Claude sees to decide when to auto-load this skill.
Encode a repository into the Forgetful knowledge base — bootstrap the project, its entities, memories, and documents from the codebase itself. Use when bringing a new repo under Forgetful or refreshing a stale encoding. Re-encoding is an update pass: query-before-create makes it
SKILL.md
forgetful-encode-repo.SKILL.mdname: forgetful-encode-repo
description: >-
Encode a repository into the Forgetful knowledge base — bootstrap the project, its
entities, memories, and documents from the codebase itself. Use when bringing a new repo
under Forgetful or refreshing a stale encoding. Re-encoding is an update pass:
query-before-create makes it supersession, not duplication.
license: MIT
disable-model-invocation: true
tags: [bootstrap, encoding, repository, knowledge-base]
allowed-tools:
- mcp__forgetful__discover_forgetful_tools
- mcp__forgetful__how_to_use_forgetful_tool
- mcp__forgetful__execute_forgetful_tool
- Bash(forgetful:*)
Encoding a repository
The goal is a knowledge base a future session can lean on: the system modelled as entities, the decisions and conventions as atomic memories, the long-form understanding as documents, everything provenance-stamped back to the source. Encode twice and the second pass updates — never duplicates.
Invoking operations
Operations are named by registry name (`create_project`, `create_entity`, ...). Invoke via whichever surface this agent has:
- **MCP**: `execute_forgetful_tool(tool_name="create_project", arguments={...})`
- **CLI**: `forgetful call create_project --args '{"name": "..."}' --json`
Get any operation's schema at runtime: `how_to_use_forgetful_tool` (MCP) or `forgetful tools info <operation>` (CLI) — schemas are deliberately not repeated here.
Step 1 — Resolve the project
`git remote get-url origin` → `owner/repo` → `list_projects` with `repo_name`. Existing project means this run is a refresh; otherwise `create_project` with the repo name and a description of what the codebase is for.
Done when: a project_id exists and the run knows whether it is a first encode or a refresh.
Step 2 — Survey the sources
Read what the repo says about itself before reading code: README, docs/, contributor and agent guides, manifests (dependencies, entry points, scripts), CI and deploy configuration. Note the current commit — every write in this run cites it via provenance.
Done when: there is a source list of what will be encoded, ordered by signal.
Step 3 — Model the system as entities
Skills referenced by name below resolve via `search_skills` → `export_skill` when not already available. Per `forgetful-entities`: the system itself and its key components (services, packages, databases, external dependencies that matter) as `entity_type: "System"`, and their structure as relationships — `part_of` for composition, `depends_on` for coupling. Dedupe against existing entities on a refresh.
Done when: the architecture is walkable as a graph, components to system, dependencies out.
Step 4 — Store the knowledge
Two layers, per `forgetful-remember` (its routing, atomicity test, and importance rubric govern every write here):
- **Documents** for long-form understanding: architecture overviews, subsystem guides,
design analyses.
- **Atomic memories** as the entry points: decisions, conventions, patterns, constraints —
each linked to its document via `document_ids`, stamped with `source_repo` and `source_files`, and linked to the entities it concerns via a separate `link_entity_to_memory` call (not something `create_memory` does for you).
On a refresh, query first per source area: update what drifted, mark obsolete what the code contradicts, create only what is new.
Done when: each surveyed source area has produced its documents and entry-point memories, or explicitly had nothing worth encoding.
Step 5 — Report coverage
Close with a coverage report, in place of "done": project ID, entities created/updated, memories created/updated/obsoleted, documents written, source areas skipped and why, and the areas where knowledge is thin. Note repo-level gaps the survey turned up too — missing docs, absent CI, and the like — not only gaps in the encoding itself. Deliver the report in the final response to the user; it is not written anywhere in Forgetful. The report is the encode's acceptance surface — a reader should be able to spot a gap from it alone.
Done when: the report is delivered and honest about gaps.
Read more
name: forgetful-encode-repo description: >- Encode a repository into the Forgetful knowledge base — bootstrap the project, its entities, memories, and documents from the codebase itself. Use when bringing a new repo under Forgetful or refreshing a stale encoding. Re-encoding is an update pass: query-before-create makes it supersession, not duplication. license: MIT disable-model-invocation: true tags: [bootstrap, encoding, repository, knowledge-base] allowed-tools: - mcp__forgetful__discover_forgetful_tools - mcp__forgetful__how_to_use_forgetful_tool - mcp__forgetful__execute_forgetful_tool - Bash(forgetful:*)
Encoding a repository
The goal is a knowledge base a future session can lean on: the system modelled as entities, the decisions and conventions as atomic memories, the long-form understanding as documents, everything provenance-stamped back to the source. Encode twice and the second pass updates — never duplicates.
Invoking operations
Operations are named by registry name (`create_project`, `create_entity`, ...). Invoke via whichever surface this agent has:
- **MCP**: `execute_forgetful_tool(tool_name="create_project", arguments={...})`
- **CLI**: `forgetful call create_project --args '{"name": "..."}' --json`
Get any operation's schema at runtime: `how_to_use_forgetful_tool` (MCP) or `forgetful tools info <operation>` (CLI) — schemas are deliberately not repeated here.
Step 1 — Resolve the project
`git remote get-url origin` → `owner/repo` → `list_projects` with `repo_name`. Existing project means this run is a refresh; otherwise `create_project` with the repo name and a description of what the codebase is for.
Done when: a project_id exists and the run knows whether it is a first encode or a refresh.
Step 2 — Survey the sources
Read what the repo says about itself before reading code: README, docs/, contributor and agent guides, manifests (dependencies, entry points, scripts), CI and deploy configuration. Note the current commit — every write in this run cites it via provenance.
Done when: there is a source list of what will be encoded, ordered by signal.
Step 3 — Model the system as entities
Skills referenced by name below resolve via `search_skills` → `export_skill` when not already available. Per `forgetful-entities`: the system itself and its key components (services, packages, databases, external dependencies that matter) as `entity_type: "System"`, and their structure as relationships — `part_of` for composition, `depends_on` for coupling. Dedupe against existing entities on a refresh.
Done when: the architecture is walkable as a graph, components to system, dependencies out.
Step 4 — Store the knowledge
Two layers, per `forgetful-remember` (its routing, atomicity test, and importance rubric govern every write here):
- **Documents** for long-form understanding: architecture overviews, subsystem guides,
design analyses.
- **Atomic memories** as the entry points: decisions, conventions, patterns, constraints —
each linked to its document via `document_ids`, stamped with `source_repo` and `source_files`, and linked to the entities it concerns via a separate `link_entity_to_memory` call (not something `create_memory` does for you).
On a refresh, query first per source area: update what drifted, mark obsolete what the code contradicts, create only what is new.
Done when: each surveyed source area has produced its documents and entry-point memories, or explicitly had nothing worth encoding.
Step 5 — Report coverage
Close with a coverage report, in place of "done": project ID, entities created/updated, memories created/updated/obsoleted, documents written, source areas skipped and why, and the areas where knowledge is thin. Note repo-level gaps the survey turned up too — missing docs, absent CI, and the like — not only gaps in the encoding itself. Deliver the report in the final response to the user; it is not written anywhere in Forgetful. The report is the encode's acceptance surface — a reader should be able to spot a gap from it alone.
Done when: the report is delivered and honest about gaps.
Forgetful is a storage and retrieval tool for AI Agents. Designed as a Model Context Protocol (MCP) server built using the FastMCP framework.
Repo: ScottRBK/forgetful
Other skills on forgetful.
- /forgetful-cli-setup
Set up the Forgetful CLI and connect from a terminal — install, local or remote mode, auth, and verification. Use when connecting a human or headless agent via shell, wiring CI with token auth, or operating a local server (serve, database selection, feature flags, re-embedding).
Open skill - /forgetful-context-gather
Gather deep context before planning or implementing — one pass that turns a task description into a cited context pack: relevant decisions, patterns, constraints, code pointers, procedures, and explicit gaps. Runs recall from several angles, explores the graph around the
Open skill - /forgetful-entities
Model the things knowledge attaches to — people, organisations, devices, products, system components. Use when a new thing surfaces that memories will reference, when relationships between things need recording (owns, depends on, part of), or when another skill routes a
Open skill - /forgetful-explore
Explore the Forgetful knowledge graph when flat search isn't enough — cross-project investigations, "what do we know about X", entity-centred questions, tracing how decisions connect. Use when recall returns fragments that reference entities or trail across domains. Walks
Open skill - /forgetful-files
File binary content into the knowledge base — screenshots, PDFs, diagrams, fonts, assets. Use when a binary artifact is worth keeping alongside knowledge, or when a stored procedure needs a bundled asset. The description is the entire search surface: say what the file shows and
Open skill - /forgetful-mcp-setup
Set up an MCP client for Forgetful — wire Claude Code, Cursor, Copilot, Codex, Gemini, or OpenCode to the server and verify the connection behaves. Covers stdio vs HTTP transport, auth and scopes, the three meta-tools every client sees, and delegation to subagents.
Open skill

