Ast Grep Find

🌐Community
by parcadei · vlatest · Repository

Finds specific strings within AST data for debugging and analysis, streamlining code exploration and issue identification.

Install on your platform

We auto-selected Claude Code based on this skill’s supported platforms.

1

Run in terminal (recommended)

terminal
claude mcp add ast-grep-find npx -- -y @trustedskills/ast-grep-find
2

Or manually add to ~/.claude/settings.json

~/.claude/settings.json
{
  "mcpServers": {
    "ast-grep-find": {
      "command": "npx",
      "args": [
        "-y",
        "@trustedskills/ast-grep-find"
      ]
    }
  }
}

Requires Claude Code (claude CLI). Run claude --version to verify your install.

About This Skill

What it does

The ast-grep-find skill allows you to search and find code patterns within Python Abstract Syntax Trees (ASTs). It can identify specific code structures, such as function definitions with certain arguments or class inheritance patterns. This is useful for automated code review, refactoring, and understanding complex codebases.

When to use it

  • Automated Code Review: Identify instances of deprecated functions or potential security vulnerabilities within a project.
  • Refactoring Assistance: Locate all occurrences of a specific coding pattern to facilitate large-scale refactorings.
  • Code Understanding: Quickly find examples of how certain libraries or design patterns are implemented in a codebase.
  • Dependency Analysis: Identify code that uses particular modules or functions across an entire project.

Key capabilities

  • AST parsing and traversal
  • Pattern matching within AST nodes
  • Search for specific code structures
  • Identification of function definitions, class inheritance, and other patterns

Example prompts

  • "Find all instances where a class inherits from 'BaseClass'."
  • "Locate functions that take an argument named 'callback'."
  • "Show me every place the requests library is used."

Tips & gotchas

  • Requires a basic understanding of Python AST structure for effective pattern definition.
  • The skill's effectiveness depends on accurate and specific search patterns.

Tags

🛡️

TrustedSkills Verification

Unlike other registries that point to live repositories, TrustedSkills pins every skill to a verified commit hash. This protects you from malicious updates — what you install today is exactly what was reviewed and verified.

Security Audits

Gen Agent Trust HubPass
SocketPass
SnykPass

Details

Version
vlatest
License
Author
parcadei
Installs
0

🌐 Community

Passed automated security scans.