Skip to content

Claude Code guide in three levels, Beginner to Advanced: hands-on lessons with checked exercises, every volatile fact cited to its source. Independent community guide.

docs: improve Skills section with mobile-friendly tables, FAQ, and navigation anchors

Wesam Abousaid89c67da7566f
diff --git a/Images/skills-workflow.png b/Images/skills-workflow.png
new file mode 100644
index 0000000..77709fe
Binary files /dev/null and b/Images/skills-workflow.png differ
diff --git a/README.md b/README.md
index e61a07e..4c68384 100644
--- a/README.md
+++ b/README.md
@@ -14,6 +14,7 @@ The ultimate all-in-one guide to mastering Claude Code. From setup, prompt engin
**Core Features:**
- [Prompt Engineering Deep Dive](#prompt-engineering-deep-dive)
- [Claude Commands Mastery: Extract the best possible results by leveraging Claude's command capabilities to their fullest.](#claude-commands)
+- [Claude Skills: Transform complex workflows into reusable slash commands](#claude-skills)
- [AI Agents: Harness agents, sub-agents, and `worktrees` to structure intelligence with precision.](#ai-agents)
- [Hooks That Work: Discover the power of Claude Hooks and learn how to implement them for maximum impact.](#hooks)
- [What are MCP servers and how to use them?](#model-context-protocol-mcp)
@@ -252,9 +253,9 @@ echo "Analyze this code for performance issues and suggest optimizations:" > .cl
- Add the following info to file
```markdown
# Create Pull Request Command
-
+
Create a new branch, commit changes, and submit a pull request.
-
+
## Behavior
- Creates a new branch based on current changes
- Formats modified files using Biome
@@ -263,7 +264,7 @@ echo "Analyze this code for performance issues and suggest optimizations:" > .cl
- Creates descriptive commit messages for each logical unit
- Pushes branch to remote
- Creates pull request with proper summary and test plan
-
+
## Guidelines for Automatic Commit Splitting
- Split commits by feature, component, or concern
- Keep related file changes together in the same commit
@@ -272,8 +273,693 @@ echo "Analyze this code for performance issues and suggest optimizations:" > .cl
- Multiple unrelated changes should be split into separate commits
```
+> **πŸ’‘ Next Level:** This is a basic custom slash command. For more sophisticated workflows, check out [Claude Skills](#claude-skills) to learn how to build reusable, team-wide skills with advanced patterns.
+
+---
+
+<a id="claude-skills"></a>
+### Claude Skills
+
+> **πŸ“– Extensibility Layer:** Claude Skills transform complex, multi-step workflows into reusable slash commands. Think of them as "macros for AI" β€” instead of repeating the same detailed instructions, encapsulate them once and invoke them with a simple `/skill-name` command.
+
+> **⚠️ IMPORTANT TERMINOLOGY:** **"Skills"** and **"custom slash commands"** are the same thing. This documentation uses "skills" as the primary term, but you may see both used interchangeably. They both refer to markdown files in `.claude/commands/` that you invoke with `/skill-name`.
+
+> **🚨 SECURITY WARNING:** Skills execute with full access to your codebase and can run arbitrary commands. Only use skills from trusted sources. Review all third-party skills before adding them to your project. Skills from untrusted repositories can access files, execute commands, and potentially compromise your system.
+
+![Skills Workflow](Images/skills-workflow.png)
+
+#### Quickstart: Your First Skill (3 minutes)
+
+Want to try skills immediately? Here's the fastest path:
+
+```bash
+# 1. Create the skills directory
+mkdir -p .claude/commands
+
+# 2. Create a simple skill file
+cat > .claude/commands/analyze.md << 'EOF'
+# Code Analysis
+
+Analyze the current code for:
+- Potential bugs and edge cases
+- Performance optimizations
+- Code quality improvements
+- Security vulnerabilities
+
+Provide specific, actionable recommendations.
+EOF
+
+# 3. Start Claude Code (if not already running)
+claude
+
+# 4. Use your new skill
+# Type: /analyze
+```
+
+**That's it!** You now have a working skill. Continue reading to learn how to create more sophisticated workflows.
+
+---
+
+<a id="what-are-skills"></a>
+#### What Are Claude Skills?
+
+**Claude Skills** (also called "custom slash commands") are markdown files stored in `.claude/commands/` that contain structured instructions for Claude Code to execute. When you type `/skill-name`, Claude loads the corresponding markdown file and applies its instructions to your current context.
+
+**Key Characteristics:**
+
+1. **Single Responsibility** β€” Each skill focuses on one workflow (e.g., PR creation, code review, TDD)
+2. **Reusable** β€” Define once, invoke repeatedly across projects and sessions
+3. **Markdown-Based** β€” Simple text files, easy to read, write, and version control
+4. **Customizable** β€” Modify existing skills or create new ones to match your team's processes
+5. **Context-Aware** β€” Skills combine their instructions with your current code, files, and conversation
+
+> **πŸ“– Quick Links:** [Built-in vs Custom Skills](#built-in-vs-custom-skills) | [Creating Skills](#creating-custom-skills) | [Troubleshooting](#troubleshooting-skills) | [FAQ](#skills-faq)
+
+**Skills vs Regular Prompts:**
+
+> **πŸ“± Mobile Users:** View this comparison in landscape mode or on desktop for best readability.
+
+| Aspect | Regular Prompts | Claude Skills |
+|--------|----------------|---------------|
+| **Definition** | Ad-hoc instructions typed each time | Reusable markdown files in `.claude/commands/` |
+| **Reusability** | Manual copy-paste required | Instant invocation with `/skill-name` |
+| **Complexity** | Limited by chat input | Multi-step workflows with detailed checklists |
+| **Sharing** | Share via text/screenshots | Share via files in version control |
+| **Evolution** | Lost after session ends | Iteratively improved and committed to repo |
+| **Discoverability** | None | Auto-listed in Claude Code's skill registry |
+
+> **πŸ’‘ Accessing the Skill Registry:** Skills are discovered automatically when you start Claude Code. To see available skills, start typing `/` in Claude Code and you'll see an autocomplete list of all available skills (both built-in and custom). You can also use `/help` to view all commands, which includes skills.
+
+<a id="built-in-vs-custom-skills"></a>
+#### Built-in Skills vs Custom Skills
+
+**Built-in Skills** (shipped with Claude Code):
+
+| Skill | Purpose | Invocation |
+|-------|---------|------------|
+| `keybindings-help` | Customize keyboard shortcuts and modify `~/.claude/keybindings.json` | `/keybindings-help` |
+| `mermaid` | Create entity relationship diagrams and flowcharts | `/mermaid` |
+
+**Custom Skills** (in this repository's `.claude/commands/`):
+
+**Quick Reference:**
+
+| Skill | Category + Complexity |
+|-------|---------------------|
+| `/pr` | Workflow (High) |
+| `/review` | Quality (High) |
+| `/test` | Quality (Medium) |
+| `/tdd` | Workflow (High) |
+| `/five` | Persona (Low) |
+| `/ux` | Persona (Medium) |
+| `/todo` | Task (Low) |
+
+**Detailed Purpose:**
+
+| Skill | What It Does |
+|-------|--------------|
+| `/pr` | Automated pull request creation with branch management and commit splitting |
+| `/review` | Multi-perspective code review (PM, Dev, QA, Security, DevOps, UX) |
+| `/test` | Unit testing best practices checklist for LLM-driven test generation |
+| `/tdd` | Complete test-driven development workflow with Red-Green-Refactor cycle |
+| `/five` | Five Whys root cause analysis for debugging and problem-solving |
+| `/ux` | User experience designer persona for empathetic, user-centric design |
+| `/todo` | Task management in `todos.md` with due dates and completion tracking |
+
+> **πŸ’‘ Pro Tip:** Start with simple skills (like `/five` or `/todo`) to understand the pattern, then progress to complex workflows (like `/tdd` or `/review`).
+
+<a id="available-skills-reference"></a>
+#### Available Skills Reference
+
+**πŸ”Ή Workflow & Process**
+
+**`/pr` - Pull Request Creation**
+- Automatically creates feature branch from current changes
+- Formats code using project linter (e.g., Biome)
+- Intelligently splits changes into logical, atomic commits
+- Generates descriptive commit messages for each unit of work
+- Pushes to remote and creates PR with summary and test plan
+- **Perfect for:** Teams requiring consistent PR quality and commit hygiene
+
+**`/tdd` - Test-Driven Development**
+- Enforces strict Red-Green-Refactor cycle
+- Guides through: failing test β†’ minimal implementation β†’ refactoring
+- Maintains feature notes in `notes/features/` for long-term memory
+- Ensures tests pass before commits, commits only when green
+- Integrates with feature branch workflows
+- **Perfect for:** Projects requiring high code quality and comprehensive test coverage
+
+**πŸ”Ή Quality & Review**
+
+**`/review` - Multi-Perspective Code Review**
+Six-role review framework:
+1. **Product Manager** β€” Business value, user experience, strategic alignment
+2. **Developer** β€” Code quality, maintainability, performance, best practices
+3. **QA Engineer** β€” Test coverage, edge cases, regression risks
+4. **Security Engineer** β€” Vulnerabilities, data handling, compliance (OWASP, GDPR)
+5. **DevOps** β€” CI/CD integration, infrastructure, monitoring
+6. **UI/UX Designer** β€” Visual consistency, usability, accessibility
+
+- Enforces "fix now, not later" philosophy for all recommendations
+- Posts comprehensive review directly to GitHub PR as a comment
+- **Perfect for:** Critical PRs, production releases, architecture changes
+- **Note:** When run on your own PR, this will post a review comment from your account
+
+**`/test` - Unit Testing Best Practices**
+- Comprehensive checklist for writing robust unit tests
+- Focuses on testing internal logic, not API endpoints
+- Covers context verification, test structure, test cases, isolation, assertions
+- Includes strict guidance against over-mocking and framework bindings
+- Encourages spawning sub-agents for complex test flows
+- **Perfect for:** Ensuring consistent, maintainable test suites
+
+**πŸ”Ή Persona & Methodology**
+
+**`/five` - Five Whys Root Cause Analysis**
+- Systematic investigation technique drilling from symptoms to root causes
+- Iteratively asks "why" to uncover fundamental issues
+- Validates findings by working backwards from root cause
+- Proposes solutions addressing systemic problems, not just symptoms
+- Handles both technical and process-related causes
+- **Perfect for:** Debugging production incidents, understanding recurring bugs
+
+**`/ux` - User Experience Designer Persona**
+Claude becomes an empathetic UX specialist:
+- Conducts user research identifying needs, pain points, motivations
+- Designs accessible, aesthetically pleasing interfaces
+- Prioritizes user needs above all other considerations
+- Creates thoughtful micro-interactions and anticipates edge cases
+- Generates precise prompts for AI UI generation tools
+- **Perfect for:** Design-first projects, prototyping, user-centric product development
+
+**πŸ”Ή Task Management**
+
+**`/todo` - Project Task Manager**
+- Manages `todos.md` in project root with Active/Completed sections
+- Supports due dates/times with smart sorting (due tasks prioritized)
+- Commands: `add`, `complete`, `remove`, `undo`, `list`, `past due`, `next`
+- Auto-numbers todos for easy reference
+- Tracks completion timestamps
+- **Perfect for:** Sprint planning, personal task tracking, session continuity
+
+**`/mermaid` - Diagram Generation**
+- Creates entity relationship diagrams from database schemas
+- Generates flowcharts, sequence diagrams, and architecture visualizations
+- Outputs valid Mermaid syntax for embedding in markdown
+- **Perfect for:** Documentation, architecture discussions, onboarding
+
+<a id="using-skills-in-workflow"></a>
+#### Using Skills in Your Workflow
+
+**Basic Invocation:**
+```bash
+# In Claude Code CLI
+/skill-name
+
+# With arguments (for skills that accept them)
+/todo add "Fix navigation bug"
+/review https://github.com/user/repo/pull/123
+```
+
+**Workflow Prerequisites:**
+
+Before using these workflow combinations, ensure you have:
+- βœ… Git repository initialized (`git init`)
+- βœ… Remote repository configured (`git remote -v` shows your repo)
+- βœ… Commit permissions to your repository
+- βœ… GitHub authentication configured (for `/review` and `/pr` skills)
+- βœ… Skills installed in `.claude/commands/` or `~/.claude/commands/`
+- βœ… Current working directory is your project root
+
+**Workflow Execution Notes:**
+- Skills execute sequentially - wait for each to complete before invoking the next
+- Skills do NOT auto-chain - you must type each `/skill-name` command manually
+- If a skill fails, address the error before proceeding to the next step
+- Use `/help` to verify skill availability before running workflows
+
+**Example Workflow Combinations:**
+
+**1. Complete Feature Development**
+```bash
+# Start with TDD workflow
+/tdd
+# Claude guides through Red-Green-Refactor cycle
+
+# Ensure tests pass
+/test
+# Validates test coverage and quality
+
+# Create PR with automatic commit splitting
+/pr
+# Creates branch, commits, and opens PR
+
+# Conduct comprehensive review (optional - creates PR comment)
+/review
+```
+
+**Common Issues:**
+- **`/tdd` fails:** Ensure tests are properly written; review test syntax
+- **`/test` reports failures:** Fix failing tests before proceeding to `/pr`
+- **`/pr` merge conflicts:** Resolve conflicts manually, then retry
+- **`/review` auth failure:** Run `gh auth login` to configure GitHub CLI
+- **No Biome configured:** `/pr` assumes Biome formatter; install or modify skill
+
+**2. Bug Investigation & Resolution**
+```bash
+# Identify root cause
+/five
+# Five Whys analysis to find systemic issues
+
+# Implement fix using TDD
+/tdd
+# Write failing test, implement fix, refactor
+
+# Verify with unit tests
+/test
+# Ensure all tests pass
+
+# Submit PR
+/pr
+# Create and push PR
+```
+
+**Common Issues:**
+- **`/five` identifies unfixable issue:** Root cause may require architecture changes
+- **Bug in dependency:** Report upstream; consider workaround or fork
+- **`/tdd` tests pass but bug persists:** Review test coverage; bug may be in untested code
+
+**3. UX-Focused Development**
+```bash
+# Start with user-centric design
+/ux
+# Claude adopts UX designer persona
+
+# Implement with tests
+/test
+# Build with test coverage
+
+# Review for accessibility and usability
+/review
+# Multi-perspective review including UX
+```
+
+**Common Issues:**
+- **`/ux` suggestions conflict with brand:** Provide brand guidelines as context
+- **`/review` finds accessibility violations:** Address WCAG issues before merge
+- **Performance issues with new UI:** Use browser profiling tools; optimize assets
+
+**Workflow FAQs:**
+
+**Q: How long do skill workflows typically take?**
+- Simple skills (5-20 lines): 10-30 seconds
+- Medium skills (20-100 lines): 1-3 minutes
+- Complex skills like `/tdd`: 5-15 minutes depending on implementation size
+
+**Q: Can I cancel a running skill midway?**
+- Press `Ctrl+C` to interrupt Claude Code execution
+- Some changes may be partially applied; review with `git status`
+
+**Q: What if a skill modifies files I didn't expect?**
+- Review changes with `git diff` before committing
+- Use `git checkout -- <file>` to revert unwanted changes
+- Report unexpected behavior to skill author
+
+**Q: Can I run skills in parallel?**
+- No - skills execute sequentially in a single Claude Code session
+- For parallel work, open multiple terminals with separate Claude Code sessions
+
+> **πŸ’‘ Workflow Tips:**
+> - **Chain skills sequentially** - Skills execute one at a time; wait for completion before invoking the next
+> - **Combine with hooks** for automatic skill invocation on events (see [Hooks](#hooks) section)
+> - **Use `/todo`** at session start to maintain context across interruptions
+> - **Run `/review`** on your own PRs before requesting human review (note: posts as a PR comment from your account)
+> - **Skills don't auto-chain** - Each `/skill` must be invoked manually; they don't automatically call other skills
+
+<a id="skills-faq"></a>
+#### Skills FAQ
+
+**Q: What's the difference between "skills" and "custom slash commands"?**
+
+**A:** They're the same thing. This documentation uses "skills" as the primary term, but both refer to markdown files in `.claude/commands/` that you invoke with `/skill-name`. You may see both terms used interchangeably.
+
+**Q: Are skills safe to use from third-party repositories?**
+
+**A:** Treat skills like executable code - review them before running. Skills can:
+- Read and modify files in your project
+- Execute commands via Claude Code
+- Access your GitHub/API credentials if configured
+
+Always review `.claude/commands/` files from cloned repositories before invoking skills.
+
+**Q: How do I know if a skill is working correctly?**
+
+**A:**
+1. Check skill autocomplete: Type `/` and your skill name should appear
+2. Test with simple input: Invoke the skill with basic arguments
+3. Review Claude's response: Skill instructions should be reflected in output
+4. Check for errors: Run `claude --debug` to see detailed execution logs
+
+**Q: Can I modify built-in skills?**
+
+**A:** No. Built-in skills (`/keybindings-help`, `/mermaid`) are shipped with Claude Code and cannot be modified. You can create your own custom skills with similar names (e.g., `/my-mermaid`) for custom behavior.
+
+**Q: How do I share skills with my team?**
+
+**A:**
+1. Create skills in `.claude/commands/` (project directory)
+2. Commit skill files to version control: `git add .claude/commands/`
+3. Document skills in your project README
+4. Team members get skills automatically when they clone the repo
+
+**Q: Do skills work offline?**
+
+**A:** Yes. Skills are local markdown files read by Claude Code. No network connection is required to invoke skills, though the AI model execution requires internet access.
+
+**Q: What happens if I have two skills with the same name?**
+
+**A:** Project skills (`.claude/commands/`) take precedence over global skills (`~/.claude/commands/`). The project-level skill will execute.
+
+**Q: Can skills accept arguments?**
+
+**A:** Yes. Type arguments after the skill name:
+```bash
+/todo add "Fix navigation bug"
+/review https://github.com/user/repo/pull/123
+```
+Claude automatically sees your arguments as context - no special syntax needed.
+
+<a id="creating-custom-skills"></a>
+#### Creating Custom Skills
+
+> **🚨 SECURITY NOTE:** When creating global skills (`~/.claude/commands/`), remember they will execute in ALL your projects. Only add skills you trust completely. For team projects, use project-specific skills (`.claude/commands/`) and commit them to version control for team review.
+
+> **πŸ’‘ New to Skills?** Review [What Are Claude Skills](#what-are-skills) and [Available Skills Reference](#available-skills-reference) before creating your first skill.
+
+#### Skill File Requirements
+
+**File Format:**
+- **Extension:** Must be `.md` (markdown files only)
+- **Encoding:** UTF-8 (required; UTF-16 not supported)
+- **Line endings:** Both LF (Unix) and CRLF (Windows) supported
+- **File size:** Recommended maximum 50KB per skill (larger files may cause performance issues)
+- **Naming:** Lowercase with hyphens (e.g., `my-skill.md` β†’ `/my-skill`)
+
+**File System:**
+- **Symlinks:** Supported (`.claude/commands/` can contain symlinks to skill files)
+- **Permissions:** Files must be readable by your user account
+- **Location:** Must be in `.claude/commands/` (project) or `~/.claude/commands/` (global)
+
+**Execution Context:**
+- **Git requirement:** None - skills work in any directory (git or non-git)
+- **Network requirement:** None - skills execute locally without network access
+- **Offline support:** βœ… Full support - skills are read from local files
+
+**Step-by-step guide to building your first skill:**
+
+**1. Create the skill file**
+```bash
+# Project-specific skill (recommended for team projects)
+# The .claude/commands/ directory will be created automatically if it doesn't exist
+mkdir -p .claude/commands
+touch .claude/commands/my-skill.md
+
+# Global skill (available in all projects - use with caution)
+mkdir -p ~/.claude/commands
+touch ~/.claude/commands/my-skill.md
+```
+
+> **πŸ’‘ Tip:** Always use project-specific skills (`.claude/commands/`) for team workflows to ensure team members can review changes through version control.
+
+**2. Define the skill structure**
+
+Skills use markdown with structured sections:
+```markdown
+# Skill Name
+
+Brief description of what this skill does.
+
+## Behavior
+- Bullet list of what Claude should do
+- Specific actions to take
+- Expected outcomes
+
+## Guidelines (optional)
+- Best practices to follow
+- Constraints or requirements
+- Formatting rules
+
+## Examples (optional)
+### Example 1: Use case description
+[Show example input/output or workflow]
+```
+
+**3. Example: Simple Skill (Complete File)**
+
+Complete contents of `.claude/commands/five.md`:
+```markdown
+# Five Whys Analysis
+
+Apply the Five Whys root cause analysis technique to investigate issues.
+
+## Steps
+1. Start with the problem statement
+2. Ask "Why did this happen?" and document the answer
+3. For each answer, ask "Why?" again
+4. Continue for at least 5 iterations or until root cause is found
+5. Validate the root cause by working backwards
+6. Propose solutions that address the root cause
+
+## Notes
+- Don't stop at symptoms; keep digging for systemic issues
+- Multiple root causes may exist - explore different branches
+```
+
+> **πŸ’‘ Tip:** This is a complete, working skill file. Copy this exactly to `.claude/commands/five.md` to use it immediately.
+
+**4. Example: Complex Skill (Complete File)**
+
+Complete contents of `.claude/commands/pr.md`:
+```markdown
+# Create Pull Request Command
+
+Create a new branch, commit changes, and submit a pull request.
+
+## Behavior
+- Creates a new branch based on current changes
+- Formats modified files using Biome
+- Analyzes changes and automatically splits into logical commits when appropriate
+- Each commit focuses on a single logical change or feature
+- Creates descriptive commit messages for each logical unit
+- Pushes branch to remote
+- Creates pull request with proper summary and test plan
+
+## Guidelines for Automatic Commit Splitting
+- Split commits by feature, component, or concern
+- Keep related file changes together in the same commit
+- Separate refactoring from feature additions
+- Ensure each commit can be understood independently
+- Multiple unrelated changes should be split into separate commits
+```
+
+> **πŸ’‘ Tip:** This is a complete, working skill file. Copy this exactly to `.claude/commands/pr.md` to use it immediately.
+
+**5. Skill Scope: Project vs Global**
+
+| Location | Scope | Use Case |
+|----------|-------|----------|
+| `.claude/commands/` | Project-specific | Team workflows, project conventions, domain-specific tasks |
+| `~/.claude/commands/` | Global (all projects) | Personal preferences, universal patterns, cross-project utilities |
+
+**6. Test your skill**
+```bash
+# Start Claude Code in your project
+claude
+
+# Invoke your skill
+/my-skill
+
+# Observe Claude's behavior and iterate on the skill file
+```
+
+> **πŸ’‘ Creation Tips:**
+> - **Start simple** β€” A 10-line skill is better than none
+> - **Be specific** β€” Vague instructions yield vague results
+> - **Use examples** β€” Show Claude what good output looks like
+> - **Iterate** β€” Skills improve with use; refine based on results
+> - **Version control** β€” Commit skills to `.claude/commands/` for team sharing
+
+<a id="troubleshooting-skills"></a>
+#### Troubleshooting Skills
+
+> **πŸ’‘ Still stuck?** Check the [Skills FAQ](#skills-faq) for common questions or review [Skills Best Practices](#skills-best-practices).
+
+**Common Issues:**
+
+**1. `/skill-name` not recognized**
+- **Cause:** Skill file doesn't exist or wrong location
+- **Solution:** Verify file exists in `.claude/commands/skill-name.md`
+
+**2. Skill not executing**
+- **Cause:** File permissions issue
+- **Solution:** Run `chmod +r .claude/commands/skill-name.md`
+
+**3. Wrong skill executes**
+- **Cause:** Name collision between project and global skills
+- **Solution:** Project skills (`.claude/commands/`) take precedence over global (`~/.claude/commands/`)
+
+**4. Skill content ignored**
+- **Cause:** Markdown formatting errors
+- **Solution:** Validate markdown syntax, ensure proper heading levels
+
+**5. Unexpected behavior**
+- **Cause:** Skill instructions unclear
+- **Solution:** Make instructions more explicit and specific
+
+**6. Changes not reflected**
+- **Cause:** Old session cache
+- **Solution:** Restart Claude Code session to reload skill files
+
+**Debugging Tips:**
+1. **Test in isolation** - Create a minimal test skill to verify the system works
+2. **Check file paths** - Use absolute paths: `ls -la .claude/commands/` to verify files exist
+3. **Review logs** - Run `claude --debug` to see detailed execution logs
+4. **Validate markdown** - Use a markdown validator to check file syntax
+5. **Start fresh** - Close and restart Claude Code session after creating/modifying skills
+
+**Error Messages:**
+
+- **"Command not found"** - Skill file doesn't exist at expected path
+- **"Permission denied"** - Skill file not readable; check permissions
+- **No error but skill doesn't work** - Instructions may be too vague; add specific steps
+
+**Version Requirements:**
+- **Claude Code Version**: Skills are available in Claude Code v1.0+ (released 2024)
+- **No special installation needed** - Skills work out of the box with any Claude Code installation
+- **All plans supported** - Available in Free, Pro, and Max plans
+- **All models supported** - Works with Opus 4.6, Sonnet 4.5, and Haiku 4.5
+
+**Edge Cases and Special Scenarios:**
+
+| Scenario | Behavior | Notes |
+|----------|----------|-------|
+| **File without .md extension** | Not recognized as skill | Only `.md` files are loaded as skills |
+| **Symlinked skill files** | βœ… Supported | `.claude/commands/` can contain symlinks |
+| **Skill in non-git directory** | βœ… Works normally | Skills don't require git |
+| **Running skills offline** | βœ… Fully supported | Skills are local files, no network needed |
+| **CRLF line endings (Windows)** | βœ… Supported | Both Unix (LF) and Windows (CRLF) work |
+| **UTF-16 encoded file** | ❌ May fail | Use UTF-8 encoding for compatibility |
+| **Skill file > 100KB** | ⚠️ Performance impact | Keep skills focused; split large workflows |
+| **Circular skill references** | ⚠️ User must break loop | Skills don't auto-execute; user types each command |
+
+<a id="skills-best-practices"></a>
+#### Skills Best Practices
+
+**βœ… Do:**
+
+1. **Give skills descriptive names** β€” Use kebab-case: `create-api-endpoint.md`, not `command.md`
+2. **Focus on one workflow** β€” Split complex processes into composable skills
+3. **Include examples** β€” Show expected input/output patterns
+4. **Document arguments** β€” Skills can accept arguments passed after the slash command
+
+**Passing Arguments to Skills:**
+```bash
+# Single argument
+/todo add "Fix navigation bug"
+
+# Multiple words (use quotes)
+/review https://github.com/user/repo/pull/123
+
+# URL or file path
+/analyze src/components/Button.tsx
+```
+
+**Accessing Arguments in Skills:**
+Arguments are automatically available to Claude as context. In your skill file, reference them naturally:
+```markdown
+# Code Review Skill
+
+Analyze the code at the provided file path or URL.
+
+## Steps
+1. Read the provided argument (file path or URL)
+2. Perform code review...
+```
+
+**Note:** There is no special `$ARGUMENTS` variable syntax - Claude automatically sees the text you type after `/skill-name` as part of the request context.
+
+5. **Test with edge cases** β€” Invoke skills with missing/invalid inputs
+6. **Share with your team** β€” Commit to `.claude/commands/` and document in README
+7. **Use structured sections** β€” Behavior, Guidelines, Examples, Notes
+8. **Leverage existing skills** β€” Reference other skills in workflows (e.g., "Run `/test` after implementation")
+
+**❌ Don't:**
+
+1. **Overload skills** β€” A skill doing 10 things is 10 skills in disguise
+2. **Use ambiguous language** β€” "Make it better" β†’ "Refactor for readability: extract functions >20 lines"
+3. **Duplicate built-in commands** β€” Check existing commands first with `/help`
+4. **Forget to test** β€” Always run skills in real scenarios before sharing
+5. **Ignore naming conventions** β€” Consistent naming improves discoverability
+6. **Hardcode project paths** β€” Use relative paths or variables
+7. **Skip documentation** β€” Future you (and teammates) will need context
+8. **Run untrusted skills** β€” Always review third-party skills before executing them
+9. **Grant excessive permissions** β€” Skills should request only the minimum permissions needed
+
+**Advanced Patterns:**
+
+**Skill Composition** β€” Reference other skills within a skill:
+```markdown
+## Workflow
+1. Run `/five` to identify root cause
+2. Create feature branch
+3. Implement fix using `/tdd`
+4. Submit with `/pr`
+```
+
+**⚠️ Circular Reference Prevention:**
+Skills can reference other skills in their workflows, but be cautious:
+- **Avoid circular calls:** Don't create skill A that calls skill B that calls skill A
+- **No automatic chaining:** Each `/skill-name` must be invoked manually; skills don't auto-execute other skills
+- **Claude interprets references:** When a skill says "Run `/test`", Claude sees this as an instruction, not automatic execution
+- **Manual workflow:** Users still need to type each skill command themselves
+
+**Conditional Logic** β€” Guide Claude's decision-making:
+```markdown
+## Behavior
+- If tests exist: Run tests first
+- If no tests: Create tests following `/test` guidelines
+- If tests fail: Fix code, do not modify tests
+```
+
+**Subagent Coordination** β€” Delegate complex tasks:
+```markdown
+## Implementation
+1. Spawn 4 subagents (Task tool) for parallel work:
+ - Agent 1: Generate test cases
+ - Agent 2: Implement core logic
+ - Agent 3: Create documentation
+ - Agent 4: Review security implications
+2. Integrate results into cohesive implementation
+```
+
+**Performance Considerations:**
+
+| Complexity | Token Usage | Response Time | Best For |
+|------------|-------------|---------------|----------|
+| Simple (5-20 lines) | Lower token usage | Faster response | Single-step tasks, checklists |
+| Medium (20-100 lines) | Moderate token usage | Moderate response | Multi-step workflows, personas |
+| Complex (100+ lines) | Higher token usage | Slower response | Comprehensive reviews, TDD cycles |
+
+> **Note:** Actual performance varies based on skill content, model selection, server load, and network conditions. Token counts and response times are approximate guidelines only.
+
+> **🎯 Optimization Tips:**
+> - **Use subagents** for parallelizable work within complex skills
+> - **Split mega-skills** into smaller, composable units
+> - **Cache common patterns** as skills instead of re-prompting
+> - **Use Fast Mode** (see [Fast Mode section](#fast-mode)) when running skill-heavy workflows for 2.5x faster responses
+
---
+<a id="fast-mode"></a>
### Fast Mode β†―
**Fast Mode** delivers **2.5x faster responses** using Claude Opus 4.6, ideal for rapid iteration and time-sensitive development work.
@@ -1017,6 +1703,10 @@ The MCP ecosystem continues to grow with:
- **1M Context Window**: Available in beta via API only (not in subscription plans at launch)
- **Fast Mode**: 2.5x faster Opus 4.6 responses (6x pricing, toggle with `/fast`)
+#### Q: What's the difference between custom slash commands and skills?
+
+**A:** They're the same thing. See the [Skills FAQ section](#skills-faq) in the Claude Skills documentation for complete details on skills, including security best practices, team sharing, and troubleshooting.
+
#### Q: How many tokens do I get with Claude Code Pro plan?
**A:** Pro plan users get approximately **~45 messages per 5-hour period** (or roughly **10-40 coding prompts** depending on complexity).