In Claude Code, the concept of "skills" translates to two powerful features: Custom Slash Commands (for repeatable workflows) and MCP (Model Context Protocol) Servers (for giving Claude new external tools).
Here is a guide on when to use them, how to find them, and how to create your own.
You don't need them on day one. You should start creating "skills" (custom commands) when you notice repetition or complex multi-step workflows that you find yourself typing out manually over and over.
Start using Custom Commands when:
Start using MCP (External Tools) when:
package.json.Claude Code comes with a few built-in commands, and you can view them at any time by typing / in the Claude Code prompt.
/help - Shows general help and available commands./clear - Clears the conversation context (as we discussed)./compact - Summarizes the current conversation to save context window space without losing the thread entirely./cost - Shows token usage and API costs for the current session./config - Opens configuration settings.Note: If there are project-specific custom commands, they will also show up in this / autocomplete menu.
Creating custom commands is incredibly easy. They are simply Markdown files stored in a specific directory.
You can create commands globally (for all projects) or locally (just for this project).
.claude/commands/ in your project root.~/.claude/commands/ in your home directory.Inside the commands folder, create a .md file. The name of the file becomes the command name.
For example, if you want a command called /security-check, create a file named security-check.md.
Inside security-check.md, write the exact prompt you want Claude to execute. You can use the $ARGUMENTS placeholder to pass variables when you run the command.
Example security-check.md:
Please analyze the following file or directory for security vulnerabilities: $ARGUMENTS
Specifically look for:
1. SQL Injection risks
2. XSS vulnerabilities
3. Hardcoded secrets or API keys
Provide a summary of your findings, and then propose a git diff to fix the most critical issues.
Now, inside Claude Code, you can simply type:
/security-check src/api/login.py
Claude will automatically load your prompt, replace $ARGUMENTS with src/api/login.py, and execute the complex workflow.
If you want to give Claude the "skill" to query a database or talk to GitHub, you use MCP (Model Context Protocol). MCP is an open standard that lets Claude Code connect to external servers.
There are pre-built MCP servers for popular tools (like Postgres, GitHub, Google Drive, Puppeteer). You can find community-made MCP servers on GitHub or the official Anthropic MCP documentation.
You can add an MCP server by editing your Claude Code configuration or using the CLI command:
claude mcp add <name> <command> [args...]
Example: Adding a Postgres MCP Server Let's say you want Claude to be able to query your local database. You would run:
claude mcp add postgres npx -y @modelcontextprotocol/server-postgres "postgresql://user:password@localhost:5432/mydb"
Once configured, restart Claude Code. Claude will now have access to the postgres MCP server. You can simply ask:
"Look at the database schema and write a FastAPI route to fetch all users."
Claude will autonomously use the MCP tool to inspect your database tables, learn the schema, and then write the code based on real, live data.
CLAUDE.md for context./clear often, scopes tasks well, and creates a few Custom Slash Commands (.md files) for repetitive code reviews or linting.ai