Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/rules/agents/agent-domain-focus.md
1 change: 1 addition & 0 deletions .claude/rules/agents/agent-external-files.md
1 change: 1 addition & 0 deletions .claude/rules/agents/agent-model-selection.md
1 change: 1 addition & 0 deletions .claude/rules/agents/graceful-degradation.md
1 change: 1 addition & 0 deletions .claude/rules/agents/multi-agent-economics.md
1 change: 1 addition & 0 deletions .claude/rules/plugin-entity-taxonomy.md
1 change: 1 addition & 0 deletions .claude/rules/skills/allowed-tools-AskUserQuestion.md
1 change: 1 addition & 0 deletions .claude/rules/skills/allowed-tools-bash-permissions.md
1 change: 1 addition & 0 deletions .claude/rules/skills/context-hygiene.md
1 change: 1 addition & 0 deletions .claude/rules/skills/context-injection-commands.md
1 change: 1 addition & 0 deletions .claude/rules/skills/cowork-specific-skill-instructions.md
1 change: 1 addition & 0 deletions .claude/rules/skills/documentation-maintenance.md
1 change: 1 addition & 0 deletions .claude/rules/skills/dynamic-project-discovery.md
1 change: 1 addition & 0 deletions .claude/rules/skills/graceful-degradation.md
1 change: 1 addition & 0 deletions .claude/rules/skills/hardening-fuzzy-vs-deterministic.md
1 change: 1 addition & 0 deletions .claude/rules/skills/naming-conventions.md
1 change: 1 addition & 0 deletions .claude/rules/skills/optional-git-repositories.md
1 change: 1 addition & 0 deletions .claude/rules/skills/progressive-disclosure.md
1 change: 1 addition & 0 deletions .claude/rules/skills/script-execution-instructions.md
1 change: 1 addition & 0 deletions .claude/rules/skills/security-restrictions.md
1 change: 1 addition & 0 deletions .claude/rules/skills/skill-composition.md
1 change: 1 addition & 0 deletions .claude/rules/skills/skill-decomposition.md
1 change: 1 addition & 0 deletions .claude/rules/skills/skill-description-frontmatter.md
1 change: 1 addition & 0 deletions .claude/rules/skills/skill-reference-files.md
1 change: 1 addition & 0 deletions .claude/rules/skills/success-criteria-and-testing.md
1 change: 1 addition & 0 deletions .claude/rules/skills/troubleshooting.md
1 change: 1 addition & 0 deletions .claude/rules/skills/use-case-planning.md
1 change: 1 addition & 0 deletions .claude/rules/skills/workflow-patterns.md
1 change: 1 addition & 0 deletions .claude/rules/skills/writing-effective-instructions.md
5 changes: 5 additions & 0 deletions docs/guidance/agent-building-guidelines/agent-domain-focus.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/agents/**/*.md"
---

# Domain Focus in Agent Definitions

Agents perform better when they target a narrow domain with precise vocabulary. A focused agent activates deep expertise in the model. A broad generalist activates shallow, averaged knowledge across competing domains.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/agents/**/*.md"
---

# External File References in Agent Definitions

Agent definitions are self-contained markdown files. Unlike skills, agents do not support external file references. No `references/` folders, no `scripts/` folders, and no context injection commands. All content must be inlined directly in the agent `.md` file.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/agents/**/*.md"
---

# Choosing the Right Model for Agent Definitions

Agents support a `model` frontmatter field that skills do not. Choosing the right model is about matching capability and speed to the task the agent performs. **Cost is not a factor in model selection for our agents.** Choose based on what the task demands, not price.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/agents/**/*.md"
---

# Graceful Degradation

Agent definitions are self-contained and dispatched by skills. When a skill operates in degraded mode (for example, no git), the agents it dispatches may include steps that depend on git history, branch context, or other tools that may be absent. Without this guidance, agents that fail or produce errors when a tool is missing force the orchestrating skill to add defensive guards around every agent dispatch. An agent that checks tool availability inline and skips gracefully self-adapts to degraded environments.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/agents/**/*.md"
---

