[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71SMGHT45P3ZBHRM4WCSQYP":3,"skill-same:01M71SMGHT45P3ZBHRM4WCSQYP":62},{"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":23,"publishedAt":35,"linkOnly":36,"markdownContent":37,"markdownBody":38,"frontMatter":39,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":43,"repositoryHtmlUrl":44,"repositoryHomepageUrl":6,"ownerHtmlUrl":45,"ownerBlogUrl":6,"ownerDescription":46,"updatedAt":47,"install":48,"resources":61},"01M71SMGHT45P3ZBHRM4WCSQYP","index-knowledge",null,"Generate hierarchical AGENTS.md knowledge base for a codebase. Creates root + complexity-scored subdirectory documentation.","sanurb\u002F.dotfiles","sanurb","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F60886336?v=4","01M71SKJS17F5YPRE27CVMEH1X","Santiago U","01M71SKJSTGEXEQ82HMAQP4ZAF",2,"MIT","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fopencode\u002Fskills\u002Findex-knowledge\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000021","资料检索与研究","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34],"index knowledge","knowledge","index","complexity","for","documentation","knowledge base","generate","codebase","base","root","2026-11-10 13:02:02",false,"---\nname: index-knowledge\ndescription: Generate hierarchical AGENTS.md knowledge base for a codebase. Creates root + complexity-scored subdirectory documentation.\n---\n\n# index-knowledge\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n--create-new   # Read existing → remove all → regenerate from scratch\n--max-depth=2  # Limit directory depth (default: 5)\n```\n\nDefault: Update mode (modify existing + create new where warranted)\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n   - Launch parallel explore agents (multiple Task calls in one message)\n   - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n\u003Ccritical>\n**TodoWrite ALL phases. Mark in_progress → completed in real-time.**\n\n```\nTodoWrite([\n  { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n  { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n  { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n  { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n\n\u003C\u002Fcritical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Launch Parallel Explore Agents\n\nMultiple Task calls in a single message execute in parallel. Results return directly.\n\n```\n\u002F\u002F All Task calls in ONE message = parallel execution\n\nTask(\n  description=\"project structure\",\n  subagent_type=\"explore\",\n  prompt=\"Project structure: PREDICT standard patterns for detected language → REPORT deviations only\"\n)\n\nTask(\n  description=\"entry points\",\n  subagent_type=\"explore\",\n  prompt=\"Entry points: FIND main files → REPORT non-standard organization\"\n)\n\nTask(\n  description=\"conventions\",\n  subagent_type=\"explore\",\n  prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) → REPORT project-specific rules\"\n)\n\nTask(\n  description=\"anti-patterns\",\n  subagent_type=\"explore\",\n  prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments → LIST forbidden patterns\"\n)\n\nTask(\n  description=\"build\u002Fci\",\n  subagent_type=\"explore\",\n  prompt=\"Build\u002FCI: FIND .github\u002Fworkflows, Makefile → REPORT non-standard patterns\"\n)\n\nTask(\n  description=\"test patterns\",\n  subagent_type=\"explore\",\n  prompt=\"Test patterns: FIND test configs, test structure → REPORT unique conventions\"\n)\n```\n\n\u003Cdynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor                       | Threshold | Additional Agents          |\n| ---------------------------- | --------- | -------------------------- |\n| **Total files**              | >100      | +1 per 100 files           |\n| **Total lines**              | >10k      | +1 per 10k lines           |\n| **Directory depth**          | ≥4        | +2 for deep exploration    |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo**                 | detected  | +1 per package\u002Fworkspace   |\n| **Multiple languages**       | >1        | +1 per language            |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*\u002Fnode_modules\u002F*' -not -path '*\u002F.git\u002F*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*\u002Fnode_modules\u002F*' -exec wc -l {} + 2>\u002Fdev\u002Fnull | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*\u002Fnode_modules\u002F*' -exec wc -l {} + 2>\u002Fdev\u002Fnull | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*\u002Fnode_modules\u002F*' -not -path '*\u002F.git\u002F*' | awk -F\u002F '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning (all in ONE message for parallel execution):\n\n```\n\u002F\u002F 500 files, 50k lines, depth 6, 15 large files → spawn additional agents\nTask(\n  description=\"large files\",\n  subagent_type=\"explore\",\n  prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\"\n)\n\nTask(\n  description=\"deep modules\",\n  subagent_type=\"explore\",\n  prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\"\n)\n\nTask(\n  description=\"cross-cutting\",\n  subagent_type=\"explore\",\n  prompt=\"Cross-cutting concerns: FIND shared utilities across directories\"\n)\n\u002F\u002F ... more based on calculation\n```\n\n\u003C\u002Fdynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While Task agents execute**, main session does:\n\n#### 1. Bash Structural Analysis\n\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*\u002F\\.*' -not -path '*\u002Fnode_modules\u002F*' -not -path '*\u002Fvenv\u002F*' -not -path '*\u002Fdist\u002F*' -not -path '*\u002Fbuild\u002F*' | awk -F\u002F '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*\u002F\\.*' -not -path '*\u002Fnode_modules\u002F*' | sed 's|\u002F[^\u002F]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*\u002Fnode_modules\u002F*' | sed 's|\u002F[^\u002F]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md \u002F CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*\u002Fnode_modules\u002F*' 2>\u002Fdev\u002Fnull\n```\n\n#### 2. Read Existing AGENTS.md\n\n```\nFor each existing file found:\n  Read(filePath=file)\n  Extract: key insights, conventions, anti-patterns\n  Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) → then delete all → regenerate.\n\n#### 3. LSP Codemap (if available)\n\n```\nlsp_servers()  # Check availability\n\n# Entry points (parallel)\nlsp_document_symbols(filePath=\"src\u002Findex.ts\")\nlsp_document_symbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nlsp_workspace_symbols(filePath=\".\", query=\"class\")\nlsp_workspace_symbols(filePath=\".\", query=\"interface\")\nlsp_workspace_symbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nlsp_find_references(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n**Merge: bash + LSP + existing + Task agent results. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor               | Weight | High Threshold           | Source  |\n| -------------------- | ------ | ------------------------ | ------- |\n| File count           | 3x     | >20                      | bash    |\n| Subdir count         | 2x     | >5                       | bash    |\n| Code ratio           | 2x     | >70%                     | bash    |\n| Unique patterns      | 1x     | Has own config           | explore |\n| Module boundary      | 2x     | Has index.ts\u002F**init**.py | bash    |\n| Symbol density       | 2x     | >30 symbols              | LSP     |\n| Export count         | 2x     | >10 exports              | LSP     |\n| Reference centrality | 3x     | >20 refs                 | LSP     |\n\n### Decision Rules\n\n| Score        | Action                    |\n| ------------ | ------------------------- |\n| **Root (.)** | ALWAYS create             |\n| **>15**      | Create AGENTS.md          |\n| **8-15**     | Create if distinct domain |\n| **\u003C8**       | Skip (parent covers)      |\n\n### Output\n\n```\nAGENTS_LOCATIONS = [\n  { path: \".\", type: \"root\" },\n  { path: \"src\u002Fhooks\", score: 18, reason: \"high complexity\" },\n  { path: \"src\u002Fapi\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\n\\`\\`\\`\n{root}\u002F\n├── {dir}\u002F # {non-obvious purpose only}\n└── {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n\n| Task | Location | Notes |\n| ---- | -------- | ----- |\n\n## CODE MAP\n\n{From LSP - skip if unavailable or project \u003C10 files}\n\n| Symbol | Type | Location | Refs | Role |\n\n## CONVENTIONS\n\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n\n{Project-specific}\n\n## COMMANDS\n\n\\`\\`\\`bash\n{dev\u002Ftest\u002Fbuild}\n\\`\\`\\`\n\n## NOTES\n\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch general agents for each location in ONE message (parallel execution):\n\n```\n\u002F\u002F All in single message = parallel\nTask(\n  description=\"AGENTS.md for src\u002Fhooks\",\n  subagent_type=\"general\",\n  prompt=\"Generate AGENTS.md for: src\u002Fhooks\n    - Reason: high complexity\n    - 30-80 lines max\n    - NEVER repeat parent content\n    - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n    - Write directly to src\u002Fhooks\u002FAGENTS.md\"\n)\n\nTask(\n  description=\"AGENTS.md for src\u002Fapi\",\n  subagent_type=\"general\",\n  prompt=\"Generate AGENTS.md for: src\u002Fapi\n    - Reason: distinct domain\n    - 30-80 lines max\n    - NEVER repeat parent content\n    - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n    - Write directly to src\u002Fapi\u002FAGENTS.md\"\n)\n\u002F\u002F ... one Task per AGENTS_LOCATIONS entry\n```\n\n**Results return directly. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== index-knowledge Complete ===\n\nMode: {update | create-new}\n\nFiles:\n  ✓ .\u002FAGENTS.md (root, {N} lines)\n  ✓ .\u002Fsrc\u002Fhooks\u002FAGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n  .\u002FAGENTS.md\n  └── src\u002Fhooks\u002FAGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size\u002Fdepth\n- **Sequential execution**: MUST parallel (multiple Task calls in one message)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die\n","# index-knowledge\n\nGenerate hierarchical AGENTS.md files. Root + complexity-scored subdirectories.\n\n## Usage\n\n```\n--create-new   # Read existing → remove all → regenerate from scratch\n--max-depth=2  # Limit directory depth (default: 5)\n```\n\nDefault: Update mode (modify existing + create new where warranted)\n\n---\n\n## Workflow (High-Level)\n\n1. **Discovery + Analysis** (concurrent)\n   - Launch parallel explore agents (multiple Task calls in one message)\n   - Main session: bash structure + LSP codemap + read existing AGENTS.md\n2. **Score & Decide** - Determine AGENTS.md locations from merged findings\n3. **Generate** - Root first, then subdirs in parallel\n4. **Review** - Deduplicate, trim, validate\n\n\u003Ccritical>\n**TodoWrite ALL phases. Mark in_progress → completed in real-time.**\n\n```\nTodoWrite([\n  { id: \"discovery\", content: \"Fire explore agents + LSP codemap + read existing\", status: \"pending\", priority: \"high\" },\n  { id: \"scoring\", content: \"Score directories, determine locations\", status: \"pending\", priority: \"high\" },\n  { id: \"generate\", content: \"Generate AGENTS.md files (root + subdirs)\", status: \"pending\", priority: \"high\" },\n  { id: \"review\", content: \"Deduplicate, validate, trim\", status: \"pending\", priority: \"medium\" }\n])\n```\n\n\u003C\u002Fcritical>\n\n---\n\n## Phase 1: Discovery + Analysis (Concurrent)\n\n**Mark \"discovery\" as in_progress.**\n\n### Launch Parallel Explore Agents\n\nMultiple Task calls in a single message execute in parallel. Results return directly.\n\n```\n\u002F\u002F All Task calls in ONE message = parallel execution\n\nTask(\n  description=\"project structure\",\n  subagent_type=\"explore\",\n  prompt=\"Project structure: PREDICT standard patterns for detected language → REPORT deviations only\"\n)\n\nTask(\n  description=\"entry points\",\n  subagent_type=\"explore\",\n  prompt=\"Entry points: FIND main files → REPORT non-standard organization\"\n)\n\nTask(\n  description=\"conventions\",\n  subagent_type=\"explore\",\n  prompt=\"Conventions: FIND config files (.eslintrc, pyproject.toml, .editorconfig) → REPORT project-specific rules\"\n)\n\nTask(\n  description=\"anti-patterns\",\n  subagent_type=\"explore\",\n  prompt=\"Anti-patterns: FIND 'DO NOT', 'NEVER', 'ALWAYS', 'DEPRECATED' comments → LIST forbidden patterns\"\n)\n\nTask(\n  description=\"build\u002Fci\",\n  subagent_type=\"explore\",\n  prompt=\"Build\u002FCI: FIND .github\u002Fworkflows, Makefile → REPORT non-standard patterns\"\n)\n\nTask(\n  description=\"test patterns\",\n  subagent_type=\"explore\",\n  prompt=\"Test patterns: FIND test configs, test structure → REPORT unique conventions\"\n)\n```\n\n\u003Cdynamic-agents>\n**DYNAMIC AGENT SPAWNING**: After bash analysis, spawn ADDITIONAL explore agents based on project scale:\n\n| Factor                       | Threshold | Additional Agents          |\n| ---------------------------- | --------- | -------------------------- |\n| **Total files**              | >100      | +1 per 100 files           |\n| **Total lines**              | >10k      | +1 per 10k lines           |\n| **Directory depth**          | ≥4        | +2 for deep exploration    |\n| **Large files (>500 lines)** | >10 files | +1 for complexity hotspots |\n| **Monorepo**                 | detected  | +1 per package\u002Fworkspace   |\n| **Multiple languages**       | >1        | +1 per language            |\n\n```bash\n# Measure project scale first\ntotal_files=$(find . -type f -not -path '*\u002Fnode_modules\u002F*' -not -path '*\u002F.git\u002F*' | wc -l)\ntotal_lines=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" -o -name \"*.go\" \\) -not -path '*\u002Fnode_modules\u002F*' -exec wc -l {} + 2>\u002Fdev\u002Fnull | tail -1 | awk '{print $1}')\nlarge_files=$(find . -type f \\( -name \"*.ts\" -o -name \"*.py\" \\) -not -path '*\u002Fnode_modules\u002F*' -exec wc -l {} + 2>\u002Fdev\u002Fnull | awk '$1 > 500 {count++} END {print count+0}')\nmax_depth=$(find . -type d -not -path '*\u002Fnode_modules\u002F*' -not -path '*\u002F.git\u002F*' | awk -F\u002F '{print NF}' | sort -rn | head -1)\n```\n\nExample spawning (all in ONE message for parallel execution):\n\n```\n\u002F\u002F 500 files, 50k lines, depth 6, 15 large files → spawn additional agents\nTask(\n  description=\"large files\",\n  subagent_type=\"explore\",\n  prompt=\"Large file analysis: FIND files >500 lines, REPORT complexity hotspots\"\n)\n\nTask(\n  description=\"deep modules\",\n  subagent_type=\"explore\",\n  prompt=\"Deep modules at depth 4+: FIND hidden patterns, internal conventions\"\n)\n\nTask(\n  description=\"cross-cutting\",\n  subagent_type=\"explore\",\n  prompt=\"Cross-cutting concerns: FIND shared utilities across directories\"\n)\n\u002F\u002F ... more based on calculation\n```\n\n\u003C\u002Fdynamic-agents>\n\n### Main Session: Concurrent Analysis\n\n**While Task agents execute**, main session does:\n\n#### 1. Bash Structural Analysis\n\n```bash\n# Directory depth + file counts\nfind . -type d -not -path '*\u002F\\.*' -not -path '*\u002Fnode_modules\u002F*' -not -path '*\u002Fvenv\u002F*' -not -path '*\u002Fdist\u002F*' -not -path '*\u002Fbuild\u002F*' | awk -F\u002F '{print NF-1}' | sort -n | uniq -c\n\n# Files per directory (top 30)\nfind . -type f -not -path '*\u002F\\.*' -not -path '*\u002Fnode_modules\u002F*' | sed 's|\u002F[^\u002F]*$||' | sort | uniq -c | sort -rn | head -30\n\n# Code concentration by extension\nfind . -type f \\( -name \"*.py\" -o -name \"*.ts\" -o -name \"*.tsx\" -o -name \"*.js\" -o -name \"*.go\" -o -name \"*.rs\" \\) -not -path '*\u002Fnode_modules\u002F*' | sed 's|\u002F[^\u002F]*$||' | sort | uniq -c | sort -rn | head -20\n\n# Existing AGENTS.md \u002F CLAUDE.md\nfind . -type f \\( -name \"AGENTS.md\" -o -name \"CLAUDE.md\" \\) -not -path '*\u002Fnode_modules\u002F*' 2>\u002Fdev\u002Fnull\n```\n\n#### 2. Read Existing AGENTS.md\n\n```\nFor each existing file found:\n  Read(filePath=file)\n  Extract: key insights, conventions, anti-patterns\n  Store in EXISTING_AGENTS map\n```\n\nIf `--create-new`: Read all existing first (preserve context) → then delete all → regenerate.\n\n#### 3. LSP Codemap (if available)\n\n```\nlsp_servers()  # Check availability\n\n# Entry points (parallel)\nlsp_document_symbols(filePath=\"src\u002Findex.ts\")\nlsp_document_symbols(filePath=\"main.py\")\n\n# Key symbols (parallel)\nlsp_workspace_symbols(filePath=\".\", query=\"class\")\nlsp_workspace_symbols(filePath=\".\", query=\"interface\")\nlsp_workspace_symbols(filePath=\".\", query=\"function\")\n\n# Centrality for top exports\nlsp_find_references(filePath=\"...\", line=X, character=Y)\n```\n\n**LSP Fallback**: If unavailable, rely on explore agents + AST-grep.\n\n**Merge: bash + LSP + existing + Task agent results. Mark \"discovery\" as completed.**\n\n---\n\n## Phase 2: Scoring & Location Decision\n\n**Mark \"scoring\" as in_progress.**\n\n### Scoring Matrix\n\n| Factor               | Weight | High Threshold           | Source  |\n| -------------------- | ------ | ------------------------ | ------- |\n| File count           | 3x     | >20                      | bash    |\n| Subdir count         | 2x     | >5                       | bash    |\n| Code ratio           | 2x     | >70%                     | bash    |\n| Unique patterns      | 1x     | Has own config           | explore |\n| Module boundary      | 2x     | Has index.ts\u002F**init**.py | bash    |\n| Symbol density       | 2x     | >30 symbols              | LSP     |\n| Export count         | 2x     | >10 exports              | LSP     |\n| Reference centrality | 3x     | >20 refs                 | LSP     |\n\n### Decision Rules\n\n| Score        | Action                    |\n| ------------ | ------------------------- |\n| **Root (.)** | ALWAYS create             |\n| **>15**      | Create AGENTS.md          |\n| **8-15**     | Create if distinct domain |\n| **\u003C8**       | Skip (parent covers)      |\n\n### Output\n\n```\nAGENTS_LOCATIONS = [\n  { path: \".\", type: \"root\" },\n  { path: \"src\u002Fhooks\", score: 18, reason: \"high complexity\" },\n  { path: \"src\u002Fapi\", score: 12, reason: \"distinct domain\" }\n]\n```\n\n**Mark \"scoring\" as completed.**\n\n---\n\n## Phase 3: Generate AGENTS.md\n\n**Mark \"generate\" as in_progress.**\n\n### Root AGENTS.md (Full Treatment)\n\n```markdown\n# PROJECT KNOWLEDGE BASE\n\n**Generated:** {TIMESTAMP}\n**Commit:** {SHORT_SHA}\n**Branch:** {BRANCH}\n\n## OVERVIEW\n\n{1-2 sentences: what + core stack}\n\n## STRUCTURE\n\n\\`\\`\\`\n{root}\u002F\n├── {dir}\u002F # {non-obvious purpose only}\n└── {entry}\n\\`\\`\\`\n\n## WHERE TO LOOK\n\n| Task | Location | Notes |\n| ---- | -------- | ----- |\n\n## CODE MAP\n\n{From LSP - skip if unavailable or project \u003C10 files}\n\n| Symbol | Type | Location | Refs | Role |\n\n## CONVENTIONS\n\n{ONLY deviations from standard}\n\n## ANTI-PATTERNS (THIS PROJECT)\n\n{Explicitly forbidden here}\n\n## UNIQUE STYLES\n\n{Project-specific}\n\n## COMMANDS\n\n\\`\\`\\`bash\n{dev\u002Ftest\u002Fbuild}\n\\`\\`\\`\n\n## NOTES\n\n{Gotchas}\n```\n\n**Quality gates**: 50-150 lines, no generic advice, no obvious info.\n\n### Subdirectory AGENTS.md (Parallel)\n\nLaunch general agents for each location in ONE message (parallel execution):\n\n```\n\u002F\u002F All in single message = parallel\nTask(\n  description=\"AGENTS.md for src\u002Fhooks\",\n  subagent_type=\"general\",\n  prompt=\"Generate AGENTS.md for: src\u002Fhooks\n    - Reason: high complexity\n    - 30-80 lines max\n    - NEVER repeat parent content\n    - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n    - Write directly to src\u002Fhooks\u002FAGENTS.md\"\n)\n\nTask(\n  description=\"AGENTS.md for src\u002Fapi\",\n  subagent_type=\"general\",\n  prompt=\"Generate AGENTS.md for: src\u002Fapi\n    - Reason: distinct domain\n    - 30-80 lines max\n    - NEVER repeat parent content\n    - Sections: OVERVIEW (1 line), STRUCTURE (if >5 subdirs), WHERE TO LOOK, CONVENTIONS (if different), ANTI-PATTERNS\n    - Write directly to src\u002Fapi\u002FAGENTS.md\"\n)\n\u002F\u002F ... one Task per AGENTS_LOCATIONS entry\n```\n\n**Results return directly. Mark \"generate\" as completed.**\n\n---\n\n## Phase 4: Review & Deduplicate\n\n**Mark \"review\" as in_progress.**\n\nFor each generated file:\n\n- Remove generic advice\n- Remove parent duplicates\n- Trim to size limits\n- Verify telegraphic style\n\n**Mark \"review\" as completed.**\n\n---\n\n## Final Report\n\n```\n=== index-knowledge Complete ===\n\nMode: {update | create-new}\n\nFiles:\n  ✓ .\u002FAGENTS.md (root, {N} lines)\n  ✓ .\u002Fsrc\u002Fhooks\u002FAGENTS.md ({N} lines)\n\nDirs Analyzed: {N}\nAGENTS.md Created: {N}\nAGENTS.md Updated: {N}\n\nHierarchy:\n  .\u002FAGENTS.md\n  └── src\u002Fhooks\u002FAGENTS.md\n```\n\n---\n\n## Anti-Patterns\n\n- **Static agent count**: MUST vary agents based on project size\u002Fdepth\n- **Sequential execution**: MUST parallel (multiple Task calls in one message)\n- **Ignoring existing**: ALWAYS read existing first, even with --create-new\n- **Over-documenting**: Not every dir needs AGENTS.md\n- **Redundancy**: Child never repeats parent\n- **Generic content**: Remove anything that applies to ALL projects\n- **Verbose style**: Telegraphic or die\n",{"name":5,"description":7},"main","5acbba39180bbea80204d1a58db40ccbd813a13a","config\u002Fopencode\u002Fskills\u002Findex-knowledge",0,"https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles","https:\u002F\u002Fgithub.com\u002Fsanurb","Building things","2026-11-08 21:22:35",{"source":8,"skillName":5,"commands":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add sanurb\u002F.dotfiles --skill index-knowledge",{"tool":54,"command":55},"bunx","bunx skills add sanurb\u002F.dotfiles --skill index-knowledge",{"tool":57,"command":58},"pnpm","pnpm dlx skills add sanurb\u002F.dotfiles --skill index-knowledge","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fopencode\u002Fskills\u002Findex-knowledge\u002FSKILL.md",true,[],[63,87,115,142,160,187],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":77,"publishedAt":35},"01M71SS19VAM2YZ2SA7HD0PT2P","writing-great-skills","Reference for writing and editing skills well — the vocabulary and principles that make a skill predictable.","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fpi\u002Fagent\u002Fskills\u002Fwriting-great-skills\u002FSKILL.md",[69,72],{"categoryNo":70,"categoryName":71,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":73,"categoryName":74,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[78,79,80,28,81,82,83,84,85,86],"writing great skills","writing","principles","editing","a skill","true","reference","make","vocabulary",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":96,"publishedAt":35},"01M71SRXKJN6RYXPN9GFRVYSR3","write-discoverable-code","Rules for writing code that coding agents (and humans) can find and understand through\nplain-text search. Apply whenever writing or renaming code: functions, types, constants,\nfiles, error messages, doc comments.\n\nGrounded in measurement: agents navigate by plain-text search, not by AST or\nlanguage server, so every identifier is a search query and every search miss\ncosts wasted reads.","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fpi\u002Fagent\u002Fskills\u002Fwrite-discoverable-code\u002FSKILL.md",[93],{"categoryNo":94,"categoryName":95,"taxonomyType":75,"taxonomyTypeDesc":76},"01JBSEEDCAT000000000000030","开发工程师",[97,98,99,100,101,102,103,104,28,105,106,107,108,109,79,110,111,112,113,114],"write discoverable code","code","discoverable code","write","measurement","error","types","error messages","search","messages","constants","plain-text","files","Rules","query","apply","comments","can",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":124,"publishedAt":35},"01M71SRT760335ES5WSEAAQDN2","wrangler","Cloudflare Workers CLI for deploying, developing, and managing Workers, KV, R2, D1, Vectorize, Hyperdrive, Workers AI, Containers, Queues, Workflows, Pipelines, and Secrets Store. Load before running wrangler commands to ensure correct syntax and best practices. Biases towards retrieval from Cloudflare docs over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fpi\u002Fagent\u002Fskills\u002Fwrangler\u002FSKILL.md",[121],{"categoryNo":122,"categoryName":123,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",[117,125,126,25,127,128,129,130,131,132,133,134,135,28,136,137,138,139,140,141],"cloudflare","d1","workflows","cli","secrets","commands","syntax","cloudflare workers","r2","queues","running","containers","correct","load","workers","best practices","store",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":35},"01M71SRPHE452V400HD2EZC4XG","workers-best-practices","Reviews and authors Cloudflare Workers code against production best practices. Load when writing new Workers, reviewing Worker code, configuring wrangler.jsonc, or checking for common Workers anti-patterns (streaming, floating promises, global state, secrets, bindings, observability). Biases towards retrieval from Cloudflare docs over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fpi\u002Fagent\u002Fskills\u002Fworkers-best-practices\u002FSKILL.md",[],[149,139,140,150,151,152,28,125,153,25,154,117,79,138,155,98,156,157,158,159],"workers best practices","observability","reviews","promises","worker","new","when","common","streaming","state","anti-patterns",{"skillNo":161,"name":162,"nameZh":6,"description":163,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":164,"categories":165,"keywords":169,"publishedAt":35},"01M71SRJ36HWMTQ9ZMQ2RB008S","web-perf","Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (LCP, INP, CLS) and supplementary metrics (FCP, TBT, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. Biases towards retrieval from current documentation over pre-trained knowledge.","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fpi\u002Fagent\u002Fskills\u002Fweb-perf\u002FSKILL.md",[166],{"categoryNo":167,"categoryName":168,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[170,171,172,173,174,175,176,177,178,179,25,180,155,181,29,182,183,184,185,186],"web perf","perf","web","resources","vitals","chrome devtools","performance","render","issues","devtools","MCP","caching","optimize","layout","audit","dependency","network",{"skillNo":188,"name":189,"nameZh":6,"description":190,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":191,"categories":192,"keywords":193,"publishedAt":35},"01M71SREWXFKFN6DM80YCCQZ46","wayfinder","Plan a huge chunk of work — more than one agent session can hold — as a shared map of decision tickets on your issue tracker, and resolve them one at a time until the way to the destination is clear.","https:\u002F\u002Fgithub.com\u002Fsanurb\u002F.dotfiles\u002Fblob\u002Fmain\u002Fconfig\u002Fpi\u002Fagent\u002Fskills\u002Fwayfinder\u002FSKILL.md",[],[189,194,195,196,197,198,199,83,200,201,202,203,114,204,205,206,207,208,209,210],"shared","as","chunk","time","session","decision","more","map","one","one at a time","agent session","work","plan","tracker","tickets","at","destination"]