xiaohongshu
xiaohongshu
claude-extensibility
Claude Code extensibility: agents, skills, output styles. Capabilities: create/update/delete agents and skills, YAML frontmatter, system prompts, tool/model selection, resumable agents, CLI-defined agents. Actions: create, edit, delete, optimize, test extensions. Keywords: agent, skill, output-st...
Full skill instructions
CRUD operations for agents, skills, and output styles. This skill transfers expertise in building extensions that actually activate and deliver value.
IMPORTANT: When creating or editing prompts, use prompt-architect skill to improve quality.
Skill("prompt-architect") → Create/enhance skill/agent prompt content
Every extension must embody these principles:
| Truth | Meaning | Test |
|---|---|---|
| Expertise Transfer | Make Claude think like expert, not follow steps | Does it transfer patterns or just procedures? |
| Flow, Not Friction | Produce output, not intermediate work | Does it help produce results or create busywork? |
| Voice Matches Domain | Sound like practitioner, not documentation | Would an expert recognize this as their thinking? |
| Focused Beats Comprehensive | Constrain ruthlessly | Does every section earn its place? |
| Rule | Guidance |
|---|---|
| 3-File Rule | Task touches 3+ files → agent (needs autonomy). Enhances how YOU work → skill. |
| Delegation Test | "Does this run independently while I do other work?" Yes → agent. No → skill. |
| Expert Test | "Would an expert do this differently than beginner?" Big difference → skill. |
| Activation Breadth | Trigger on 80% of relevant requests, not 100%. Over-broad = noise. |
| Composition Preference | When in doubt, 2 small focused extensions > 1 large monolith. |
| Tool Constraint | Start with 2-3 essential tools. Adding is easy; removing breaks things. |
When you see: User wants one agent/skill to handle auth, database, API, and testing This indicates: Scope creep that will create bloated, unfocused extension Therefore: Split into focused single-responsibility extensions; suggest composition Watch out: User may resist - explain that 3 focused skills outperform 1 swiss-army-knife
When you see: Skill that just wraps a CLI tool with no added expertise This indicates: Missing the expertise transfer opportunity Therefore: Ask "what would an expert know that the tool doesn't tell you?" Watch out: The skill becomes redundant with just reading --help
When you see: Frontmatter description uses only formal/technical terms This indicates: Skill won't activate when users use casual language Therefore: Add synonyms, verbs, casual phrasings to description Watch out: Over-broad keywords cause false activations
When you see: Step 1, Step 2, Step 3... (long numbered instructions) This indicates: Procedures don't transfer judgment - expert skips steps, adapts order Therefore: Teach patterns and heuristics. Let reader apply judgment. Watch out: Some workflows genuinely need sequence - use sparingly
| Type | Invocation | Purpose | Location |
|---|---|---|---|
| Agents | Task tool | Specialized sub-processes | .claude/agents/ |
| Skills | Model-invoked (autonomous) | Domain knowledge | .claude/skills/{name}/ |
| Output Styles | /output-style command | Modify main agent behavior | .claude/output-styles/ |
The description field is your activation gate. System reads ONLY frontmatter to decide loading. Brilliant skill + poor keywords = dead skill.
# Bad - too vague, won't trigger
description: Helps with documents
# Bad - missing WHEN triggers
description: PDF skill
# Good - multiple trigger points
description: "Extract text and tables from PDF files, fill forms, merge documents.
Formats: .pdf. Tools: pypdf, pdfplumber. Actions: extract, fill, merge PDFs.
Keywords: PDF, form, document. Use when: working with PDF files, extracting data."
Read description aloud. For every 10 words, at least 3 should be potential triggers.
Reference: references/agent-development.md - Full YAML structure, system prompt patterns, optimization techniques.
---
name: agent-name
# CRITICAL: Description is the ONLY thing system reads to decide activation
# Include: task verbs, problem descriptions, synonyms users actually say
description: Use this agent when [use case]. Use PROACTIVELY for [triggers].\n\nExamples:\n<example>\nContext: [situation]\nuser: [request]\nassistant: [response]\n<commentary>[reasoning]</commentary>\n</example>
# CONSTRAIN RUTHLESSLY: 3-5 tools = focused. 10+ tools = confused.
tools: Grep, Glob, Read, Bash
model: haiku
permissionMode: default
skills: skill-name
---
# Agent Name
Brief mission statement.
## Core Strategy
### 1. Phase Name
Approach and techniques
## What This Agent Does NOT Do
- Does not [boundary 1] (use X agent)
- Does not [boundary 2] (escalate to user)
<format>
Expected output structure
</format>
| Field | Required | Description |
|---|---|---|
name | Yes | Lowercase, hyphens (e.g., code-reviewer) |
description | Yes | Single line with \n for newlines, include examples |
tools | No | Comma-separated; inherits all if omitted |
model | No | haiku, sonnet, opus, inherit (default: sonnet) |
permissionMode | No | default, acceptEdits, bypassPermissions, plan, ignore |
skills | No | Comma-separated skill names to auto-load |
| Model | Use When | Target Time |
|---|---|---|
haiku | Fast tasks, exploration, search | < 3s |
sonnet | Balanced, most use cases | < 10s |
opus | Complex reasoning, architecture | < 30s |
inherit | Match main conversation model | varies |
| Agent | Model | Tools | Purpose |
|---|---|---|---|
general-purpose | Sonnet | All | Complex research, multi-step operations |
plan | Sonnet | Read, Glob, Grep, Bash | Research in plan mode |
Explore | Haiku | Read-only | Fast codebase search (quick/medium/very thorough) |
| Location | Scope | Priority |
|---|---|---|
.claude/agents/ | Project | Highest |
~/.claude/agents/ | User (all projects) | Lower |
Plugin agents/ | Plugin-specific | Varies |
--agents CLI flag | Session only | Medium |
claude --agents '{
"code-reviewer": {
"description": "Expert code reviewer. Use proactively after code changes.",
"prompt": "You are a senior code reviewer...",
"tools": ["Read", "Grep", "Glob", "Bash"],
"model": "sonnet"
}
}'
Continue previous conversations:
agentIdagent-{agentId}.jsonlagentId to continue with full contextReference: references/skill-development.md - Full structure, trigger patterns, hook system.
---
name: skill-name
# WHAT it does + WHEN to use it (both required!)
description: "[Core purpose]. [Technologies]. Capabilities: [list].
Actions: [verbs]. Keywords: [triggers]. Use when: [scenarios]."
allowed-tools: Read, Grep, Glob
---
# Skill Name
## Purpose
What this skill helps with - in practitioner voice.
## Patterns
### [Pattern Name]
**When you see:** [Observable trigger]
**This indicates:** [Expert insight]
**Therefore:** [Action to take]
**Watch out for:** [Common pitfall]
## Heuristics
- **[Rule of thumb]**: [When/why it applies]
## When to Use Something Else
- For X → use `other-skill`
- For Y → escalate to user
| Field | Required | Description |
|---|---|---|
name | Yes | Lowercase, hyphens, max 64 chars |
description | Yes | WHAT + WHEN format, max 1024 chars, quoted |
allowed-tools | No | Restrict tool access (security) |
Restrict Claude's tools with allowed-tools:
---
name: safe-reader
description: "Read-only file access. Use when viewing code without modifications."
allowed-tools: Read, Grep, Glob
---
| Location | Scope |
|---|---|
.claude/skills/{name}/SKILL.md | Project (shared via git) |
~/.claude/skills/{name}/SKILL.md | User (all projects) |
Plugin skills/ | Plugin-bundled |
my-skill/
├── SKILL.md (required, <800 lines)
├── references/ (optional - detailed docs)
├── scripts/ (optional - utilities)
└── templates/ (optional - templates)
| Section | Purpose | Include When |
|---|---|---|
| Frontmatter | Activation trigger | Always - required |
| Context | Domain framing | When domain context helps |
| Patterns | Expert recognition | Core - almost always |
| Heuristics | Decision guidance | When judgment needed |
| Anti-Patterns | What to avoid | When mistakes are common/costly |
| Workflow | Process guidance | When sequence matters |
| Quality Signals | How to verify good work | When quality is hard to assess |
| Tools/Commands | Technical specifics | When implementation details matter |
| Output Spec | Expected format | When format is specific |
Modify Claude Code's main agent behavior.
---
name: My Custom Style
description: Brief description of behavior
keep-coding-instructions: true
---
# Custom Style Instructions
You are an interactive CLI tool that helps users...
## Specific Behaviors
[Define assistant behavior...]
| Field | Purpose | Default |
|---|---|---|
name | Display name | Filename |
description | UI description | None |
keep-coding-instructions | Retain coding instructions | false |
TODO(human) markers~/.claude/output-styles/.claude/output-styles//output-style # Access menu
/output-style explanatory # Switch directly
Before (documentation voice):
It is recommended that users consider implementing appropriate error handling mechanisms.
After (practitioner voice):
Always handle errors explicitly. Silent failures are debugging nightmares.
Transform procedures to patterns when expertise matters:
Before (procedure):
1. Open the file
2. Check the format
3. Validate the data
4. Process the content
After (pattern):
### Format Recognition
**When you see:** File extension and initial bytes
**This indicates:** Expected structure and parsing approach
**Therefore:** Choose parser before reading content
**Watch out for:** Extension doesn't always match actual format
Looks like: Agent with 10+ tools, handles "everything related to X" Why wrong: Broad agents make poor decisions, consume tokens exploring options Instead: Constrain to 3-5 core tools. Create sibling agents for related domains.
Looks like: Skill that restates tool documentation without adding insight Why wrong: No expertise transfer. User could just read the docs. Instead: Add the "expert layer" - pitfalls, non-obvious combos, when NOT to use.
Looks like: Description uses only official tool/framework name Why wrong: Users say "help me deploy" not "invoke kubernetes-orchestrator" Instead: Include task verbs, user-language synonyms, problem descriptions.
Looks like: No explicit "what this does NOT do" section Why wrong: Scope creep, incorrect expectations, overlapping extensions Instead: Every extension needs 3+ explicit out-of-scope declarations.
Looks like: description: Helps with documents
Why wrong: Too vague to trigger on relevant requests
Instead: Include file types, task verbs, problem descriptions, synonyms.
Before outputting, verify against Core Truths:
.claude/agents/{name}.mdSkill("prompt-architect") to improve prompt.claude/skills/{name}/SKILL.mdSkill("prompt-architect") to improve promptSkill("prompt-architect") to improve promptsAgent Testing:
Task(
subagent_type="agent-name",
description="Test task",
prompt="Detailed test prompt"
)
Skill Testing:
claude --debug✅ 800-line rule: Keep SKILL.md and agent prompts under 800 lines ✅ Progressive disclosure: Use reference files for detailed content ✅ Proactive language: Include "use PROACTIVELY" in descriptions ✅ WHAT + WHEN descriptions: Both capability and triggers ✅ Test first: Build 3+ evaluations before extensive documentation ✅ Least privilege: Limit tools to necessary set
❌ Vague descriptions without triggers ❌ Over 800 lines without references ❌ Second-person voice ("you should...") ❌ All tools when subset suffices ❌ No examples in agent descriptions ❌ Procedures without patterns
Agent Model Selection:
File Locations:
.claude/agents/*.md.claude/skills/{name}/SKILL.md.claude/output-styles/*.mdManagement Commands:
/agents - Interactive agent management/output-style - Switch output stylesStatus: Production Ready | Lines: ~500 | Progressive Disclosure: ✅
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience