Skills Plugins MCP Prompt Model 博客 我的中心

parser-development

Use this skill when implementing or modifying Biome parser behavior, including `.ungram` grammars, lexers, token sources, parse rules, separated lists, error recovery, and parser fixtures. Do not use merely for consuming an existing AST/CST.

DeepseekModel 官方收录技能 质量 优秀 · 90 v1.0.0

获取

https://deepseekmodel.com/api/download.php?id=biomejs-biome-claude-skills-parser-development-skill-md&format=skill
下载 .skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用
.skill 文件中 system_prompt 字段的实际内容。
name parser-development description Use this skill when implementing or modifying Biome parser behavior, including `.ungram` grammars, lexers, token sources, parse rules, separated lists, error recovery, and parser fixtures. Do not use merely for consuming an existing AST/CST. compatibility Designed for coding agents working on the Biome codebase (github.com/biomejs/biome). Parser Development Use crates/biome_parser/CONTRIBUTING.md as the canonical parser guide. Read the section matching the current grammar, lexer, parse-rule, or recovery task. Workflow Inspect the language grammar and neighboring parse rules. Add or adjust focused ok/ and error/ fixtures before changing recovery behavior. Update the grammar when the typed tree shape changes. Regenerate syntax and factory artifacts after .ungram changes. Implement parser logic with explicit presence tests and bounded recovery. Run the language parser's focused tests and inspect snapshots. Grammar Grammar files under xtask/codegen/ define typed syntax nodes and fields. Follow existing language naming: prefix nodes with the language name; name unions with Any ; use Bogus nodes for recoverable invalid syntax; end list node names with List ; represent lists as present, possibly empty nodes rather than optional fields. After a grammar change, run: just gen-grammar <lang> This updates generated syntax nodes, syntax kinds, factories, macros, and language-specific mappings. Parser rules remain hand-written. Presence Contract A parse function returns Absent only when it has consumed no tokens. Test the first distinguishing token before calling start , bump , eat , expect , or another parser that can advance. Use: expect for required tokens that should create a diagnostic when absent; eat for optional tokens; .ok() for optional nodes; .or_add_diagnostic(...) for required nodes; typed recovery for malformed nodes that should remain in the CST. Do not use backtracking where a bounded lookahead or a more precise presence test can distinguish the syntax. Error Recovery Recovery must preserve following valid syntax and produce a bogus node permitted by the grammar at that position. A recovery set normally includes the nearest relevant: list separator; list or block terminator; statement boundary; token that starts the next valid construct. Do not copy a recovery set from an unrelated grammar position. Verify which tokens the caller expects after the failed parse. Lists Use the parser infrastructure's list traits instead of open-coded loops when their contract matches the grammar. For separated lists, verify: the parser recognizes the enclosing terminator; separator handling agrees with trailing-separator grammar; a malformed element makes progress or stops; recovery cannot consume the enclosing terminator; an empty list still produces the required list node. Lexer and Token Source Follow the current Lexer and buffered token-source traits from biome_parser ; do not copy an old trait implementation from a skill or issue. Use checked byte and character accessors supplied by the lexer infrastructure. Keep lexing context explicit where the same bytes have context-dependent meaning. Ensure every lexer path advances or returns EOF. Use &str lexer tests for valid multibyte characters and character-boundary/index behavior. Test malformed byte sequences only through an existing byte-oriented API. Testing Load testing-codegen for parser quick tests and snapshot mechanics. Use the crate's quick_test to inspect a CST while developing. Add persistent fixtures under the parser crate's current ok/ and error/ directories. A parser bug fix needs the smallest fixture that failed before the change. Recovery changes need malformed input followed by valid syntax to prove parsing resumes correctly. Review Checklist Absent paths consume no input. Required nodes and tokens produce useful diagnostics. Recovery emits a grammar-valid bogus node. Every loop either advances or exits. List recovery stops before the enclosing boundary. The CST retains all source text, including malformed input. Grammar changes include generated syntax and factory artifacts. Valid and malformed fixtures exercise the changed path. References Parser guide: crates/biome_parser/CONTRIBUTING.md Grammars: xtask/codegen/*.ungram Parser infrastructure: crates/biome_parser/src/ Language implementations: crates/biome_*_parser/src/
Agent 识别该技能的关键词,点击任意一个即可复制。

该技能未提供触发词。

下载的 .skill 包内含以下字段。
字段 说明
format格式标识(skill/v1)
skill_id技能唯一 ID
name技能名称
version版本号
description技能描述
category所属分类(数组)
trigger_words触发词列表
tags标签列表
source来源标识
source_url来源链接(本页地址)
exported_at导出时间(每次下载生成)
system_prompt系统提示词正文
model_config模型参数:provider / model / temperature / max_tokens / top_p
examples示例
install_guide各平台导入说明(Coze / Dify / Claude / 自定义框架)
同一份技能可按不同平台格式导出。
.skill 标准格式,含 system_prompt 与 model_config,导入任意 Agent 框架即可使用 下载
.skillpro 增强格式,额外含脚本 / 工具 / 依赖 / 钩子占位 下载
.json 纯 JSON 导出,只含 system_prompt 与模型参数 下载
Coze 带 frontmatter 的 Markdown,Coze 平台导入用 下载
Dify Dify DSL,创建应用后直接导入 下载

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。