Skip to main content
Back to registry

ast-grep

ast-grep/agent-skill

This skill helps translate natural language queries into ast-grep rules for structural code search. ast-grep uses Abstract Syntax Tree (AST) patterns to match code based on its structure rather than just text, enabling powerful and precise code search across large codebases.

Installs1
Install command
npx skills add https://github.com/ast-grep/agent-skill --skill ast-grep
Security audits
Gen Agent Trust HubPASS
SocketPASS
SnykPASS
About this skill
This skill helps translate natural language queries into ast-grep rules for structural code search. ast-grep uses Abstract Syntax Tree (AST) patterns to match code based on its structure rather than just text, enabling powerful and precise code search across large codebases. Use this skill when users: Follow this process to help users write effective ast-grep rules: Clearly understand what the user wants to find. Ask clarifying questions if needed: Write a simple code snippet that represents what the user wants to match. Save this to a temporary file for testing. Example: If searching for "async functions that use await", create a test file: Translate the pattern into an ast-grep rule. Start simple and add complexity as needed. Key principles: Example rule file (test_rule.yml): See references/rule_reference.md for comprehensive rule documentation. Use ast-grep CLI to verify the rule matches the example code.

Source description provided by the upstream skill listing. Community reviews and install context appear in the sections below.

Community Reviews

Latest reviews

Sign in to review

No community reviews yet. Be the first to review.

Browse this skill in context
FAQ
What does ast-grep do?

This skill helps translate natural language queries into ast-grep rules for structural code search. ast-grep uses Abstract Syntax Tree (AST) patterns to match code based on its structure rather than just text, enabling powerful and precise code search across large codebases.

Is ast-grep good?

ast-grep does not have approved reviews yet, so SkillJury cannot publish a community verdict.

What agent does ast-grep work with?

ast-grep currently lists compatibility with codex, gemini-cli, opencode, amp, github-copilot.

What are alternatives to ast-grep?

Skills in the same category include telegram-bot-builder, flutter-app-size, sharp-edges, iterative-retrieval.

How do I install ast-grep?

npx skills add https://github.com/ast-grep/agent-skill --skill ast-grep

Related skills

Alternatives in Software Engineering