Working with Claude Code: 5. Skills

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.


1. When should you start using them?

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:


2. How to explore existing skills (Commands)

Claude Code comes with a few built-in commands, and you can view them at any time by typing / in the Claude Code prompt.

Note: If there are project-specific custom commands, they will also show up in this / autocomplete menu.


3. How to implement new "Skills" (Custom Slash Commands)

Creating custom commands is incredibly easy. They are simply Markdown files stored in a specific directory.

Step 1: Create the commands folder

You can create commands globally (for all projects) or locally (just for this project).

Step 2: Create the Markdown file

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.

Step 3: Write the prompt

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.

Step 4: Use your new skill

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.


4. How to implement new "Skills" (MCP Servers for External Tools)

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.

Step 1: Find or build an MCP Server

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.

Step 2: Add the MCP server to Claude Code

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"

Step 3: Use the new skill

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.


Summary: The Progression of a Claude Code User

  1. Beginner: Types everything out manually. Uses CLAUDE.md for context.
  2. Intermediate: Uses /clear often, scopes tasks well, and creates a few Custom Slash Commands (.md files) for repetitive code reviews or linting.
  3. Advanced: Uses MCP Servers to connect Claude directly to databases, APIs, and issue trackers, turning Claude Code into a fully integrated member of the development environment.

ai

Back