# Multi-Agent Economics

When a skill dispatches agents via the `Agent` tool, each agent adds latency and token cost. This doc provides the decision framework for when adding agents is justified and when it's wasteful.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# `AskUserQuestion` in Skill `allowed-tools`

The `allowed-tools` frontmatter in a SKILL.md file defines which tools are auto-approved without user permission prompts when the skill is active. Due to a bug in Claude Code's permission evaluator, `AskUserQuestion` must not be listed in `allowed-tools` — doing so silently breaks the tool's interactive prompt.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Bash Permission Patterns in `allowed-tools`

The `allowed-tools` frontmatter in a SKILL.md file declares which Bash commands are auto-approved without user permission prompts. Bash permissions use a glob pattern syntax: `Bash(command prefix *)`. Getting the syntax or granularity wrong causes skills to either stall on permission prompts or silently auto-approve unintended commands.
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/context-hygiene.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Context Hygiene

Context hygiene is the discipline of keeping a skill's context footprint minimal, well-positioned, and free of stale or irrelevant tokens. Several other guidance docs contain rules that serve this goal — progressive disclosure, frontmatter conciseness, extracting to references/, position-aware ordering, stale-doc audits. This doc explains the mechanisms behind those rules: why they work and what happens when they're violated. It is based on the [Context Hygiene principle](https://jdforsythe.github.io/10-principles/principles/context-hygiene/), adapted for skill-building concerns.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Context Injection Commands in Skill Files

Context injection commands use the `` !`command` `` syntax to execute a shell command at skill load time and inject its stdout into the skill as runtime context. The command runs **once when the skill loads**, not during each step. This gives skill steps access to dynamic information about the current environment without hardcoding values.
Expand Down Expand Up @@ -217,9 +222,10 @@ Real examples organized by purpose, with source file references:

**File/directory discovery:**
- `` !`find . -maxdepth 1 -name "CLAUDE.md" -type f` `` — check for file (`code-review`, `coding-standard`, `architectural-decision-record`, `investigate`, `iterative-plan-review`, `project-discovery`, `project-documentation`, `test-planning`)
- `` !`find . -maxdepth 1 -name "AGENTS.md" -type f` `` — check for file (`project-discovery`)
- `` !`find . -maxdepth 1 -name "AGENTS.md" -type f` `` — check for file (`coding-standard`, `project-discovery`)
- `` !`find . -maxdepth 1 -name "README*" -type f` `` — check for file (`project-discovery`)
- `` !`find . -maxdepth 3 -name "project-discovery.md" -type f` `` — find discovery output (`code-review`, `coding-standard`, `architectural-decision-record`, `investigate`, `iterative-plan-review`, `project-documentation`, `test-planning`)
- `` !`find . -maxdepth 4 -type d -path "*/.claude/rules/coding-standards"` `` — check for path-scoped rules directory (`coding-standard`)

**Tool availability:**
- `` !`which gh` `` — check for gh CLI (`update-pr-description`, `gh-pr-review`)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Claude Cowork — Complete Reference

## What is Cowork?
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Documentation Maintenance

A skill that worked last month can silently degrade if its SKILL.md or references describe things that have changed. The model follows stale instructions faithfully — stale documentation is active poison, not passive neglect.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Dynamic Project Discovery

Skills run in whatever repository the user invokes them from. They must discover the project's structure, branch names, and tool availability dynamically rather than hardcoding assumptions.
Expand Down
6 changes: 6 additions & 0 deletions docs/guidance/skill-building-guidance/graceful-degradation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
paths:
- "plugin/skills/**/*.md"
- "plugin/skills/**/scripts/**"
---

# Graceful Degradation

**Differentiation from `dynamic-project-discovery.md`:** That doc covers hard prerequisites — tools or capabilities the skill cannot function without at all; when they're missing, the skill stops with a message to the user. This doc covers *partial context* — situations where the environment is usable but some data (a git history, project config, docs directory) is absent. Graceful degradation means detecting what is available, selecting a named execution mode, and continuing to produce useful output.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Hardening: Fuzzy vs. Deterministic Steps

Other guidance docs tell you to extract deterministic operations to scripts ([Progressive Disclosure](./progressive-disclosure.md), [Writing Effective Instructions](./writing-effective-instructions.md)). This doc provides the decision framework for recognizing which steps are candidates and classifying them correctly.
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/naming-conventions.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Naming Conventions

Consistent naming across plugins, skills, and directories helps users discover and understand what a skill does from its name alone.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Optional Git Repositories

Skills that analyze code should treat git as optional. Hard-requiring git breaks skills in common, legitimate scenarios — and the moments when git is *not* fully set up are often the most valuable times to run an analysis skill.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Progressive Disclosure

Skills use a three-level information architecture that balances context availability with token efficiency. Each level loads only when needed, keeping Claude's context window focused on what matters for the current task.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
---
paths:
- "plugin/skills/**/*.md"
- "plugin/skills/**/scripts/**"
---

# Script Execution Instructions in SKILL.md

When a skill needs to run shell scripts during its steps, the SKILL.md body must describe the invocation as numbered prose instructions — not fenced code blocks.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Security Restrictions

Skill frontmatter appears in Claude's system prompt. This privileged position means malicious or malformed frontmatter could inject instructions into the system prompt, bypass skill boundaries, or cause silent failures. These restrictions prevent those risks.
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/skill-composition.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Skill Composition

Skills should not call other skills via the Skill tool. Sub-skill calls have
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/skill-decomposition.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Skill Decomposition

A skill should do one thing well. When a skill handles too many responsibilities, it becomes fragile, hard to debug, and difficult for the LLM to follow consistently. Split monolithic skills into focused units and extract reusable agent definitions.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Skill Description Frontmatter

The `description` field in SKILL.md frontmatter is the primary mechanism Claude uses to decide when to invoke a skill. Every installed skill's description is always loaded into Claude's context, where descriptions compete against each other for selection. A thin description means missed triggers — users ask for something the skill handles, but Claude doesn't recognize the match. An overbroad description means false triggers — Claude invokes the wrong skill because descriptions overlap without clear boundaries.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Skill Reference Files

Skills can include reference documents — templates, checklists, examples, and other supporting content — in a `references/` subdirectory within the skill folder. These files are loaded into the skill's context on demand when a step explicitly references them.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Success Criteria and Testing

How do you know a skill is working? Without defined success criteria, "it seems fine" becomes the bar — and that bar shifts with each conversation. This guide defines three test types that cover whether a skill triggers correctly, executes its workflow, and actually improves outcomes compared to working without it.
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/troubleshooting.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Troubleshooting

This guide covers common problems encountered when building and using skills, organized by symptom. Each section describes the symptom, explains the likely cause, and provides a concrete fix.
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/use-case-planning.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Use Case Planning

Before writing a SKILL.md, define 2-3 concrete use cases the skill should handle. Use cases ground the skill in real user workflows rather than abstract capabilities, and they become the test cases you run after building.
Expand Down
5 changes: 5 additions & 0 deletions docs/guidance/skill-building-guidance/workflow-patterns.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Workflow Patterns

Skills encode workflows — multi-step processes that Claude executes in a specific order with specific tools. This guide documents four structural patterns that appear across well-built skills. Each pattern solves a different workflow shape, and most real skills combine two or more.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
paths:
- "plugin/skills/**/*.md"
---

# Writing Effective Instructions

The SKILL.md body — everything below the YAML frontmatter — is where you tell Claude *how* to execute the skill. These instructions load when the skill triggers (Level 2 in the progressive disclosure model) and guide Claude through the workflow step by step.
Expand Down
Loading