Kvmzen 部落格
← 返回技術實踐

2026 最新 Claude Code Skills 模板大全(100+ 免費範例)

AIDevelopment ·約 31 分鐘閱讀

2026 最新 Claude Code Skills 模板大全(100+ 免費範例)- Kvmzen

2026 年,AI 程式設計助手已經從「聊天補全」進化到「可編排的 Agent 工作流」。Claude Code Skills(Anthropic 終端 Agent)與 Cursor Agent Skills(IDE 內建 Agent)共享同一套 SKILL.md 規範——用 Markdown 檔案教會 AI「在特定場景下該怎麼做」。

如果你還在每次對話裡重複貼上「請按我們團隊的 PR 審查標準檢查程式碼」,是時候把這段話寫進 Skill,一勞永逸了。本文提供 120+ 即用 Skill 名稱與觸發場景,外加 8 套可複製模板,涵蓋從程式碼審查到 DevOps 的完整開發鏈路。

120+
分類整理的 Skill 範例
8 套
可複製 SKILL.md 骨架
12
程式碼審查 · 測試 · DevOps · 安全…

Skills 是什麼?和 Rules / MCP 怎麼分工?

機制 存放位置 觸發方式 適合場景
Rules .cursor/rules/ 或專案根 AGENTS.md 始終在上下文中 編碼風格、命名規範、禁止事項
Skills ~/.cursor/skills/.cursor/skills/ Agent 按 description 語意匹配後載入 多步驟工作流、領域專業知識
MCP 外部服務連接 Agent 呼叫工具 API 資料庫查詢、瀏覽器、CI 系統

一句話總結:Rules 定底線,Skills 教方法,MCP 接工具。

Claude Code 的 Skills 目錄通常為 ~/.claude/skills/(個人)或專案內 .claude/skills/;Cursor 對應 ~/.cursor/skills/.cursor/skills/。兩邊格式互通,本文模板均可直接複用。

2026 年重要變化
Cursor 在 2026 年初將 Agent Skills 從實驗功能升級為正式能力,支援專案級與個人級 Skills 並存;Claude Code 同步採納相同的 YAML frontmatter 規範。兩套工具現在可以共享同一套 Skill 倉庫。

SKILL.md 標準結構

每個 Skill 是一個目錄,核心檔案為 SKILL.md

my-skill/
├── SKILL.md          # Required: main instructions + YAML frontmatter
├── reference.md      # Optional: detailed reference
├── examples.md       # Optional: input/output examples
└── scripts/          # Optional: executable scripts
    └── validate.sh

最小可用模板

---
name: my-skill-name
description: 用第三人稱寫清楚「做什麼」和「何時觸發」。包含關鍵詞以便 Agent 發現。
---

# My Skill Name

## 步驟
1. 第一步具體操作
2. 第二步具體操作

## 輸出格式
描述期望的輸出結構。

frontmatter 必填欄位

欄位 要求 說明
name ≤64 字元,小寫字母/數字/連字號 唯一識別碼
description ≤1024 字元,第三人稱 Agent 靠它決定是否載入此 Skill

寫作原則(2026 最佳實踐)

  1. 簡潔優先:Agent 已經很聰明,只寫它不知道的資訊
  2. description 是關鍵:寫清 WHAT + WHEN,包含觸發關鍵詞
  3. 主檔案 ≤500 行:詳細內容拆到 reference.md
  4. 可執行步驟:用編號列表,不用模糊描述
  5. 禁止建立在 ~/.cursor/skills-cursor/:該目錄為 Cursor 內建 Skill 保留

120+ Skill 範例速查表

以下按 12 個分類列出 120 個即用 Skill 名稱、觸發場景與建議 description 關鍵詞。複製名稱建立目錄即可開始定制。

1. 程式碼審查與品質(10)

