[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"pack-detail-legacy-code-onboarding-en":3,"seo:pack:legacy-code-onboarding:en":98},{"code":4,"message":5,"data":6},200,"操作成功",{"pack":7},{"slug":8,"icon":9,"tone":10,"status":11,"status_label":12,"title":13,"description":14,"items":15,"install_cmd":97},"legacy-code-onboarding","🗺️","#7C3AED","new","New · this week","Legacy Code Onboarding Kit — Land in a 10-Year Codebase","You joined a team. The repo is 10 years old, 800k LOC, three dead microservices, one heroic engineer who left. Ten picks that turn an AI agent into your onboarding partner: index the repo, map the architecture, generate call graphs, summarize modules, flag dead code, then write the CLAUDE.md\u002FAGENTS.md the team never had. Codebase Memory MCP + Codebase Explorer + Pattern Finder + ast-index + CodeGraphContext + Graphify + Legacy Modernizer + Technical Debt Manager + CLAUDE.md template + Architect Reviewer.",[16,28,38,45,55,62,69,76,83,91],{"id":17,"uuid":18,"slug":19,"title":20,"description":21,"author_name":22,"view_count":23,"vote_count":24,"lang_type":25,"type":26,"type_label":27},852,"a3fe5165-33ca-11f1-9bc6-00163e2b0d79","codebase-memory-mcp-code-intelligence-ai-agents-a3fe5165","Codebase Memory MCP — Code Intelligence for AI Agents","High-performance code intelligence MCP server. Indexes repos in milliseconds via tree-sitter AST, supports 66 languages, sub-ms graph queries. MIT, 1,300+ stars.","MCP Hub",220,0,"en","mcp","MCP",{"id":29,"uuid":30,"slug":31,"title":32,"description":33,"author_name":34,"view_count":35,"vote_count":24,"lang_type":25,"type":36,"type_label":37},4389,"7b3ad600-e85c-4e84-812f-d3ef57b62b16","claude-code-agent-codebase-explorer-7b3ad600","Claude Code Agent: Codebase Explorer","|","TokRepo精选",24,"skill","Skill",{"id":39,"uuid":40,"slug":41,"title":42,"description":43,"author_name":34,"view_count":44,"vote_count":24,"lang_type":25,"type":36,"type_label":37},4390,"bb32e488-ee43-44ed-9458-30755eee7cad","claude-code-agent-codebase-pattern-finder-bb32e488","Claude Code Agent: Codebase Pattern Finder","Specialist for finding code patterns and examples in the codebase, providing concrete implementations that can serve as templates for new work",21,{"id":46,"uuid":47,"slug":48,"title":49,"description":50,"author_name":51,"view_count":52,"vote_count":24,"lang_type":25,"type":53,"type_label":54},3702,"8af1d19c-c287-537f-a08f-d3ab7d1a144f","ast-index-fast-code-search-for-agents","ast-index — Fast Code Search for Agents","ast-index builds an AST index for fast code search and integrates with Claude\u002FCodex\u002FCursor; verified 347★ and installs via Homebrew.","Script Depot",80,"script","Script",{"id":56,"uuid":57,"slug":58,"title":59,"description":60,"author_name":22,"view_count":61,"vote_count":24,"lang_type":25,"type":26,"type_label":27},3218,"c1dbc5db-1dde-463c-b63b-5c0393595eb6","codegraphcontext-graph-index-for-code-mcp","CodeGraphContext — Graph Index for Code + MCP","CodeGraphContext indexes a repo into a code graph so developers and agents can query call chains, dependencies, and architecture via CLI or MCP mode.",56,{"id":63,"uuid":64,"slug":65,"title":66,"description":67,"author_name":51,"view_count":68,"vote_count":24,"lang_type":25,"type":53,"type_label":54},3072,"e38149fa-1a44-425e-9c82-2bd8eb4d9c6c","graphify-repo-knowledge-graph-mcp","Graphify — Repo Knowledge Graph + MCP","Graphify extracts docs\u002Fcode into a knowledge graph and can install as an MCP\u002Fskill across Claude Code, Cursor, Codex, and Gemini CLI. Install via uv\u002Fpipx.",107,{"id":70,"uuid":71,"slug":72,"title":73,"description":74,"author_name":34,"view_count":75,"vote_count":24,"lang_type":25,"type":36,"type_label":37},4505,"dccb0175-e306-4c4b-ba7c-039b28f8847b","claude-code-agent-legacy-modernizer-dccb0175","Claude Code Agent: Legacy Modernizer","Use this agent when modernizing legacy systems that need incremental migration strategies, technical debt reduction, and risk mitigation while maintaining business continuity. Specifically:\\\\n\\\\n\u003Cexample>\\\\nContext: A development team has a 15-year-old mono...",23,{"id":77,"uuid":78,"slug":79,"title":80,"description":81,"author_name":34,"view_count":82,"vote_count":24,"lang_type":25,"type":36,"type_label":37},4410,"6285fca6-68a4-4b43-bbdc-0fc70327a3ef","claude-code-agent-technical-debt-manager-6285fca6","Claude Code Agent: Technical Debt Manager","Expert technical debt analyst for code health, maintainability, and strategic refactoring planning. Use PROACTIVELY when codebase shows complexity growth, when planning...",25,{"id":84,"uuid":85,"slug":86,"title":87,"description":88,"author_name":89,"view_count":90,"vote_count":24,"lang_type":25,"type":36,"type_label":37},813,"b152c845-95bc-493e-af27-b7f882e8896b","claude-code-claude-md-best-practices-template-b152c845","Claude Code CLAUDE.md — Best Practices Template","Production-tested CLAUDE.md template for Claude Code projects. Covers coding conventions, test requirements, git workflow, and project-specific AI instructions.","Skill Factory",245,{"id":92,"uuid":93,"slug":94,"title":95,"description":96,"author_name":34,"view_count":82,"vote_count":24,"lang_type":25,"type":36,"type_label":37},4383,"a8044a3f-4d19-4012-b1b4-ae98d3a98174","claude-code-agent-architect-reviewer-a8044a3f","Claude Code Agent: Architect Reviewer","Use this agent when you need to evaluate system design decisions, architectural patterns, and technology choices at the macro level. Specifically:\\ \\ \\ Context: Team has...","tokrepo install pack\u002Flegacy-code-onboarding",{"pageType":99,"pageKey":8,"locale":25,"title":100,"metaDescription":101,"h1":102,"tldr":103,"bodyMarkdown":104,"faq":105,"schema":121,"internalLinks":127,"citations":140,"wordCount":153,"generatedAt":154},"pack","Legacy Code Onboarding Kit — Land Fast in a 10-Year-Old Codebase","Ten AI tools that turn a sprawling legacy repo into a navigable map: index the code, generate call graphs, summarize modules, flag dead code, and bootstrap the CLAUDE.md \u002F AGENTS.md the team never wrote. Opinionated order for week-one engineers.","Legacy Code Onboarding Kit — Make AI Map the Codebase Before You Do","Ten picks in deliberate order: index the repo, explore architecture, find recurring patterns, build a structural call graph, summarize each module, mark dead code, then write the CLAUDE.md\u002FAGENTS.md your team should have had. By Friday you can describe the system to a stranger and open a credible first PR.","## Who this is for\n\nYou just joined a team. The repo is **8 to 12 years old**, hundreds of thousands of lines, three half-dead microservices, conflicting naming conventions, and the one engineer who knew it all left two months ago. There is no `ARCHITECTURE.md`. The README still references Python 2. The wiki is on a Confluence instance nobody can find the URL for.\n\nThis is the situation a curated AI toolchain actually solves. Not by reading the code for you — by giving you a navigable map fast enough that **week one becomes productive instead of demoralising**.\n\nThis pack is opinionated about order. Each tool in the chain produces an artifact the next tool consumes. If you install them at random you get noise; if you install them in this sequence you get a working mental model by Friday.\n\n## Install in this order\n\n1. **Codebase Memory MCP** — index first. Persistent code knowledge graph that an MCP-aware agent (Claude Code, Cursor, Windsurf) can query directly. Run it on day one so every later question is answered against a real index instead of grep guesses.\n2. **Claude Code Agent: Codebase Explorer** — broad map. Walks the repo and produces a high-level module\u002Fservice inventory: where the entry points are, which packages call which, what the test layout looks like.\n3. **Claude Code Agent: Codebase Pattern Finder** — recurring patterns. Surfaces repeated idioms, custom abstractions, and the tribal-knowledge wrappers that veterans built on top of the standard library. This is where you learn the **team's local dialect**.\n4. **ast-index** — fast structural search. Tree-sitter-backed CLI for AST-level queries (`find every place that calls X with arg shape Y`). Replaces ripgrep when you need structure, not text.\n5. **CodeGraphContext** — call graph as MCP. Builds a queryable graph of function and class relationships. Now the agent can answer *what calls this?* and *what breaks if I change this signature?* with edges, not vibes.\n6. **Graphify** — repo-wide dependency graph. Layers module-to-module and file-to-file edges on top of the call graph. The diagram you wish someone had drawn five years ago, generated in five minutes.\n7. **Claude Code Agent: Legacy Modernizer** — module summaries. Reads each module against the graphs above and writes a paragraph: what it does, who calls it, what it depends on, what looks rotten. Save these as `docs\u002Fmodules\u002F*.md` — your team will thank you.\n8. **Claude Code Agent: Technical Debt Manager** — dead code and debt. Cross-references the call graph with git blame and test coverage to flag unreachable code, untested critical paths, and modules nobody has touched since 2019. Output is a triage list, not a delete script.\n9. **Claude Code CLAUDE.md — Best Practices Template** — write the file the team never had. Use the inventory + summaries + debt list to draft a `CLAUDE.md` (and parallel `AGENTS.md` for tool-agnostic agents) that tells the next new hire where the bodies are buried.\n10. **Claude Code Agent: Architect Reviewer** — your first PR. Before you open a real PR, run the architect-reviewer agent on your diff. It catches the convention you didn't know existed, the layer you accidentally crossed, and the public API you broke by renaming.\n\n## How the chain produces value\n\n```\nCodebase Memory MCP  ──┐\n                       ├── shared index\nast-index ─────────────┤\n                       │\nCodebase Explorer ─────┤───►  module\u002Fservice inventory\nPattern Finder ────────┤───►  team-specific idioms\n                       │\nCodeGraphContext ──────┤───►  call edges\nGraphify ──────────────┤───►  module edges\n                       │\nLegacy Modernizer ─────┴───►  per-module summaries (docs\u002Fmodules\u002F*.md)\nTechnical Debt Manager ────►  triage list (docs\u002Fdebt.md)\n                            │\n                            ▼\n        CLAUDE.md  +  AGENTS.md  ◄── you write this\n                            │\n                            ▼\n         first PR + Architect Reviewer pass\n```\n\nThe critical insight: steps 1-6 build **structured context** the team has been missing. Steps 7-8 turn that context into prose and triage. Step 9 is the writeup that future engineers (and future agents) will rely on. Step 10 keeps your first PR from embarrassing you.\n\n## Tradeoffs you'll hit\n\n- **Index everything vs index incrementally** — Codebase Memory MCP and CodeGraphContext both want a full index up front. On a 1M-line repo this can take 30-90 minutes the first time. Run it overnight; the rest of the week is sub-second queries.\n- **MCP server vs CLI** — ast-index works as a plain CLI; CodeGraphContext and Codebase Memory MCP shine inside an MCP-aware agent. Pick CLI if you're stuck on a tool that doesn't speak MCP; pick MCP if your agent does.\n- **Auto-generated docs vs handwritten** — the per-module summaries the Legacy Modernizer agent produces are a *first draft*, not a final document. Treat them as starting material you edit, not as authoritative.\n- **Dead code: flag vs delete** — never let an agent delete dead code on a legacy repo. It will be wrong about cron-scheduled callers, dynamic dispatch, and reflection. Flag, review with a veteran, delete by hand.\n- **CLAUDE.md vs AGENTS.md** — Claude Code reads `CLAUDE.md`, generic agents read `AGENTS.md`. Keep them as the same content with two filenames (symlink or generate from one source) so multi-tool teams don't fork.\n\n## Common pitfalls\n\n- **Skipping the index step** — every later tool degrades to grep-quality output without it. Don't.\n- **Trusting the call graph 100%** — reflection, dependency injection, and YAML-configured routes are invisible to static analysis. Verify hot paths with a runtime trace before refactoring.\n- **Writing CLAUDE.md from agent output alone** — talk to a veteran for 30 minutes before finalising. They will name three landmines no graph can see.\n- **Modernising before you understand** — Legacy Modernizer is named provocatively. Use it to summarise first, modernise much later. Week-one rewrites are how new hires get reverted.\n- **Skipping Architect Reviewer on the first PR** — first impressions matter. A 10-minute reviewer pass catches the convention violation that would otherwise eat your code-review thread for three days.",[106,109,112,115,118],{"q":107,"a":108},"Won't an AI agent just hallucinate the architecture?","It will if you let it answer from raw file context. That's exactly why the first three picks (Codebase Memory MCP, Codebase Explorer, Pattern Finder) exist: they build a structured index the agent queries instead of guessing. Hallucination drops sharply when the answer is grounded in a real graph rather than a 200k-token window of best-guess source files. Verify the first few answers against the code by hand; once they line up, trust grows reasonably.",{"q":110,"a":111},"How long does indexing a million-line repo actually take?","Plan 30 to 90 minutes the first time for Codebase Memory MCP and CodeGraphContext on a mid-size laptop. ast-index is much faster, usually under five minutes. Run the heavy indexers overnight on day one; subsequent queries are sub-second. Incremental reindex on file save is supported by all three and adds only milliseconds per change.",{"q":113,"a":114},"Can I really write a useful CLAUDE.md in week one?","Yes, if you treat the output as a draft and pair it with one veteran review. The per-module summaries, debt triage, and team-idiom list give you a structured first draft most teams have never had. Spend 30 minutes with a long-tenured engineer marking what's wrong, then ship version 0.1 of CLAUDE.md and AGENTS.md. Iterate weekly. The team will start contributing once they see something concrete to correct.",{"q":116,"a":117},"Why both CLAUDE.md and AGENTS.md — isn't one enough?","Claude Code reads CLAUDE.md by convention; tool-agnostic agents (Codex, Cursor, OpenCode, generic agent SDKs) increasingly look for AGENTS.md. Keeping both with the same content covers every agent the team might use in the next two years. Symlink them or generate from a single source-of-truth file to avoid drift.",{"q":119,"a":120},"What if my repo is private and I can't send code to a cloud LLM?","All ten picks support local-first or self-hosted deployment. Codebase Memory MCP, CodeGraphContext, Graphify, and ast-index run entirely on your machine. The Claude Code subagents and CLAUDE.md template work with any model the agent can talk to, including local Ollama or vLLM endpoints. You can complete the entire pack without a single byte of code leaving the laptop.",{"@context":122,"@type":123,"name":124,"description":125,"numberOfItems":126,"inLanguage":25},"https:\u002F\u002Fschema.org","ItemList","Legacy Code Onboarding Kit","Ten AI tools curated and ordered to onboard an engineer into a decade-old legacy codebase: index, map, graph, summarize, flag debt, and write the CLAUDE.md\u002FAGENTS.md the team never had.",10,[128,132,136],{"url":129,"anchor":130,"reason":131},"\u002Fen\u002Fai-tools-for\u002Fcode-intelligence","AI code intelligence tools","Code indexers and graph builders that complement this onboarding chain",{"url":133,"anchor":134,"reason":135},"\u002Fen\u002Ftopics\u002Fagent-frameworks-multilang","Agent frameworks across languages","Pair these onboarding tools with the agent framework that matches your stack",{"url":137,"anchor":138,"reason":139},"\u002Fen\u002Ftopics","Browse other topic packs","Discover packs for AI agents, MCP servers, and engineer toolkits",[141,145,149],{"claim":142,"source_name":143,"source_url":144},"Tree-sitter provides language-aware parsing used by AST search tools","Tree-sitter documentation","https:\u002F\u002Ftree-sitter.github.io\u002Ftree-sitter\u002F",{"claim":146,"source_name":147,"source_url":148},"Model Context Protocol is the open standard MCP servers implement","Model Context Protocol","https:\u002F\u002Fmodelcontextprotocol.io\u002F",{"claim":150,"source_name":151,"source_url":152},"Anthropic documents CLAUDE.md as a project-level instruction file for Claude Code","Claude Code documentation","https:\u002F\u002Fdocs.claude.com\u002Fen\u002Fdocs\u002Fclaude-code\u002Fmemory",910,"2026-05-22T10:00:00Z"]