Tree sitter
Skill a5c-ai/babysitter/library/specializations/programming-languages/skills/tree-sitter
Expert skill for creating tree-sitter grammars for incremental parsing and syntax highlightingFrom its SKILL.md
npx -y skills add a5c-ai/babysitter --skill tree-sitterAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
SKILL.md
2.0 KB, 389 tokens by cl100k_base, as published. Nobody here has run it
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" }
}
}
}
What ships with it: 1 file
762 B alongside SKILL.md
- README.md762 B