#Skill 名稱觸發場景description 關鍵詞
1code-reviewPR / diff 審查pull request, code review, diff
2security-review安全漏洞掃描security, vulnerability, OWASP
3performance-review效能熱點分析performance, bottleneck, profiling
4refactor-suggest重構建議refactor, clean code, smell
5api-design-reviewAPI 設計評審REST, API design, endpoint
6typescript-strictTS 型別安全審查TypeScript, type safety, strict
7react-patternsReact 元件審查React, hooks, component
8go-idiomsGo 慣用法檢查Go, idioms, error handling
9python-pep8Python 風格審查Python, PEP8, lint
10accessibility-audita11y 無障礙審查accessibility, WCAG, a11y

2. Git 與版本控制(10)

#Skill 名稱觸發場景description 關鍵詞
11commit-message產生規範 commitcommit message, conventional commits
12changelog-writer寫 CHANGELOGchangelog, release notes
13branch-naming分支命名建議branch, git flow
14merge-conflict解決合併衝突merge conflict, rebase
15git-blame-analysis追溯程式碼變更原因git blame, history
16pr-description寫 PR 描述pull request description
17squash-commits整理提交歷史squash, interactive rebase
18git-hooks-setup設定 pre-commitgit hooks, pre-commit, husky
19monorepo-workflowMonorepo 分支策略monorepo, turborepo, nx
20release-tagging語意化版本打 tagsemver, release, tagging

3. 測試(10)

#Skill 名稱觸發場景description 關鍵詞
21unit-test-writer產生單元測試unit test, jest, pytest
22integration-test整合測試骨架integration test, e2e setup
23test-coverage覆蓋率分析與補全coverage, untested paths
24mock-factory產生 mock 資料mock, fixture, factory
25snapshot-test快照測試維護snapshot, visual regression
26playwright-e2ePlaywright E2E 腳本Playwright, browser test
27api-contract-testAPI 契約測試contract test, OpenAPI
28load-test-k6k6 壓測腳本load test, k6, performance
29mutation-test變異測試分析mutation testing, stryker
30test-flaky-debug排查不穩定測試flaky test, intermittent failure

4. DevOps 與 CI/CD(10)

#Skill 名稱觸發場景description 關鍵詞
31dockerfile-optimize最佳化 DockerfileDockerfile, multi-stage, image size
32github-actions寫 GitHub Actions workflowGitHub Actions, CI pipeline
33gitlab-ciGitLab CI 設定GitLab CI, .gitlab-ci.yml
34kubernetes-manifestK8s YAML 產生Kubernetes, deployment, helm
35terraform-moduleTerraform 模組編寫Terraform, IaC, HCL
36ansible-playbookAnsible playbookAnsible, provisioning
37nginx-configNginx 反向代理設定nginx, reverse proxy, SSL
38monitoring-setupPrometheus/Grafana 設定monitoring, Prometheus, alerting
39log-analysis日誌模式分析logs, ELK, structured logging
40rollback-runbook回滾操作手冊rollback, incident, runbook

5. 安全(10)

#Skill 名稱觸發場景description 關鍵詞
41owasp-top10OWASP Top 10 檢查OWASP, injection, XSS
42secrets-scan金鑰洩露掃描secrets, API key, credential
43dependency-audit依賴漏洞審計npm audit, CVE, Snyk
44auth-review認證授權審查OAuth, JWT, RBAC
45sql-injectionSQL 注入檢測SQL injection, parameterized query
46cors-csp-configCORS/CSP 標頭設定CORS, CSP, security headers
47pen-test-report滲透測試報告模板penetration test, finding
48gdpr-complianceGDPR 合規檢查GDPR, privacy, PII
49ssl-tls-configTLS 設定審查TLS, certificate, HTTPS
50sbom-generator軟體物料清單SBOM, supply chain

6. 文件與技術寫作(10)

