[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M71F030F7D3QH8CTSNK4QD9D":3,"skill-same:01M71F030F7D3QH8CTSNK4QD9D":74},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":56,"repositoryHtmlUrl":57,"repositoryHomepageUrl":6,"ownerHtmlUrl":58,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":59,"install":60,"resources":73},"01M71F030F7D3QH8CTSNK4QD9D","codegraph-worktree",null,"Initialize and refresh the CodeGraph symbol index for the current worktree or workspace. Trigger: entering or creating a worktree where code will be edited, after large refactors, or when codegraph query\u002Fexplore results look stale for files changed on a branch.","parada1104\u002Fai-specs-cli","parada1104","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F57575053?v=4","01M71EZZV71KAFZKJ47FQ99ZVS","01M71EZZW7JJBY2VAWA5HRD944",0,"MIT","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Fai-specs\u002Fskills\u002Fcodegraph-worktree\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"worktree","codegraph","codegraph worktree","stale","workspace","results","work","refresh","fresh","code","query","when","files","missing","explore","trigger","runtime","for","branch","initialize","2026-11-10 10:12:30",false,"---\nname: codegraph-worktree\ndescription: >\n  Initialize and refresh the CodeGraph symbol index for the current worktree or\n  workspace. Trigger: entering or creating a worktree where code will be edited,\n  after large refactors, or when codegraph query\u002Fexplore results look stale for\n  files changed on a branch.\nlicense: MIT\nmetadata:\n  author: ai-specs\n  version: \"1.0\"\n  scope: [root, runtime]\n  auto_invoke:\n    - \"Starting work in a fresh worktree where code will be edited\"\n    - \"Reindexing code after a large refactor on a branch\"\n    - \"Codegraph query or explore returned stale or missing symbols\"\n---\n\n# CodeGraph Worktree Index\n\n## Why this exists\n\nCodeGraph indexes **per workspace**: the `.codegraph\u002F` index is machine-local and\ngit-ignored, so `git worktree add` never brings it over. A fresh worktree has **no\nindex**, and the main checkout's index does **not** cover worktree paths — querying it\nfrom a worktree session silently misses files created or changed on the branch.\n\nVerified facts (2026-09-02, ai-specs-cli):\n\n- `.codegraph\u002F.gitignore` (written by the tool) ignores everything except itself:\n  the database, daemon files, and logs are never committed.\n- The Pi-native `codegraph` tool (registered by gentle-pi's `codegraph-tools.ts`\n  extension) resolves the index from the current workspace only and never accepts\n  external paths or shell commands.\n- If the `codegraph` binary is missing, the tool reports `unavailable` and falls back\n  to `read` \u002F `grep` \u002F `find` — install it with `npm install -g @colbymchenry\u002Fcodegraph`.\n\n## When to run `codegraph init`\n\n| Situation | Action |\n|---|---|\n| Fresh worktree created; you will edit code there | Run `codegraph init` in the worktree root |\n| Entering an existing worktree with no `.codegraph\u002F` | Run `codegraph init` before symbol queries |\n| Large refactor landed on the branch (new\u002Frenamed symbols) | Re-run `codegraph init` to refresh the graph |\n| Read-only exploration only | Skip — the main checkout's index is fine |\n\n## How\n\n1. Confirm you are in the right workspace root:\n   `git rev-parse --show-toplevel` (must equal the directory you will index).\n2. In Pi, use the native tool: `codegraph` with `operation: \"init\"`. Outside Pi or\n   from a script, use the binary: `codegraph init` (run from the worktree root).\n3. Verify: `.codegraph\u002Fcodegraph.db` exists in that worktree.\n\n## Freshness rules (do not skip)\n\n- `query`\u002F`explore` re-read **source** from disk live, but **symbol\u002Fcall-path data\n  (callers, blast radius) is only as fresh as the last index run**.\n- For any critical decision based on blast radius (\"who calls this?\"), corroborate\n  with `grep` before acting — grep cannot be stale.\n- CodeGraph does not index shell scripts or prose: for `.sh` logic and docs, use\n  `grep`\u002F`git log -S` directly.\n\n## Never\n\n- Never commit `.codegraph\u002F` — it is a regenerable, machine-local build artifact\n  (the tool's own `.gitignore` enforces this).\n- Never run `codegraph init` in `$HOME` or a temp directory — the tool refuses\n  (it requires a real Git project root).\n- Never treat a stale index as proof of absence: \"no callers found\" may only mean\n  \"not re-indexed since the caller was added\".\n","# CodeGraph Worktree Index\n\n## Why this exists\n\nCodeGraph indexes **per workspace**: the `.codegraph\u002F` index is machine-local and\ngit-ignored, so `git worktree add` never brings it over. A fresh worktree has **no\nindex**, and the main checkout's index does **not** cover worktree paths — querying it\nfrom a worktree session silently misses files created or changed on the branch.\n\nVerified facts (2026-09-02, ai-specs-cli):\n\n- `.codegraph\u002F.gitignore` (written by the tool) ignores everything except itself:\n  the database, daemon files, and logs are never committed.\n- The Pi-native `codegraph` tool (registered by gentle-pi's `codegraph-tools.ts`\n  extension) resolves the index from the current workspace only and never accepts\n  external paths or shell commands.\n- If the `codegraph` binary is missing, the tool reports `unavailable` and falls back\n  to `read` \u002F `grep` \u002F `find` — install it with `npm install -g @colbymchenry\u002Fcodegraph`.\n\n## When to run `codegraph init`\n\n| Situation | Action |\n|---|---|\n| Fresh worktree created; you will edit code there | Run `codegraph init` in the worktree root |\n| Entering an existing worktree with no `.codegraph\u002F` | Run `codegraph init` before symbol queries |\n| Large refactor landed on the branch (new\u002Frenamed symbols) | Re-run `codegraph init` to refresh the graph |\n| Read-only exploration only | Skip — the main checkout's index is fine |\n\n## How\n\n1. Confirm you are in the right workspace root:\n   `git rev-parse --show-toplevel` (must equal the directory you will index).\n2. In Pi, use the native tool: `codegraph` with `operation: \"init\"`. Outside Pi or\n   from a script, use the binary: `codegraph init` (run from the worktree root).\n3. Verify: `.codegraph\u002Fcodegraph.db` exists in that worktree.\n\n## Freshness rules (do not skip)\n\n- `query`\u002F`explore` re-read **source** from disk live, but **symbol\u002Fcall-path data\n  (callers, blast radius) is only as fresh as the last index run**.\n- For any critical decision based on blast radius (\"who calls this?\"), corroborate\n  with `grep` before acting — grep cannot be stale.\n- CodeGraph does not index shell scripts or prose: for `.sh` logic and docs, use\n  `grep`\u002F`git log -S` directly.\n\n## Never\n\n- Never commit `.codegraph\u002F` — it is a regenerable, machine-local build artifact\n  (the tool's own `.gitignore` enforces this).\n- Never run `codegraph init` in `$HOME` or a temp directory — the tool refuses\n  (it requires a real Git project root).\n- Never treat a stale index as proof of absence: \"no callers found\" may only mean\n  \"not re-indexed since the caller was added\".\n",{"name":5,"license":14,"metadata":43,"description":52},{"scope":44,"author":46,"version":47,"auto_invoke":48},[45,34],"root","ai-specs","1.0",[49,50,51],"Starting work in a fresh worktree where code will be edited","Reindexing code after a large refactor on a branch","Codegraph query or explore returned stale or missing symbols","Initialize and refresh the CodeGraph symbol index for the current worktree or workspace. Trigger: entering or creating a worktree where code will be edited, after large refactors, or when codegraph query\u002Fexplore results look stale for files changed on a branch.\n","main","c092fc1f51280350a4434827e2f6d6d99e3431ca","ai-specs\u002Fskills\u002Fcodegraph-worktree",2,"https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli","https:\u002F\u002Fgithub.com\u002Fparada1104","2026-11-15 03:00:26",{"source":8,"skillName":5,"commands":61,"prompt":71,"zipAvailable":72},[62,65,68],{"tool":63,"command":64},"npx","npx skills add parada1104\u002Fai-specs-cli --skill codegraph-worktree",{"tool":66,"command":67},"bunx","bunx skills add parada1104\u002Fai-specs-cli --skill codegraph-worktree",{"tool":69,"command":70},"pnpm","pnpm dlx skills add parada1104\u002Fai-specs-cli --skill codegraph-worktree","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Fai-specs\u002Fskills\u002Fcodegraph-worktree\u002FSKILL.md",true,[],[75,87,98,107,116,126],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":38},"01M71F2TF9TS9DNCJ68M7C3B5S","test-skill","Test skill for fixture purposes.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Frecipes\u002Ftest-fixture\u002Fskills\u002Ftest-skill\u002FSKILL.md",[],[82,83,35,45,84,85,86],"Test Skill","test","fixtures","fixture","testing",{"skillNo":88,"name":89,"nameZh":6,"description":90,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":38},"01M71F2RTH94ZB7XEAW4P6ZG0D","obsidian-markdown","Fixture skill for obsidian-markdown.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fobsidian-markdown\u002FSKILL.md",[],[94,95,96,35,85,97],"markdown","obsidian markdown","obsidian","fixture skill",{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":38},"01M71F2R20CPTJXD9F7DP4JPP6","obsidian-cli","Fixture skill for obsidian-cli.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fobsidian-cli\u002FSKILL.md",[],[105,96,106,35,85,97],"obsidian cli","cli",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":38},"01M71F2PCH4NWVTT1J57SHJX33","obsidian-bases","Fixture skill for obsidian-bases.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fobsidian-bases\u002FSKILL.md",[],[114,115,96,35,85,97],"bases","obsidian bases",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":38},"01M71F2MSS6EVFEYVYAA1KBYCC","json-canvas","Fixture skill for json-canvas.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fjson-canvas\u002FSKILL.md",[],[123,124,125,97,85,35],"json","json canvas","canvas",{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":38},"01M71F2KY5QVNEN1Q3REFB0MQZ","defuddle","Fixture skill for defuddle.","https:\u002F\u002Fgithub.com\u002Fparada1104\u002Fai-specs-cli\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fkepano-obsidian-skills\u002Fskills\u002Fdefuddle\u002FSKILL.md",[],[128,97,85,35]]