Guides · Updated November 27, 2026

How to pass arguments to an agent skill

By Tineessa Nelson, Use This Skill

To pass arguments to a skill in Claude Code, type them after the skill's name: /fix-issue 123. Inside the skill, $ARGUMENTS becomes everything you typed, $0 and $1 (or $ARGUMENTS[0]) become single arguments, and names declared in an arguments field become $name. With no placeholder, Claude Code appends ARGUMENTS: <your input> to it. Only 19 of 1,973 public skills we read on November 27, 2026 use one.

The other half of the answer is for skill authors: a dollar sign followed by a digit is a placeholder in Claude Code, even when you meant a price or a shell variable. We found 15 public skills with text like that and no intention of using arguments.

How many public skills take arguments?

We read the front matter and instructions of every skill in this directory's November 23 crawl (data/skills.json): 1,973 SKILL.md files from 47 GitHub repositories, cloned at depth 1 and parsed by script on November 27, 2026. One listed skill, sap-fiori-building-blocks, is no longer at its path. Scan results come from the weekly scan of November 23 (data/scan.json).

What the skill does Skills Repositories
Sets argument-hint (top-level front matter) 108 7
Uses $ARGUMENTS in its instructions 19 4
Sets argument-hint and uses $ARGUMENTS 18 3
Sets argument-hint but has no placeholder 90 6
Uses $ARGUMENTS[N] or $0, $1 as an argument 0 0
Declares named arguments 0 0
Contains $ and a digit that is not meant as an argument 15 6
Neither a hint nor a placeholder 1,864 45

Source: Use This Skill directory (data/skills.json, crawl of November 23, 2026), repositories cloned on November 27, 2026. 1,973 of 1,974 SKILL.md files opened. A placeholder counts only if it is not escaped with a backslash. Every "$ and a digit" match was read by hand.

One collection accounts for most of it. Donchitos/Claude-Code-Game-Studios sets argument-hint on all 78 of its skills, with hints like [feature-name or sprint-N], and 10 of them use $ARGUMENTS; adopt, for example, reads its mode from $ARGUMENTS and treats a blank value as full. nextlevelbuilder/ui-ux-pro-max-skill sets a hint on 12 of 13 skills; slides parses a subcommand from the first word of $ARGUMENTS. trailofbits/skills uses the placeholder in 4 skills, such as code-improver, which says that if $ARGUMENTS is empty, it takes the details from the conversation. That fallback is worth copying.

web-design-guidelines from vercel-labs uses $ARGUMENTS too, but puts argument-hint inside its metadata block rather than at the top level, so it is not in the 108.

Of the 109 skills with a hint or a placeholder, 106 were clear in the November 23 scan and 3 were marked for review; none was flagged. Six of them have side-by-side proofs on the proven list, including slides, brand and web-design-guidelines. Our proofs load the SKILL.md as text and send the brief as a message, so they show how these skills behave when no argument is passed at all.

How does Claude Code fill in the placeholders?

From Claude Code's skills documentation, read on November 27, 2026:

Placeholder What it becomes
$ARGUMENTS Everything typed after /name, as typed
$ARGUMENTS[N] One argument by 0-based position: $ARGUMENTS[0] is the first
$N Shorthand for $ARGUMENTS[N]: $0 is the first argument, $1 the second
$name A name declared in the arguments front matter field, mapped to positions in order
No placeholder receives anything Claude Code appends ARGUMENTS: <value> to the skill's content
$2 when only one argument was passed Left in the text unchanged
A named placeholder with no argument Becomes an empty string
\$1 A literal $1; the backslash escapes it

The arguments field takes a space-separated string or a YAML list. With arguments: [issue, branch], $issue is the first argument and $branch the second. argument-hint takes free text shown in autocomplete, such as [filename] [format]; it does not change what the skill receives.

A minimal skill that takes two arguments looks like this:

---
name: migrate-component
description: Migrate a UI component from one framework to another.
argument-hint: [component] [from] [to]
arguments: [component, from, to]
---

Migrate the $component component from $from to $to.
If no component was given, ask which one before starting.

Typing /migrate-component SearchBar React Vue gives Claude "Migrate the SearchBar component from React to Vue." Typing /migrate-component alone leaves the named placeholders empty, which is why the second line is there.