#Skill 名稱觸發場景description 關鍵詞
51readme-writer產生 READMEREADME, project documentation
52api-docs-openapiOpenAPI 文件產生OpenAPI, Swagger, API docs
53adr-writer架構決策記錄ADR, architecture decision
54inline-comments補充程式碼註解code comments, docstring
55migration-guide版本遷移指南migration, upgrade guide
56onboarding-doc新人 onboarding 文件onboarding, getting started
57runbook-writer維運手冊編寫runbook, SOP, operations
58tech-blog-post技術部落格撰寫blog post, technical writing
59mermaid-diagram架構圖 Mermaid 產生Mermaid, diagram, flowchart
60javadoc-jsdocAPI 註解產生JSDoc, JavaDoc, Sphinx

7. 資料庫(10)

#Skill 名稱觸發場景description 關鍵詞
61sql-optimizeSQL 查詢最佳化SQL, query plan, index
62migration-sql資料庫遷移腳本migration, ALTER TABLE, Flyway
63schema-design表結構設計schema, normalization, ER diagram
64postgres-tuningPostgreSQL 調校PostgreSQL, vacuum, EXPLAIN
65redis-patternsRedis 使用模式Redis, cache, pub/sub
66mongodb-schemaMongoDB 文件設計MongoDB, document model
67prisma-schemaPrisma schema 編寫Prisma, ORM, schema.prisma
68data-seed種子資料產生seed data, fixture, faker
69backup-restore備份還原腳本backup, restore, pg_dump
70etl-pipelineETL 管道設計ETL, data pipeline, dbt

8. 前端開發(10)

#Skill 名稱觸發場景description 關鍵詞
71react-componentReact 元件腳手架React component, JSX
72vue-composableVue Composable 編寫Vue 3, composable, Pinia
73tailwind-stylingTailwind CSS 樣式Tailwind, utility CSS
74css-responsive響應式版面responsive, mobile-first, media query
75state-management狀態管理方案選型Redux, Zustand, state
76nextjs-app-routerNext.js App RouterNext.js, RSC, app router
77i18n-setup國際化設定i18n, localization, react-intl
78storybook-storyStorybook 故事編寫Storybook, component story
79bundle-optimize打包體積最佳化bundle size, tree shaking, code split
80form-validation表單校驗邏輯form, validation, zod, yup

9. 後端與 API(10)

#Skill 名稱觸發場景description 關鍵詞
81rest-api-designRESTful API 設計REST, endpoint, HTTP methods
82graphql-schemaGraphQL schema 定義GraphQL, resolver, schema
83grpc-protobufgRPC / ProtobufgRPC, protobuf, service definition
84express-middlewareExpress 中介軟體Express, middleware, Node.js
85fastapi-endpointFastAPI 路由FastAPI, Python, Pydantic
86error-handling統一錯誤處理error handling, exception, status code
87rate-limiting限流策略實作rate limit, throttle, token bucket
88webhook-handlerWebhook 接收處理webhook, event, signature verify
89background-job背景任務佇列queue, Celery, BullMQ, Sidekiq
90microservice-split微服務拆分建議microservice, bounded context, DDD

10. AI / LLM 整合(10)

#Skill 名稱觸發場景description 關鍵詞
91prompt-engineeringPrompt 最佳化prompt, LLM, few-shot
92rag-pipelineRAG 管道搭建RAG, embedding, vector store
93agent-orchestration多 Agent 編排agent, orchestration, tool use
94mcp-serverMCP Server 開發MCP, model context protocol
95llm-evalLLM 輸出評估evaluation, benchmark, LLM judge
96token-optimizeToken 用量最佳化token, context window, cost
97fine-tune-guide微調流程指導fine-tune, LoRA, training data
98embedding-search語意搜尋實作embedding, semantic search, FAISS
99guardrailsAI 輸出護欄guardrails, content filter, safety
100function-callingFunction Calling 實作function calling, tool use, OpenAI

11. 行動與跨平台(10)

