Skill Arguments - Claude Code
Pass arguments to skills with string substitution support.
Skill arguments let you parameterize a skill so it can be reused across different inputs without duplicating the whole file.
What it does
You define placeholders in the skill body and users pass values when they invoke the skill. For example, /newblog "topic" can substitute the topic into the instructions. The argument syntax is documented with the skill's description so users know what to pass. It turns static skills into small functions.
When to use it
- Skills that operate on a variable target (filename, topic, URL).
- Parameterized workflows like "write a blog about X" or "review file Y".
- Reducing skill proliferation - one parametric skill beats ten near-identical ones.
- Encoding team conventions with per-invocation overrides.
Gotchas
- Document argument names and formats in the skill description or the skill's README.
- Quoting matters. Arguments with spaces need quotes on the command line.
- Optional arguments still require a placeholder strategy - decide on defaults explicitly.
Official docs: https://code.claude.com/docs/en/skills.md#pass-arguments-to-skills
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Get the weekly deep dive
Tutorials on Claude Code, AI agents, and dev tools - delivered free every week.
Was this helpful?




