agentleFS
davidliukdavidliuk/graph-of-skills/CLAUDE.md

graph-of-skills

CLAUDE.md217 starsChanged 8 months agoMITView on GitHub

GoS ships with a built-in MCP server that gives Claude Code direct access to the skill graph — search, retrieve, explore, and manage skills without leaving the conversation. 3. Get a workspace — build from source for the current typed-directed constructor. Downloaded *_v1 workspaces are legacy reproduction artifacts and are rejected because their undirected edges cannot be repaired safely: The .mcp.json at the project root auto-registers the MCP server. Open the project directory in Claude Code — the graph-of-skills server…

  • Reads credentials

The file

We split this CLAUDE.md into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If auto-discovery doesn't work (e.g.

    line 50
  2. Very specific:

    Call get_status → check workspace (200 skills, 126 edges)

    line 116
  3. Very specific:

    Call search_skills("3D mesh") → find mesh-analysis, obj-exporter, threejs

    line 117
  4. Very specific:

    Call retrieve_skill_bundle("3D mesh") → get full SKILL.md content with scripts

    line 118
  5. Very specific:

    Read the skill's script (mesh_tool.py), find task data, execute the solution

    line 119
  6. Very specific:

    All settings use the GOS_ prefix and are read from .env:

    line 171

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md 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
CLAUDE.md

Graph of Skills — Claude Code Integration

GoS ships with a built-in MCP server that gives Claude Code direct access to the skill graph — search, retrieve, explore, and manage skills without leaving the conversation.

Setup

Prerequisites

  1. Install dependencies:

    uv sync
  2. Configure API keys — copy .env.example to .env and fill in your embedding provider (OpenAI, Gemini, or Azure):

    cp .env.example .env
    # Edit .env: set OPENAI_API_KEY or GEMINI_API_KEY
  3. Get a workspace — build from source for the current typed-directed constructor. Downloaded *_v1 workspaces are legacy reproduction artifacts and are rejected because their undirected edges cannot be repaired safely:

    # Option A: Download prebuilt workspaces
    ./scripts/download_data.sh --workspace
    
    # Option B: Build locally (needs embedding API)
    ./scripts/download_data.sh --skillsets
    uv run gos index data/skillsets/skills_200 \
      --workspace data/gos_workspace/skills_200_v1 --clear

Auto-Discovery (Recommended)

The .mcp.json at the project root auto-registers the MCP server. Open the project directory in Claude Code — the graph-of-skills server is immediately available, no extra steps.

Verify with:

claude mcp list

You should see graph-of-skills in the output.

Manual Registration

If auto-discovery doesn't work (e.g. you're working from a different directory), register manually:

# Basic registration
claude mcp add graph-of-skills -- uv run --directory /path/to/graph-of-skills gos-claude

# With an explicit workspace
claude mcp add graph-of-skills -- uv run --directory /path/to/graph-of-skills gos-claude \
  --workspace /path/to/graph-of-skills/data/gos_workspace/skills_200_v1

Switching Workspaces

The default workspace is set in .mcp.json. To use a different skill library size, edit the --workspace argument:

// .mcp.json
{
  "mcpServers": {
    "graph-of-skills": {
      "command": "uv",
      "args": ["run", "--directory", ".", "gos-claude",
               "--workspace", "data/gos_workspace/skills_2000_v1"]
    }
  }
}

Available prebuilt workspaces: skills_200_v1, skills_500_v1, skills_1000_v1, skills_2000_v1.

Available MCP Tools

Retrieval

ToolPurpose
search_skillsQuick ranked summary — skill names, scores, graph relations. Use for a fast overview before deciding which skills to load.
retrieve_skill_bundleFull agent-ready skill content: SKILL.md bodies, source paths, script entrypoints, graph evidence. This is the primary tool.
hydrate_skillsLoad specific skills by exact name (comma-separated). Use when you already know which skills you need.

Exploration

