agentleFS
selamy-labsselamy-labs/agent-skills/skills/codegraph-worktree-startup/SKILL.md

codegraph-worktree-startup

Skill0 starsChanged 3 days agoMITView on GitHub

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.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use CodeGraph as repository startup hygiene for coding tasks.

    line 8
  2. Very specific:

    If codegraph is unavailable and the user has not authorized installing it, say so briefly and use normal repository exploration.

    line 20
  3. Distinctive:

    Keep the generated index out of source control:

    line 23
  4. Distinctive:

    If an index already exists, sync it before relying on it:

    line 30
  5. Distinctive:

    If no index exists, initialize one before code exploration unless the repository is clearly too large for the current disk/time budget, the …

    line 37
  6. Distinctive:

    Use CodeGraph before grep or broad file reads when locating code, call paths, blast radius, likely tests, or a symbol's implementation:

    line 48
  7. Very specific:

    Run codegraph sync after meaningful edits before relying on impact or affected-test output.

    line 66
  8. Very specific:

    If CodeGraph cannot be installed, initialized, or queried, state the specific blocker and fall back to ordinary repo exploration.

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
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_explore MCP when it is available, because it returns relevant source, call paths, and blast radius in one tool call.
  • codegraph explore for relevant symbols, line-numbered source, call paths, and blast radius.
  • codegraph node for one exact file or symbol.
  • codegraph affected after edits when choosing focused tests.
  • rg after 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.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.