mirror of
https://github.com/tradecatlabs/vibe-coding-cn.git
synced 2026-08-20 22:38:04 +00:00
chore: migrate repository to standard knowledge base layout
This commit is contained in:
@@ -0,0 +1,123 @@
|
||||
# Skills
|
||||
Skills are folders of instructions, scripts, and resources that Claude loads dynamically to improve performance on specialized tasks. Skills teach Claude how to complete specific tasks in a repeatable way, whether that's creating documents with your company's brand guidelines, analyzing data using your organization's specific workflows, or automating personal tasks.
|
||||
|
||||
For more information, check out:
|
||||
- [What are skills?](https://support.claude.com/en/articles/12512176-what-are-skills)
|
||||
- [Using skills in Claude](https://support.claude.com/en/articles/12512180-using-skills-in-claude)
|
||||
- [How to create custom skills](https://support.claude.com/en/articles/12512198-creating-custom-skills)
|
||||
- [Equipping agents for the real world with Agent Skills](https://anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills)
|
||||
|
||||
# About This Repository
|
||||
|
||||
This repository contains example skills that demonstrate what's possible with Claude's skills system. These examples range from creative applications (art, music, design) to technical tasks (testing web apps, MCP server generation) to enterprise workflows (communications, branding, etc.).
|
||||
|
||||
Each skill is self-contained in its own directory with a `SKILL.md` file containing the instructions and metadata that Claude uses. Browse through these examples to get inspiration for your own skills or to understand different patterns and approaches.
|
||||
|
||||
The example skills in this repo are open source (Apache 2.0). We've also included the document creation & editing skills that power [Claude's document capabilities](https://www.anthropic.com/news/create-files) under the hood in the [`skills/`](https://github.com/anthropics/skills/tree/main/skills) directory. These are source-available, not open source, but we wanted to share these with developers as a reference for more complex skills that are actively used in a production AI application.
|
||||
|
||||
**Note:** These are reference examples for inspiration and learning. They showcase general-purpose capabilities rather than organization-specific workflows or sensitive content.
|
||||
|
||||
## Disclaimer
|
||||
|
||||
**These skills are provided for demonstration and educational purposes only.** While some of these capabilities may be available in Claude, the implementations and behaviors you receive from Claude may differ from what is shown in these examples. These examples are meant to illustrate patterns and possibilities. Always test skills thoroughly in your own environment before relying on them for critical tasks.
|
||||
|
||||
# Example Skills
|
||||
|
||||
This repository includes a diverse collection of example skills demonstrating different capabilities:
|
||||
|
||||
## Creative & Design
|
||||
- **algorithmic-art** - Create generative art using p5.js with seeded randomness, flow fields, and particle systems
|
||||
- **canvas-design** - Design beautiful visual art in .png and .pdf formats using design philosophies
|
||||
- **slack-gif-creator** - Create animated GIFs optimized for Slack's size constraints
|
||||
|
||||
## Development & Technical
|
||||
- **artifacts-builder** - Build complex claude.ai HTML artifacts using React, Tailwind CSS, and shadcn/ui components
|
||||
- **mcp-server** - Guide for creating high-quality MCP servers to integrate external APIs and services
|
||||
- **webapp-testing** - Test local web applications using Playwright for UI verification and debugging
|
||||
|
||||
## Enterprise & Communication
|
||||
- **brand-guidelines** - Apply Anthropic's official brand colors and typography to artifacts
|
||||
- **internal-comms** - Write internal communications like status reports, newsletters, and FAQs
|
||||
- **theme-factory** - Style artifacts with 10 pre-set professional themes or generate custom themes on-the-fly
|
||||
|
||||
## Meta Skills
|
||||
- **skill-creator** - Guide for creating effective skills that extend Claude's capabilities
|
||||
- **template-skill** - A basic template to use as a starting point for new skills
|
||||
|
||||
# Document Skills
|
||||
|
||||
The `document-skills/` subdirectory contains skills that Anthropic developed to help Claude create various document file formats. These skills demonstrate advanced patterns for working with complex file formats and binary data:
|
||||
|
||||
- **docx** - Create, edit, and analyze Word documents with support for tracked changes, comments, formatting preservation, and text extraction
|
||||
- **pdf** - Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms
|
||||
- **pptx** - Create, edit, and analyze PowerPoint presentations with support for layouts, templates, charts, and automated slide generation
|
||||
- **xlsx** - Create, edit, and analyze Excel spreadsheets with support for formulas, formatting, data analysis, and visualization
|
||||
|
||||
**Important Disclaimer:** These document skills are point-in-time snapshots and are not actively maintained or updated. Versions of these skills ship pre-included with Claude. They are primarily intended as reference examples to illustrate how Anthropic approaches developing more complex skills that work with binary file formats and document structures.
|
||||
|
||||
# Try in Claude Code, Claude.ai, and the API
|
||||
|
||||
## Claude Code
|
||||
You can register this repository as a Claude Code Plugin marketplace by running the following command in Claude Code:
|
||||
```
|
||||
/plugin marketplace add anthropics/skills
|
||||
```
|
||||
|
||||
Then, to install a specific set of skills:
|
||||
1. Select `Browse and install plugins`
|
||||
2. Select `anthropic-agent-skills`
|
||||
3. Select `document-skills` or `example-skills`
|
||||
4. Select `Install now`
|
||||
|
||||
Alternatively, directly install either Plugin via:
|
||||
```
|
||||
/plugin install document-skills@anthropic-agent-skills
|
||||
/plugin install example-skills@anthropic-agent-skills
|
||||
```
|
||||
|
||||
After installing the plugin, you can use the skill by just mentioning it. For instance, if you install the `document-skills` plugin from the marketplace, you can ask Claude Code to do something like: "Use the PDF skill to extract the form fields from path/to/some-file.pdf"
|
||||
|
||||
## Claude.ai
|
||||
|
||||
These example skills are all already available to paid plans in Claude.ai.
|
||||
|
||||
To use any skill from this repository or upload custom skills, follow the instructions in [Using skills in Claude](https://support.claude.com/en/articles/12512180-using-skills-in-claude#h_a4222fa77b).
|
||||
|
||||
## Claude API
|
||||
|
||||
You can use Anthropic's pre-built skills, and upload custom skills, via the Claude API. See the [Skills API Quickstart](https://docs.claude.com/en/api/skills-guide#creating-a-skill) for more.
|
||||
|
||||
# Creating a Basic Skill
|
||||
|
||||
Skills are simple to create - just a folder with a `SKILL.md` file containing YAML frontmatter and instructions. You can use the **template-skill** in this repository as a starting point:
|
||||
|
||||
```markdown
|
||||
---
|
||||
name: my-skill-name
|
||||
description: A clear description of what this skill does and when to use it
|
||||
---
|
||||
|
||||
# My Skill Name
|
||||
|
||||
[Add your instructions here that Claude will follow when this skill is active]
|
||||
|
||||
## Examples
|
||||
- Example usage 1
|
||||
- Example usage 2
|
||||
|
||||
## Guidelines
|
||||
- Guideline 1
|
||||
- Guideline 2
|
||||
```
|
||||
|
||||
The frontmatter requires only two fields:
|
||||
- `name` - A unique identifier for your skill (lowercase, hyphens for spaces)
|
||||
- `description` - A complete description of what the skill does and when to use it
|
||||
|
||||
The markdown content below contains the instructions, examples, and guidelines that Claude will follow. For more details, see [How to create custom skills](https://support.claude.com/en/articles/12512198-creating-custom-skills).
|
||||
|
||||
# Partner Skills
|
||||
|
||||
Skills are a great way to teach Claude how to get better at using specific pieces of software. As we see awesome example skills from partners, we may highlight some of them here:
|
||||
|
||||
- **Notion** - [Notion Skills for Claude](https://www.notion.so/notiondevs/Notion-Skills-for-Claude-28da4445d27180c7af1df7d8615723d0)
|
||||
@@ -0,0 +1,110 @@
|
||||
# Anti-Patterns (And How to Fix Them)
|
||||
|
||||
This file documents common ways Skills fail in practice. Use it when refactoring existing Skills.
|
||||
|
||||
## 1) Documentation Dump in Quick Reference
|
||||
|
||||
**Symptom**
|
||||
- Quick Reference contains paragraphs of text, pasted docs, or large excerpts.
|
||||
|
||||
**Why it fails**
|
||||
- Users cannot scan or reuse it.
|
||||
- The model treats it as "knowledge soup" rather than executable patterns.
|
||||
|
||||
**Fix**
|
||||
- Move long text into `references/` (split by topic).
|
||||
- Keep Quick Reference as <= 20 copy/paste patterns when possible.
|
||||
- Add Examples for anything non-trivial.
|
||||
|
||||
## 2) Vague Triggers ("Helps with X")
|
||||
|
||||
**Symptom**
|
||||
- `description` says "helps with databases" or similar.
|
||||
- "When to Use" is a generic list with no tasks/inputs/goals.
|
||||
|
||||
**Why it fails**
|
||||
- Activation becomes noisy and unpredictable.
|
||||
|
||||
**Fix**
|
||||
- Rewrite `description` as: "What + when".
|
||||
- In "When to Use", list decidable tasks:
|
||||
- "Writing migration SQL for PostgreSQL"
|
||||
- "Debugging a failing CCXT order placement"
|
||||
- Add "Not For / Boundaries" to prevent misfires.
|
||||
|
||||
## 3) Missing Boundaries
|
||||
|
||||
**Symptom**
|
||||
- The Skill never says what it will not do.
|
||||
|
||||
**Why it fails**
|
||||
- The model over-promises and makes unsafe assumptions.
|
||||
- The skill triggers in irrelevant contexts.
|
||||
|
||||
**Fix**
|
||||
- Add `## Not For / Boundaries` with:
|
||||
- explicit out-of-scope items
|
||||
- required inputs and what questions to ask when missing
|
||||
|
||||
## 4) Non-reproducible Examples
|
||||
|
||||
**Symptom**
|
||||
- Examples are pseudo-code, missing inputs, or missing expected outputs.
|
||||
|
||||
**Why it fails**
|
||||
- Users cannot trust or validate the behavior.
|
||||
|
||||
**Fix**
|
||||
- Each example should contain:
|
||||
- Input(s)
|
||||
- Steps
|
||||
- Expected output / acceptance criteria
|
||||
- Prefer minimal reproducible examples over big "showcase" code.
|
||||
|
||||
## 5) One Giant File Syndrome
|
||||
|
||||
**Symptom**
|
||||
- Everything is in `SKILL.md` (or one huge reference file).
|
||||
|
||||
**Why it fails**
|
||||
- The entrypoint becomes unscannable and hard to maintain.
|
||||
|
||||
**Fix**
|
||||
- Keep `SKILL.md` execution-focused (patterns + examples + boundaries).
|
||||
- Split long content into `references/` and add `references/index.md`.
|
||||
|
||||
## 6) Invented Facts and Unverifiable Claims
|
||||
|
||||
**Symptom**
|
||||
- The Skill claims API fields/flags/commands without citing sources.
|
||||
|
||||
**Why it fails**
|
||||
- Incorrect guidance is worse than missing guidance.
|
||||
|
||||
**Fix**
|
||||
- Add a "verification path": where/how to confirm in official docs or source code.
|
||||
- Prefer statements backed by your material; mark assumptions explicitly.
|
||||
|
||||
## 7) Unsafe Defaults and Destructive Commands
|
||||
|
||||
**Symptom**
|
||||
- The Skill suggests destructive commands as the default path.
|
||||
|
||||
**Why it fails**
|
||||
- Users copy/paste and lose data.
|
||||
|
||||
**Fix**
|
||||
- Put destructive actions behind explicit warnings and confirmation steps.
|
||||
- Prefer read-only diagnostics first.
|
||||
|
||||
## 8) Inconsistent Terminology
|
||||
|
||||
**Symptom**
|
||||
- Same concept has multiple names; different concepts share a name.
|
||||
|
||||
**Why it fails**
|
||||
- Increases cognitive load and produces inconsistent outputs.
|
||||
|
||||
**Fix**
|
||||
- Add a short glossary (in `references/getting_started.md` or similar).
|
||||
- Use one concept, one name.
|
||||
@@ -0,0 +1,27 @@
|
||||
# Auto Skill Reference Index
|
||||
|
||||
This directory contains long-form documentation that supports the `auto-skill` meta-skill.
|
||||
|
||||
## Start Here
|
||||
|
||||
- [`../SKILL.md`](../SKILL.md): the meta-skill entrypoint (workflow, quality gate, tooling)
|
||||
|
||||
## Local Reference Docs (This Repo)
|
||||
|
||||
- [`skill-spec.md`](skill-spec.md): normative spec (MUST/SHOULD/NEVER) for a production-grade Skill in this repo
|
||||
- [`quality-checklist.md`](quality-checklist.md): quality gate checklist + scoring rubric
|
||||
- [`anti-patterns.md`](anti-patterns.md): common failure modes and how to fix them
|
||||
- [`skill-seekers.md`](skill-seekers.md): linked Skill Seekers tool integration (workflow + commands)
|
||||
|
||||
## Upstream / Official Reference
|
||||
|
||||
- [`README.md`](README.md): upstream overview of Claude Skills (what skills are, usage, examples)
|
||||
|
||||
## External Links (Official)
|
||||
|
||||
- What are skills? https://support.claude.com/en/articles/12512176-what-are-skills
|
||||
- Using skills in Claude https://support.claude.com/en/articles/12512180-using-skills-in-claude
|
||||
- Creating custom skills https://support.claude.com/en/articles/12512198-creating-custom-skills
|
||||
- Skills API Quickstart https://docs.claude.com/en/api/skills-guide
|
||||
- Anthropic Skills GitHub https://github.com/anthropics/skills
|
||||
- Engineering blog: Agent Skills https://anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills
|
||||
@@ -0,0 +1,49 @@
|
||||
# Quality Checklist (Production Gate)
|
||||
|
||||
Use this checklist to decide whether a Skill is shippable. It is intentionally biased toward reliability and maintainability over "more content".
|
||||
|
||||
## Scoring
|
||||
|
||||
Score each item:
|
||||
- 2 = fully satisfied
|
||||
- 1 = partially satisfied / needs work
|
||||
- 0 = missing
|
||||
|
||||
Suggested ship threshold:
|
||||
- Total score >= 24 (out of 32)
|
||||
- No "critical" item below 2
|
||||
|
||||
## A. Activation Reliability (Critical)
|
||||
|
||||
1. Frontmatter `name` matches `^[a-z][a-z0-9-]*$` and matches directory name (2)
|
||||
2. Frontmatter `description` is decidable ("what + when") with concrete keywords (2)
|
||||
3. `## When to Use This Skill` lists concrete tasks/inputs/goals (2)
|
||||
4. `## Not For / Boundaries` exists and meaningfully prevents misfires (2)
|
||||
|
||||
## B. Usability (Critical)
|
||||
|
||||
5. `## Quick Reference` is short and directly usable (no doc dumps) (2)
|
||||
6. Quick Reference patterns are formatted for copy/paste (2)
|
||||
7. `## Examples` contains >= 3 reproducible examples (2)
|
||||
8. Examples include acceptance criteria / expected output (2)
|
||||
|
||||
## C. Evidence & Correctness
|
||||
|
||||
9. `## Maintenance` lists sources (docs/repos/specs) and last-updated date (2)
|
||||
10. Uncertain external details include a verification path (2)
|
||||
11. Terminology is consistent (one concept, one name) (2)
|
||||
12. No contradictions between Quick Reference and Examples (2)
|
||||
|
||||
## D. Structure & Maintainability
|
||||
|
||||
13. Long-form content lives in `references/` with `references/index.md` navigation (2)
|
||||
14. Reference files are split by topic (not one giant file) (2)
|
||||
15. The skill reads like an operator manual (task -> steps -> acceptance) (2)
|
||||
16. Optional: scripts/assets are minimal and clearly scoped (2)
|
||||
|
||||
## Common Reasons to Fail the Gate
|
||||
|
||||
- Vague activation ("helps with X") with no boundaries
|
||||
- Quick Reference contains pasted documentation instead of patterns
|
||||
- Examples are not reproducible (no inputs, no steps, no expected output)
|
||||
- No sources and no update date (cannot be trusted or maintained)
|
||||
@@ -0,0 +1,39 @@
|
||||
# Skill Seekers(链接工具)使用说明
|
||||
|
||||
本目录通过相对软链接暴露 `tools/external/Skill_Seekers-development` submodule,用于把「文档 / GitHub 仓库 / PDF」快速转成一个可落地的 Skill 初稿。`tools/external/` 是源码单一来源,`auto-skill/scripts/` 只保留工具入口。
|
||||
|
||||
## 目录约定
|
||||
|
||||
- 工具源码入口:`skills/auto-skill/scripts/Skill_Seekers-development -> ../../../tools/external/Skill_Seekers-development`
|
||||
- 运行入口:`skills/auto-skill/scripts/skill-seekers.sh`
|
||||
- 依赖初始化:`skills/auto-skill/scripts/skill-seekers-bootstrap.sh`
|
||||
- 导入到本仓库:`skills/auto-skill/scripts/skill-seekers-import.sh`
|
||||
- 更新源码:直接更新 `tools/external/Skill_Seekers-development` submodule 指针;`skill-seekers-update.sh` 仅保留为受保护的旧入口。
|
||||
|
||||
## 推荐工作流(强约束)
|
||||
|
||||
1. 用 Skill Seekers 生成初稿到 `output/<name>/`
|
||||
2. 导入到 `skills/<name>/`
|
||||
3. 用 `validate-skill.sh --strict` 做质量闸门
|
||||
4. 回到 `auto-skill` 的规范对 `SKILL.md` 做“可激活性”与“边界”修订
|
||||
|
||||
## 最小可执行示例
|
||||
|
||||
```bash
|
||||
# 1) 初始化(只需一次)
|
||||
./skills/auto-skill/scripts/skill-seekers-bootstrap.sh
|
||||
|
||||
# 2) 生成(示例:抓 docs 配置)
|
||||
./skills/auto-skill/scripts/skill-seekers.sh -- scrape --config ./skills/auto-skill/scripts/Skill_Seekers-development/configs/react.json
|
||||
|
||||
# 3) 导入到 skills/
|
||||
./skills/auto-skill/scripts/skill-seekers-import.sh react
|
||||
|
||||
# 4) 严格校验
|
||||
./skills/auto-skill/scripts/validate-skill.sh skills/react --strict
|
||||
```
|
||||
|
||||
## 设计原则
|
||||
|
||||
- `skills/auto-skill/` 负责:规范、模板、闸门、可激活性;不直接承载领域知识。
|
||||
- Skill Seekers 负责:抓取与初稿生成;最终交付仍以本仓库的 `validate-skill.sh --strict` 为准。
|
||||
@@ -0,0 +1,111 @@
|
||||
# Skill Spec (This Repo)
|
||||
|
||||
This document defines what a "production-grade Skill" means in this repository. Use it as the source of truth when creating or refactoring anything under `skills/`.
|
||||
|
||||
Keywords: MUST / SHOULD / MAY / MUST NOT / SHOULD NOT are normative.
|
||||
|
||||
## 1. Directory & Naming
|
||||
|
||||
- A Skill MUST be a directory under `skills/` named after its `name` field.
|
||||
- The directory name MUST match `^[a-z][a-z0-9-]*$`.
|
||||
- The Skill entrypoint MUST be `SKILL.md` at the root of the skill directory.
|
||||
|
||||
## 2. Frontmatter (Required)
|
||||
|
||||
`SKILL.md` MUST start with YAML frontmatter:
|
||||
|
||||
```yaml
|
||||
---
|
||||
name: skill-name
|
||||
description: "What it does + when to use (activation triggers)."
|
||||
---
|
||||
```
|
||||
|
||||
Rules:
|
||||
- `name` MUST match `^[a-z][a-z0-9-]*$`.
|
||||
- `name` SHOULD equal the directory name.
|
||||
- `description` MUST be decidable and operational:
|
||||
- Good: "X development and debugging. Use when doing A/B/C."
|
||||
- Bad: "Helps with X."
|
||||
|
||||
## 3. SKILL.md Structure
|
||||
|
||||
### 3.1 Required Sections
|
||||
|
||||
`SKILL.md` SHOULD follow this section order, and in strict mode it MUST:
|
||||
|
||||
1. `## When to Use This Skill`
|
||||
2. `## Not For / Boundaries`
|
||||
3. `## Quick Reference`
|
||||
4. `## Examples`
|
||||
5. `## References`
|
||||
6. `## Maintenance`
|
||||
|
||||
Rationale:
|
||||
- Activation reliability depends on explicit triggers and boundaries.
|
||||
- Usability depends on short patterns and reproducible examples.
|
||||
- Maintainability depends on sources and navigable references.
|
||||
|
||||
### 3.2 Quick Reference Rules
|
||||
|
||||
- Quick Reference MUST contain short, directly usable patterns.
|
||||
- Quick Reference MUST NOT become a documentation dump.
|
||||
- Long explanations SHOULD go to `references/`.
|
||||
- A good target is <= 20 patterns, but large domains may justify more.
|
||||
|
||||
### 3.3 Example Rules
|
||||
|
||||
- The Examples section MUST contain reproducible examples.
|
||||
- Each example SHOULD specify:
|
||||
- input(s)
|
||||
- steps
|
||||
- expected output / acceptance criteria
|
||||
- Pseudo-code MAY be used only if the platform is unavailable, and MUST be clearly labeled.
|
||||
|
||||
### 3.4 Boundaries Rules
|
||||
|
||||
- "Not For / Boundaries" MUST list:
|
||||
- explicit out-of-scope items (to prevent misfires)
|
||||
- required inputs and what to ask when missing (1-3 questions)
|
||||
|
||||
## 4. references/ (Long-form Docs)
|
||||
|
||||
- `references/` SHOULD exist when the domain has:
|
||||
- long docs
|
||||
- many edge cases
|
||||
- extensive APIs/CLIs/config surfaces
|
||||
- If `references/` exists, it SHOULD include:
|
||||
- `references/index.md` as a navigation entrypoint
|
||||
|
||||
Guideline:
|
||||
- `references/` is for evidence, depth, and navigation.
|
||||
- `SKILL.md` is for execution: short patterns + examples + constraints.
|
||||
|
||||
## 5. scripts/ and assets/
|
||||
|
||||
- `scripts/` MAY contain helper automation (generators, validators, setup).
|
||||
- Scripts MUST be non-interactive by default.
|
||||
- Scripts MUST NOT require network access unless explicitly stated.
|
||||
- `assets/` MAY contain templates, configs, or static resources.
|
||||
|
||||
## 6. Safety & Integrity
|
||||
|
||||
- Skills MUST NOT include secrets (API keys, tokens, credentials).
|
||||
- Skills MUST NOT invent external facts.
|
||||
- If uncertain, they MUST include a verification path (where/how to check).
|
||||
- Potentially destructive commands MUST be explicitly labeled and gated.
|
||||
|
||||
## 7. Maintenance Metadata
|
||||
|
||||
Each Skill SHOULD include a `## Maintenance` section with:
|
||||
- sources (docs/repos/specs)
|
||||
- last-updated date
|
||||
- known limits / non-goals
|
||||
|
||||
## 8. Quality Gate
|
||||
|
||||
Before shipping, run the checklist in `quality-checklist.md` and (if available) the validator:
|
||||
|
||||
```bash
|
||||
./skills/auto-skill/scripts/validate-skill.sh skills/<skill-name> --strict
|
||||
```
|
||||
Reference in New Issue
Block a user