agentsclimarketplace

Codegraph worktree startup

Skill selamy-labs/agent-skills/skills/codegraph-worktree-startup

Reusable public SKILL.md workflows for AI agents

Install
npx -y skills add selamy-labs/agent-skills --skill codegraph-worktree-startup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when starting or resuming code work in a repository worktree. Initialize or sync CodeGraph, keep its cache uncommitted, and prefer CodeGraph for code navigation before grep or broad file reads.

SKILL.md

2.5 KB, 520 tokens by cl100k_base, as published. Nobody here has run it

CodeGraph Worktree Startup

Use CodeGraph as repository startup hygiene for coding tasks. The goal is faster, more accurate code navigation without committing .codegraph/ cache artifacts.

Startup

  1. Confirm the tool and repository root:
command -v codegraph
git rev-parse --show-toplevel

If codegraph is unavailable, say so briefly and use normal repo exploration.

  1. If an index exists, sync it:
codegraph sync "$(git rev-parse --show-toplevel)"
codegraph status "$(git rev-parse --show-toplevel)"
  1. If no index exists, initialize one before code exploration unless disk, memory, or repo size makes that unreasonable:
/usr/bin/time -f 'elapsed=%E cpu=%P maxrss_kb=%M' codegraph init "$(git rev-parse --show-toplevel)"
codegraph status "$(git rev-parse --show-toplevel)"

Local calibration has shown small and medium repositories can index in seconds, so prefer measuring once over assuming indexing is expensive.

  1. Keep CodeGraph out of source control:
printf '\n.codegraph/\n' >> "$(git rev-parse --git-path info/exclude)"
git status --short --branch

Use local git excludes instead of editing .gitignore unless the repository explicitly wants a shared ignore rule. git rev-parse --git-path info/exclude works in linked worktrees because it resolves the real git metadata path.

Usage

Use CodeGraph before grep or broad file reads when locating code, call paths, blast radius, or likely tests:

codegraph explore "<symbol, file, behavior, or bug area>"
codegraph node "<symbol-or-file>"
codegraph affected <changed-files>

Prefer:

  • 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

When timing a new repository class, record wall time, indexed files, DB size, memory, and whether the first query was useful. If indexing is slow or low-value for that class, document the exception instead of making the startup step performative.

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.