📋 YAML — 技能工具
v1.0.0[自动翻译] Write valid YAML that parses predictably across languages and versions.
2· 1.4k·0 当前·0 累计
安全扫描
OpenClaw
安全
high confidenceThe skill is an instruction-only helper for producing compatible YAML; its declared purpose matches its requirements and it asks for no credentials or installs.
评估建议
This is an instruction-only YAML style/compatibility helper and appears coherent and low-risk. Before relying on outputs, confirm which YAML version and parser your target environment uses (YAML 1.1 vs 1.2 differences matter), and test generated YAML with that parser. If you need the agent to read or transform real files, expect a separate skill or explicit instructions that request file access; this skill does not do file I/O or require credentials.详细分析 ▾
✓ 用途与能力
Name/description: 'Write valid YAML...' matches the SKILL.md content, which is a focused style/compatibility guidance. The skill requests no binaries, env vars, or config paths—everything requested is proportional to a documentation/instruction helper.
✓ 指令范围
SKILL.md contains only YAML guidance (type coercion, indentation, strings, multiline, anchors, compatibility). It does not instruct the agent to read files, access environment variables, call external endpoints, or perform unrelated system operations.
✓ 安装机制
No install spec and no code files — instruction-only. This minimizes risk because nothing is written to disk or executed during install.
✓ 凭证需求
The skill declares no environment variables, credentials, or config-path requirements. There are no requests for unrelated secrets or system access.
✓ 持久化与权限
always is false and the skill is user-invocable. It does not request persistent privileges or modify other skills or system settings.
安全有层次,运行前请审查代码。
运行时依赖
🖥️ OSLinux · macOS · Windows
版本
latestv1.0.02026/2/10
● 无害
安装命令
点击复制官方npx clawhub@latest install yaml
镜像加速npx clawhub@latest install yaml --registry https://cn.longxiaskill.com✓ 镜像可用
技能文档
Type Coercion Traps
yes,no,on,off,true,false→ boolean; quote if literal string:"yes"NO(Norway country code) → false in YAML 1.1; always quote country codes1.0→ float,1→ int; quote version numbers:"1.0"010→ octal (8) in YAML 1.1; quote or use0o10explicitlynull,~, empty value → null; quote if literal:"null","~".inf,-.inf,.nan→ special floats; quote if literal strings
Indentation
- Spaces only—tabs are forbidden and cause parse errors
- Consistent indent width required within document—2 spaces conventional
- Sequence items
-count as indentation—nested content aligns after the space
Strings
- Colon followed by space
:triggers key-value—quote strings containing: #starts comment unless quoted—quote strings with#- Leading/trailing spaces stripped from unquoted strings—quote to preserve
- Quote strings starting with
@, ``,,&,!,|,>,{,[,%
Multiline Strings
- |
literal block preserves newlines;>folded block joins lines with spaces Trailing newline:|-and>-strip final newline;|+and>+keep trailing blank lines- Indentation of first content line sets the block indent—be consistent
Structure
Duplicate keys: YAML spec says last wins, but some parsers error—avoid duplicatesAnchors&nameand aliasesnamereduce repetition—but aliases can't override anchor valuesDocument separator---starts new document;...ends document—useful in streamsEmpty documents between---markers are valid but often unintended
Comments
- #
only valid at line start or after whitespace—key:value#commenthas no comment - No inline comments after multiline block scalars—comment applies to next line
No multi-line comment syntax—each line needs#
Compatibility
YAML 1.1 vs 1.2: boolean words (yes/no`), octal syntax differ—know which version parser uses- JSON is valid YAML 1.2—but YAML features (anchors, multiline) don't round-trip to JSON
- Some parsers limit nesting depth or file size—test with expected data scale