# How should a Claude Code skill handle missing, malformed, or unsafe arguments?

Exam: CCAR-F — Claude Certified Architect - Foundations (CCAR-F)
Knowledge domain: Claude Code Configuration & Workflows
Updated: 2026-12-04T01:16:40.510656+00:00
HTML: https://learningpathx.com/faq/CCAR-F/ccarf-skill-argument-contract.html

## Also asked as

- Does argument-hint validate inputs to a Claude Code skill?
- How do I define and check the input contract for a parameterized Claude Code skill?

Define the skill's input contract in its instructions and validate consequential values in trusted code before using them. `argument-hint` describes expected input during autocomplete; it does not implement validation or guarantee a missing-input prompt.

State each argument's purpose, position, accepted values, and failure behavior. Current Claude Code supports `$ARGUMENTS` for supplied arguments, zero-based `$ARGUMENTS[N]`, and the shorter `$N` forms. Named arguments require the supported `arguments` declaration. Inspect the actual expanded input; a placeholder or frontmatter key alone does not establish that the intended value arrived.

For a document-preview skill, require a permitted repository-relative source path and an output format from a declared set. If the format is missing, ask for it before processing. If the path resolves outside the authorized scope or the format is unsupported, return a specific error without reading the rejected target or creating output. Treat the supplied text as data rather than executable shell text or new instructions.

Test an ordinary invocation, a path with spaces, missing input, an unsupported option, and a path outside scope. Check quoting and parsing in the installed client instead of assuming every slash-command parser behaves alike. Do not guess missing values merely to continue.

Keep the resolved skill name and source unambiguous when sharing the workflow. Include its supporting resources in the shared checkout and test the selected definition. Invocation settings and tool preapproval remain separate from input validation and destination authorization.

[Claude Code skill arguments and frontmatter](https://code.claude.com/docs/en/skills#pass-arguments-to-skills)

Source: [Create and configure custom slash commands and skills](https://learningpathx.com/material/CCAR-F/create-and-configure-custom-slash-commands-and-skills.html)
