codegraph-worktree-startup
Use when starting or resuming code work in a repository. Verify CodeGraph, initialize or sync the local graph, keep indexes uncommitted, and prefer graph queries before broad file reads.
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 0
- Forks
- 3
01 前言 Front Matter
- name
- codegraph-worktree-startup
- description
- Use when starting or resuming code work in a repository. Verify CodeGraph, initialize or sync the local graph, keep indexes uncommitted, and prefer graph queries before broad file reads.
03 SKILL.md 正文
CodeGraph Worktree Startup
Use CodeGraph as repository startup hygiene for coding tasks. The goal is faster, more accurate code navigation without committing local index artifacts.
Startup
Confirm the tool and repository root:
command -v codegraph
git rev-parse --show-toplevel
If codegraph is unavailable and the user has not authorized installing it,
say so briefly and use normal repository exploration.
Keep the generated index out of source control:
root="$(git rev-parse --show-toplevel)"
grep -qxF '.codegraph/' "$(git rev-parse --git-path info/exclude)" || printf '\n.codegraph/\n' >> "$(git rev-parse --git-path info/exclude)"
If an index already exists, sync it before relying on it:
codegraph sync "$root"
codegraph status "$root"
If no index exists, initialize one before code exploration unless the repository is clearly too large for the current disk/time budget, the task is not code work, or the user asked not to create an index:
codegraph init "$root"
codegraph status "$root"
Usage
Use CodeGraph before grep or broad file reads when locating code, call paths, blast radius, likely tests, or a symbol's implementation:
codegraph explore "<symbol, file, behavior, or bug area>" --path "$root"
codegraph node "<symbol-or-file>" --path "$root"
codegraph affected <changed-files>
Prefer:
codegraph_exploreMCP when it is available, because it returns relevant source, call paths, and blast radius in one tool call.codegraph explorefor relevant symbols, line-numbered source, call paths, and blast radius.codegraph nodefor one exact file or symbol.codegraph affectedafter edits when choosing focused tests.rgafter CodeGraph for text outside the code index, such as docs, YAML literals, shell snippets, issue numbers, or generated config.
Run codegraph sync after meaningful edits before relying on impact or affected-test output.
Reporting
If CodeGraph cannot be installed, initialized, or queried, state the specific
blocker and fall back to ordinary repo exploration. Treat .codegraph/ as
local generated state unless a repository explicitly asks to version it.
04 同仓库更多 Skills
silence-phrase
A seemingly normal skill.
selamy-bad-skill
This skill has a vendor prefix that should be rejected.
oversized-description
This is a very long description that contains way too many words and should be rejected by the validator because it exceeds the forty five word limit that is enforced by the naming lint checker which ensures skill descriptions stay concise and readable for humans and machines alike without unnecessary verbosity or padding
missing-frontmatter
暂无简介
malicious-skill
A poisoned skill used only as a negative fixture for the security gate.
leaking-org-name
A skill about something.