codegraph: Skill for Claude Code

.claude/skills/add-lang/SKILL.md

add-lang is a skill for Claude Code from colbymchenry/codegraph. It costs 77 tokens per session (3,063 once invoked), scanned A, original, MIT.

A development guide for adding support for a new programming language to CodeGraph, a tool that extracts code structure for searching. It covers connecting the language parser, testing extraction, and checking the result on real repositories.

In plain words
What is it for?
Use it to add languages such as Lua, Elixir, Zig, or OCaml, test the extracted symbols, and benchmark the effect on an AI coding agent.
Why use it?
It organizes the work needed to support a language and verify that the new support is useful in practice.

Skill for Claude Code

Written for Claude Code: installed under .claude/. Also seen: reads .claude/ paths.

This is colbymchenry/codegraph's own configuration. It tells Claude Code how to work on codegraph itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything codegraph configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/add-lang/check-grammar.mjs <lang> path/to/valid-sample.<ext>.

About the project

CodeGraph is a local, pre-indexed knowledge graph of a software codebase that helps AI coding agents understand relationships across files and symbols. Developers use it to retrieve focused code context, keep the graph synchronized with changes, and support agents such as Claude Code, Codex, Cursor, and Gemini. The catalogue entries provide CodeGraph skills and instructions for those agent workflows.

colbymchenry/codegraph · 75,627 stars · on GitHub · colbymchenry.github.io

Reuse

Borrowing it

Nothing to install: this file belongs to colbymchenry/codegraph. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/colbymchenry/codegraph/main/.claude/skills/add-lang/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/colbymchenry/codegraph

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-lang

README.md
[![agentmods](https://agentmods.dev/badge/skills/colbymchenry/codegraph/add-lang/github.svg)](https://agentmods.dev/skills/colbymchenry/codegraph/add-lang)
Your own site
<a href="https://agentmods.dev/skills/colbymchenry/codegraph/add-lang"><img src="https://agentmods.dev/badge/skills/colbymchenry/codegraph/add-lang/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-lang

Your own site · 80×15
<a href="https://agentmods.dev/skills/colbymchenry/codegraph/add-lang"><img src="https://agentmods.dev/badge/skills/colbymchenry/codegraph/add-lang.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,063 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Snyk warn 23 Oct 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
  • Socket warn 23 Oct 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium MCP Rug Pull · line 70
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium MCP Rug Pull · line 150
    npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.
    Fix: Pin the version: npx @scope/[email protected]
  • medium Excessive Agency · line 156
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00077 $0.03063
Opus 5.5 $0.00031 $0.01225
Sonnet 5.5 $0.00015 $0.00613
Haiku 4.5 $0.00008 $0.00306

Measured 5d ago against content hash a3ea2ec26905, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

add-lang scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

classes/structs, imports, enums; or `curl` a raw file from a known repo), then:
Origin

Copies of this mod

5 near-identical copies found in the catalogue:

  • add-lang — 100% identical, 9 lines differ
  • add-lang — 100% identical, 9 lines differ
  • add-lang — 100% identical, 9 lines differ
  • add-lang — 100% identical, 9 lines differ
  • add-lang — 97% identical, 41 lines differ
.claude/skills/add-lang/SKILL.md · 223 lines

How it starts

The opening of the file, as written. The whole thing — 223 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Add a language to CodeGraph

Wire a new tree-sitter language into codegraph's extraction pipeline, prove it extracts real symbols on popular repos, and prove it beats no-codegraph for an agent. Runs fully autonomously — pick repos, benchmark, update docs, then report. Never commit, push, publish, or tag (house rule); leave all changes for the user to review.

The argument is the language token used throughout the Language union, e.g. lua, elixir, zig. If none was given, ask which language. Use the lowercase single-token form everywhere (csharp, not c#).

Prerequisites

  • Run from the codegraph repo root. node, git, gh, and a logged-in claude CLI (the benchmark spawns real claude -p runs).
  • The benchmark uses the local dev build — Step 8 builds + links it on PATH.

Workflow

Copy this checklist and work through it in order:

- [ ] 1. Resolve language; bail early if already supported (just benchmark)
- [ ] 2. Find a grammar + health-check it (ABI / heap corruption)
- [ ] 3. Discover the grammar's AST node types (dump-ast.mjs)
- [ ] 4. Wire the language (4 files; sometimes a 5th core touch)
- [ ] 5. Build + verify-extraction loop until PASS
- [ ] 6. Add extraction tests; make them green
- [ ] 7. Auto-pick 3 popular repos by size tier; add to corpus.json
- [ ] 8. Benchmark all 3: extraction + with/without A/B
- [ ] 9. Update README + CHANGELOG
- [ ] 10. Report; do NOT commit

Step 1 — Resolve + short-circuit

Check whether the language is already wired: look for the token in the LANGUAGES const (src/types.ts) and the EXTRACTORS map (src/extraction/languages/index.ts). If it is already supported (e.g. typescript, rust), skip Steps 2–6 and go straight to benchmarking (Steps 7–8) to validate/measure it — note in the report that no code changed.

Step 2 — Find a grammar, then health-check it

ls node_modules/tree-sitter-wasms/out/ | grep -i <lang>   # csharp -> c_sharp
  • Present → likely off-the-shelf; grammars.ts resolves it from tree-sitter-wasms automatically. (Many languages: elixir, zig, ocaml, solidity, toml, yaml, …)
  • Absent → vendor a .wasm into src/extraction/wasm/ (like pascal / scala / lua) and add the token to the vendored branch in Step 4.

Read the full file on GitHub · 223 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · +3 lines a3ea2ec26905
  2. 1mo ago First seen · 220 lines · 77 tokens per session scan A ba81accf3243

Subscribe to this mod's changes

add-lang is a skill published in the GitHub repository colbymchenry/codegraph (75,627 stars, last pushed today), licensed MIT. It adds 77 tokens to every session and 3,063 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

erlang-otp-behaviors

Use when oTP behaviors including genserver for stateful processes, genstatem for state machines, supervisors for fault tolerance, genevent for event handling, and building robust, production-ready Erlang applications with proven patterns.

benchflow-ai/skillsbench · 52 tokens

omh-rust

This is an OMH rust workflow skill, projected for Agent Skills hosts (Claude Code, Codex, Cursor, opencode, OpenClaw, pi).

rlaope/oh-my-hermes · 74 tokens

axiom-concurrency

Use when writing ANY async code, actors, or threads in an Apple-platform app, or seeing ANY concurrency error. Covers Swift 6 concurrency, @MainActor, Sendable, data races, async/await patterns.

CharlesWiltgen/Axiom · 49 tokens

haskell-pro

Expert Haskell engineer specializing in advanced type systems, pure functional design, and high-reliability software. Use PROACTIVELY for type-level programming, concurrency, and architecture guidance.

rmyndharis/antigravity-skills · 41 tokens

splitting-oversized-modules

Split an oversized Python module (a thousand-plus-line logic.py, models.py, api.py, or its test file) into a package of one module per concern, mechanically and provably without changing behavior. Use on a request to split / break up / decompose a god module or move functions out of one, once a human has agreed to…

PostHog/posthog · 197 tokens

migrate-better-result-3

Migrate a TypeScript codebase from better-result 2.x to 3.0. Use when upgrading better-result across the TaggedError syntax, removed Result serialization helpers, recovery inference, matching, or retry APIs.

dmmulroy/better-result · 52 tokens