Claude Code

Slash Commands in Claude Code: Complete Guide to Creating and Using (2026)

minhaskills.io Slash Commands in Claude Code: Complete Guide to Creating and Using (2026) Claude Code
minhakills.io 2 Apr 2026 11 min read

If you use Claude Code in the terminal, you may have already noticed that typing/opens a list of commands. These are theslash commands-- shortcuts that perform specific actions without having to type long prompts.

But most users stop at native commands and never discover that they cancreate your own slash commandsusing Skills. In this guide, you will learn everything: from the built-in commands to how to create a costm skill from scratch.

1. What are slash commands in Claude Code

Slash commands are commands that start with/and that you type directly at the Claude Code prompt. They are divided into two types:

The bottom line: costm slash commands transform Claude Code from a generic wizard into aspecialist on demand. You type/auditoria-seoand it performs a full audit. Digital/gerar-copyand he creates copy following specific frameworks.

How Claude detects skills:When starting a session, Claude Code scans the folders.claude/skills/of the local project and~/.claude/skills/global. Each subfolder with a fileSKILL.mdis registered as an available slash command. The name and description come from the file's frontmatter.

2. All native slash commands

Claude Code comes with a series of built-in commands. Here is the complete and updated list:

Command What it does
/helpShows the list of available commands and general help
/clearClears all context of the current conversation, starting from scratch
/compactCompresses conversation history to save tokens (accepts optional instructions on how to summarize)
/costShows the accumulated token cost of the current session
/initGenerate the fileCLAUDE.mdof the project with instructions based on the codebase
/reviewDo code review of the current diff (changes not committed)
/terminal-setupInstall the Shift+Cmd+U shortcut to get terminal context
/configOpen the Claude Code configuration file
/logoutCloses the current authentication session
/loginSwitch account or authentication method
/doctorDiagnose installation and configuration problems
/permissionsShow and manage tool permissions
/memoryEdit the fileCLAUDE.mdof the project
/modelSwitch between available templates (Opus, Sonnet, Haiku)
/vimActivate vim editing mode in input

These commands cover system operations. But note: none of them specialize inmarketing, SEO, copywriting, development with specific frameworksor any technical domain. For this, you need skills.

3. How to create costm slash commands using Skills

Claude Code's Skills system is straightforward: you create a folder with a Markdown file and Claude Code does the rest. No package installation, no compilation, no CLI configuration.

The 3-step process:

  1. Create the skill folderinside.claude/skills/(in the project) or~/.claude/skills/(global)
  2. Create the fileSKILL.mdwith YAML frontmatter + Markdown instructions
  3. Ready.The next time you type/In Claude Code, your skill appears in the list
Terminal
# Criar estrutura da skill
$ mkdir -p .claude/skills/auditoria-seo
$ touch .claude/skills/auditoria-seo/SKILL.md

# Agora abra o Claude Code e digite /
$ claude
> / ← sua skill "auditoria-seo" aparece aqui

Claude Code detects new skills automatically when starting the session. If you add a skill with Claude Code already open, start a new session with/clearor restart Claude Code for it to appear.

4. Complete structure of a skill

A skill can be simple (just theSKILL.md) or complete (with tests and reference files). Here is the maximum structure:

.claude/skills/
  minha-skill/
    SKILL.md ← instrucoes (obrigatorio)
    evals/
      evals.json ← testes automateds (opcional)
    references/
      dados.md ← contexto extra (opcional)
      template.html ← templates (opcional)

The SKILL.md file

The main file for every skill. It has two parts: theYAML frontmatter(metadata) and theMarkdown body(instructions).

SKILL.md
---
name: auditoria-seo
description: Faz auditoria SEO completa de uma pagina ou site
---

# Auditoria SEO

Voce e um especialista em SEO tecnico e on-page.
Quando acionado, execute a seguinte auditoria:

## Checklist
1. Analise a tag <title> (comprimento, keyword)
2. Verifique a meta description
3. Avalie a estrutura de headings (H1-H6)
4. Confira canonical, hreflang, robots
5. Analise schema markup (JSON-LD)
6. Verifique imagens (alt text, formatos)
7. Analise links internos e externos
8. Avalie Core Web Vitals potenciais

