视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
generate-docs【文档与办公】Generate fumadocs MDX documentation for agent skills. Use when users say "generate docs", "document this skill", "create fumadocs for X", "update skill docs", "validate docs", or when working with docs/content/docs directory. Handles initial generation, smart updates preserving manual edits, and validation. Uses SHA tracking for three-way merge logic.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Generate fumadocs MDX documentation for agent skills with SHA tracking and smart updates.
Engineers maintain the documentation. You assist.
Your role:
All generated content is editable markdown. Engineers can freely customize—adapt to their patterns rather than enforcing rigid templates.
Humans evaluating or using documented skills in agent harnesses such as Claude Code or pi.
Write for someone trying to understand whether a skill is useful, what it helps them accomplish, and how it behaves. Do not write as if you are instructing another agent how to execute the skill unless that operational detail is directly relevant to the human reader.
Prose should be to the point—help folks understand what the skill is for, when to reach for it, and what value it provides. Follow these patterns:
> **Good to know:** only when it helps a human choose, use, or not misuse the skillRemove AI-sounding phrasing like "leverages", "streamlines", "comprehensive", "robust". Keep it direct and human.
Use these as strong defaults:
## How It Works to 3–5 bullets or 3–4 short subsectionsLonger pages are justified only when the skill has multiple genuinely distinct user-facing modes or deliverables.
Before including any detail, classify it:
references/*.md, assets/*, helper docs, or other skill internals unless they are directly user-consumable artifactsBefore including any detail, ask:
If the answer is no, omit it.
If the source contains agent-operational guidance with user-facing significance, convert it into human language. Never describe how the skill is implemented when you can describe what the user experiences or receives instead.
Examples:
Omit by default. Include only if that structure changes the user's interaction, output depth, or expectations; if it does, describe the user-visible effect rather than naming the internal technique.Frontmatter (rendered as page H1 and meta description):
---
title: Overview
description: One detailed sentence describing what it does
source: skills/skill-name/SKILL.md
source_sha: <git hash-object>
doc_sha: <content hash>
deprecated: false
updated: YYYY-MM-DD
---
Default body sections (start with H2, NOT H1):
## What It Helps You Do - User-facing outcomes and scope## When to Use - Trigger patterns and contexts## How It Works - Main workflows, behaviors, or evaluation dimensions from SKILL.mdOptional sections (include only when clearly user-relevant):
### Intelligent Discovery Process - Only when the skill has a concrete, user-visible multi-stage discovery process that materially changes behavior, output, or required user interaction## Good to Know - Scope boundaries, important limitations, sibling-skill distinctions, and user-facing gotchas## Prerequisites - Required tools, configuration, existing files, or environmental assumptions the user must satisfy before the skill is useful## What You Get - The output artifact, report shape, generated files, or result structure the user can expect. Use only when the skill reliably produces a concrete, reviewable deliverable that is distinct from the user outcome itself.## Examples - Named by use case when concrete examples materially help adoption## Limits or ## What It Does Not Do - Sharp boundaries that are central to understanding the skill's scope## Degrees of Freedom - How prescriptive vs flexible the skill is, when relevant## Related - Links to related skillsDo not add sections just because the source contains them. Start with the three core sections and keep the page tight unless extra structure clearly improves consumer understanding.
Prefer 4–6 total sections on most pages. If ## Good to Know exists, do not also create extra boundary/gotcha sections such as ## Common Issues, ## Critical Setup Rules, ## Review Format, or ## Key Behaviors unless they are truly distinct and essential.
When in doubt, use a short ## Good to Know section instead of inventing a specialized heading.
Avoid ## Common Pitfalls as a default catch-all. If the content is not actually about pitfalls or misuse, use a more accurate section name such as ## Good to Know, ## Limits, or ## Related.
Avoid ## Key Patterns and ## Anti-Patterns as default generated sections. These often balloon into a restatement of the SKILL.md internals. Only surface that material indirectly through concise behavior summaries in ## How It Works, or through a short ## Good to Know / ## Limits section when it materially changes user expectations.
IMPORTANT:
##, NOT # (frontmatter title becomes page H1)The dual-SHA system enables smart updates that preserve manual edits.
source_sha: Hash of source file at time docs were generated
git hash-object <source-file>doc_sha: Hash of documentation content (excluding frontmatter)
IF doc_sha matches current doc content:
→ No manual edits, safe to regenerate affected sections
ELSE:
→ Manual edits detected, preserve prose and merge code changes carefully
When updating:
source_sha to current HEAD → what changed in codedoc_sha to current doc → whether user edited docsRead the skill's SKILL.md completely from skills/ directory only (ignore .agent/skills, .claude/skills, .pi/skills). Look for:
Exclude test files from documentation output:
*.test.ts, *.test.tsx files__tests__/, __mocks__/ directoriesRead existing documentation if present to understand current state.
Before generating content:
git hash-object skills/skill-name/SKILL.md
Store this value for frontmatter.
Extract information from source—don't infer or hallucinate. Focus on:
Opening section: Start with user-facing outcomes and include a short invocation block so every skill doc shows the slash command near the top. Keep it brief.
## What It Helps You Do
Use this skill to [core outcomes in human terms].
Activate it with:
- `/<name-from-frontmatter>`
- Phrases like "[key phrases from description]"
- Related requests about [context or keywords]
It is especially useful when you need to:
- [Outcome 1]
- [Outcome 2]
- [Outcome 3]
Keep the invocation block to 2–3 bullets max. The goal is discoverability, not a long trigger list.
For tool-like skills, concrete invocation examples are useful. For process, audit, or judgment skills, spend more space on outcomes and behavior than on command syntax.
Aim for compression:
## What It Helps You Do, do not repeat it in ## Good to Know unless you are reframing it as a boundary, limit, or gotchaWhen to Use section: Extract from description field
## When to Use
Use this skill when:
- Users say "[exact phrases from description]"
- Working with [file types/contexts]
- [Other trigger patterns]
Behavior / evaluation section: Summarize what the skill optimizes, checks, or calibrates.
## How It Works
- [Behavior pattern 1 in user-facing language]
- [Behavior pattern 2 in user-facing language]
- [Behavior pattern 3 in user-facing language]
### Intelligent Discovery Process
- [Only include when the staged discovery process is concrete, visible to the user, and important to expectations or output]
Use labels such as ## How It Works or ## What It Checks based on the skill type, but default to ## How It Works.
This section should answer questions like:
Default this section to 3–5 bullets or 3–4 short subsections. Do not narrate the full internal execution plan unless those mechanics materially change the user's expectations.
Only add ### Intelligent Discovery Process when the section contains concrete, user-visible behavior such as phased scanning, targeted interviews, preview/approval checkpoints, or other workflow stages that change the user's experience. Do not include it for generic statements like "the skill adapts its guidance" or "the skill goes deeper where needed."
If the explanation reads like instructions for the agent rather than expectations for the human reader, compress it.
This section should NOT list internal file reads, traversal order, hidden resource names, long lists of anti-patterns / rules copied from SKILL.md, or internal implementation mechanics that do not change the user's experience.
Examples: Extract from SKILL.md body or references/, show explicit slash command usage
## Examples
### Example: [Use Case Name]
```bash
# Command (always show explicit slash command when possible)
/<skill-name> path/to/target
[One short sentence about what the user gets back]
Examples should demonstrate use cases, not simulate the entire internal workflow. Prefer one command + one outcome summary over transcript-style step-by-step narration. If two examples teach the same thing, keep the clearer one.
**Good to Know** (optional): User-facing scope boundaries, prerequisites, limitations, expected outputs, or sibling-skill distinctions. This section is not for maintainer notes or internal implementation details.
```markdown
## Good to Know
> **Good to know:** [When this skill applies vs when to use a different skill]
> **Good to know:** [Non-obvious limitation, scope boundary, prerequisite, or expected output]
> **Good to know:** [Gotcha that prevents misuse or wrong expectations]
Prerequisites (optional): Use when the skill depends on real user-facing setup or environment assumptions
## Prerequisites
- [Required CLI, package, or tool]
- [Required configuration or enabled workflow]
- [Expected project file or environment capability]
What You Get (optional): Use only when the skill consistently produces a concrete, recognizable output shape that is distinct from ## What It Helps You Do
## What You Get
- [Generated file, report, or artifact 1]
- [Generated file, report, or artifact 2]
- [What the user can review, edit, or approve]
Do NOT use this section for advisory or best-practice skills when the content would just restate the guidance already described in ## What It Helps You Do. If the "output" is merely recommendations, guidance, or help, fold that into ## What It Helps You Do and omit ## What You Get.
Do not turn this section into an exhaustive inventory of every subsection or internal artifact unless that detail materially helps the user decide whether to use the skill.
Limits / What It Does Not Do (optional): Use when a sharp boundary is central to correct expectations
## Limits
- [Important non-goal or out-of-scope area]
- [Adjacent task this skill intentionally does not handle]
Use ## Common Pitfalls only for actual pitfalls or misuse patterns. Do not put generic scope notes under a pitfalls heading.
For example:
## Good to Know: "This skill focuses on X, not Y. For Y tasks, use skill-name instead."## Good to Know: "When you scan a directory, you get format A. For quick questions, you get format B."## Good to Know: "You get a structured audit report for full reviews, but direct implementation help for narrow fix requests."## Limits: "This skill plans the change but does not implement it."## What You Get: "A generated ARCHITECTURE.md draft plus a preview for review before write."## What You Get: "Guidance on choosing query keys and mutation patterns" when those points are already covered in ## What It Helps You Do## Common Pitfalls: "Using this skill for Y usually leads to shallow results because it is optimized for X."Load: query-client-setup.md and server-integration.md
The skill covers both client-side QueryClient setup and server-rendered integration patterns.Skip: mutation and caching references
Read references only when needed
The skill keeps detailed guidance modular so it can go deep without bloating the core instructions.The skill uses a progressive disclosure structure — you don't need to load all reference files at once.
Detailed guidance is available for specific scenarios, while the main workflow stays concise.Spawns one subagent per touched capability
Updates each affected capability independently so larger archive operations stay manageable.Loads project context into subagent prompts
Uses project conventions so implementation stays aligned with the repo.Keep prose concise. Prefer user outcomes and behavior first. Show commands or internal steps only when they help the human apply the skill.
Before writing or saving, verify:
## How It Works read like a workflow summary rather than an implementation manual?## Good to Know?SKILL.md?---
title: Overview
description: One detailed sentence describing what it does
source: skills/skill-name/SKILL.md
source_sha: <value from step 2>
doc_sha: pending
deprecated: false
updated: YYYY-MM-DD
---
Check:
< followed by numbers → use < (e.g., "<500 lines" not "<500 lines")> followed by numbers → use > (e.g., ">50%" not ">50%")& in prose → use & (e.g., "Testing & QA" not "Testing & QA"){{ and }} (e.g., {{ label: "text" }})After generating content:
# Strip accelint- prefix for doc path
doc_dir="docs/content/docs/${skill_name#accelint-}"
# Extract content after frontmatter, hash it
awk '/^---$/{if(++count==2){flag=1;next}}flag' "$doc_dir/index.mdx" | git hash-object --stdin
Update frontmatter: replace doc_sha: pending with computed hash.
IMPORTANT - Path Construction:
accelint- prefix from skill name for docs pathskills/accelint-ac-to-playwright/ → docs/content/docs/ac-to-playwright/index.mdxskills/skill-creator/ → docs/content/docs/skill-creator/index.mdx (no prefix to strip)Write to docs/content/docs/{skill-name-without-accelint-prefix}/index.mdx.
If the directory doesn't exist, create it:
# Strip accelint- prefix if present
doc_dir="docs/content/docs/${skill_name#accelint-}"
mkdir -p "$doc_dir"
When source changes and docs exist:
# Strip accelint- prefix for doc path
doc_dir="docs/content/docs/${skill_name#accelint-}"
# Compare source_sha to current
current_sha=$(git hash-object skills/skill-name/SKILL.md)
documented_sha=$(grep 'source_sha:' "$doc_dir/index.mdx" | awk '{print $2}')
if [ "$current_sha" != "$documented_sha" ]; then
echo "Source changed, docs may be stale"
fi
# Strip accelint- prefix for doc path
doc_dir="docs/content/docs/${skill_name#accelint-}"
# Compute current doc content hash
current_doc_sha=$(awk '/^---$/{if(++count==2){flag=1;next}}flag' "$doc_dir/index.mdx" | git hash-object --stdin)
recorded_doc_sha=$(grep 'doc_sha:' "$doc_dir/index.mdx" | awk '{print $2}')
if [ "$current_doc_sha" != "$recorded_doc_sha" ]; then
echo "Manual edits detected, preserve prose"
fi
If no manual edits (doc_sha matches):
updated dateIf manual edits detected (doc_sha doesn't match):
updated dateRun these checks on command or when user asks to "validate docs":
For each documented skill:
# Strip accelint- prefix for doc path
doc_dir="docs/content/docs/${skill_name#accelint-}"
current_sha=$(git hash-object skills/skill-name/SKILL.md)
documented_sha=$(grep 'source_sha:' "$doc_dir/index.mdx" | awk '{print $2}')
if [ "$current_sha" != "$documented_sha" ]; then
# Count commits since documented version
echo "skill-name: docs are stale"
fi
Parse markdown links: [text](../path/to/file.mdx)
Verify linked files exist. Report broken links.
Required fields: title, description, source, source_sha, doc_sha, updated
Error if any missing.
List skills in skills/ that have no corresponding docs.
List docs that reference non-existent source files.
Ask the user: