agentleFS
kkxdevkkxdev/claude-skills/skills/project-knowledge/SKILL.md

project-knowledge

Skill1 starsChanged 12 days agoMITView on GitHub

Generate project knowledge for any git repo: code graph, knowledge graph, code wiki, and AI-written domain docs under .ai/. Use when onboarding to a repo, asked to document a codebase, or to refresh stale .ai/ knowledge.

16 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 15 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read .ai/wiki/code-wiki.md and the hub files first.

    line 35

“Common” is measured: kept by at least 6 in 10 of the 15 edited versions of this file we could read. “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

/project-knowledge

Deterministic facts first (code graph, knowledge graph, code wiki), then narrative docs written from those facts.

Usage

/project-knowledge            # current repo
/project-knowledge <path>     # another repo

Step 1: deterministic artifacts (no model, stdlib Python 3.9+)

python3 ~/.claude/skills/project-knowledge/scripts/build_knowledge.py <repo> [--rules rules.json] [--name NAME]

Writes (all derived from the code, nothing invented; capped in size):

  • .ai/graph/code-graph.json: files, symbols, import edges (Python, JS/TS, PHP, Java)
  • .ai/graph/knowledge-graph.json: modules, hub files, optional rules linked to the modules they govern
  • .ai/wiki/code-wiki.md: most-imported hub files + module map with top symbols
  • .ai/wiki/knowledge-wiki.md: optional rules grouped by kind

rules.json is optional: [{"id","kind","text","scope_paths","source"}], kind one of convention/decision/constraint/gotcha/other. Only include rules the user has confirmed.

Step 2: narrative docs (you write these)

Read .ai/wiki/code-wiki.md and the hub files first; do not re-explore the whole tree. Then write:

  • .ai/domain/*.md: one file per business domain/module cluster: purpose, key entry points, invariants, gotchas. Cite real paths.
  • .ai/danger-zones.yaml: hub files and fragile areas (use the hub list as the starting evidence).
  • CLAUDE.md: minimal; point to .ai/wiki/code-wiki.md and .ai/domain/. Do not overwrite an existing CLAUDE.md; append a short "Project knowledge" section instead.

Rules: state only what you verified in code; mark anything inferred as such; keep files short, they are read on demand.

Step 3: report

Summarise files written and graph stats. Do not commit; leave the diff for the user to review. Suggest adding .ai/graph/*.json to .gitignore if the repo is large.

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.