From an Agent That Knows You to One That Works for You
If you've worked through the Memory Architecture tutorial, your agent already knows who you are —
your projects, preferences, tone, and hard limits. Skills are the next layer: they define what
your agent can do on command. Type /status and your agent runs a full
system health check. Type /deploy and it walks through your deployment checklist.
Type /brainstorm and it structures an ideation session around your actual workflow.
Skills are just Markdown files with instructions. There's no new language to learn, no plugin API to integrate, no compilation step. You write what you want the agent to do, save the file in the right place, and it becomes a slash command in your next session.
The Mental Model
The reason this matters: keeping procedures out of your always-on memory files keeps those files lean. A deployment checklist in AGENTS.md costs tokens on every single message. As a skill, it only costs tokens when you actually need to deploy.
File Structure
Every skill is a directory with a required SKILL.md entrypoint. The directory
name becomes the slash command:
.claude/skills/status/
└── SKILL.md ← becomes /status
.claude/skills/deploy-check/
├── SKILL.md ← becomes /deploy-check
└── checklist.md ← supporting file the skill can reference
Skills can live in three places depending on their scope:
~/.claude/skills/<name>/SKILL.mdAvailable in every project on this machine. Use for personal workflows — your daily standup format, your preferred code review style, your server health check.
.claude/skills/<name>/SKILL.md (inside your project)Available only in this project. Safe to commit to git — teammates get the same skills automatically. Use for deployment steps, project-specific workflows, team conventions.
~/.claude/commands/<name>.md or .claude/commands/<name>.mdThe older single-file format. Still fully supported. If you see tutorials using this format, they work exactly the same way — the
skills/ format just adds the ability
to include supporting files alongside the SKILL.md.
What You Get During Install
When you first run claude or go through the OpenClaw onboarding, you'll see prompts
about skills and plugins. Here's what those prompts are actually offering:
github.com/anthropics/skills) and Vercel's agent skills. These add
immediately useful slash commands for documents, code review, design, and more.
Accept this. You can always remove skills you don't use.
/plugin command and connects to the official Anthropic marketplace,
where you can install LSP integrations (TypeScript, Python, Go, Rust diagnostics), external
services (GitHub, Linear, Figma, Slack), and pre-packaged skill bundles.
Accept this too — it doesn't install anything automatically, it just makes
the marketplace available when you want it.
/batch, /simplify, /loop, and /debug
ship with every Claude Code installation. They're available immediately, no setup required.
We'll cover all of them in the next section.
npx skills add github.com/anthropics/skills installs the official
library any time. /plugin typed in any session opens the marketplace.
A Minimal Skill
Before diving into features — here's the simplest possible skill to make the format concrete.
Create this file and you immediately have a /hello command:
mkdir -p ~/.claude/skills/hello
nano ~/.claude/skills/hello/SKILL.md
---
description: Quick test that skill loading is working
---
Say hello and confirm which skills are currently loaded.
Type /hello in your next session. That's it — the agent reads the SKILL.md and
follows the instructions. The description frontmatter is what lets the agent
decide to use this skill automatically when it's relevant.
What Ships With Every Installation
Four skills come bundled with Claude Code and are available the moment you install it — no setup, no configuration. Most people never discover them because they're not prominently advertised. They're also some of the most powerful things in the tool.
/batch — Parallel Subagent Execution
/batch is for large-scale changes that can be broken into independent units.
It analyzes your codebase, decomposes the task into 5–30 parallel workstreams, spawns
a separate agent for each one in an isolated git worktree, and opens pull requests when
done. Work that would take hours of sequential back-and-forth completes in parallel.
/batch Add JSDoc comments to all exported functions in src/
/batch Migrate all fetch() calls to use the new apiClient wrapper
/batch Update all components to use the new Button component instead of raw <button>
/batch is smart but not infallible
across large, varied codebases. It's a force multiplier, not a set-and-forget.
/simplify — Three-Agent Code Review
/simplify spawns three parallel review agents focused on different lenses:
code quality, reusability, and efficiency. Their findings are aggregated and applied
to the code you specify. It's the closest thing to a real peer review you can get from
a single tool.
# Review your current open files
/simplify
# Focus on a specific aspect
/simplify focus on error handling
# Point at a specific file
/simplify src/auth/tokenManager.ts
Use it after you think a piece of code is done. The three-agent structure catches things a single review pass misses — one agent tends to focus on what you intended, while another is reading the code fresh and catching what you've gone blind to after staring at it.
/loop — Run a Prompt on an Interval
/loop runs a prompt repeatedly at a specified interval until you stop it or
a condition is met. Useful for babysitting long-running processes without manually polling.
# Check a deploy every 30 seconds
/loop 30 Check the deploy status at https://api.example.com/health and report if it's up
# Watch a build log for errors
/loop 10 tail -20 /var/log/build.log and alert me if you see any ERROR lines
# Monitor disk space during a large operation
/loop 60 Run df -h and warn me if any filesystem is above 85%
Stop the loop by sending /loop stop or just starting a new prompt. Particularly
useful when running on a server via Discord — you can start a loop and walk away, getting
notifications if something needs attention.
/debug — Self-Diagnosis
/debug reads Claude Code's own internal session debug log and helps you
understand what's happening when something isn't working. Useful when:
- A skill isn't appearing in the slash command menu
- A hook isn't firing when you expect it to
- Memory files don't seem to be loading
- An API tool call is silently failing
- The context window is behaving unexpectedly
/debug
/debug my /status skill isn't showing up in the command menu
/debug the PreToolUse hook doesn't seem to be blocking Bash commands
/debug with a description
of your problem will usually surface the answer in seconds.
Checking What's Available
To see every skill currently loaded in your session, type:
/help
This lists all available slash commands — built-in skills, community skills you've installed, and any custom skills you've written. If a skill you created isn't showing up here, check the file path and frontmatter (more in the Tips section).
To see what's consuming your context budget (relevant when you have many skills installed):
/context
Skills compete for a context budget of about 16,000 characters (2% of the context window).
If you have more skills than fit, Claude trims the least recently used. /context
shows you exactly what made the cut and what didn't.
The Best Skills You Didn't Have to Write
The skills ecosystem has grown fast. There are now hundreds of published skills covering everything from React performance patterns to security audits to marketing copy. The best ones are battle-tested by thousands of users and handle edge cases you'd have to discover the hard way if you wrote them yourself. Here are the ones worth installing.
The npx skills CLI
The universal skill installer. Works across Claude Code, Cursor, Cline, and 40+ other AI tools — but we're focused on Claude Code here. Install a skill repo in one command:
# Install all skills from a repo globally (available in all projects)
npx skills add github.com/anthropics/skills -g
# Install a single skill from a repo
npx skills add github.com/anthropics/skills --skill frontend-design -g
# Preview what's in a repo before installing
npx skills add github.com/anthropics/skills --list
# Install to current project only (no -g flag)
npx skills add github.com/anthropics/skills --skill webapp-testing
The -g flag installs to ~/.claude/skills/ (global, all projects).
Without it, skills go to .claude/skills/ in your current directory (project-only,
safe to commit).
Official Anthropic Skills
These ship from Anthropic's own repository. Maintained, tested, and worth having:
npx skills add github.com/anthropics/skills -g
/pdf extracts, creates, merges, and OCRs PDFs.
/docx creates Word documents with real formatting. /xlsx builds
spreadsheets with formulas. /pptx generates PowerPoint decks. Each handles
the file format complexity so you can just describe what you want.
Vercel Agent Skills
The most-installed community skills library. Focused on frontend and web development:
npx skills add github.com/vercel-labs/agent-skills -g
/vercel-react-best-practices.
obra/superpowers — Multi-Agent Dev Workflow
The most complete development workflow skill library. Built around the idea that planning and execution should be separate phases, with subagents handling implementation.
npx skills add obra/superpowers -g
/execute-plan.
/write-plan and executes it with
TDD enforcement. Tests get written first, then implementation, then review.
The agent can't mark work complete until tests pass.
trailofbits/skills — Security Audit
Professional-grade security audit methodology from Trail of Bits, the security research firm. Particularly relevant if you're running a server exposed to the internet (which you are if you followed the EC2 tutorial).
npx skills add trailofbits/skills -g
Covers CodeQL and Semgrep analysis, structured code auditing methodology, and variant analysis (finding all instances of a class of vulnerability, not just the one you spotted). Run it against your OpenClaw configuration and server setup — you may find things.
Installing via the Plugin Marketplace
The /plugin command opens the official Anthropic marketplace directly in your
session. Some of the highest-value plugins for this audience:
# Browse the marketplace
/plugin
# Install directly if you know the plugin name
/plugin install typescript-lsp@claude-plugins-official
/plugin install github@claude-plugins-official
/plugin install commit-commands@claude-plugins-official
typescript-lsp, pyright-lsp, gopls-lsp,
rust-analyzer-lsp. If you write code in any of these languages,
install the LSP plugin. It's the difference between Claude guessing at types
and Claude knowing the types.
gh CLI calls with natural language.
"Create a PR for my current branch targeting main with these changes" just works.
/commit with conventional commit formatting, /pr
for structured pull request creation, and /changelog for release notes.
Small skill, high daily-use value if you're in a Git workflow.
npx skills. Plugins bundle skills, hooks, and MCP server connections into
a single installable package from the marketplace. Functionally similar from your perspective —
both add slash commands — but plugins can also wire in external services that plain skills can't.
Build Skills That Actually Fit Your Workflow
Community skills handle general use cases well. Your specific workflow — your server setup, your deployment process, your daily rituals — requires skills you write yourself. This section covers the SKILL.md format in detail, then walks through building two practical skills for OpenClaw users: a server health check and a deployment pre-flight.
SKILL.md Frontmatter Reference
The frontmatter block (the --- section at the top) controls how and when your
skill gets used. Most fields are optional — the body text is the only strict requirement.
Here are the ones that matter most:
[service-name],
[branch], [ticket-number]. Purely cosmetic but
saves you from forgetting what a skill expects.
true to prevent Claude from invoking this skill automatically.
Only you can trigger it with the slash command. Use this for anything sensitive
or disruptive — deployment scripts, destructive operations, anything that should
require conscious intent to run.
Bash, Read, Glob. Scope it tightly — only list what
the skill actually needs. This is a trust grant specific to this skill's execution.
---
name: deploy-check
description: Run pre-deployment checks — tests, lint, env vars, disk space
argument-hint: [environment]
disable-model-invocation: true
allowed-tools: Bash, Read
context: fork
---
Your skill instructions here...
Dynamic Content: Arguments and Shell Injection
Skills aren't static documents — they can pull in live data and accept arguments:
/status prod,
then $ARGUMENTS is prod and $ARGUMENTS[0]
is also prod. Use $ARGUMENTS[1] for the second word.
---
description: Summarize recent changes on the current branch
argument-hint: [branch-name]
allowed-tools: Bash(git *)
---
Branch: !`git branch --show-current`
Recent commits: !`git log --oneline -10`
Diff summary: !`git diff --stat HEAD~5`
Summarize what changed in the last 5 commits.
Target environment: $ARGUMENTS
When this skill runs, Claude receives the actual branch name, the real commit list, and the real diff stats — not a request to go find them. The skill front-loads the research.
Worked Example: /status
A server health check skill built specifically for OpenClaw users. One command gives you
a full picture of your server state: gateway, Docker, disk, memory, and recent logs.
This skill lives in your global ~/.claude/skills/ directory so it's available
everywhere.
mkdir -p ~/.claude/skills/status
nano ~/.claude/skills/status/SKILL.md
---
description: Full server health check — OpenClaw gateway, Docker, disk, memory, and recent error logs
allowed-tools: Bash
disable-model-invocation: true
---
Run each of the following checks and compile a clear health report:
## 1. OpenClaw Gateway
Run: `openclaw status`
Report: running/stopped, uptime, version if available
## 2. Docker Containers
Run: `docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"`
Report: which containers are up, which are down or restarting
## 3. Disk Usage
Run: `df -h --output=source,size,used,avail,pcent | grep -v tmpfs`
Report: flag any filesystem above 80% usage
## 4. Memory
Run: `free -h`
Report: total, used, available RAM — flag if available drops below 1GB
## 5. Recent Errors
Run: `openclaw logs --tail 20 2>/dev/null || journalctl -u openclaw --since "1 hour ago" --no-pager -q 2>/dev/null`
Report: any ERROR or WARN lines from the last hour
---
Format the output as a short dashboard summary.
Use ✅ for healthy, ⚠️ for warning, ❌ for critical.
End with a one-line overall status: HEALTHY / DEGRADED / CRITICAL.
Type /status in any session and you get a formatted report in seconds.
No flags to remember, no commands to look up, no mentally assembling the pieces yourself.
systemctl status nginx. If you have a database,
add a connection test. The skill grows with your infrastructure.
Worked Example: /deploy-check
A pre-flight checklist that runs before any deployment. Catches the things you always forget: uncommitted changes, failing tests, exposed environment variables, missing config keys. Scoped to a project directory, committed to git so your team inherits it.
mkdir -p .claude/skills/deploy-check
nano .claude/skills/deploy-check/SKILL.md
---
description: Pre-deployment checklist — git status, tests, env vars, and config validation
argument-hint: [staging|production]
allowed-tools: Bash, Read
disable-model-invocation: true
---
Target environment: $ARGUMENTS
Run each check and report pass ✅ / fail ❌:
## Git
- [ ] No uncommitted changes: `git status --short`
- [ ] On the correct branch for $ARGUMENTS deployment
- [ ] No merge conflicts: `git diff --check`
## Tests
- [ ] Run: `npm test 2>&1 | tail -20` (or your test command)
- [ ] All tests passing
## Environment
- [ ] .env file is NOT committed: `git ls-files .env`
- [ ] Required env vars present: `printenv | grep -E "^(DATABASE_URL|API_KEY|NODE_ENV)"`
(update this list with your actual required vars)
## Disk & Memory
- [ ] Sufficient disk space: `df -h .`
- [ ] Sufficient memory: `free -h`
---
If any checks fail, stop and describe exactly what needs to be fixed before deploying.
Do not proceed past a failing check — the purpose of this skill is to catch problems, not confirm them.
Commit this file and everyone on your team has the same pre-deployment checklist. It also doubles as documentation — new team members learn your deployment requirements by reading the skill.
git add .claude/skills/deploy-check/SKILL.md
git commit -m "Add deploy-check skill for pre-deployment validation"
Skill Patterns to Steal
A few more patterns worth knowing as you build your own library:
!`cat ~/.openclaw/docs/api-reference.md`. This is how you
load deep reference content on-demand without keeping it in TOOLS.md permanently.
$ARGUMENTS to branch behavior:
"If $ARGUMENTS is 'production', run the full checklist.
If $ARGUMENTS is 'staging', skip the performance tests."
The agent handles conditional logic from natural language instructions.
context: fork and agent: Explore to frontmatter
to run your skill in a specialized subagent. The Explore agent is fast and
optimized for reading and searching — good for skills that do a lot of
codebase analysis before reporting back.
When Skills Don't Work and How to Fix Them
Skills are simple by design, but there are a handful of gotchas that catch most people. If a skill isn't showing up, isn't firing, or is behaving unexpectedly — the answer is almost always one of the things in this section.
My Skill Isn't Showing Up
Type /help in your session. If your skill isn't listed, work through this checklist:
SKILL.md (capital letters) inside a
directory inside skills/. The structure is
~/.claude/skills/my-skill/SKILL.md, not
~/.claude/skills/my-skill.md and not
~/.claude/skills/SKILL.md directly.
ls ~/.claude/skills/ should list directories, not files.
/context to see what's loaded and what's been cut.
If a critical skill keeps getting trimmed, add priority: high to its frontmatter.
/exit
and reconnect.
user-invocable: false, it's hidden from the
/help menu intentionally — only the agent can trigger it automatically.
Remove that line if you want it to appear as a slash command.
# Check your global skills directory
ls -la ~/.claude/skills/
# Each item should be a directory containing SKILL.md
ls -la ~/.claude/skills/status/
# File permissions — SKILL.md needs to be readable
chmod 644 ~/.claude/skills/status/SKILL.md
The Agent Isn't Using My Skill Automatically
Claude uses a skill automatically when the description frontmatter matches
what you're asking about. If auto-invocation isn't working, the description probably
isn't descriptive enough — or auto-invocation is disabled.
description: Server checkBetter:
description: Check OpenClaw gateway status, Docker container health, disk usage, and recent error logsThe more specific the description, the more reliably Claude connects "I should check on the server" to "I have a skill for exactly this."
disable-model-invocation: true is in the frontmatter, the agent will
never invoke it automatically — only you can trigger it. This is intentional
for sensitive skills, but remove it if you want the agent to use the skill on its own.
Shell Injection Isn't Running
The !`command` syntax runs the command at skill load time. If it's not executing:
!`command` with backticks, not !'command'
with single quotes or !"command" with double quotes. Easy to mix up.
~/.zshrc or ~/.bashrc prints anything (welcome
messages, prompts, colorized output), it can pollute the shell injection output.
Wrap interactive output in a check: if [[ $- == *i* ]]; then echo "hello"; fi.
Non-interactive shells should produce no output except what's intentional.
Managing a Growing Skill Library
Once you've built up a library of skills, a few practices keep it maintainable:
s is a bad name. server-status
is a good name. Use kebab-case, be specific, and don't worry about length —
tab completion handles typing.
~/.claude/skills/ (health checks,
daily routines, personal formatting preferences). Keep project-specific skills in
.claude/skills/ inside the repo and commit them. Never commit skills
with hardcoded personal paths or credentials.
rm -rf ~/.claude/skills/unused-skill/ and it's gone.
# List all global skills with their SKILL.md descriptions
for dir in ~/.claude/skills/*/; do
name=$(basename "$dir")
desc=$(grep "^description:" "$dir/SKILL.md" 2>/dev/null | head -1)
echo "$name — $desc"
done
# Check total character count of all skill descriptions
wc -c ~/.claude/skills/*/SKILL.md | sort -rn | head -20
Useful Debug Commands
# List all currently loaded slash commands
/help
# See full context window breakdown (what's loaded, what's been trimmed)
/context
# Self-diagnose a skill loading or firing issue
/debug my /status skill isn't appearing
# Toggle verbose debug output (shows tool calls, hook executions, etc.)
Ctrl+O
/status health check and one
workflow skill that matches your actual daily use — a deploy check, a standup template,
a code review checklist. Use them for a week. You'll naturally discover what else you want.
Build skills reactively, not speculatively, and your library will stay lean and genuinely useful.