[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M79XDHJC8PGECCVZVR1SCSFM":3,"skill-same:01M79XDHJC8PGECCVZVR1SCSFM":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":33,"commitSha":34,"skillDirectory":35,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":39,"updatedAt":40,"install":41,"resources":53},"01M79XDHJC8PGECCVZVR1SCSFM","map",null,"Structural codebase index generator. Builds a compact JSON map of files, exports, imports, dependency graph, and roles. Queryable by keyword. Injected into fleet agents as context slices to reduce token usage on code navigation.","mayankjain1815-commits\u002FCITADEL","mayankjain1815-commits","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F234472344?v=4","01M79X9599EWEQTD62DMNTEG7X","Mayank jain","01M79X95AA0KDFTN1Z1A6DQTX1",4,"MIT","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fmap\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: map\nlicense: MIT\ndescription: >-\n  Structural codebase index generator. Builds a compact JSON map of files,\n  exports, imports, dependency graph, and roles. Queryable by keyword. Injected\n  into fleet agents as context slices to reduce token usage on code navigation.\nuser-invocable: true\nauto-trigger: false\ntrigger_keywords:\n  - map\n  - index codebase\n  - codebase map\n  - structural index\n  - scan codebase\n  - map stats\n  - map query\nlast-updated: 2026-03-29\n---\n\n# \u002Fmap -- Codebase Intelligence\n\n## Orientation\n\nUse `\u002Fmap` when:\n- Starting work on an unfamiliar codebase (build the index first)\n- A fleet or archon campaign needs agents to know \"what files matter for X\"\n- You want a quick structural overview (stats, roles, dependency graph)\n- You need to find files related to a keyword without exploratory reads\n\nDo not use `\u002Fmap` for:\n- Reading file contents (use Read)\n- Searching for string patterns inside files (use Grep)\n- Single-file edits where you already know the path\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fmap` | Generate or refresh the index (skips if cache is fresh) |\n| `\u002Fmap --force` | Rebuild the index even if cache is fresh |\n| `\u002Fmap query \u003Cterms>` | Search the index for files matching keywords |\n| `\u002Fmap stats` | Print summary statistics (files, lines, languages, roles) |\n| `\u002Fmap slice \u003Cterms>` | Output a compact context slice for agent injection |\n| `\u002Fmap stale` | Detect added, changed, or removed indexed source files |\n\n## Protocol\n\n### Step 1: GENERATE INDEX\n\nRun the index generator:\n\n```bash\nnode scripts\u002Fmap-index.js --generate --root .\n```\n\nAdd `--force` if the user requested a fresh rebuild or if the index is stale.\n\nThe generator:\n1. Walks the project tree (respects `.gitignore`, skips `node_modules`, `dist`, etc.)\n2. Extracts exports, imports, and symbols from each source file\n3. Infers a role for each file (component, hook, store, route, test, config, etc.)\n4. Builds a dependency graph from resolved import paths\n5. Records per-file SHA-256 hashes plus a whole-index source signature\n6. Extracts route-like paths and package verification scripts\n7. Writes the index to `.planning\u002Fmap\u002Findex.json`\n\n**Supported languages:** TypeScript, JavaScript, Python, Go, Rust.\n\n**Cache behavior:** The index is cached for 5 minutes. Subsequent runs within\nthat window exit immediately unless `--force` is passed.\n\nIf `.planning\u002Fmap\u002F` does not exist, the generator creates it automatically.\n\n### Step 2: QUERY (when user provides search terms)\n\n```bash\nnode scripts\u002Fmap-index.js --query \"\u003Cterms>\"\n```\n\nThe query engine scores files by:\n- Path match: +3 per term\n- Export match: +5 per term\n- Symbol match: +2 per term\n- Role match: +1 per term\n\nResults are sorted by score and capped at 20 files (configurable with `--max-files`).\nOutput is budget-capped at 8000 characters to stay injection-safe.\n\n### Step 3: STATS (structural overview)\n\n```bash\nnode scripts\u002Fmap-index.js --stats\n```\n\nOutputs: file count, line count, export count, dependency edge count, route count,\npackage script count, verification command count, breakdown by language, and\nbreakdown by role.\n\n### Step 4: SLICE (agent context injection)\n\nWhen another skill or orchestrator needs a map slice for agent injection:\n\n1. Run `node scripts\u002Fmap-index.js --slice \"\u003Cscope terms>\" --max-files 15`\n2. Inject the generated compact block:\n\n```\n=== MAP SLICE: \u003Cterms> ===\nGenerated: \u003Ctimestamp>\nVerification: npm run test | npm run typecheck\n\u003Cscore> \u003Crole>  \u003Cpath>  [\u003Ctop exports>]  (\u003Clines>L)\n...\n=== END MAP SLICE ===\n```\n\n3. The calling skill injects this block into the agent's prompt alongside\n   CLAUDE.md and rules-summary.md\n\n**Token budget:** A 15-file slice is typically 800-1200 tokens. This replaces\n2000-5000 tokens of exploratory Glob\u002FGrep results that agents would otherwise\nspend finding relevant files.\n\n### Step 5: STALENESS CHECK\n\nBefore injecting an existing map into a long-running campaign, run:\n\n```bash\nnode scripts\u002Fmap-index.js --stale\n```\n\nThe command exits `0` when the map is current and `2` when indexed source files\nwere added, changed, or removed. Refresh with:\n\n```bash\nnode scripts\u002Fmap-index.js --generate --force --root .\n```\n\n## Fleet Integration\n\nFleet agents receive map slices automatically when `\u002Fmap` index exists:\n\n1. Before spawning each wave, Fleet checks if `.planning\u002Fmap\u002Findex.json` exists\n2. If it exists: Fleet runs a slice scoped to each agent's assigned domain\n3. The generated slice is prepended to the agent's context alongside CLAUDE.md\n   and rules-summary.md\n4. If the index does not exist: Fleet proceeds without a map slice (no error)\n\n**Context injection order:**\n1. CLAUDE.md content\n2. `.claude\u002Fagent-context\u002Frules-summary.md`\n3. **Map slice** (scoped to agent's domain\u002Fdirection)\n4. Campaign-specific direction and scope\n5. Discovery briefs from previous waves\n\n## Contextual Gates\n\n**Disclosure:** \"Generating codebase map. Creates `.planning\u002Fmap\u002Findex.json`.\"\n**Reversibility:** green — creates `.planning\u002Fmap\u002Findex.json` only; undo by deleting `.planning\u002Fmap\u002F`.\n**Trust gates:**\n- Any: generate index, query, stats, slice.\n\n## Quality Gates\n\n- Index must generate without errors on any supported project\n- Query must return results sorted by relevance score\n- Stats output must be human-scannable in under 5 seconds\n- Slice output must stay under 2000 tokens for a 15-file result\n- Index must handle 100K+ line repos without hanging (iterative walker, no recursion limits)\n- Cache must prevent redundant regeneration within the TTL window\n- Stale checks must detect added, changed, and removed indexed source files\n- Slice output must include relevant verification commands when package scripts exist\n\n## Fringe Cases\n\n- **No source files found**: Generator writes an empty index (`fileCount: 0`). Query returns no results. Not an error.\n- **`.planning\u002F` does not exist**: Generator creates `.planning\u002Fmap\u002F` automatically via `mkdirSync({ recursive: true })`.\n- **Index file missing when querying**: Error message: \"Index not found. Run `node scripts\u002Fmap-index.js --generate` first.\"\n- **Binary or unsupported files**: Silently skipped. Only files with recognized language extensions are indexed.\n- **Very large repos (10K+ files)**: The walker is iterative (stack-based), not recursive. No stack overflow risk. May take 5-10 seconds on first run.\n- **Windows paths**: All stored paths use forward slashes for cross-platform consistency.\n\n## Exit Protocol\n\nAfter generation:\n```\nIndex written: \u003Cpath>\n  \u003Cfile count> files, \u003Cedge count> dependency links\n  \u003Croute count> routes, \u003Cverification command count> verification commands\n```\n\nAfter query:\n```\nResults for \"\u003Cterms>\" (\u003Ccount> matches):\n  Score  Role        Path\n  -----------------------------------------------\n  \u003Cresults>\n```\n\nAfter stats: print the full statistics block.\n\nAfter slice: output the formatted slice block ready for injection.\n\nAfter stale check:\n```\nMap index is current.\n```\n\nor:\n\n```\nMap index is stale.\nChanged: \u003Cpaths>\nAdded: \u003Cpaths>\nRemoved: \u003Cpaths>\n```\n\nReversibility: green — delete `.planning\u002Fmap\u002F` to remove all generated artifacts; no source files modified.\n","# \u002Fmap -- Codebase Intelligence\n\n## Orientation\n\nUse `\u002Fmap` when:\n- Starting work on an unfamiliar codebase (build the index first)\n- A fleet or archon campaign needs agents to know \"what files matter for X\"\n- You want a quick structural overview (stats, roles, dependency graph)\n- You need to find files related to a keyword without exploratory reads\n\nDo not use `\u002Fmap` for:\n- Reading file contents (use Read)\n- Searching for string patterns inside files (use Grep)\n- Single-file edits where you already know the path\n\n## Commands\n\n| Command | Behavior |\n|---|---|\n| `\u002Fmap` | Generate or refresh the index (skips if cache is fresh) |\n| `\u002Fmap --force` | Rebuild the index even if cache is fresh |\n| `\u002Fmap query \u003Cterms>` | Search the index for files matching keywords |\n| `\u002Fmap stats` | Print summary statistics (files, lines, languages, roles) |\n| `\u002Fmap slice \u003Cterms>` | Output a compact context slice for agent injection |\n| `\u002Fmap stale` | Detect added, changed, or removed indexed source files |\n\n## Protocol\n\n### Step 1: GENERATE INDEX\n\nRun the index generator:\n\n```bash\nnode scripts\u002Fmap-index.js --generate --root .\n```\n\nAdd `--force` if the user requested a fresh rebuild or if the index is stale.\n\nThe generator:\n1. Walks the project tree (respects `.gitignore`, skips `node_modules`, `dist`, etc.)\n2. Extracts exports, imports, and symbols from each source file\n3. Infers a role for each file (component, hook, store, route, test, config, etc.)\n4. Builds a dependency graph from resolved import paths\n5. Records per-file SHA-256 hashes plus a whole-index source signature\n6. Extracts route-like paths and package verification scripts\n7. Writes the index to `.planning\u002Fmap\u002Findex.json`\n\n**Supported languages:** TypeScript, JavaScript, Python, Go, Rust.\n\n**Cache behavior:** The index is cached for 5 minutes. Subsequent runs within\nthat window exit immediately unless `--force` is passed.\n\nIf `.planning\u002Fmap\u002F` does not exist, the generator creates it automatically.\n\n### Step 2: QUERY (when user provides search terms)\n\n```bash\nnode scripts\u002Fmap-index.js --query \"\u003Cterms>\"\n```\n\nThe query engine scores files by:\n- Path match: +3 per term\n- Export match: +5 per term\n- Symbol match: +2 per term\n- Role match: +1 per term\n\nResults are sorted by score and capped at 20 files (configurable with `--max-files`).\nOutput is budget-capped at 8000 characters to stay injection-safe.\n\n### Step 3: STATS (structural overview)\n\n```bash\nnode scripts\u002Fmap-index.js --stats\n```\n\nOutputs: file count, line count, export count, dependency edge count, route count,\npackage script count, verification command count, breakdown by language, and\nbreakdown by role.\n\n### Step 4: SLICE (agent context injection)\n\nWhen another skill or orchestrator needs a map slice for agent injection:\n\n1. Run `node scripts\u002Fmap-index.js --slice \"\u003Cscope terms>\" --max-files 15`\n2. Inject the generated compact block:\n\n```\n=== MAP SLICE: \u003Cterms> ===\nGenerated: \u003Ctimestamp>\nVerification: npm run test | npm run typecheck\n\u003Cscore> \u003Crole>  \u003Cpath>  [\u003Ctop exports>]  (\u003Clines>L)\n...\n=== END MAP SLICE ===\n```\n\n3. The calling skill injects this block into the agent's prompt alongside\n   CLAUDE.md and rules-summary.md\n\n**Token budget:** A 15-file slice is typically 800-1200 tokens. This replaces\n2000-5000 tokens of exploratory Glob\u002FGrep results that agents would otherwise\nspend finding relevant files.\n\n### Step 5: STALENESS CHECK\n\nBefore injecting an existing map into a long-running campaign, run:\n\n```bash\nnode scripts\u002Fmap-index.js --stale\n```\n\nThe command exits `0` when the map is current and `2` when indexed source files\nwere added, changed, or removed. Refresh with:\n\n```bash\nnode scripts\u002Fmap-index.js --generate --force --root .\n```\n\n## Fleet Integration\n\nFleet agents receive map slices automatically when `\u002Fmap` index exists:\n\n1. Before spawning each wave, Fleet checks if `.planning\u002Fmap\u002Findex.json` exists\n2. If it exists: Fleet runs a slice scoped to each agent's assigned domain\n3. The generated slice is prepended to the agent's context alongside CLAUDE.md\n   and rules-summary.md\n4. If the index does not exist: Fleet proceeds without a map slice (no error)\n\n**Context injection order:**\n1. CLAUDE.md content\n2. `.claude\u002Fagent-context\u002Frules-summary.md`\n3. **Map slice** (scoped to agent's domain\u002Fdirection)\n4. Campaign-specific direction and scope\n5. Discovery briefs from previous waves\n\n## Contextual Gates\n\n**Disclosure:** \"Generating codebase map. Creates `.planning\u002Fmap\u002Findex.json`.\"\n**Reversibility:** green — creates `.planning\u002Fmap\u002Findex.json` only; undo by deleting `.planning\u002Fmap\u002F`.\n**Trust gates:**\n- Any: generate index, query, stats, slice.\n\n## Quality Gates\n\n- Index must generate without errors on any supported project\n- Query must return results sorted by relevance score\n- Stats output must be human-scannable in under 5 seconds\n- Slice output must stay under 2000 tokens for a 15-file result\n- Index must handle 100K+ line repos without hanging (iterative walker, no recursion limits)\n- Cache must prevent redundant regeneration within the TTL window\n- Stale checks must detect added, changed, and removed indexed source files\n- Slice output must include relevant verification commands when package scripts exist\n\n## Fringe Cases\n\n- **No source files found**: Generator writes an empty index (`fileCount: 0`). Query returns no results. Not an error.\n- **`.planning\u002F` does not exist**: Generator creates `.planning\u002Fmap\u002F` automatically via `mkdirSync({ recursive: true })`.\n- **Index file missing when querying**: Error message: \"Index not found. Run `node scripts\u002Fmap-index.js --generate` first.\"\n- **Binary or unsupported files**: Silently skipped. Only files with recognized language extensions are indexed.\n- **Very large repos (10K+ files)**: The walker is iterative (stack-based), not recursive. No stack overflow risk. May take 5-10 seconds on first run.\n- **Windows paths**: All stored paths use forward slashes for cross-platform consistency.\n\n## Exit Protocol\n\nAfter generation:\n```\nIndex written: \u003Cpath>\n  \u003Cfile count> files, \u003Cedge count> dependency links\n  \u003Croute count> routes, \u003Cverification command count> verification commands\n```\n\nAfter query:\n```\nResults for \"\u003Cterms>\" (\u003Ccount> matches):\n  Score  Role        Path\n  -----------------------------------------------\n  \u003Cresults>\n```\n\nAfter stats: print the full statistics block.\n\nAfter slice: output the formatted slice block ready for injection.\n\nAfter stale check:\n```\nMap index is current.\n```\n\nor:\n\n```\nMap index is stale.\nChanged: \u003Cpaths>\nAdded: \u003Cpaths>\nRemoved: \u003Cpaths>\n```\n\nReversibility: green — delete `.planning\u002Fmap\u002F` to remove all generated artifacts; no source files modified.\n",{"name":5,"license":15,"description":7,"auto-trigger":20,"last-updated":24,"user-invocable":25,"trigger_keywords":26},1774742400000,true,[5,27,28,29,30,31,32],"index codebase","codebase map","structural index","scan codebase","map stats","map query","main","49119fa06efc769f502bede04ad99746ac20f021","skills\u002Fmap",0,"https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits","2nd-yr EEE 📍 Bangalore | Python, C, Java, C# | ML, NLP & Flask backends | Building AI tools that ship 🚀 | Open to hackathons & collabs","2026-11-14 14:46:28",{"source":8,"skillName":5,"commands":42,"prompt":52,"zipAvailable":25},[43,46,49],{"tool":44,"command":45},"npx","npx skills add mayankjain1815-commits\u002FCITADEL --skill map",{"tool":47,"command":48},"bunx","bunx skills add mayankjain1815-commits\u002FCITADEL --skill map",{"tool":50,"command":51},"pnpm","pnpm dlx skills add mayankjain1815-commits\u002FCITADEL --skill map","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fmap\u002FSKILL.md",[],[55,62,69,76,83,90],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M79XH1DBMXQEF9N0Q6NW7Q5P","workspace","Multi-repo campaign coordinator. Same lifecycle as fleet -- scope claims, discovery relay, wave-based execution -- but the unit of work is a repo, not a file. Coordinates campaigns across repositories with shared context.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fworkspace\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M79XGWJJHSKNTH78TNVX09VK","wiki","Markdown-first knowledge base where the LLM acts as librarian. Ingests raw sources, compiles and interlinks topic files, self-maintains an index. No vector DB or embeddings required -- uses LLM-native navigation over structured markdown up to ~400K words.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fwiki\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M79XGNW2YTFHVMEZGZDEDN43","watch","File sentinel that monitors the working directory for changes and marker comments, then auto-triggers appropriate skills. Poll-based via git diff against the last scan commit. Writes intake items for batch processing and routes marker actions through \u002Fdo. Use for automatic reactions to file changes; do NOT use for one-off inspection or tasks needing human judgment per file.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fwatch\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M79XGHZ0028HDW7SDT186D6Q","verify","Self-test the Citadel hook pipeline from within a live session. Exercises real tool calls (Write, Edit, Bash, Read) and checks that hooks fired, telemetry accumulated, and no errors occurred. Reports HOOK HEALTH: PASS or HOOK HEALTH: FAIL with a per-hook breakdown.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Fverify\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M79XGDKHMADJXC27T0FMQAN3","unharness","Remove Citadel from a project. Exports valuable state (campaigns, postmortems, research, backlog, discoveries) to docs\u002Fcitadel\u002F as human-readable markdown, then removes all harness files and hooks. The archive is detected by \u002Fdo setup on re-install and offered for restore.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Funharness\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":19},"01M79XG81A3RHP2TKKBT5WYEY2","triage","GitHub issue and PR investigator. Pulls open issues\u002FPRs, classifies them, searches the codebase for root cause or reviews contributed code, proposes fixes with file:line references, and optionally implements fixes. Use for investigating GitHub issues and reviewing PRs; do NOT use for general code review unrelated to GitHub issues.","https:\u002F\u002Fgithub.com\u002Fmayankjain1815-commits\u002FCITADEL\u002Fblob\u002Fmain\u002Fskills\u002Ftriage\u002FSKILL.md",[],[]]