#Skill 名稱觸發場景description 關鍵詞
101swiftui-viewSwiftUI 視圖編寫SwiftUI, iOS, view
102kotlin-composeJetpack Compose UICompose, Android, Kotlin
103react-native-screenRN 頁面開發React Native, mobile screen
104flutter-widgetFlutter WidgetFlutter, Dart, widget
105app-store-submitApp Store 提交流程App Store, TestFlight, submission
106push-notification推播通知整合push notification, APNs, FCM
107deep-linkingDeep Link 設定deep link, universal link
108offline-first離線優先架構offline, sync, local storage
109app-perf-profile行動端效能分析Instruments, Android Profiler
110ci-mobile-build行動端 CI 建置Fastlane, Xcode Cloud, mobile CI

12. 專案管理與協作(10)

#Skill 名稱觸發場景description 關鍵詞
111sprint-planningSprint 計畫輔助sprint, planning, estimation
112ticket-breakdown需求拆分為 ticketticket, user story, breakdown
113retro-facilitator回顧會議引導retrospective, retro, team
114incident-postmortem事故復盤報告postmortem, incident, RCA
115tech-debt-audit技術債盤點tech debt, prioritization
116rfc-reviewRFC 設計評審RFC, design proposal, review
117estimation-poker故事點估算estimation, story points, planning poker
118standup-summary站會摘要產生standup, daily sync, summary
119okr-alignmentOKR 對齊檢查OKR, goal alignment
120handoff-checklist專案交接清單handoff, knowledge transfer

8 套可複製 SKILL.md 模板

以下模板可直接複製到 .cursor/skills/<name>/SKILL.md~/.claude/skills/<name>/SKILL.md,按需修改。

模板 1:程式碼審查

---
name: code-review
description: Review code changes for quality, security, and best practices. Use when reviewing pull requests, diffs, or when the user asks for a code review.
---

# Code Review

## Checklist
1. Read the full diff before commenting
2. Check for security issues (injection, XSS, secrets)
3. Verify error handling on all external calls
4. Confirm tests cover new logic
5. Flag breaking API changes

## Output Format
- **Critical**: must fix before merge
- **Suggestion**: optional improvement
- **Praise**: well-done patterns worth keeping

模板 2:Commit Message

---
name: commit-message
description: Generate descriptive commit messages following Conventional Commits. Use when the user asks to write commit messages or review staged changes.
---

# Commit Message Generator

## Format
`<type>(<scope>): <subject>`

Types: feat, fix, docs, style, refactor, test, chore

## Rules
- Subject ≤ 72 characters, imperative mood
- Body explains WHY, not WHAT
- Reference issue numbers when applicable

模板 3:單元測試

---
name: unit-test-writer
description: Write unit tests for given code using the project's existing test framework. Use when the user asks to add tests, improve coverage, or test a function.
---

# Unit Test Writer

## Steps
1. Identify the project's test framework (Jest, pytest, Go test, etc.)
2. Read existing test files for patterns and conventions
3. Cover: happy path, edge cases, error paths
4. Use descriptive test names: `should_<expected>_when_<condition>`
5. Mock external dependencies, not the unit under test

模板 4:Dockerfile 最佳化

---
name: dockerfile-optimize
description: Optimize Dockerfiles for smaller image size, faster builds, and security. Use when working with Docker, containerization, or image optimization.
---

# Dockerfile Optimizer

## Checklist
- Use multi-stage builds
- Pin base image versions (no `latest`)
- Run as non-root user
- Combine RUN layers, clean package caches
- Use .dockerignore
- Scan for known CVEs in base image

模板 5:安全審查

---
name: security-review
description: Review code for security vulnerabilities following OWASP guidelines. Use when the user asks for security review, vulnerability scan, or before deploying to production.
---

# Security Review

## OWASP Top 10 Check
1. Injection (SQL, command, LDAP)
2. Broken authentication
3. Sensitive data exposure
4. XXE / deserialization
5. Broken access control
6. Security misconfiguration
7. XSS
8. Insecure deserialization
9. Known vulnerable components
10. Insufficient logging

## Output
Severity: Critical / High / Medium / Low / Info
Include: location, impact, remediation

模板 6:API 文件

---
name: api-docs-openapi
description: Generate or update OpenAPI/Swagger documentation from code. Use when documenting REST APIs, generating API specs, or working with OpenAPI files.
---

