cajias/claude-skills/cc-slash-command-argument-hint-yaml
Claude Code and agent skill by cajias/claude-skills
- community
Checking that the SKILL.md file is still in the repository.
Fix for Claude Code slash command frontmatter that fails to parse when `argument-hint:` is given square-bracketed placeholder values. Use when: (1) authoring `commands/<name>.md` files in a CC plugin and the frontmatter shows `argument-hint: [working-dir] [team-name]` or similar multi-token bracketed values; (2) a frontmatter-validation test (e.g. `yaml.safe_load(block)` over the SKILL/command frontmatter) raises `ScannerError` or `ConstructorError` complaining about flow sequences or "expected a mapping"; (3) the slash command silently doesn't appear in `/help` after install, or a plugin-marketplace test asserting the `description` field is present trips because the whole frontmatter parse blew up. The fix is to QUOTE the value as a single string. Covers the same trap for `commands/<name>.md` directly authored in CC format AND APM-managed marketplaces shipping commands via APM.
Install
npx vskill@latest install cajias/claude-skills/cc-slash-command-argument-hint-yamlSKILL.md
The same SKILL.md was published earlier as cajias/claude-skills/cc-slash-command-argument-hint-yaml.
CC slash command argument-hint YAML parse trap
Problem
When authoring a Claude Code slash command (plugins/<plugin>/commands/<name>.md), the convention shown in many examples is:
This does not parse as YAML. [working-dir] is a single-element flow sequence. [working-dir] [team-name] is two flow sequences with whitespace between them — invalid syntax for a scalar value. yaml.safe_load raises ScannerError or ConstructorError.
Claude Code's command loader may swallow the parse error silently and the command never appears in /help. Worse: in a plugin marketplace context, a downstream test that asserts every command's frontmatter has a description field will fail because the whole frontmatter block failed to parse, not because description was actually missing — leading to ~30 minutes of looking at the wrong field.
Trigger conditions
Any of these:
yaml.safe_load(frontmatter)raisesyaml.scanner.ScannerErroror
yaml.constructor.ConstructorError, often pointing at the argument-hint: line.
- A plugin-marketplace test like:
``python fm = yaml.safe_load(frontmatter_block) assert "description" in fm ``
fails with a YAML error instead of an assert failure.
- The slash command was added to
plugins/<name>/commands/<cmd>.mdbut
doesn't show up in Claude Code's /help after installing the plugin.
- The frontmatter on disk shows a value with multiple bracketed tokens:
``yaml argument-hint: [working-dir] [team-name] argument-hint: [path] argument-hint: [up|down] ``
Solution
Quote the value as a single string. The angle-bracket form is the idiomatic placeholder convention for shell argument hints:
Quoting turns the value into a YAML scalar; the brackets are now just characters in a string and don't trigger flow-sequence parsing.
If you genuinely want a YAML list of hint tokens (rare; the loader typically wants a single string), use the explicit list form:
But this is almost never what argument-hint consumers expect — they treat it as display text shown next to the slash command in /help. Stick with the quoted-string form.
Verification
After quoting:
In Claude Code:
In the plugin tests (e.g., tests/test_plugin_marketplace.py):
Example — full command file (corrected)
Notes
- The trap fires specifically on multi-token bracketed values. A
single bare bracketed token like argument-hint: [path] parses as a one-element list, which the command loader may also reject (depending on how strictly it expects a string). Quote it for safety.
- Prettier and other YAML formatters generally leave bracketed flow
sequences alone; they don't auto-quote, so the fix has to be by hand.
- This is unrelated to the
[tool.ruff.lint.per-file-ignores]style
square-bracket usage in pyproject.toml (TOML, different parser).
- Origin: discovered while shipping slash commands for the
cajias/nautilus-competition APM plugin (May 2026). The agent's _parse_frontmatter() test helper caught it on first run; quoting all four argument-hint values made the test pass.
References
- YAML 1.2 flow-sequence productions:
<https://yaml.org/spec/1.2.2/#742-flow-sequence>
- Claude Code command authoring:
<https://docs.claude.com/en/docs/claude-code/plugins> (commands section)
- Plugin development skill (
plugin-dev:command-development) — the
authoritative reference for command frontmatter fields. This skill documents the YAML-parse pitfall the command-development skill doesn't cover head-on.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugins/cc-plugin-authoring/skills/cc-slash-command-argument-hint-yaml/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/cajias/claude-skills/cc-slash-command-argument-hint-yaml)