afnanenayet/diffsitter/ast-navigation
- community
Checking that the SKILL.md file is still in the repository.
Use tree-sitter MCP tools for AST-aware code navigation — finding symbols, jumping to definitions, inspecting scopes, and running structural queries across 14+ languages
Install
npx vskill@latest install afnanenayet/diffsitter/ast-navigationSKILL.md
AST Navigation with tree-sitter MCP
You have access to tree-sitter MCP tools that let you navigate code structurally rather than as flat text. Use these tools when you need precise, language-aware understanding of code structure.
Available Tools
parse_file
Parse a file and get its top-level AST structure. Returns the root node with its children's kinds and spans.
When to use: Starting point for exploring an unfamiliar file. Shows you what top-level constructs exist (functions, classes, imports, etc.).
list_symbols
List all top-level symbols (functions, structs, classes, traits, enums, constants) with their names, kinds, and locations.
When to use: Getting an overview of what a file defines. Much faster than reading the whole file when you just need to know what's there.
get_definition
Get the full source text of a specific symbol by name.
When to use: Reading one specific function/struct/class without loading the entire file.
get_children_of
Get child definitions within a named scope (methods inside a class/impl, fields in a struct).
When to use: Exploring the contents of a class, impl block, or module.
get_node_at_position
Get the deepest AST node at a specific line/column position.
When to use: Understanding what syntax construct exists at a specific location (e.g., when investigating a compiler error at a given line).
get_scope
Get the enclosing scope (function, class, module) at a position, with the full parent chain.
When to use: Understanding the nesting context at a specific location — what function am I in? What class is that function in?
navigate
Move from a position in a direction: parent, first_child, next_sibling, prev_sibling, next_named_sibling, prev_named_sibling.
When to use: Traversing the AST step by step from a known position. Useful for exploring neighboring constructs.
query
Run a raw tree-sitter S-expression query and get all matches with captures.
When to use: Complex structural searches that the other tools don't cover. For example, finding all functions that take a specific parameter type, or all assignments to a variable.
Supported Languages
Rust, Python, TypeScript, TSX, JavaScript, Go, Java, C, C++, C#, Ruby, Bash, PHP, OCaml, CSS, HCL.
Usage Patterns
Exploring an unfamiliar codebase:
list_symbolson key files to understand structureget_definitionfor specific symbols you need to understandget_children_ofto drill into classes/modules
Investigating a specific location:
get_node_at_positionto see what's at a line/columnget_scopeto understand the nesting contextnavigatewithparentto walk up the tree
Structural search:
querywith S-expressions for pattern matching across the AST
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/tree-sitter-mcp/skills/ast-navigation/SKILL.md
Popularity
- Repository stars
- 2,380
- Repository forks
- 53
- 7-day trend score
- 39
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/afnanenayet/diffsitter/ast-navigation)