
codegraph-ast-grep
by servrox
Supercharge repo exploration and refactoring with semantic call-graph tracing and structural AST pattern matching.
- Trace call paths and symbol dependencies across large monorepos
- Find exact structural code patterns using AST-based search rules
- Automate the setup and configuration of Codex MCP tools and servers
Free
Included in download
- Downloadable skill package
- Works with Codex CLI, SKILL.md-compatible agents
- 3 permissions declared
Sample input
I need to change the signature of AuthService.validate(). Use CodeGraph to find callers and ast-grep to identify the specific conditional patterns used for the refactor plan.
Sample output
Analyzing impact of changing 'AuthService.validate()'... CodeGraph found 12 callers across 4 services. ast-grep identified structural pattern: 'if (!auth.validate(user)) { ... }' in 8 locations. Refactor plan: Update 8 call sites + 2 middleware handlers. Risk: Medium (shared library).
Supercharge repo exploration and refactoring with semantic call-graph tracing and structural AST pattern matching.
Free
Included in download
- Downloadable skill package
- Works with Codex CLI, SKILL.md-compatible agents
- 3 permissions declared
- Instant install
Sample input
I need to change the signature of AuthService.validate(). Use CodeGraph to find callers and ast-grep to identify the specific conditional patterns used for the refactor plan.
Sample output
Analyzing impact of changing 'AuthService.validate()'... CodeGraph found 12 callers across 4 services. ast-grep identified structural pattern: 'if (!auth.validate(user)) { ... }' in 8 locations. Refactor plan: Update 8 call sites + 2 middleware handlers. Risk: Medium (shared library).
Screenshots
About This Skill
The Ultimate Repo Exploration & Refactor Engine
Navigating complex codebases requires more than just keyword search. This skill combines the semantic power of CodeGraph with the structural precision of ast-grep to give your AI agent a deep, multi-dimensional understanding of your repository.
What it does
- Semantic Mapping: Uses CodeGraph to trace call flows, find callers/callees, and perform impact analysis across entire repositories.
- Structural Search: Leverages ast-grep for deterministic, AST-based pattern matching (e.g., finding unsafe writes or deprecated API patterns).
- Intelligent Setup: Automates the configuration of Codex MCP servers, handling global vs. local installs and .gitignore management.
- Safe Refactoring: Scopes impacted symbols with semantic data before applying precise structural rewrites.
Why use this skill
Standard AI prompting often hallucinates code relationships or misses structural nuances in large repos. This developer-centric skill provides a "ground truth" layer by integrating specialized tools. Instead of asking "Where is this used?", your agent can now prove it by tracing the actual call path and identifying the exact syntax nodes involved, ensuring refactors are both comprehensive and safe.
Supported Workflows
Designed for professional environments, it respects package manager policies, redacts secrets during MCP configuration, and integrates with existing .codex/ and .codegraph/ metadata.
Use Cases
- Trace call paths and symbol dependencies across large monorepos
- Find exact structural code patterns using AST-based search rules
- Automate the setup and configuration of Codex MCP tools and servers
- Plan and validate refactors by combining semantic scope with syntax matching
- Generate impact analysis reports before modifying shared utility functions
Known Limitations
- Requires local installation of CodeGraph and ast-grep binaries.
- Performance varies with repository size and index freshness.
- Does not replace language-specific compilers for final validation.
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/codegraph-ast-grep -o /tmp/codegraph-ast-grep.zip && unzip -o /tmp/codegraph-ast-grep.zip -d ~/.claude/skills && rm /tmp/codegraph-ast-grep.zipFree skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
Allowed Hosts
File Scopes
Codex CLI, SKILL.md-compatible agents
Creator
Entrepreneur & Builder 🚀 Co-Founder and Managing Director at servrox solutions and stark AI
Frequently Asked Questions
Learn More About AI Agent Skills
More Premium Skills
Multi-Agent Orchestration Master Library
Transform Claude Code into a coordinated multi-agent system. Battle-tested tmux orchestration patterns, YAML task queues, event-driven communication, and parallel worker management for 8+ agents.
designing-hybrid-context-layers
Architects the right retrieval strategy for every query — teaching your agent when to use RAG, a knowledge graph, or a temporal index instead of defaulting to vector search for everything.
ai-automation-qa-pack
Professional QA & UAT documentation generator for AI automation agencies and complex agent deployments.
Bounty Security Pattern Master Library — 399 Vulnerability Patterns
A premium library of 399 vulnerability patterns and DeFi attack vectors for AI-driven bug hunting and security audits.