## Formato de saida
Entregue um relatorio com:
- Score de 0-100
- Problemas criticos (vermelho)
- Improvements recomendadas (amarelo)
- O que esta bom (verde)

Frontmatter fields

Field Mandatory Description
nameSimName of the slash command (appears as/nome)
descriptionSimShort description that appears in the command list

The Markdown body accepts any formatting: lists, tables, code blocks, headings. Everything you write there will be the instruction that Claude follows when the user activates the command.

references/ folder

Files in folderreferences/are loaded as additional context when the skill is triggered. Use for:

evals/ folder

The fileevals.jsondefines automated tests to validate whether the skill is working correctly. It is useful for those who distribute skills or want to guarantee quality after updates.

5. Where to put files: local vs global

Claude Code looks for skills in two places:

Location Path Scope
Project (location) .claude/skills/ Only available when you open Claude Code in that project directory
User (global) ~/.claude/skills/ Available in any project, in any directory

When to use each one?

Practical tip:If you work in marketing, put your marketing skills in the global folder (~/.claude/skills/). So, no matter what project you're on -- your copy, SEO, ads and analytics skills are always available.

If there is a local and a global skill with the same name, the local one has priority. This allows you to costmize behaviors per project.

Want to master this faster?

Everything you are learning here becomes 10x more powerful with ready-made skills. Instead of typing commands manually, skills do the heavy lifting for you. 748+ professional skills, installs in 2 minutes.

Quero as Skills — $9

6. Practical examples: 3 skills from scratch

We are going to create three real skills for you to understand the pattern and start using today.

Example 1: On-Page SEO Audit

.claude/skills/seo-audit/SKILL.md
---
name: seo-audit
description: Auditoria SEO on-page completa com score e recomendacoes
---

# SEO Audit Skill

Voce e um consultor SEO senior com 10 anos de experiencia.

## Ao ser acionado:
1. Peca a URL ou o HTML da pagina
2. Analise os seguintes elementos:
  - Title tag (50-60 chars, keyword presente)
  - Meta description (150-160 chars)
  - H1 unico e com keyword principal
  - Hierarquia H2-H6 logica
  - Schema markup (JSON-LD)
  - Canonical e hreflang
  - Alt text em imagens
  - Links internos (min 3-5)
  - Core Web Vitals potenciais

## Formato do relatorio:
Score: X/100
[CRITICO] Problemas que precisam de correcao imediata
[ALERTA] Improvements recomendadas
[OK] Elementos que estao corretos

With this skill installed, you type/seo-auditin Claude Code and it starts the audit automatically.

Example 2: Copy Generator (AIDA)

.claude/skills/gerar-copy/SKILL.md
---
name: gerar-copy
description: Gera copy de vendas usando framework AIDA
---

# Copywriter AIDA

Voce e um copywriter direto-resposta especializado
no framework AIDA (Atencao, Interesse, Desejo, Acao).

## Ao ser acionado:
Peca ao usuario:
1. Produto/servico
2. Publico-alvo
3. Principal dor/desejo
4. Formato (landing page, email, anuncio, post)

## Regras de escrita:
- Frases curtas (max 20 palavras)
- Paragrafos de 1-3 linhas
- Beneficios > funcionalidades
- Use numeros especificos ("em 14 dias", nao "rapidamente")
- Tom: confiante, direto, sem jargao
- Inclua pelo menos 3 CTAs ao longo do texto

Example 3: Automated Code Review

.claude/skills/code-review/SKILL.md
---
name: code-review
description: Code review detalhado com foco em seguranca e performance
---

# Code Review Skill

Voce e um engenheiro de software senior fazendo code review.

## Ao ser acionado:
1. Leia o diff atual (git diff) ou o arquivo indicado
2. Analise os seguintes aspectos:

### Seguranca
- SQL injection, XSS, CSRF
- Secrets/credenciais expostas
- Validacao de input

