encode-repo-serena

encode-repo-serena is a skill for Claude Code from rjmurillo/ai-agents. It costs 97 tokens per session (1,362 once invoked), scanned A, original, MIT.

A process for building a searchable knowledge base about a code repository using symbol analysis, which examines named code elements such as functions and classes. It is designed to work with Forgetful, a tool for storing and searching project knowledge.

In plain words
What is it for?
Use it to onboard to a repository, populate or refresh its Forgetful knowledge, and rebuild that understanding after major codebase changes.
Why use it?
Undocumented or frequently changing codebases are harder to understand and onboard to. This records the repository's structure and relationships so later searches can provide better context.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Part of the project-toolkit plugin — 113 skills, 26 commands, 33 agents, 4 hooks shipped together

Good fit Use it to onboard to a repository, populate or refresh its Forgetful knowledge, and rebuild that understanding after major codebase changes.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/rjmurillo/ai-agents/encode-repo-serena
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.

Any agent
npx skills add rjmurillo/ai-agents --skill encode-repo-serena
Clone the repo
git clone --depth 1 https://github.com/rjmurillo/ai-agents

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 113 skills, 26 commands, 33 agents, 4 hooks.

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

agentmods badge for encode-repo-serena

README.md
[![agentmods](https://agentmods.dev/badge/skills/rjmurillo/ai-agents/encode-repo-serena/github.svg)](https://agentmods.dev/skills/rjmurillo/ai-agents/encode-repo-serena)
Your own site
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/encode-repo-serena"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/encode-repo-serena/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for encode-repo-serena

Your own site · 80×15
<a href="https://agentmods.dev/skills/rjmurillo/ai-agents/encode-repo-serena"><img src="https://agentmods.dev/badge/skills/rjmurillo/ai-agents/encode-repo-serena.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,362 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.1 $0.00097 $0.01362
Opus 5 $0.00048 $0.00681
Sonnet 5 $0.00019 $0.00272
Haiku 4.5 $0.00010 $0.00136

Measured 6d ago against content hash d45ef5476c07, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

encode-repo-serena 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 6d 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.

.claude/skills/encode-repo-serena/SKILL.md · 185 lines

How it starts

The opening of the file, as written. The whole thing — 185 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Encode Repository (Serena-Enhanced)

Transform an undocumented codebase into a rich, searchable knowledge repository using Serena's LSP-powered symbol analysis.

Triggers

Trigger Phrase Operation
encode this repository Full 12-phase encoding pipeline
populate forgetful with this codebase Full encoding pipeline
onboard to this repo Discovery + foundation phases
refresh project understanding Re-run encoding on updated codebase
build knowledge base for this project Full encoding pipeline

When to Use

Use this skill when:

  • Onboarding to a new repository that lacks Forgetful knowledge
  • Repository structure has changed significantly since last encoding
  • Forgetful searches return sparse or outdated results for the project

Use research-and-incorporate instead when:

  • Researching an external topic, not encoding a codebase
  • You need analysis of a single concept, not full repository encoding

Quick Start

/encode-repo-serena
/encode-repo-serena ./my-project
"encode this repository"
"populate forgetful with this codebase"
Input Output Duration
Codebase path Forgetful memories + entities + docs 30-60 min

Prerequisites

  1. Serena plugin: claude plugins list | grep serena
  2. Forgetful MCP: Test with execute_forgetful_tool("list_projects", {})
  3. If missing, run /context-hub-setup first

Process

Phase 0: Discovery

Assess project size, complexity, and structure. Produce a structure map.

Phase 1: Foundation

Create 5-10 project overview memories covering purpose, tech stack, and entry points.

Phase 1B: Dependencies

Create 1-3 dependency memories documenting external libraries and internal references.

Phase 2: Symbols

Use Serena find_symbol and find_referencing_symbols to produce 10-15 architecture memories.

Phase 2B: Entities

Create component entities with relationships in Forgetful. Deduplicate before creating.

Read the full file on GitHub · 185 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 6d ago First seen · 185 lines · 97 tokens per session scan A d45ef5476c07

Subscribe to this mod's changes

encode-repo-serena is a skill published in the GitHub repository rjmurillo/ai-agents (45 stars, last pushed today), licensed MIT. It adds 97 tokens to every session and 1,362 once invoked, about $0.0005 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-09-03.