ToolPurpose
get_statusWorkspace stats: skill count, edge count, embedding model, retrieval config.
list_skillsBrowse every indexed skill — name, description, source path, domain tags.
get_skill_detailFull metadata for one skill: I/O schema, domain tags, tooling, scripts, and all graph neighbors.
get_skill_neighborsIncoming/outgoing edges for a skill — dependency, workflow, semantic, alternative relationships.

Management

ToolPurpose
index_skillsBuild the skill graph from a directory of SKILL.md files. Set clear=true to rebuild from scratch.
add_skillIncrementally add new SKILL.md files to an existing graph without rebuilding.

Example Workflows

1. Find and Use Skills for a Task

Just describe what you need in natural language:

"Find skills for processing 3D mesh files with GoS, then follow the skill instructions to complete the task."

Claude Code will:

  1. Call get_status → check workspace (200 skills, 126 edges)
  2. Call search_skills("3D mesh") → find mesh-analysis, obj-exporter, threejs
  3. Call retrieve_skill_bundle("3D mesh") → get full SKILL.md content with scripts
  4. Read the skill's script (mesh_tool.py), find task data, execute the solution

Real output from a test run (1 min 16 sec):

GoS retrieval — skills_200_v1 (200 skills, 126 edges), 3 relevant skills retrieved:

┌───────────────┬──────────────────────────────────────────┬───────┐
│     Skill     │               Purpose                    │ Score │
├───────────────┼──────────────────────────────────────────┼───────┤
│ mesh-analysis │ STL parsing, volume calc, component anal │ 0.146 │
│ obj-exporter  │ Three.js → OBJ format export             │ 0.613 │
│ threejs       │ Scene graph parsing & URDF export         │ 0.044 │
└───────────────┴──────────────────────────────────────────┴───────┘

Executed following mesh-analysis skill instructions:
1. Parse — MeshAnalyzer reads Binary STL, extracts 53 connected components
2. Filter — analyze_largest_component() isolates the main body
3. Extract — attribute bytes yield Material ID = 42
4. Compute — 6242.89 cm³ × 5.55 g/cm³ = 34648.04 g

Output → mass_report.json

2. Browse the Skill Library

"List all skills related to audio processing."

Claude Code calls list_skills then filters by domain. Or more directly:

"Search for FFmpeg-related skills and tell me what's available."

3. Explore Skill Relationships

"What are the dependencies and related skills for mesh-analysis?"

Claude Code calls get_skill_neighbors("mesh-analysis") and get_skill_detail("mesh-analysis") to show the full graph context.

4. Index Your Own Skills

"Index all skills from ~/my-skills/ into the GoS graph."

Claude Code calls index_skills(path="~/my-skills/", clear=true) to build a new workspace.

5. Add a New Skill Incrementally

"Add this new SKILL.md to the graph."

Claude Code calls add_skill(path="path/to/new/SKILL.md").

Configuration

All settings use the GOS_ prefix and are read from .env:

VariableDefaultDescription
GOS_WORKING_DIR./gos_workspaceDefault workspace path
GOS_EMBEDDING_MODELopenai/text-embedding-3-largeEmbedding model (must match workspace)
GOS_EMBEDDING_DIM3072Embedding dimension
GOS_LLM_MODELopenrouter/google/gemini-2.5-flashLLM for extraction/linking
GOS_RETRIEVAL_TOP_N8Max skills returned per query
GOS_SEED_TOP_K5Initial seed count before PPR expansion
GOS_MAX_SKILL_CHARS2400Character budget per skill
GOS_MAX_CONTEXT_CHARS12000Total character budget for the skill bundle

Note: The embedding model at retrieval time must match the model used when the workspace was indexed.

Troubleshooting

ProblemSolution
graph-of-skills not in claude mcp listRun claude mcp add manually (see Manual Registration)
"0 skills" on first queryCheck --workspace in .mcp.json points to a valid prebuilt workspace
Embedding dimension mismatchEnsure GOS_EMBEDDING_MODEL / GOS_EMBEDDING_DIM in .env match the workspace
"LLM service is not configured"Set the correct API key in .env (OPENAI_API_KEY, GEMINI_API_KEY, etc.)
Slow first queryThe first query loads the graph into memory; subsequent queries are faster

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.