### Performance
- Queries N+1
- Memory leaks potenciais
- Operacoes desnecessarias em loops

### Qualidade
- Naming conventions
- DRY (codigo duplicado)
- Complexidade ciclomatica
- Testes ausentes

## Formato:
Para cada issue encontrada:
[SEVERITY] arquivo:linha - descricao + sugestao de fix

Note the pattern: every skill follows the same structure -- frontmatter with name and description, role context (who Claude should be), instructions for when triggered, execution rules and output format.

7. Advanced tips: evals, references and composition

Using reference files

For skills that need rich context, add files to the folderreferences/. Claude Code loads these files automatically when the skill is activated.

.claude/skills/
  email-marketing/
    SKILL.md
    references/
      tone-of-voice.md ← guia de tom de voz da marca
      melhores-subjects.md ← subjects lines que funcionaram
      template-email.html ← template HTML padrao

No SKILL.md, you can reference these files directly in the instructions. Claude will have access to them as part of the skill context.

Testing with evals

The fileevals/evals.jsonallows you to define tests to validate that the skill works as expected. The structure follows the standard:

Evals are useful for those who create skills for teams or for distribution -- they ensure that updates do not break the expected behavior.

Composition: combining multiple skills

You can create skills that reference other skills. For example, a "product launch" skill that directs Claude to execute sequentially:

  1. The market research skill
  2. The copy generation skill
  3. The landing page creation skill
  4. The tracking configuration skill

This turns Claude Code into a true automated workflow, where each step feeds into the next.

Good practices when writing skills

8. Why not create it from scratch?

Youhe cancreate all your skills from scratch. But consider what this involves:

The real cost of creating skills from scratch isn't just the writing time -- it's theopportunity cost. Every hour you spend writing a skill is an hour youit is notusing Claude Code to deliver real work to your clients.

The math is simple

If you charge R$100/hour and spend 2 hours creating a skill, the real cost was R$200. For $9, you have access to an entire package with hundreds of ready-made, tested and updated skills.

It's not about "not knowing how to create" -- it's about using your time on what generates revenue and leaving the infrastructure ready for those who have already done the heavy lifting.

Next step: install skills and see the difference

You already know the basics. Now imagine Claude Code knowing how to do all this himself — SEO, copywriting, code review, deployment, data analysis. That's what skills do. Lifetime access, updates included.

Ver o Mega Bundle — $9
SPECIAL OFFER — LIMITED TIME

The Largest AI Skills Package on the Market

748+ Skills + 12 Bonus Packs + 120,000 Prompts

748+
Professional Skills
Marketing, SEO, Copy, Dev, Social
12
GitHub Bonus Packs
8,107 skills + 4,076 workflows
100K+
AI Prompts
ChatGPT, Claude, Gemini, Midjourney
135
Ready-Made Agents
Automation, data, business, dev

Was $39

$9

One-time payment • Lifetime access • Free updates

GET THE MEGA BUNDLE NOW

Install in 2 minutes • Works with Claude Code, Cursor, ChatGPT • 7-day guarantee

✓ SEO & GEO (20 skills) ✓ Copywriting (34 skills) ✓ Dev (284 skills) ✓ Social Media (170 skills) ✓ n8n Templates (4,076)

FAQ

Native slash commands (like/help, /clear, /compact) are commands built into Claude Code that perform system actions. Custom skills are filesSKILL.mdthat you create in the folder.claude/skills/-- they appear as costm slash commands in the same list. When you type/, both natives and skills appear together.

Create a folder inside.claude/skills/in your project (for local access) or in~/.claude/skills/(for global access). Inside the folder, create a fileSKILL.mdwith YAML frontmatter containingname e description, followed by instructions in Markdown. Claude Code automatically detects and the command appears when you type/in the terminal.

Yes. Claude Code scans all folders within.claude/skills/and records eachSKILL.mdas a setote slash command. You can combine local skills (project specific) with global skills (available in all projects). Packages likeminhakills.iooffer 748+ professional skills in 7 categories ready to install at once.

Share este artigo X / Twitter LinkedIn Facebook WhatsApp
PT EN