codegraph-ast-grep

codegraph-ast-grep is a skill for Claude Code, Codex from stark-ai-de/agent-skills. It costs 72 tokens per session (2,361 once invoked), scanned A, a copy of codegraph-ast-grep, Apache-2.0.

A setup and troubleshooting workflow for CodeGraph and ast-grep in a code repository. CodeGraph provides semantic information about code, while ast-grep searches code by its structural syntax rather than only by text.

In plain words
What is it for?
Use it to install or update the tools, reconnect their MCP service, build or migrate indexes, or diagnose a missing, stale, or disconnected setup.
Why use it?
It helps coding agents get a consistent analysis setup, including tool installation, connections, indexing, migrations, and saved repository guidance.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to install or update the tools, reconnect their MCP service, build or migrate indexes, or diagnose a missing, stale, or disconnected setup.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stark-ai-de/agent-skills/runtime
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add stark-ai-de/agent-skills --skill runtime
Clone the repo
git clone --depth 1 https://github.com/stark-ai-de/agent-skills

Made for: Claude Code, Codex.

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 codegraph-ast-grep

README.md
[![agentmods](https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/runtime/github.svg)](https://agentmods.dev/skills/stark-ai-de/agent-skills/runtime)
Your own site
<a href="https://agentmods.dev/skills/stark-ai-de/agent-skills/runtime"><img src="https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/runtime/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 codegraph-ast-grep

Your own site · 80×15
<a href="https://agentmods.dev/skills/stark-ai-de/agent-skills/runtime"><img src="https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,361 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin 100% copy Near-identical to another mod 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.00072 $0.02361
Opus 5.5 $0.00029 $0.00944
Sonnet 5.5 $0.00014 $0.00472
Haiku 4.5 $0.00007 $0.00236

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

Security

Grade A, and why

codegraph-ast-grep scanned grade A with 0 findings 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 15d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

100% identical to codegraph-ast-grep — 8 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skill-evals/codegraph-ast-grep/behavioral-baseline/v0.3.3/runtime/SKILL.md · 144 lines

How it starts

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

CodeGraph + ast-grep

Goal

Make a repository's coding agents ready to use CodeGraph for semantic scope and ast-grep CLI for structural evidence. Public workflows manage that capability; repository exploration and refactoring are ordinary internal coding behaviors after setup.

When to use

  • Install or reconcile CodeGraph, ast-grep CLI, MCP exposure, indexing, and agent guidance.
  • Update the installed analysis stack and run required configuration, index, or schema migrations.
  • Diagnose a missing, stale, disconnected, or apparently broken setup without repairing it.

When not to use

Do not activate this skill merely because a coding task can benefit from an already-ready analysis stack. Follow the persisted repository guidance instead. Do not use it for general dependency audits, compiler/runtime proof, or an unreviewed broad rewrite.

Workflow selection

Always expose these finite workflows in plain, benefit-first language when the skill is invoked directly:

  • setup: supercharge the repository with Semantic Code Intelligence and structural code search, helping coding agents answer faster with fewer tool calls. Install missing pieces, connect the coding client, build the code index, add repository guidance, and safely reuse or repair any existing setup.
  • update: bring an existing setup to current stable versions without changing how it was installed. Migrate configuration or index data when needed, reconnect the coding client, and verify that everything still works.
  • doctor: diagnose setup health and report analytics without repairing anything.

There is no auto workflow. Select by intent:

  • An explicit setup or installation request selects setup.
  • An explicit stable-tool update, migration, or refresh request selects update.
  • “Something is broken,” a health check, or a request for setup analytics selects doctor.
  • A bare invocation or ambiguous intent requires showing all three workflows and asking the user to choose.

For clear direct intent, state the selected workflow, rationale, root, expected writes/artifacts, and protected state, then proceed. Agent-initiated activation may select and announce only doctor; it must not infer setup or update authority. Selecting setup or update is allowed only when the user already requested that outcome for the stated root. Privileged/global installation, paid or external services, publication/deployment, destructive replacement, telemetry changes, and scope expansion retain separate approval.

Read the full file on GitHub · 144 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 15d ago First seen · 144 lines · 72 tokens per session scan A a2220d0a4363

Subscribe to this mod's changes

codegraph-ast-grep is a skill published in the GitHub repository stark-ai-de/agent-skills (8 stars, last pushed today), licensed Apache-2.0. It adds 72 tokens to every session and 2,361 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 100% identical to codegraph-ast-grep, differing in 8 lines, and is treated as a copy.

Related

Other skills, from other repositories

openlore-debug

Debug with OpenLore structural context, an explicit root-cause hypothesis, and RED/GREEN verification. Use when a bug, failure, or regression needs diagnosis and repair.

clay-good/OpenLore · 39 tokens

openlore-analyze-codebase

Run a full static OpenLore analysis and summarize architecture, call graph, refactoring issues, and duplicate code. Use when asked to analyze, map, or assess a codebase without LLM inference.

clay-good/OpenLore · 48 tokens

team-diagnose

Use when the team context did not appear at session start, a skill failed to trigger, the install behaves unexpectedly, or someone asks why a session ran without team rules — walks the failure chain with commands and evidence before any conclusion.

tikalk/adlc-team-skills · 51 tokens

senmu-build-assurance

Conduct explicit audits, decision POCs, comparisons or disputed-cause reviews with scoped evidence. Audit scope does not imply reviewer independence. Not for routine domain self-checks or production implementation.

SenMuShare/senmu-buildos · 43 tokens

layerkit-fix-from-dry-run

Fix failed integration verification from logs, tests, and docs evidence; edit real package files, no invention.

hariharapanigrahy/layerkit · 30 tokens

postmortem-generator

Generate a blameless incident postmortem from raw material (Slack thread, pager timeline, notes) — quantified impact, UTC timeline with detection/mitigation gaps, contributing factors instead of a single root cause, and ≤8 verifiable action items. Use after an incident or outage when the user needs a postmortem, RCA…

sananthanarayan/skilldrop · 84 tokens