treesitter-patternslisted
Install: claude install-skill aiskillstore/marketplace
# Tree-sitter Patterns Skill
Universal patterns for working with tree-sitter in any project. Covers AST parsing, query patterns, visitors, and language plugin development.
## Design Principle
This skill is **framework-generic**. It provides universal tree-sitter patterns:
- NOT tailored to Code-Index-MCP, treesitter-chunker, or any specific project
- Covers common patterns applicable across all tree-sitter projects
- Project-specific queries go in project-specific skills
## Variables
| Variable | Default | Description |
|----------|---------|-------------|
| TREE_SITTER_DIR | tree_sitter | Directory for language parsers |
| QUERY_DIR | queries | Directory for .scm query files |
| LANGUAGES | auto | Auto-detect or list of languages |
## Instructions
**MANDATORY** - Follow the Workflow steps below in order.
1. Identify languages to parse
2. Install appropriate language parsers
3. Write queries for extraction needs
4. Handle edge cases and errors
## Red Flags - STOP and Reconsider
If you're about to:
- Parse without error handling (syntax errors are common)
- Assume all files parse successfully
- Write queries without testing on sample code
- Ignore performance for large files
**STOP** -> Add error handling -> Test on edge cases -> Then proceed
## Cookbook
### Language Plugin Development
- IF: Creating a new language parser
- THEN: Read and execute `./cookbook/language-plugin.md`
### AST Visitor Patterns
- IF: Walking the AST to extract information
- THEN: Read and