codegraph-ast-grep

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

Instructions for setting up, updating, or diagnosing CodeGraph and ast-grep in a code repository. CodeGraph provides semantic code relationships, while ast-grep searches code by its syntax structure.

In plain words
What is it for?
Use them to install or reconcile the tools, connect the coding client, update indexes or schemas, preserve agent guidance, or diagnose the setup without changing it.
Why use it?
They help coding agents establish reliable repository-wide code search and scope information, or investigate when that setup is missing or stale.

Skill for Codex

Written for Codex: agents/openai.yaml present.

Good fit Use them to install or reconcile the tools, connect the coding client…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/stark-ai-de/agent-skills/codegraph-ast-grep
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 codegraph-ast-grep
Clone the repo
git clone --depth 1 https://github.com/stark-ai-de/agent-skills

Made for: 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/codegraph-ast-grep.svg)](https://agentmods.dev/skills/stark-ai-de/agent-skills/codegraph-ast-grep)
Your own site
<a href="https://agentmods.dev/skills/stark-ai-de/agent-skills/codegraph-ast-grep"><img src="https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/codegraph-ast-grep.svg" alt="Measured on agentmods" 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 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.00072 $0.02361
Opus 5 $0.00036 $0.01180
Sonnet 5 $0.00014 $0.00472
Haiku 4.5 $0.00007 $0.00236

Measured 7d ago against content hash a2220d0a4363, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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 7d 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.

plugins/stark-ai-developer/skills/codegraph-ast-grep/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

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. 7d 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 (5 stars, last pushed 3d ago), licensed Apache-2.0. It adds 72 tokens to every session and 2,361 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories