Agent-skill enables AI agents to search codebases using Abstract Syntax Tree (AST) patterns. It benefits developers and operations teams by allowing structural code search beyond simple text matching. The skill integrates with Claude Code plugin marketplace and is applied in code analysis, refactoring, and maintenance tasks.
git clone https://github.com/ast-grep/agent-skill.githttps://ast-grep.github.io/
Find all async functions that do not implement error handling.
Locate React components that utilize a specific custom hook.
Identify functions with more than three parameters for potential refactoring.
Search for console.log calls within class methods to improve logging practices.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/ast-grep/agent-skillCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Act as an AI automation agent. Use the ast-grep plugin to search for code patterns in [REPOSITORY] related to [CODE_PATTERN]. Provide a summary of the findings, including file paths, line numbers, and relevant code snippets. Focus on [PROGRAMMING_LANGUAGE] files.
# Code Pattern Search Results
## Summary
- **Repository**: example-repo
- **Code Pattern**: `getUserById`
- **Programming Language**: JavaScript
- **Total Matches**: 5
## Matches
1. **File**: `src/services/userService.js`
- **Line**: 42
- **Code**: `function getUserById(id) {
return db.query('SELECT * FROM users WHERE id = ?', [id]);
}`
2. **File**: `src/controllers/userController.js`
- **Line**: 87
- **Code**: `const user = await getUserById(req.params.id);
if (!user) {
return res.status(404).send('User not found');
}`
... (3 more matches)Your one-stop shop for church and ministry supplies.
Automate your browser workflows effortlessly
IronCalc is a spreadsheet engine and ecosystem
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power