Agent skill
Tree-sitter
Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlighting
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/tree-sitter
SKILL.md
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
- Grammar.js: Follow tree-sitter grammar.js conventions
- External Scanners: Use external scanners for context-sensitive lexing
- Queries: Write highlight.scm and other query files for editor integration
- Testing: Build comprehensive corpus test files
- Error Recovery: Design grammar with error recovery in mind
Output Schema
{
"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" }
}
}
}
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?