All Agent Engineering

Claude Code skill arguments: positions, quoting and missing values

Inspect how multiple arguments enter the body and prevent unresolved placeholders.

AINavWritten / Updated
On this page

At a glance

This page inspects one configuration or restoration contract from official documentation. No actual skill, subagent, hook or restoration was executed. Local checks use synthetic inputs and are not complete product tests.

Runtime and applicability

Article type
Spec file
Verified
Applies to
  • Claude Code Applies to the documented Claude Code configuration and version contract.

File locations

PathScopeHow it is read
.claude/skills/<name>/SKILL.mdThe configuration or session operation described here.Read by Claude Code under the relevant loading and event contract; not enabled in this run.

When to use

  • Inspect how multiple arguments enter the body and prevent unresolved placeholders.

When not to use

  • Establish required inputs, permission scope and recovery points before execution.

Positions start at zero

In a skill body, $ARGUMENTS is the complete argument string, $ARGUMENTS[N] uses zero-based positions and $N is shorthand. Define each input position and inspect the invocation rather than assuming $1 is the first item. Only synthetic arguments were checked; no actual skill was loaded or invoked.

Preserve multi-word arguments with quotes

Indexed arguments use shell-style quoting: /my-skill "hello world" second supplies hello world to $0 and second to $1, while $ARGUMENTS retains the original full string. Argument values containing $1 or $ARGUMENTS are inserted literally without another expansion of those placeholders.

Missing positions may remain in the body

An indexed placeholder such as $2 stays unchanged when its position is absent; a named frontmatter argument without a value becomes empty. Inspect required rendered input and stop the task on literal placeholders or missing values. A standard-library tokenization check is not end-to-end Claude Code verification.

Sources

All links are official pages; verification dates are listed per source, and links point to the version checked.

  1. Anthropic · Extend Claude with skills

Found an error? Tell us →