skills
6 questions
- AI
How do I keep my skill body short and reference long material on demand?
A skill is a directory, not a single file. Keep SKILL.md under ~500 lines and move long reference into supporting files (reference.md, examples/, scripts/) that the body links to. Claude reads supporting files only when SKILL.md prose tells it to; the body itself stays in context for the rest of the session.
- AI
What does Claude Code's skill auto-invocation actually look like in a real session?
A captured `claude --print` session against the demo app, with a `booking-conventions` skill defined at `.claude/skills/booking-conventions/SKILL.md`. The prompt mentioned bookings without mentioning the skill. The events.jsonl init event listed the skill in its `skills` array; Claude's first tool call was `Skill({skill: 'booking-conventions'})`, which loaded the full convention content into the session before any reads or edits. The implementation that landed honored the skill's status state machine and lexical-sort guidance without those rules ever appearing in the prompt.
- AI
How do I share my Claude Code setup as a plugin with one config file?
Plugins are how you turn `.claude/` into something a teammate installs with one slash command. Two config files (`plugin.json` + `marketplace.json`), one git repo, one `/plugin install`. Plus the namespacing rule that surprises people and the version-pinning trap that quietly stops updates.
- AI
Should this be a skill, a plugin, a subagent, or an MCP server?
Skills are reusable prompts. Subagents are isolated research workers. MCP servers are persistent stateful tools. Plugins bundle the three for distribution. Pick by asking which property you actually need: persistence, isolation, or reusability.
- AI
How do I pass arguments to my custom slash command?
Use `$ARGUMENTS` for the whole input, `$0`/`$1`/`$ARGUMENTS[N]` for positional, or named placeholders via the `arguments` frontmatter list. Multi-word values need quotes. Inline `!`shell`` expands before Claude sees the prompt unless you have disabled skill shell execution.
- AI
How do I add my own /command to Claude Code?
Drop a SKILL.md file in .claude/skills/your-command/. Edits hot-reload in the current session, but creating the skills directory for the first time needs a restart. Slash commands and skills are now the same feature; the .claude/commands/ path still works but skills add the features you actually want.