{
    "componentChunkName": "component---src-templates-blog-detail-tsx",
    "path": "/blog/claude-code/",
    "result": {"data":{"site":{"siteMetadata":{"siteTitleShort":"Developer Portfolio"}},"markdownRemark":{"id":"8fa4c6ec-49c2-5d4a-9b50-89379ca585b7","excerpt":"Teaching Your AI Coding Partner New Tricks Skills are markdown-based playbooks that extend what Claude Code can do. Instead of explaining the same workflow…","html":"<h2>Teaching Your AI Coding Partner New Tricks</h2>\n<p class=\"lead\">Claude Code is Anthropic's agentic coding tool that lives in your terminal. It reads your codebase, edits files, runs commands, and handles git workflows through natural language. But its real power emerges when you teach it how your team works — through skills.</p>\n<p>Skills are markdown-based playbooks that extend what Claude Code can do. Instead of explaining the same workflow every session — how to deploy, how to write commit messages, how to review PRs — you write it once as a skill, and Claude follows it consistently. With over 77,000 GitHub stars and adoption across the developer community, Claude Code has become a central tool in many development workflows. In this post, we’ll explore how skills work, how to create your own, and the patterns that make them effective.</p>\n<h3>What Is Claude Code?</h3>\n<p>Before diving into skills, let’s establish what Claude Code brings to the table. It’s an agentic coding assistant that operates directly in your terminal. Start it in any project directory:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">claude</code></pre></div>\n<p>From there, you interact through natural language. Ask it to refactor a function, fix a bug, explain a piece of code, or create a pull request. What makes it “agentic” is that it doesn’t just suggest — it acts. A single request can trigger dozens of independent tool calls: reading files, searching code, editing multiple files, running tests, and committing changes.</p>\n<p>Key capabilities include:</p>\n<ul>\n<li><strong>Full codebase understanding</strong>: Claude reads and navigates your entire project, understanding relationships between files, modules, and dependencies.</li>\n<li><strong>Multi-file editing</strong>: Changes span as many files as needed. Rename a component and Claude updates every import.</li>\n<li><strong>Terminal execution</strong>: Runs build commands, tests, linters, and any shell command your workflow requires.</li>\n<li><strong>Git integration</strong>: Stages changes, writes commit messages following your conventions, creates branches, and opens pull requests.</li>\n<li><strong>Multi-agent workflows</strong>: Spawns parallel agents for large tasks, with a lead agent coordinating the work.</li>\n<li><strong>IDE integration</strong>: Available in VS Code, JetBrains IDEs, and as a standalone desktop app — in addition to the terminal.</li>\n</ul>\n<p>Claude Code also reads <code class=\"language-text\">CLAUDE.md</code> files at the start of every session. These project-level configuration files tell Claude about your architecture, coding standards, build commands, and conventions. Think of <code class=\"language-text\">CLAUDE.md</code> as the persistent context and skills as the on-demand playbooks.</p>\n<h3>Understanding Skills</h3>\n<p>Skills are the mechanism for teaching Claude Code how to handle specific tasks. Each skill is a directory containing a <code class=\"language-text\">SKILL.md</code> file — a markdown document with frontmatter metadata and natural language instructions.</p>\n<p>The key insight is how skills are loaded. At startup, Claude only reads the <strong>name and description</strong> of each available skill. The full instructions are loaded into context only when a skill is actually invoked. This progressive disclosure keeps context usage efficient — you can have dozens of skills installed without paying a context cost for all of them.</p>\n<p>Skills can be invoked two ways:</p>\n<ol>\n<li><strong>Directly</strong> by typing <code class=\"language-text\">/skill-name</code> in the conversation</li>\n<li><strong>Automatically</strong> by Claude when it determines a skill is relevant based on its description</li>\n</ol>\n<p>This dual invocation model means skills can serve as both explicit commands and background knowledge that Claude draws on when appropriate.</p>\n<h4>Where Skills Live</h4>\n<p>Skills can be defined at three levels, each scoped differently:</p>\n<table>\n<thead>\n<tr>\n<th>Level</th>\n<th>Path</th>\n<th>Applies To</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Personal</td>\n<td><code class=\"language-text\">~/.claude/skills/&lt;name>/SKILL.md</code></td>\n<td>All your projects</td>\n</tr>\n<tr>\n<td>Project</td>\n<td><code class=\"language-text\">.claude/skills/&lt;name>/SKILL.md</code></td>\n<td>This project only</td>\n</tr>\n<tr>\n<td>Plugin</td>\n<td><code class=\"language-text\">&lt;plugin>/skills/&lt;name>/SKILL.md</code></td>\n<td>Where the plugin is enabled</td>\n</tr>\n</tbody>\n</table>\n<p>Personal skills are great for workflow preferences that follow you across projects — your preferred commit message format, your code explanation style, your deployment checklist. Project skills encode team conventions — API patterns, testing requirements, review processes — and are committed to version control so every team member benefits.</p>\n<p>In monorepo setups, Claude automatically discovers skills from nested <code class=\"language-text\">.claude/skills/</code> directories when you work in subdirectories. A <code class=\"language-text\">packages/frontend/.claude/skills/</code> directory is picked up when you’re working in that package.</p>\n<h3>The Skill File Format</h3>\n<p>A skill is a directory with at minimum a <code class=\"language-text\">SKILL.md</code> file. The file uses YAML frontmatter followed by markdown instructions:</p>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\">name: review-component\ndescription: Reviews React components for accessibility, performance,\n  and adherence to project conventions. Use when reviewing PRs or\n  checking component quality.</span>\n<span class=\"token punctuation\">---</span></span>\n\nWhen reviewing a React component, check the following areas:\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Accessibility</span>\n<span class=\"token list punctuation\">-</span> All interactive elements have appropriate ARIA attributes\n<span class=\"token list punctuation\">-</span> Images have alt text\n<span class=\"token list punctuation\">-</span> Color is not the only means of conveying information\n<span class=\"token list punctuation\">-</span> Keyboard navigation works correctly\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Performance</span>\n<span class=\"token list punctuation\">-</span> No unnecessary re-renders (check dependency arrays)\n<span class=\"token list punctuation\">-</span> Large lists use virtualization\n<span class=\"token list punctuation\">-</span> Images are optimized and lazy-loaded\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Conventions</span>\n<span class=\"token list punctuation\">-</span> Component uses TypeScript with proper prop types\n<span class=\"token list punctuation\">-</span> Follows the project's naming conventions\n<span class=\"token list punctuation\">-</span> Uses Tailwind utility classes (no inline styles)\n<span class=\"token list punctuation\">-</span> Tests cover the main interaction paths\n\nProvide specific line references for any issues found.</code></pre></div>\n<h4>Frontmatter Fields</h4>\n<p>The frontmatter controls how the skill behaves:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token punctuation\">---</span>\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> deploy<span class=\"token punctuation\">-</span>production\n<span class=\"token key atrule\">description</span><span class=\"token punctuation\">:</span> Deploys the application to production. Runs tests<span class=\"token punctuation\">,</span>\n  builds the Docker image<span class=\"token punctuation\">,</span> and pushes to the container registry.\n<span class=\"token key atrule\">disable-model-invocation</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span>\n<span class=\"token key atrule\">user-invocable</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span>\n<span class=\"token key atrule\">allowed-tools</span><span class=\"token punctuation\">:</span> Read<span class=\"token punctuation\">,</span> Grep<span class=\"token punctuation\">,</span> Glob<span class=\"token punctuation\">,</span> Bash\n<span class=\"token key atrule\">argument-hint</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"[environment]\"</span>\n<span class=\"token key atrule\">model</span><span class=\"token punctuation\">:</span> claude<span class=\"token punctuation\">-</span>sonnet<span class=\"token punctuation\">-</span>4<span class=\"token punctuation\">-</span><span class=\"token number\">20250514</span>\n<span class=\"token punctuation\">---</span></code></pre></div>\n<p>The most important fields:</p>\n<ul>\n<li><strong><code class=\"language-text\">name</code></strong>: The slash command name. Lowercase, numbers, and hyphens only (max 64 characters). Defaults to the directory name if omitted.</li>\n<li><strong><code class=\"language-text\">description</code></strong>: What the skill does and when to use it (max 1024 characters). This is what Claude reads at startup to decide relevance, so write it carefully.</li>\n<li><strong><code class=\"language-text\">disable-model-invocation</code></strong>: Set to <code class=\"language-text\">true</code> to prevent Claude from automatically invoking this skill. Essential for skills with side effects like deployments or sending messages.</li>\n<li><strong><code class=\"language-text\">user-invocable</code></strong>: Set to <code class=\"language-text\">false</code> to hide from the <code class=\"language-text\">/</code> menu. Useful for background skills that Claude invokes on its own.</li>\n<li><strong><code class=\"language-text\">allowed-tools</code></strong>: Which tools Claude can use without asking permission during skill execution. Restrict to <code class=\"language-text\">Read, Grep, Glob</code> for read-only skills.</li>\n<li><strong><code class=\"language-text\">argument-hint</code></strong>: Shows during autocomplete to guide usage, like <code class=\"language-text\">[branch-name]</code> or <code class=\"language-text\">[issue-number]</code>.</li>\n<li><strong><code class=\"language-text\">model</code></strong>: Override the model for this skill. Use a faster model for simple tasks, a more capable one for complex analysis.</li>\n</ul>\n<p>The invocation control matrix gives you fine-grained control:</p>\n<table>\n<thead>\n<tr>\n<th>Configuration</th>\n<th>User Can Invoke</th>\n<th>Claude Can Invoke</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Default (no flags)</td>\n<td>Yes</td>\n<td>Yes</td>\n</tr>\n<tr>\n<td><code class=\"language-text\">disable-model-invocation: true</code></td>\n<td>Yes</td>\n<td>No</td>\n</tr>\n<tr>\n<td><code class=\"language-text\">user-invocable: false</code></td>\n<td>No</td>\n<td>Yes</td>\n</tr>\n</tbody>\n</table>\n<h3>String Substitutions and Dynamic Context</h3>\n<p>Skills support variable substitution for arguments passed during invocation:</p>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\">name: fix-issue\ndescription: Reads a GitHub issue and implements the fix\nargument-hint: \"[issue-number]\"</span>\n<span class=\"token punctuation\">---</span></span>\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Issue Context</span>\nRead GitHub issue #$ARGUMENTS and understand the problem.\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Implementation</span>\n<span class=\"token list punctuation\">1.</span> Find the relevant code\n<span class=\"token list punctuation\">2.</span> Implement the fix\n<span class=\"token list punctuation\">3.</span> Write tests\n<span class=\"token list punctuation\">4.</span> Create a commit with message: \"fix: resolve #$ARGUMENTS\"</code></pre></div>\n<p>Invoking <code class=\"language-text\">/fix-issue 42</code> replaces <code class=\"language-text\">$ARGUMENTS</code> with <code class=\"language-text\">42</code> throughout the skill.</p>\n<p>For more powerful context injection, skills support the <code class=\"language-text\">!`command`</code> syntax, which runs shell commands before the skill content is sent to Claude. The command output replaces the placeholder:</p>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\">name: pr-summary\ndescription: Summarizes the current pull request\ncontext: fork\nagent: Explore</span>\n<span class=\"token punctuation\">---</span></span>\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Pull Request Context</span>\n<span class=\"token list punctuation\">-</span> Changed files: !<span class=\"token code-snippet code keyword\">`gh pr diff --name-only`</span>\n<span class=\"token list punctuation\">-</span> PR description: !<span class=\"token code-snippet code keyword\">`gh pr view --json body -q .body`</span>\n<span class=\"token list punctuation\">-</span> Review comments: !<span class=\"token code-snippet code keyword\">`gh api repos/{owner}/{repo}/pulls/{number}/comments`</span>\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Task</span>\nSummarize this pull request. Focus on:\n<span class=\"token list punctuation\">1.</span> What changed and why\n<span class=\"token list punctuation\">2.</span> Any concerns raised in review comments\n<span class=\"token list punctuation\">3.</span> Suggested improvements</code></pre></div>\n<p>This is incredibly powerful. The skill dynamically fetches live data — the actual PR diff, comments, and description — and hands it to Claude as context. Every invocation works with current data, not stale instructions.</p>\n<h3>Subagent Execution</h3>\n<p>For tasks that benefit from isolation, skills can run in a forked context:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token punctuation\">---</span>\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> deep<span class=\"token punctuation\">-</span>research\n<span class=\"token key atrule\">description</span><span class=\"token punctuation\">:</span> Performs thorough codebase research on a topic\n<span class=\"token key atrule\">context</span><span class=\"token punctuation\">:</span> fork\n<span class=\"token key atrule\">agent</span><span class=\"token punctuation\">:</span> Explore\n<span class=\"token punctuation\">---</span>\n\n<span class=\"token key atrule\">Research the following topic in this codebase</span><span class=\"token punctuation\">:</span> $ARGUMENTS\n\nTrace through all relevant code paths. Map the architecture.\nIdentify patterns<span class=\"token punctuation\">,</span> abstractions<span class=\"token punctuation\">,</span> and dependencies.\nReturn a comprehensive summary with the 10 most important\nfiles to understand this area of the codebase.</code></pre></div>\n<p>The <code class=\"language-text\">context: fork</code> setting runs the skill in an isolated subagent. The subagent has access to the codebase and tools but not the conversation history. This prevents research tasks from consuming your main context window.</p>\n<p>Built-in agent types include <code class=\"language-text\">Explore</code> (optimized for codebase navigation), <code class=\"language-text\">Plan</code> (for architecture design), and <code class=\"language-text\">general-purpose</code> (full capabilities). You can also define custom agents in <code class=\"language-text\">.claude/agents/</code> for specialized workflows.</p>\n<h3>Skill Directory Structure</h3>\n<p>While a single <code class=\"language-text\">SKILL.md</code> is sufficient, skills can include supporting files:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">review-security/\n├── SKILL.md              # Main instructions\n├── owasp-checklist.md    # Reference material\n├── examples/\n│   ├── good-review.md    # Example of expected output\n│   └── bad-review.md     # Example of what to avoid\n└── scripts/\n    └── scan.sh           # Script Claude can execute</code></pre></div>\n<p>Reference files provide detailed context that Claude loads as needed. The <code class=\"language-text\">SKILL.md</code> stays concise with instructions, while <code class=\"language-text\">owasp-checklist.md</code> contains the full reference. This separation keeps the primary skill lean while making deep knowledge available.</p>\n<p>For strict output formatting, use a template file:</p>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token comment\">&lt;!-- template.md --></span>\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Security Review: {{component_name}}</span>\n\n<span class=\"token title important\"><span class=\"token punctuation\">###</span> Summary</span>\n{{one_paragraph_summary}}\n\n<span class=\"token title important\"><span class=\"token punctuation\">###</span> Findings</span>\n{{findings_table}}\n\n<span class=\"token title important\"><span class=\"token punctuation\">###</span> Risk Level</span>\n{{low|medium|high|critical}}\n\n<span class=\"token title important\"><span class=\"token punctuation\">###</span> Recommended Actions</span>\n{{numbered_action_items}}</code></pre></div>\n<p>Reference the template from your <code class=\"language-text\">SKILL.md</code>:</p>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\">Format your output according to the template in template.md.\nFill in all placeholder fields.</code></pre></div>\n<h3>Built-in Skills</h3>\n<p>Claude Code ships with several built-in skills that demonstrate the pattern:</p>\n<ul>\n<li><strong><code class=\"language-text\">/simplify</code></strong>: Reviews recently changed files for code reuse, quality, and efficiency. Spawns three parallel review agents and aggregates findings.</li>\n<li><strong><code class=\"language-text\">/batch &lt;instruction></code></strong>: Orchestrates large-scale changes across a codebase. Decomposes work into independent units, spawns background agents in isolated git worktrees, implements changes, runs tests, and opens PRs.</li>\n<li><strong><code class=\"language-text\">/loop [interval] &lt;prompt></code></strong>: Runs a prompt repeatedly on a schedule. Useful for monitoring deploys or polling for status changes.</li>\n</ul>\n<p>These bundled skills are good reference implementations for your own skills. They demonstrate patterns like parallel agent spawning, work decomposition, and iterative execution.</p>\n<h3>Practical Examples</h3>\n<p>Here are skills that solve common development workflow problems:</p>\n<h4>Conventional Commits</h4>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\">name: commit\ndescription: Creates a conventional commit from staged changes.\n  Analyzes the diff, determines the commit type, and writes a\n  descriptive message.\ndisable-model-invocation: true</span>\n<span class=\"token punctuation\">---</span></span>\n\nCreate a git commit following the Conventional Commits specification.\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Steps</span>\n<span class=\"token list punctuation\">1.</span> Run <span class=\"token code-snippet code keyword\">`git diff --staged`</span> to see what's being committed\n<span class=\"token list punctuation\">2.</span> Analyze the changes to determine the type:\n   <span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`feat`</span>: New feature\n   <span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`fix`</span>: Bug fix\n   <span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`refactor`</span>: Code restructuring\n   <span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`docs`</span>: Documentation only\n   <span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`test`</span>: Adding or updating tests\n   <span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`chore`</span>: Maintenance tasks\n<span class=\"token list punctuation\">3.</span> Write a commit message: <span class=\"token code-snippet code keyword\">`type(scope): description`</span>\n   <span class=\"token list punctuation\">-</span> Scope is the primary area affected (component name, module)\n   <span class=\"token list punctuation\">-</span> Description is imperative mood, lowercase, no period\n   <span class=\"token list punctuation\">-</span> Add a body if the \"why\" isn't obvious from the diff\n<span class=\"token list punctuation\">4.</span> Include <span class=\"token code-snippet code keyword\">`Co-Authored-By: Claude &lt;noreply@anthropic.com>`</span>\n<span class=\"token list punctuation\">5.</span> Show the message and ask for confirmation before committing</code></pre></div>\n<h4>Component Generator</h4>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\">name: create-component\ndescription: Generates a new React component with TypeScript,\n  tests, and Storybook story following project conventions.\nargument-hint: \"[ComponentName]\"</span>\n<span class=\"token punctuation\">---</span></span>\n\nGenerate a new React component named <span class=\"token code-snippet code keyword\">`$ARGUMENTS`</span>.\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> File Structure</span>\nCreate these files:\n<span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`src/components/$ARGUMENTS/$ARGUMENTS.tsx`</span>\n<span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`src/components/$ARGUMENTS/$ARGUMENTS.test.tsx`</span>\n<span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`src/components/$ARGUMENTS/$ARGUMENTS.stories.tsx`</span>\n<span class=\"token list punctuation\">-</span> <span class=\"token code-snippet code keyword\">`src/components/$ARGUMENTS/index.ts`</span> (barrel export)\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Component Conventions</span>\n<span class=\"token list punctuation\">-</span> Use TypeScript with an exported Props interface\n<span class=\"token list punctuation\">-</span> Use <span class=\"token code-snippet code keyword\">`forwardRef`</span> for components that render DOM elements\n<span class=\"token list punctuation\">-</span> Use Tailwind CSS for styling (no CSS modules)\n<span class=\"token list punctuation\">-</span> Include JSDoc comment on the Props interface\n<span class=\"token list punctuation\">-</span> Export as named export, not default\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Test Conventions</span>\n<span class=\"token list punctuation\">-</span> Use Vitest and Testing Library\n<span class=\"token list punctuation\">-</span> Test rendering, interaction, and edge cases\n<span class=\"token list punctuation\">-</span> Use <span class=\"token code-snippet code keyword\">`screen`</span> queries, not container queries\n\n<span class=\"token title important\"><span class=\"token punctuation\">##</span> Story Conventions</span>\n<span class=\"token list punctuation\">-</span> Use CSF3 format with <span class=\"token code-snippet code keyword\">`satisfies Meta&lt;typeof Component>`</span>\n<span class=\"token list punctuation\">-</span> Include <span class=\"token code-snippet code keyword\">`tags: ['autodocs']`</span>\n<span class=\"token list punctuation\">-</span> Create stories for: Default, WithProps, EdgeCase</code></pre></div>\n<h4>Safe Explorer</h4>\n<div class=\"gatsby-highlight\" data-language=\"markdown\"><pre class=\"language-markdown\"><code class=\"language-markdown\"><span class=\"token front-matter-block\"><span class=\"token punctuation\">---</span>\n<span class=\"token front-matter yaml language-yaml\">name: explore\ndescription: Read-only codebase exploration. Use when you want to\n  understand code without risk of modifications.\nallowed-tools: Read, Grep, Glob\ncontext: fork\nagent: Explore</span>\n<span class=\"token punctuation\">---</span></span>\n\nExplore this codebase to answer: $ARGUMENTS\n\nYou are in read-only mode. Search files, read code, and trace\nthrough execution paths. Do not suggest changes — focus entirely\non understanding and explaining what exists.\n\nReturn:\n<span class=\"token list punctuation\">1.</span> A clear explanation of what you found\n<span class=\"token list punctuation\">2.</span> Key files involved (with paths and line numbers)\n<span class=\"token list punctuation\">3.</span> Architecture diagram in ASCII if applicable</code></pre></div>\n<h3>CLAUDE.md and Skills: Working Together</h3>\n<p><code class=\"language-text\">CLAUDE.md</code> and skills serve complementary roles. The <code class=\"language-text\">CLAUDE.md</code> file is loaded into context at the start of every session — it’s the persistent project knowledge. Skills are loaded on demand — they’re the task-specific playbooks.</p>\n<p>A well-structured setup looks like:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">project/\n├── CLAUDE.md                          # Project context (always loaded)\n├── .claude/\n│   └── skills/\n│       ├── commit/SKILL.md            # Commit workflow\n│       ├── review-pr/SKILL.md         # PR review process\n│       └── create-component/SKILL.md  # Component scaffolding</code></pre></div>\n<p>Your <code class=\"language-text\">CLAUDE.md</code> defines the “what” — project architecture, coding standards, key commands. Skills define the “how” — step-by-step workflows for specific tasks. When a skill runs, <code class=\"language-text\">CLAUDE.md</code> is also loaded alongside it, so skills always have project context available.</p>\n<p>Generate an initial <code class=\"language-text\">CLAUDE.md</code> by running <code class=\"language-text\">/init</code> in Claude Code. It analyzes your codebase and produces a starting point that you can refine over time.</p>\n<h3>Best Practices</h3>\n<h4>Keep Skills Focused</h4>\n<p>Each skill should do one thing well. A “deploy-and-notify-and-update-docs” skill should be three separate skills that can be composed. Small, focused skills are easier to test, maintain, and reuse.</p>\n<h4>Write Descriptions for Discovery</h4>\n<p>The description is the most important field in your frontmatter. Claude uses it to decide when a skill is relevant, so be specific about both what the skill does and when to use it:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token comment\"># Bad</span>\n<span class=\"token key atrule\">description</span><span class=\"token punctuation\">:</span> Helps with components\n\n<span class=\"token comment\"># Good</span>\n<span class=\"token key atrule\">description</span><span class=\"token punctuation\">:</span> Generates a new React component with TypeScript<span class=\"token punctuation\">,</span>\n  tests<span class=\"token punctuation\">,</span> and Storybook story. Use when creating new UI components\n  or when the user asks to scaffold a component.</code></pre></div>\n<h4>Use Progressive Disclosure</h4>\n<p>Keep <code class=\"language-text\">SKILL.md</code> under 500 lines. Move detailed reference material to separate files within the skill directory. Structure your content as: metadata (~100 tokens), instructions (&#x3C;5000 tokens), and resources (loaded as needed). Every token in a skill is a token that can’t be used for reasoning about your code.</p>\n<h4>Restrict Dangerous Skills</h4>\n<p>Any skill that has side effects — deploying, sending messages, deleting resources — should set <code class=\"language-text\">disable-model-invocation: true</code>. This ensures it’s only run when you explicitly type the slash command, not when Claude decides it might be helpful:</p>\n<div class=\"gatsby-highlight\" data-language=\"yaml\"><pre class=\"language-yaml\"><code class=\"language-yaml\"><span class=\"token punctuation\">---</span>\n<span class=\"token key atrule\">name</span><span class=\"token punctuation\">:</span> deploy\n<span class=\"token key atrule\">description</span><span class=\"token punctuation\">:</span> Deploys to production\n<span class=\"token key atrule\">disable-model-invocation</span><span class=\"token punctuation\">:</span> <span class=\"token boolean important\">true</span>\n<span class=\"token punctuation\">---</span></code></pre></div>\n<h4>Test Across Models</h4>\n<p>Skills that work well with Claude Opus might need more detail for Sonnet or Haiku. Test your skills across models and adjust the level of instruction detail accordingly. You can even set a specific model per skill using the <code class=\"language-text\">model</code> field.</p>\n<h4>Use the Agent Skills Standard</h4>\n<p>Skills follow the <a href=\"https://agentskills.io\">Agent Skills open standard</a>, which works across multiple AI tools including Cursor, Gemini CLI, and Codex CLI. Writing skills to this standard means they’re portable — a skill you write for Claude Code can work in other tools that support the specification.</p>\n<h3>Conclusion</h3>\n<p>Skills transform Claude Code from a general-purpose assistant into a tool that knows your team’s specific workflows. The combination of <code class=\"language-text\">CLAUDE.md</code> for persistent context and skills for on-demand playbooks creates a development environment where Claude understands not just your code, but how your team works with it.</p>\n<p>Start small — pick one repetitive workflow you explain to Claude regularly and encode it as a skill. As your skill library grows, you’ll find that the consistency and time savings compound. Every new team member benefits from the same encoded knowledge, and every session starts with Claude already knowing how you work.</p>\n<p>The skills system is an open standard, meaning the investment you make in writing skills pays off across tools, not just Claude Code. That portability, combined with the progressive disclosure architecture that keeps context usage efficient, makes skills one of the most practical ways to customize your AI development workflow.</p>\n<p>‘Till next time!</p>","rawMarkdownBody":"\n## Teaching Your AI Coding Partner New Tricks\n\n<p class=\"lead\">Claude Code is Anthropic's agentic coding tool that lives in your terminal. It reads your codebase, edits files, runs commands, and handles git workflows through natural language. But its real power emerges when you teach it how your team works — through skills.</p>\n\nSkills are markdown-based playbooks that extend what Claude Code can do. Instead of explaining the same workflow every session — how to deploy, how to write commit messages, how to review PRs — you write it once as a skill, and Claude follows it consistently. With over 77,000 GitHub stars and adoption across the developer community, Claude Code has become a central tool in many development workflows. In this post, we'll explore how skills work, how to create your own, and the patterns that make them effective.\n\n### What Is Claude Code?\n\nBefore diving into skills, let's establish what Claude Code brings to the table. It's an agentic coding assistant that operates directly in your terminal. Start it in any project directory:\n\n```bash\nclaude\n```\n\nFrom there, you interact through natural language. Ask it to refactor a function, fix a bug, explain a piece of code, or create a pull request. What makes it \"agentic\" is that it doesn't just suggest — it acts. A single request can trigger dozens of independent tool calls: reading files, searching code, editing multiple files, running tests, and committing changes.\n\nKey capabilities include:\n\n- **Full codebase understanding**: Claude reads and navigates your entire project, understanding relationships between files, modules, and dependencies.\n- **Multi-file editing**: Changes span as many files as needed. Rename a component and Claude updates every import.\n- **Terminal execution**: Runs build commands, tests, linters, and any shell command your workflow requires.\n- **Git integration**: Stages changes, writes commit messages following your conventions, creates branches, and opens pull requests.\n- **Multi-agent workflows**: Spawns parallel agents for large tasks, with a lead agent coordinating the work.\n- **IDE integration**: Available in VS Code, JetBrains IDEs, and as a standalone desktop app — in addition to the terminal.\n\nClaude Code also reads `CLAUDE.md` files at the start of every session. These project-level configuration files tell Claude about your architecture, coding standards, build commands, and conventions. Think of `CLAUDE.md` as the persistent context and skills as the on-demand playbooks.\n\n### Understanding Skills\n\nSkills are the mechanism for teaching Claude Code how to handle specific tasks. Each skill is a directory containing a `SKILL.md` file — a markdown document with frontmatter metadata and natural language instructions.\n\nThe key insight is how skills are loaded. At startup, Claude only reads the **name and description** of each available skill. The full instructions are loaded into context only when a skill is actually invoked. This progressive disclosure keeps context usage efficient — you can have dozens of skills installed without paying a context cost for all of them.\n\nSkills can be invoked two ways:\n\n1. **Directly** by typing `/skill-name` in the conversation\n2. **Automatically** by Claude when it determines a skill is relevant based on its description\n\nThis dual invocation model means skills can serve as both explicit commands and background knowledge that Claude draws on when appropriate.\n\n#### Where Skills Live\n\nSkills can be defined at three levels, each scoped differently:\n\n| Level | Path | Applies To |\n| --- | --- | --- |\n| Personal | `~/.claude/skills/<name>/SKILL.md` | All your projects |\n| Project | `.claude/skills/<name>/SKILL.md` | This project only |\n| Plugin | `<plugin>/skills/<name>/SKILL.md` | Where the plugin is enabled |\n\nPersonal skills are great for workflow preferences that follow you across projects — your preferred commit message format, your code explanation style, your deployment checklist. Project skills encode team conventions — API patterns, testing requirements, review processes — and are committed to version control so every team member benefits.\n\nIn monorepo setups, Claude automatically discovers skills from nested `.claude/skills/` directories when you work in subdirectories. A `packages/frontend/.claude/skills/` directory is picked up when you're working in that package.\n\n### The Skill File Format\n\nA skill is a directory with at minimum a `SKILL.md` file. The file uses YAML frontmatter followed by markdown instructions:\n\n```markdown\n---\nname: review-component\ndescription: Reviews React components for accessibility, performance,\n  and adherence to project conventions. Use when reviewing PRs or\n  checking component quality.\n---\n\nWhen reviewing a React component, check the following areas:\n\n## Accessibility\n- All interactive elements have appropriate ARIA attributes\n- Images have alt text\n- Color is not the only means of conveying information\n- Keyboard navigation works correctly\n\n## Performance\n- No unnecessary re-renders (check dependency arrays)\n- Large lists use virtualization\n- Images are optimized and lazy-loaded\n\n## Conventions\n- Component uses TypeScript with proper prop types\n- Follows the project's naming conventions\n- Uses Tailwind utility classes (no inline styles)\n- Tests cover the main interaction paths\n\nProvide specific line references for any issues found.\n```\n\n#### Frontmatter Fields\n\nThe frontmatter controls how the skill behaves:\n\n```yaml\n---\nname: deploy-production\ndescription: Deploys the application to production. Runs tests,\n  builds the Docker image, and pushes to the container registry.\ndisable-model-invocation: true\nuser-invocable: true\nallowed-tools: Read, Grep, Glob, Bash\nargument-hint: \"[environment]\"\nmodel: claude-sonnet-4-20250514\n---\n```\n\nThe most important fields:\n\n- **`name`**: The slash command name. Lowercase, numbers, and hyphens only (max 64 characters). Defaults to the directory name if omitted.\n- **`description`**: What the skill does and when to use it (max 1024 characters). This is what Claude reads at startup to decide relevance, so write it carefully.\n- **`disable-model-invocation`**: Set to `true` to prevent Claude from automatically invoking this skill. Essential for skills with side effects like deployments or sending messages.\n- **`user-invocable`**: Set to `false` to hide from the `/` menu. Useful for background skills that Claude invokes on its own.\n- **`allowed-tools`**: Which tools Claude can use without asking permission during skill execution. Restrict to `Read, Grep, Glob` for read-only skills.\n- **`argument-hint`**: Shows during autocomplete to guide usage, like `[branch-name]` or `[issue-number]`.\n- **`model`**: Override the model for this skill. Use a faster model for simple tasks, a more capable one for complex analysis.\n\nThe invocation control matrix gives you fine-grained control:\n\n| Configuration | User Can Invoke | Claude Can Invoke |\n| --- | --- | --- |\n| Default (no flags) | Yes | Yes |\n| `disable-model-invocation: true` | Yes | No |\n| `user-invocable: false` | No | Yes |\n\n### String Substitutions and Dynamic Context\n\nSkills support variable substitution for arguments passed during invocation:\n\n```markdown\n---\nname: fix-issue\ndescription: Reads a GitHub issue and implements the fix\nargument-hint: \"[issue-number]\"\n---\n\n## Issue Context\nRead GitHub issue #$ARGUMENTS and understand the problem.\n\n## Implementation\n1. Find the relevant code\n2. Implement the fix\n3. Write tests\n4. Create a commit with message: \"fix: resolve #$ARGUMENTS\"\n```\n\nInvoking `/fix-issue 42` replaces `$ARGUMENTS` with `42` throughout the skill.\n\nFor more powerful context injection, skills support the `` !`command` `` syntax, which runs shell commands before the skill content is sent to Claude. The command output replaces the placeholder:\n\n```markdown\n---\nname: pr-summary\ndescription: Summarizes the current pull request\ncontext: fork\nagent: Explore\n---\n\n## Pull Request Context\n- Changed files: !`gh pr diff --name-only`\n- PR description: !`gh pr view --json body -q .body`\n- Review comments: !`gh api repos/{owner}/{repo}/pulls/{number}/comments`\n\n## Task\nSummarize this pull request. Focus on:\n1. What changed and why\n2. Any concerns raised in review comments\n3. Suggested improvements\n```\n\nThis is incredibly powerful. The skill dynamically fetches live data — the actual PR diff, comments, and description — and hands it to Claude as context. Every invocation works with current data, not stale instructions.\n\n### Subagent Execution\n\nFor tasks that benefit from isolation, skills can run in a forked context:\n\n```yaml\n---\nname: deep-research\ndescription: Performs thorough codebase research on a topic\ncontext: fork\nagent: Explore\n---\n\nResearch the following topic in this codebase: $ARGUMENTS\n\nTrace through all relevant code paths. Map the architecture.\nIdentify patterns, abstractions, and dependencies.\nReturn a comprehensive summary with the 10 most important\nfiles to understand this area of the codebase.\n```\n\nThe `context: fork` setting runs the skill in an isolated subagent. The subagent has access to the codebase and tools but not the conversation history. This prevents research tasks from consuming your main context window.\n\nBuilt-in agent types include `Explore` (optimized for codebase navigation), `Plan` (for architecture design), and `general-purpose` (full capabilities). You can also define custom agents in `.claude/agents/` for specialized workflows.\n\n### Skill Directory Structure\n\nWhile a single `SKILL.md` is sufficient, skills can include supporting files:\n\n```\nreview-security/\n├── SKILL.md              # Main instructions\n├── owasp-checklist.md    # Reference material\n├── examples/\n│   ├── good-review.md    # Example of expected output\n│   └── bad-review.md     # Example of what to avoid\n└── scripts/\n    └── scan.sh           # Script Claude can execute\n```\n\nReference files provide detailed context that Claude loads as needed. The `SKILL.md` stays concise with instructions, while `owasp-checklist.md` contains the full reference. This separation keeps the primary skill lean while making deep knowledge available.\n\nFor strict output formatting, use a template file:\n\n```markdown\n<!-- template.md -->\n## Security Review: {{component_name}}\n\n### Summary\n{{one_paragraph_summary}}\n\n### Findings\n{{findings_table}}\n\n### Risk Level\n{{low|medium|high|critical}}\n\n### Recommended Actions\n{{numbered_action_items}}\n```\n\nReference the template from your `SKILL.md`:\n\n```markdown\nFormat your output according to the template in template.md.\nFill in all placeholder fields.\n```\n\n### Built-in Skills\n\nClaude Code ships with several built-in skills that demonstrate the pattern:\n\n- **`/simplify`**: Reviews recently changed files for code reuse, quality, and efficiency. Spawns three parallel review agents and aggregates findings.\n- **`/batch <instruction>`**: Orchestrates large-scale changes across a codebase. Decomposes work into independent units, spawns background agents in isolated git worktrees, implements changes, runs tests, and opens PRs.\n- **`/loop [interval] <prompt>`**: Runs a prompt repeatedly on a schedule. Useful for monitoring deploys or polling for status changes.\n\nThese bundled skills are good reference implementations for your own skills. They demonstrate patterns like parallel agent spawning, work decomposition, and iterative execution.\n\n### Practical Examples\n\nHere are skills that solve common development workflow problems:\n\n#### Conventional Commits\n\n```markdown\n---\nname: commit\ndescription: Creates a conventional commit from staged changes.\n  Analyzes the diff, determines the commit type, and writes a\n  descriptive message.\ndisable-model-invocation: true\n---\n\nCreate a git commit following the Conventional Commits specification.\n\n## Steps\n1. Run `git diff --staged` to see what's being committed\n2. Analyze the changes to determine the type:\n   - `feat`: New feature\n   - `fix`: Bug fix\n   - `refactor`: Code restructuring\n   - `docs`: Documentation only\n   - `test`: Adding or updating tests\n   - `chore`: Maintenance tasks\n3. Write a commit message: `type(scope): description`\n   - Scope is the primary area affected (component name, module)\n   - Description is imperative mood, lowercase, no period\n   - Add a body if the \"why\" isn't obvious from the diff\n4. Include `Co-Authored-By: Claude <noreply@anthropic.com>`\n5. Show the message and ask for confirmation before committing\n```\n\n#### Component Generator\n\n```markdown\n---\nname: create-component\ndescription: Generates a new React component with TypeScript,\n  tests, and Storybook story following project conventions.\nargument-hint: \"[ComponentName]\"\n---\n\nGenerate a new React component named `$ARGUMENTS`.\n\n## File Structure\nCreate these files:\n- `src/components/$ARGUMENTS/$ARGUMENTS.tsx`\n- `src/components/$ARGUMENTS/$ARGUMENTS.test.tsx`\n- `src/components/$ARGUMENTS/$ARGUMENTS.stories.tsx`\n- `src/components/$ARGUMENTS/index.ts` (barrel export)\n\n## Component Conventions\n- Use TypeScript with an exported Props interface\n- Use `forwardRef` for components that render DOM elements\n- Use Tailwind CSS for styling (no CSS modules)\n- Include JSDoc comment on the Props interface\n- Export as named export, not default\n\n## Test Conventions\n- Use Vitest and Testing Library\n- Test rendering, interaction, and edge cases\n- Use `screen` queries, not container queries\n\n## Story Conventions\n- Use CSF3 format with `satisfies Meta<typeof Component>`\n- Include `tags: ['autodocs']`\n- Create stories for: Default, WithProps, EdgeCase\n```\n\n#### Safe Explorer\n\n```markdown\n---\nname: explore\ndescription: Read-only codebase exploration. Use when you want to\n  understand code without risk of modifications.\nallowed-tools: Read, Grep, Glob\ncontext: fork\nagent: Explore\n---\n\nExplore this codebase to answer: $ARGUMENTS\n\nYou are in read-only mode. Search files, read code, and trace\nthrough execution paths. Do not suggest changes — focus entirely\non understanding and explaining what exists.\n\nReturn:\n1. A clear explanation of what you found\n2. Key files involved (with paths and line numbers)\n3. Architecture diagram in ASCII if applicable\n```\n\n### CLAUDE.md and Skills: Working Together\n\n`CLAUDE.md` and skills serve complementary roles. The `CLAUDE.md` file is loaded into context at the start of every session — it's the persistent project knowledge. Skills are loaded on demand — they're the task-specific playbooks.\n\nA well-structured setup looks like:\n\n```\nproject/\n├── CLAUDE.md                          # Project context (always loaded)\n├── .claude/\n│   └── skills/\n│       ├── commit/SKILL.md            # Commit workflow\n│       ├── review-pr/SKILL.md         # PR review process\n│       └── create-component/SKILL.md  # Component scaffolding\n```\n\nYour `CLAUDE.md` defines the \"what\" — project architecture, coding standards, key commands. Skills define the \"how\" — step-by-step workflows for specific tasks. When a skill runs, `CLAUDE.md` is also loaded alongside it, so skills always have project context available.\n\nGenerate an initial `CLAUDE.md` by running `/init` in Claude Code. It analyzes your codebase and produces a starting point that you can refine over time.\n\n### Best Practices\n\n#### Keep Skills Focused\n\nEach skill should do one thing well. A \"deploy-and-notify-and-update-docs\" skill should be three separate skills that can be composed. Small, focused skills are easier to test, maintain, and reuse.\n\n#### Write Descriptions for Discovery\n\nThe description is the most important field in your frontmatter. Claude uses it to decide when a skill is relevant, so be specific about both what the skill does and when to use it:\n\n```yaml\n# Bad\ndescription: Helps with components\n\n# Good\ndescription: Generates a new React component with TypeScript,\n  tests, and Storybook story. Use when creating new UI components\n  or when the user asks to scaffold a component.\n```\n\n#### Use Progressive Disclosure\n\nKeep `SKILL.md` under 500 lines. Move detailed reference material to separate files within the skill directory. Structure your content as: metadata (~100 tokens), instructions (<5000 tokens), and resources (loaded as needed). Every token in a skill is a token that can't be used for reasoning about your code.\n\n#### Restrict Dangerous Skills\n\nAny skill that has side effects — deploying, sending messages, deleting resources — should set `disable-model-invocation: true`. This ensures it's only run when you explicitly type the slash command, not when Claude decides it might be helpful:\n\n```yaml\n---\nname: deploy\ndescription: Deploys to production\ndisable-model-invocation: true\n---\n```\n\n#### Test Across Models\n\nSkills that work well with Claude Opus might need more detail for Sonnet or Haiku. Test your skills across models and adjust the level of instruction detail accordingly. You can even set a specific model per skill using the `model` field.\n\n#### Use the Agent Skills Standard\n\nSkills follow the [Agent Skills open standard](https://agentskills.io), which works across multiple AI tools including Cursor, Gemini CLI, and Codex CLI. Writing skills to this standard means they're portable — a skill you write for Claude Code can work in other tools that support the specification.\n\n### Conclusion\n\nSkills transform Claude Code from a general-purpose assistant into a tool that knows your team's specific workflows. The combination of `CLAUDE.md` for persistent context and skills for on-demand playbooks creates a development environment where Claude understands not just your code, but how your team works with it.\n\nStart small — pick one repetitive workflow you explain to Claude regularly and encode it as a skill. As your skill library grows, you'll find that the consistency and time savings compound. Every new team member benefits from the same encoded knowledge, and every session starts with Claude already knowing how you work.\n\nThe skills system is an open standard, meaning the investment you make in writing skills pays off across tools, not just Claude Code. That portability, combined with the progressive disclosure architecture that keeps context usage efficient, makes skills one of the most practical ways to customize your AI development workflow.\n\n'Till next time!\n","frontmatter":{"title":"Supercharging Your Workflow with Claude Code Skills","date":"18. April, 2026","description":"Extend Claude Code with custom skills that automate repetitive tasks. Learn the skill file format, invocation patterns, dynamic context, and best practices.","category":"Develop","cover":{"childImageSharp":{"gatsbyImageData":{"layout":"fixed","backgroundColor":"#e8e8d8","images":{"fallback":{"src":"/static/88c0d6c46c75b1485744ea44c9ca169e/1619f/claude-code.png","srcSet":"/static/88c0d6c46c75b1485744ea44c9ca169e/1619f/claude-code.png 960w","sizes":"960px"},"sources":[{"srcSet":"/static/88c0d6c46c75b1485744ea44c9ca169e/0a27d/claude-code.webp 960w","type":"image/webp","sizes":"960px"}]},"width":960,"height":653}}}},"fields":{"slug":"/2026-04-18_claude-code/"}}},"pageContext":{"slug":"/2026-04-18_claude-code/","previous":{"fields":{"slug":"/2026-03-13_docker/"},"frontmatter":{"title":"Docker for Frontend Developers"}},"next":null}},
    "staticQueryHashes": ["1711471402","674253978"]}