Tree-sitter
Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlighting
Best use case
Tree-sitter is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlighting
Teams using Tree-sitter should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/tree-sitter/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How Tree-sitter Compares
| Feature / Agent | Tree-sitter | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlighting
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Tree-sitter Skill
## Overview
Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlighting.
## Capabilities
- Write tree-sitter grammar.js files
- Handle tree-sitter external scanners
- Design queries for syntax highlighting
- Implement incremental parsing support
- Handle tree-sitter error recovery
- Generate bindings for various languages
- Integrate with editors (VS Code, Neovim, Helix)
- Test grammars with corpus files
## Target Processes
- language-grammar-design.js
- lexer-implementation.js
- parser-development.js
- lsp-server-implementation.js
## Dependencies
- tree-sitter CLI
- tree-sitter crates/npm packages
## Usage Guidelines
1. **Grammar.js**: Follow tree-sitter grammar.js conventions
2. **External Scanners**: Use external scanners for context-sensitive lexing
3. **Queries**: Write highlight.scm and other query files for editor integration
4. **Testing**: Build comprehensive corpus test files
5. **Error Recovery**: Design grammar with error recovery in mind
## Output Schema
```json
{
"type": "object",
"properties": {
"grammarName": { "type": "string" },
"nodeTypes": {
"type": "array",
"items": { "type": "string" }
},
"queries": {
"type": "array",
"items": {
"type": "string",
"enum": ["highlights", "injections", "locals", "tags", "folds"]
}
},
"bindings": {
"type": "array",
"items": { "type": "string" }
},
"generatedFiles": {
"type": "array",
"items": { "type": "string" }
}
}
}
```Related Skills
babysitter
Orchestrate via @babysitter. Use this skill when asked to babysit a run, orchestrate a process or whenever it is called explicitly. (babysit, babysitter, orchestrate, orchestrate a run, workflow, etc.)
behavior-trees
Behavior tree design and implementation skill for game AI. Enables creation of behavior tree structures, custom nodes, decorators, composites, and integration with game engines for NPC and enemy AI systems.
decision-tree-analyzer
Decision tree analysis skill with expected value, risk analysis, and utility theory.
phylogenetics-tree-builder
Phylogenetic analysis skill for constructing evolutionary trees and assessing relationships
dun-bradstreet-data
Dun & Bradstreet data quality and firmographic enrichment
decision-tree-builder
Automated decision tree construction skill for structuring complex decisions with probabilities, payoffs, and expected value calculations
issue-tree-generator
Generate and validate issue trees for structured problem solving with MECE validation
segment-tree-builder
Generate customized segment tree implementations
using-git-worktrees
Use when starting feature work that needs isolation from current workspace or before executing implementation plans.
Worktree Isolation
Manage git worktree lifecycle for safe, isolated parallel development.
process-builder
Scaffold new babysitter process definitions following SDK patterns, proper structure, and best practices. Guides the 3-phase workflow from research to implementation.
yolo
Run Babysitter autonomously with minimal manual interruption.