Files
Holocron/plugins/kyberforge/docs/research/docs/prompt-standards/claude-code-commands.md
T
Defame1297andClaude Sonnet 5.5 f5a260e85c docs(kyberforge): research apm prompts primitive and prompt-file standards
Add prompt-target-mapping and prompt-gotchas for the apm .prompt.md
primitive from the published apm docs, correct the preserved-key set in
prompt-primitive-schema, and add prompt-standards research covering
Copilot/VS Code prompt files, Claude Code commands, Prompty, Dotprompt
and MCP prompts. No vendor-neutral prompt-file standard was found.

Refs: #149

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
2026-10-15 07:29:52 +00:00

2.3 KiB

topic, source_keys
topic source_keys
claude-code-commands
claude-code-slash-commands

Status

Custom commands have been merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and behave the same. Command files are described as the older format that still works; the docs recommend skills for new work. Nothing is deprecated. This is the format an apm prompt becomes on the Claude target.

Frontmatter

A command file accepts the same fields as a skill except name and paths. Relevant fields: description (the first non-empty body line is used if absent), argument-hint, arguments (named positional arguments, as a space-separated string or YAML list), allowed-tools (space or comma separated, or a list), model, disable-model-invocation, user-invocable, effort, context, agent, hooks, shell and others. Unrecognised fields are ignored without an error. Malformed YAML loads the body with empty metadata.

Arguments and substitution

$ARGUMENTS is the whole argument string, $ARGUMENTS[N] and $N are zero-based positional arguments ($0 is the first), and $name is a named argument declared in arguments. This answers the open question in the apm research: Claude Code does honor an arguments: list with $name substitution, alongside $ARGUMENTS and zero-based $N. An unmatched named placeholder becomes empty and an unmatched indexed placeholder stays literal. If no placeholder consumes the arguments, the text ARGUMENTS: <value> is appended. Literal dollar signs are escaped with a backslash. Inline shell injection with an exclamation-mark backtick form runs commands through permission rules and aborts the invocation on failure.

Naming and precedence

Files in subdirectories get a colon-joined name, so frontend/component.md is /frontend:component. A skill beats a command file of the same name. Enterprise beats personal and personal beats project. Plugin skills are namespaced. The anthropic-skills name is reserved.

Standards relationship

The page links to the agentskills.io evaluation guide, which shows Claude Code skills follow that open standard. Nothing on the page suggests command files are an open standard; treat .claude/commands/ as Claude Code specific.