Claude-skill-registry encode-repo-serena

Systematically populate the Forgetful knowledge base using Serena's LSP-powered

install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/encode-repo-serena" ~/.claude/skills/majiayu000-claude-skill-registry-encode-repo-serena && rm -rf "$T"
manifest: skills/data/encode-repo-serena/SKILL.md
source content

Encode Repository (Serena-Enhanced)

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

Quick Start

/encode-repo-serena
/encode-repo-serena ./my-project
"encode this repository"
"populate forgetful with this codebase"
InputOutputDuration
Codebase pathForgetful memories + entities + docs30-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

Phase Overview

PhaseFocusOutput
0DiscoveryProject assessment, structure map
1Foundation5-10 project overview memories
1BDependencies1-3 dependency memories
2Symbols10-15 architecture memories
2BEntitiesComponent entities + relationships
3Patterns8-12 pattern memories
4Features1-2 per critical feature
5DecisionsDesign decision memories
6ArtifactsCode artifact storage
6BSymbol IndexDocument + entry memory
7DocumentsLong-form documentation
7BArchitectureArchitecture reference doc

See references/phases.md for full phase details.

Memory Targets

ProfileTotal MemoriesDocumentsEntities
Small Simple17-3123-5
Small Complex28-4625-10
Medium38-662-310-20
Large66-1123-620-40

Execution Order

0 → 1 → 1B → 2 → 2B → 3 → 4 → 5 → 6 → 6B → 7 → 7B

Guidelines:

  • Execute phases in order
  • Use Serena's
    find_symbol
    and
    find_referencing_symbols
  • Deduplicate entities before creating
  • Link entities to memories bidirectionally
  • Create entry memories for documents

Quality Principles

PrincipleDescription
Symbol-accurateUse LSP data, not guesses
AtomicOne concept per memory
Size200-400 words ideal
ImportanceMost should be 7-8
LinkingConnect related memories

Validation Checklist

After completion:

  • Test memory search: "How do I add a new API endpoint?"
  • Test dependency query: "What dependencies does this project use?"
  • List entities by project
  • Verify entity relationships
  • Check Symbol Index document exists
  • Check Architecture Reference document exists
  • Verify project.notes populated

See references/validation.md for test commands.

References

DocumentContent
phases.mdDetailed phase workflows
templates.mdEntity schemas, memory templates
validation.mdValidation test commands

Related Skills

  • /context-hub-setup
    - Setup Forgetful MCP
  • /using-forgetful-memory
    - Memory best practices
  • /using-serena-symbols
    - Serena symbol analysis