Built-in Skills and Slash Commands
The command layer
Before custom skills became widespread, both Claude Code and Codex shipped with built-in commands that handle common workflows. These commands remain useful even with full skill systems in place. Some have been reimplemented as skills internally, while others remain hardcoded for performance or security reasons.
Understanding the built-in command vocabulary helps in two ways. First, built-in commands handle frequent operations more reliably than custom alternatives. Second, knowing what the platform provides prevents reinventing functionality that already exists.
Claude Code slash commands
Claude Code organizes built-in functionality into slash commands invoked by typing / followed by the command name.
The commands fall into several categories.
Session management
| Command | Purpose |
|---|---|
/clear | Remove all conversation history, keeping project context |
/compact [instructions] | Compress history while preserving specified information |
/rewind | Restore to a previous checkpoint in conversation or code |
/resume [session] | Continue a previous session by ID or name |
/rename <name> | Give the current session a memorable name |
/export [filename] | Save conversation to a file or clipboard |
The /compact command accepts optional focus instructions.
When context grows large, /compact preserve: authentication flow, API decisions tells the compaction algorithm what matters most.
Without guidance, the algorithm makes its own choices about what to summarize away.
Information and status
| Command | Purpose |
|---|---|
/help | Display command reference and usage information |
/status | Show version, model, account, and connectivity details |
/context | Visualize current token usage as a colored grid |
/cost | Display token usage statistics for the session |
/usage | Show plan limits and rate limit status (subscription only) |
/stats | Display daily usage, session history, and model preferences |
/tasks | List and manage background tasks |
/todos | Show current TODO items being tracked |
The /context command is particularly useful during long sessions.
It renders a visual breakdown of how context window capacity is being consumed: project files, conversation history, tool results, and agent overhead.
When context approaches capacity, this visualization helps identify what to compact or clear.
Configuration and setup
| Command | Purpose |
|---|---|
/config | Open the settings interface |
/init | Create a starter CLAUDE.md file from codebase analysis |
/memory | View and edit loaded memory files |
/permissions | View or modify tool permissions |
/hooks | Configure automation hooks through interactive menu |
/model | Switch the active model |
/theme | Change the color theme |
/statusline | Configure the status line UI display |
/mcp | Manage MCP server connections and OAuth |
The /init command deserves special mention.
Running it in a new project generates a starter CLAUDE.md by examining package files, configuration, directory structure, and code patterns.
The generated file provides a reasonable starting point that teams then customize.
Advanced features
| Command | Purpose |
|---|---|
/plan | Enter plan mode for structured task breakdown |
/doctor | Check installation health and diagnose issues |
/teleport | Resume a remote session from claude.ai (subscribers only) |
Quick prefixes
Beyond full commands, Claude Code supports shorthand prefixes:
| Prefix | Effect |
|---|---|
! | Execute the following as a bash command directly |
@ | Attach a file path with autocomplete |
# | Add a quick memory note (e.g., # Use 2-space indentation) |
These prefixes reduce friction for common operations without invoking the full command system.
Codex interactive commands
Codex provides a parallel command vocabulary with some overlap and some unique functionality.
Session commands
| Command | Purpose |
|---|---|
/new | Start a new conversation in the same CLI session |
/fork | Fork current conversation into a new thread |
/resume | Resume a saved conversation from session list |
/exit or /quit | Terminate the session |
Information commands
| Command | Purpose |
|---|---|
/status | Display configuration and token usage |
/diff | Show Git diff including untracked files |
/mcp | List configured MCP tools |
/feedback | Send logs to maintainers |
Configuration commands
| Command | Purpose |
|---|---|
/approvals | Set what Codex can do without asking (Auto, Read-only, Full Access) |
/model | Choose active model and reasoning effort |
/init | Generate an AGENTS.md scaffold |
/mention | Attach a file to the conversation |
/review | Ask Codex to review your working tree with configurable presets |
/compact | Summarize visible conversation to free tokens |
/logout | Sign out of Codex |
The /approvals command controls Codex's autonomy level mid-session.
Switching between Auto, Read-only, and Full Access adjusts what actions require explicit confirmation.
Skill invocation
Codex uses the $ prefix for skills rather than /:
# Invoke a skill in Codex
$skill-creator # Create new skills from natural language
$skill-installer # Download skills from curated repository
$create-plan # Research and create implementation plansThis syntactic difference matters when working across both platforms.
Claude Code skills invoke with /skill-name.
Codex skills invoke with $skill-name.
Document manipulation capabilities
Both platforms support working with common document formats, though the implementation differs.
PDF handling
Claude Code natively reads PDF files through its Read tool. The process involves rasterizing each page to a high-resolution image while extracting text. For scanned documents, OCR applies automatically.
# In Claude Code, just reference the PDF
"Analyze the quarterly report in reports/Q4-2025.pdf"No special skill or MCP server required for reading. The agent receives both visual layout and extracted text, enabling analysis of charts, tables, and formatted content.
Limitations for native PDF reading:
- Maximum request size: 32MB
- Maximum pages per request: 100
- Cannot create or modify PDFs natively
For PDF creation and editing, skills or MCP servers provide that functionality.
Excel, Word, and PowerPoint
These formats require skills rather than native support. The official Anthropic skills repository (github.com/anthropics/skills) provides production-ready capabilities:
| Format | Skill capabilities |
|---|---|
| Excel (.xlsx) | Create spreadsheets, build formulas, generate charts, data validation |
| Word (.docx) | Create documents, format text, tracked changes, OOXML manipulation |
| PowerPoint (.pptx) | Create presentations, edit slides, HTML-to-PPTX conversion |
Installation in Claude Code:
/plugin marketplace add anthropics/skills
/plugin install document-skills@anthropic-agent-skillsOnce installed, these skills activate automatically when tasks involve the relevant formats. Request "Create a budget spreadsheet" and the xlsx skill loads. Ask for "a presentation summarizing the architecture" and the pptx skill engages.
Skills for document manipulation follow the progressive disclosure pattern from Page 1. Only metadata loads at startup. Full instructions load when you actually work with documents. This prevents document skills from consuming context when you're doing pure code work.
How commands became skills
Claude Code version 2.1.3 merged the custom commands system into skills.
Previously, custom commands lived in .claude/commands/ as single markdown files.
That structure still works, but skills in .claude/skills/ provide additional capabilities.
| Feature | Legacy commands | Skills |
|---|---|---|
| Location | .claude/commands/foo.md | .claude/skills/foo/SKILL.md |
| Supporting files | Not supported | Can include scripts, templates, references |
| Auto-invocation | No | Configurable via frontmatter |
| Tool restrictions | Use conversation defaults | Can specify allowed-tools |
Both create the same /foo invocation.
New development favors skills for the additional flexibility.
Existing commands continue working without migration.
The merger reflects a pattern in agent tooling: specialized features consolidate into general-purpose systems. Commands were a proto-skill system. As skills matured, maintaining separate implementations made less sense.
MCP-provided commands
MCP servers can expose prompts that appear as commands with the format /mcp__<server>__<prompt>.
These are discovered dynamically from connected servers.
For example, a database MCP server might expose /mcp__postgres__query-tables that provides structured database interaction beyond what ad-hoc prompting offers.
The distinction matters for understanding where commands originate:
/compactis built into Claude Code/code-reviewmight be a custom skill/mcp__github__create-prcomes from an MCP server
Knowing the source helps troubleshoot when commands don't behave as expected.
Choosing between commands, skills, and direct interaction
Built-in commands handle platform operations: session management, configuration, status. Skills handle domain workflows: code review, commit procedures, deployment verification. Direct interaction handles everything else.
The decision tree:
- Is this a platform operation? Use built-in commands.
- Is this a repeated workflow? Consider or create a skill.
- Is this ad-hoc? Use direct interaction.
Attempting to replicate built-in commands as skills rarely improves outcomes.
The built-in /compact has deeper integration with context management than any skill could achieve.
Focus skill development on domain-specific workflows where platform primitives don't reach.
The next page covers skill invocation mechanics and configuration options in detail, including the YAML frontmatter fields that control how skills behave when activated.