codegraph-ast-grep

codegraph-ast-grep is a skill for Codex from stark-ai-de/agent-skills. It costs 72 tokens per session (2,425 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, update indexes or schemas, preserve agent guidance, or diagnose the setup without changing it.

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/github.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/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/codegraph-ast-grep"><img src="https://agentmods.dev/badge/skills/stark-ai-de/agent-skills/codegraph-ast-grep.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,425 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. Third-party audits
  • Socket pass 31 Aug 2026
  • Snyk pass 31 Aug 2026
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.00072 $0.02425
Opus 5.5 $0.00029 $0.00970
Sonnet 5.5 $0.00014 $0.00485
Haiku 4.5 $0.00007 $0.00243

Measured 25d ago against content hash 00c31971bc10, 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 25d 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

Copies of this mod

1 near-identical copy found in the catalogue:

plugins/stark-ai-developer/skills/codegraph-ast-grep/SKILL.md · 146 lines

How it starts

The opening of the file, as written. The whole thing — 146 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

The complete finite workflow inventory, in plain, benefit-first language, is:

  • 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.

Show the complete finite workflow inventory in its documented order for a bare or materially ambiguous invocation, or an explicit options request. An options request alone does not authorize execution or repository/tool inspection; answer from the documented inventory. For clear authorized intent, announce only the selected workflow and rationale, with material scope and evidence fields, and proceed.

There is no auto workflow. Select by intent:

Read the full file on GitHub · 146 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. 25d ago Changed · +2 lines 00c31971bc10
  2. 1mo 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 3d ago), licensed Apache-2.0. It adds 72 tokens to every session and 2,425 once invoked, about $0.0003 per session on Opus 5.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

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

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

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

bug-triage

Turn a vague bug report (Slack message, support ticket, "it's broken on mobile sometimes") into an actionable ticket — searchable symptom title, numbered repro steps from a clean state, expected vs actual, severity separated from priority, evidence tagged reported-vs-verified, and labeled hypotheses instead of…

sananthanarayan/skilldrop · 99 tokens