Claude Code slash commands are markdown files with optional YAML frontmatter that create reusable /command workflows. Commands and skills are unified: .claude/commands/ files and .claude/skills/ directories both create slash commands. Skills are the recommended approach since they support additional features like supporting files, but single-file commands still work.
When to use: Repeatable prompts, team workflow standardization, guardrailed operations (deploy, commit), multi-phase tasks, dynamic context injection with bash output.
When NOT to use: Complex capabilities needing multiple files and scripts (use a full skill directory instead), one-off prompts, built-in commands that already exist (/compact, /help, /init).
Создавайте собственные команды слэша для кода Claude с уценкой и форматом YAML. Используйте при построении автоматизации рабочих процессов, создании многократно используемых подсказок или определении пользовательских команд /. Используйте для команд с косой чертой, обработки аргументов, ссылок на файлы, выполнения bash. Источник: oakoss/agent-skills.