# API Documentation

## Steps
1. Scan route handlers for endpoints, methods, params
2. Generate OpenAPI 3.1 YAML with request/response schemas
3. Add examples for each endpoint
4. Document error responses (4xx, 5xx)
5. Include authentication requirements

模板 7:資料庫遷移

---
name: migration-sql
description: Write database migration scripts with rollback support. Use when altering database schema, adding tables, or writing Flyway/Liquibase migrations.
---

# Database Migration

## Rules
- Every UP migration must have a DOWN (rollback)
- Never drop columns in production without deprecation period
- Add indexes CONCURRENTLY on PostgreSQL
- Test migration on a copy of production data
- Name: `V{version}__{description}.sql`

模板 8:MCP Server 開發

---
name: mcp-server
description: Build MCP (Model Context Protocol) servers for tool integration. Use when creating MCP servers, connecting external tools to AI agents, or working with the MCP SDK.
---

# MCP Server Builder

## Structure
- Define tools with JSON Schema input/output
- Implement handlers with proper error responses
- Add authentication if connecting to external APIs
- Test with `npx @modelcontextprotocol/inspector`
- Document each tool's purpose and parameters

安裝與使用

Cursor

  1. 建立目錄:.cursor/skills/my-skill/SKILL.md(專案級)或 ~/.cursor/skills/my-skill/SKILL.md(個人級)
  2. 在 Agent 對話中提及相關場景,Agent 會自動匹配 description 載入 Skill
  3. 也可顯式呼叫:/my-skill-name 或在提示詞中 @my-skill

Claude Code

  1. 建立目錄:~/.claude/skills/my-skill/SKILL.md
  2. 啟動 Claude Code 後,在終端對話中描述任務,Agent 自動匹配
  3. 專案級 Skill 放在 .claude/skills/ 並提交到 Git

團隊共享最佳實踐

  • .cursor/skills/ 納入版本控制,全團隊共享
  • README.md 中列出可用 Skills 及觸發方式
  • 每個 Skill 附帶 examples.md 展示期望輸入輸出
  • 定期審查 description 是否涵蓋新成員的常用表述
進階技巧
把多個相關 Skill 組合使用:先用 security-review 掃描,再用 unit-test-writer 補測試,最後用 commit-message 產生提交。Skills 鏈式呼叫是 2026 年重度 Agent 工作流的核心模式。

開發環境的底座同樣重要

Skills 再強大,也需要在合適的硬體和作業系統上執行。iOS 開發相關的 Skills(如 swiftui-viewapp-store-submit)必須在 macOS + Xcode 環境下才能發揮價值;大型 monorepo 的 code-review Skill 也需要足夠的記憶體和磁碟 I/O。

如果你需要在雲端獲得完整的 macOS 開發環境來配合 Claude Code 或 Cursor Agent,Kvmzen Mac 雲租用 提供獨享 Mac mini M4,按月計費,與本文所有 Skills 模板無縫配合。

延伸閱讀

常見問題

Claude Code Skills 和 Cursor Rules 有什麼區別?

Rules 是持久化的專案級約束(編碼風格、命名規範),始終在上下文中生效;Skills 是按場景動態載入的專業工作流指令,只在相關任務時被 Agent 呼叫。兩者互補:Rules 定底線,Skills 教方法。

Skills 應該放在個人目錄還是專案目錄?

個人 Skills 適合跨專案通用能力;專案 Skills 適合團隊共享的領域知識。團隊專案優先放專案目錄並納入版本控制。

一個 SKILL.md 寫多長合適?

主檔案建議控制在 500 行以內。核心指令放 SKILL.md,詳細參考文件拆到 reference.md 或 examples.md,避免擠佔 Agent 上下文空間。

限時特惠

不只是一台 Mac,是你在雲端的開發基地

獨享算力 · 全球節點 · 按月訂閱 · 無需購置硬體

返回首頁
限時優惠 點擊查看套餐