Can Claude pass arguments when it picks the skill itself?

The documentation says both you and Claude can pass arguments when invoking a skill, and gives no further detail. In practice, write instructions that still make sense if a placeholder comes back empty, as code-improver and adopt do. If a skill should only ever run when you type it, with your arguments, set disable-model-invocation; 13 of the 108 skills with a hint do, including four of mattpocock/skills' (handoff, teach, loop-me and claude-handoff).

Why would a price or a shell script break a skill?

Because $0, $1 and the rest are placeholders wherever they appear in the skill's content. If you invoke a skill with arguments, Claude Code replaces $0 with your first argument, even inside a sentence about money or a shell example. Indexed placeholders with no matching argument stay as they are, so the text looks fine until someone passes enough arguments.

The 15 skills we found fall into three kinds, all read by hand:

Kind of text Example Skills
Shell variables in code examples, such as "$1" or Usage: $0 aflpp, bats-testing-patterns, cargo-fuzz 5
Prices and figures, such as $2M ARR or $1 credit startup-metrics-framework, claude-api, x402 7
SQL or regex back-references, such as VALUES ($1, $2) python-background-jobs, setup-ts-deep-modules 3

None of these skills sets argument-hint or uses $ARGUMENTS, so they are most likely to be invoked with no arguments, and then nothing changes. Typing /aflpp docker would turn the script's Usage: $0 line into Usage: docker. The fix the documentation gives is a backslash: \$1.00, \$0. None of the 1,973 skills uses that escape today.

How do I check a skill's arguments before installing it?

Open its SKILL.md and look for three things: an argument-hint line, which tells you what to type; $ARGUMENTS, $0 or $name in the instructions, which tells you where your text goes; and any $ followed by a digit that is not meant as an argument. The live check at /scan reads any skill on GitHub for risky commands, and the MCP connector does the same from inside your agent.

If you write skills for more than one agent, remember that the Agent Skills specification defines six front matter fields (name, description, license, compatibility, metadata and allowed-tools) and no argument mechanism. Do skills work in Codex, Cursor and Gemini CLI? covers what other agents do with Claude Code-only fields, and How to create an agent skill covers the rest of the file.

How we got these numbers

The skill list and paths come from data/skills.json (crawl of November 23, 2026). Each of the 47 repositories was cloned at depth 1 from its default branch on November 27, 2026, and each SKILL.md was read at its recorded path. Front matter is the YAML block between the first two --- lines; argument-hint and arguments were counted only as top-level keys. In the instructions we searched for $ARGUMENTS, $ARGUMENTS[N], each declared name, and a $ followed by one digit that is not preceded by a backslash, a letter or another $, and not followed by another digit, a period or a comma. Every match of the last pattern was read by hand to decide whether it was meant as an argument. Placeholder behavior comes from Claude Code's documentation, read on November 27, 2026. We did not run any of these skills with arguments for this page.

Questions

What happens if my skill has no $ARGUMENTS placeholder?

Claude Code still passes what you typed. Its documentation says that when no placeholder in the skill receives an argument, it appends ARGUMENTS: followed by your input to the end of the skill's content. 90 of the 108 public skills we read that set argument-hint rely on this, and 30 of them never mention arguments in their instructions.

How do I pass an argument that contains spaces?

Wrap it in quotes. Claude Code splits indexed arguments with shell-style quoting, so /my-skill "hello world" second makes $0 expand to hello world and $1 to second. $ARGUMENTS always expands to the whole string exactly as you typed it.

Does argument-hint change what the skill receives?

No. In Claude Code it is a hint shown during autocomplete, such as [issue-number] or [filename] [format]. The skill only receives arguments through $ARGUMENTS, $N, named placeholders, or the ARGUMENTS: line Claude Code appends when no placeholder receives them.

Do arguments work in Codex, Cursor and Gemini CLI?

The Agent Skills specification, read on November 27, 2026, defines no argument mechanism and no placeholders, so $ARGUMENTS is a Claude Code feature. In another agent, write the skill so it still works when the placeholder is not filled, for example by telling the agent to take the details from the conversation when no argument was given.