你有沒有覺得 Claude Code、Cursor、Codex 這些 AI 工具很強大,但每次遇到特定任務還是要重複解釋一堆背景?Agent Skills 就是來解決這件事的。
這個專案在 2026 年七月初爆發,短短幾天衝上 GitHub trending 第一名,累積 76,000+ stars。主要貢獻者是 Google Chrome 的首席工程師 Addy Osmani。
簡單說:Agent Skills 是一套給 AI 工具用的「技能包」系統,讓你的 AI 助手知道怎麼處理特定任務、遵循什麼規範、用什麼工具——不需要每次重新說明。
Agent Skills 是什麼?
傳統上,當你叫 Claude Code 或 Cursor 幫你做事,你需要把所有脈絡都塞進 prompt 裡:「這個專案用 React 18,測試用 Vitest,部署在 Vercel,code style 遵守 Airbnb,記得寫 JSDoc...」
Agent Skills 翻轉了這個流程。你把這些規則和流程預先打包成一個「Skill」,放在特定位置,AI 工具在執行任務前自動讀取,等於幫你的 AI 配備了「肌肉記憶」。
一個 Skill 本質上是一個 Markdown 檔案(SKILL.md),裡面定義:
- 這個技能負責什麼任務
- 使用什麼工具和命令
- 遵循哪些規範和流程
- 輸入輸出格式要求
支援哪些 AI 工具?
Agent Skills 設計上是工具中立的,目前已確認支援:
- Claude Code(Anthropic)— 透過
AGENTS.md系統整合 - Cursor(.cursor/rules 路徑)
- GitHub Copilot Codex
- Gemini CLI(Google)
- Windsurf(.windsurf/rules)
基本上只要是支援「讀取工作目錄規則檔案」的 AI 工具,都能使用。
為什麼現在爆發?
三個因素同時到位:
1. AI 工具進入「熟練工」時代。2026 年,越來越多工程師把 AI 工具用在正式生產流程,不再只是 demo。熟練工需要技能,而不只是聰明腦袋。
2. Addy Osmani 的背書。他是 Google Chrome 的首席工程師,寫過《Learning Patterns》,在前端開發圈有巨大影響力。他主導這個專案,本身就是一個強力信號。
3. 時機點剛好。Claude Code 和 Cursor 同期都做了重大更新,開發者在尋找更好的使用方式,Agent Skills 剛好填補了這個空缺。
快速上手:安裝你的第一個 Agent Skill
假設你用 Claude Code,流程如下:
方法一:使用 clawhub CLI
如果你用 OpenClaw 或支援 clawhub 的環境:
npm install -g clawhub
clawhub search typescript
clawhub install typescript-best-practices
方法二:手動安裝(Claude Code / AGENTS.md 系統)
# 在你的專案根目錄建立 skills 資料夾
mkdir -p .claude/skills
# 下載或建立 SKILL.md
# 範例:TypeScript 開發規範 Skill
cat > .claude/skills/typescript/SKILL.md << 'EOF'
# TypeScript Best Practices Skill
## Purpose
Enforce TypeScript strict mode conventions and project standards.
## Rules
- Always use `strict: true` in tsconfig.json
- Prefer `interface` over `type` for object shapes
- Use `const` assertions for literal types
- Never use `any` — use `unknown` and narrow types
- Document public APIs with JSDoc
## Testing
- Use Vitest for unit tests
- Test file naming: `*.test.ts` next to source files
- Minimum 80% coverage for business logic
## Commands
- Build: `pnpm build`
- Test: `pnpm test`
- Lint: `pnpm lint`
EOF
之後當你叫 Claude Code 執行任何 TypeScript 相關任務,它會自動參照這份規範。
方法三:從 GitHub 官方 repo 直接複製
git clone https://github.com/addyosmani/agent-skills
ls agent-skills/skills/
官方 repo 已經有幾十個預製 Skill,涵蓋 React、Node.js、Python、Docker、CI/CD 等常見場景。
實戰範例:幾個有用的 Skills
1. Code Review Skill
# skills/code-review/SKILL.md
## Purpose
Perform thorough code reviews following team standards.
## Checklist
- Security: Check for injection vulnerabilities, exposed secrets
- Performance: Identify N+1 queries, unnecessary re-renders
- Readability: Variable names, function length, complexity
- Tests: Coverage for new logic, edge cases
## Output Format
Use GitHub PR comment format with severity levels:
- 🔴 BLOCKER: Must fix before merge
- 🟡 SUGGESTION: Nice to have
- 🟢 PRAISE: Highlight good patterns
2. Git Commit Skill
# skills/git-conventions/SKILL.md
## Purpose
Enforce Conventional Commits standard.
## Format
type(scope): description
## Types
feat, fix, docs, style, refactor, test, chore
## Rules
- Max 72 characters in subject line
- Always write in English
- Reference issue number when applicable: `fix(auth): resolve JWT expiry #123`
3. API Design Skill
# skills/rest-api/SKILL.md
## Purpose
Design RESTful APIs following OpenAPI 3.1 standard.
## Conventions
- Use kebab-case for URL paths: /user-profiles
- Version prefix: /api/v1/
- Always return consistent error format:
{ "error": { "code": "...", "message": "...", "details": [...] } }
- Pagination: cursor-based preferred over offset
## Documentation
- Generate OpenAPI spec for all new endpoints
- Include request/response examples
進階用法:組合多個 Skills
Agent Skills 真正的威力在於組合。一個複雜的工程流程可以拆成多個 Skill,讓 AI 在不同情境切換:
project/
├── .claude/
│ └── skills/
│ ├── typescript/SKILL.md # 語言規範
│ ├── testing/SKILL.md # 測試策略
│ ├── git-conventions/SKILL.md # 提交規範
│ ├── code-review/SKILL.md # 程式碼審查
│ └── deployment/SKILL.md # 部署流程
├── src/
└── AGENTS.md # 告訴 Claude Code skills 的位置
在 AGENTS.md 裡,你可以指定哪些 Skill 適用於哪些路徑:
# AGENTS.md
## Skills
For all TypeScript files in src/: follow skills/typescript/SKILL.md
For all test files: follow skills/testing/SKILL.md
For git operations: follow skills/git-conventions/SKILL.md
自己製作 Skill:最佳實踐
根據 Addy Osmani 和社群整理出的最佳實踐:
保持單一職責
每個 Skill 只做一件事。「TypeScript 規範」和「API 設計」分開,而不是塞進同一個 Skill。這樣才容易維護和升級。
用動詞開頭描述規則
「Use `interface` over `type`」比「interface is preferred」更清楚,AI 更容易理解這是個要執行的規則。
提供負面範例
只說「做什麼」有時不夠,補上「不要做什麼」能讓 AI 更準確:
## Rules
✅ Do: `const data = await fetch(url).then(r => r.json())`
❌ Don't: Use XMLHttpRequest or jQuery.ajax()
版本控制你的 Skills
Skill 也是程式碼,放進 Git 管理。團隊共用同一套 Skills,保持一致性。
與其他工具的整合
Cursor 整合
Cursor 使用 .cursor/rules 目錄,Agent Skills 可以直接對應:
.cursor/
└── rules/
├── typescript.md
└── testing.md
Windsurf 整合
類似地,Windsurf 使用 .windsurf/rules,格式基本相同。
與 CI/CD 整合
你可以在 GitHub Actions 裡用 Agent Skills 來自動化 code review:
# .github/workflows/ai-review.yml
- name: AI Code Review
run: |
claude-code review \
--skill .claude/skills/code-review/SKILL.md \
--pr ${{ github.event.pull_request.number }}
在雲端部署你的 AI 開發環境
DigitalOcean 提供簡單易用的雲端 VPS,用 Droplet 跑 Claude Code + Agent Skills 工作流。新用戶免費獲得 $200 點數。
☁️ 獲得 $200 DigitalOcean 免費點數 →社群分享的實用 Skill 案例
自從 Agent Skills 走紅,GitHub 和 Reddit 上湧現了很多社群分享的 Skill 包:
🔥 最受歡迎的社群 Skills
- React 18 + TypeScript 完整規範 — 涵蓋 hooks 使用規則、狀態管理模式、效能優化
- Security Audit Skill — OWASP Top 10 安全審查清單
- Database Migration Skill — Prisma + PostgreSQL 遷移流程
- Documentation Writer Skill — 自動生成 README、API 文檔
- Accessibility Checker Skill — WCAG 2.2 合規檢查
- Performance Profiler Skill — Core Web Vitals 優化指引
Agent Skills vs 其他方案的比較
| 方案 | 優點 | 缺點 |
|---|---|---|
| Agent Skills | 跨工具、開源、社群資源豐富 | 需要手動維護 |
| Cursor Rules | 深度整合 Cursor UI | 僅限 Cursor |
| System Prompt 硬塞 | 即時生效 | 每次都要重複、耗用 token |
| .editorconfig | 格式化標準化 | 只管格式,不管邏輯規範 |
常見問題
Q:Skills 會增加 API 費用嗎?
每次對話都會把 Skill 內容加入 context,所以會消耗少量額外 token。建議保持 Skill 精簡(< 500 tokens),成本影響不大。
Q:可以用在私有專案嗎?
完全可以。Skill 就是本機的 Markdown 檔案,你的業務規則和系統設計不需要分享出去。
Q:Skills 和 MCP(Model Context Protocol)有什麼關係?
MCP 解決的是「AI 如何連接外部工具和資料」,Agent Skills 解決的是「AI 如何遵循特定流程和規範」。兩者互補,可以同時使用。
Q:不同 AI 工具讀取 Skill 的效果一樣嗎?
基本上接近,但各工具對規則的遵循度略有差異。Claude Code 和 Cursor 目前對結構化 Markdown 指令的遵循度最高。
未來展望
Agent Skills 的走紅預示著一個趨勢:AI 工具的使用方式正在從「每次互動式提問」轉向「預設化、制度化」。
就像軟體工程從手動 checklist 進化到 CI/CD 自動化,AI 輔助開發也正在從「每次手動說明」進化到「預設知識庫驅動」。
預計接下來會看到:
- 企業級 Skill marketplace(類似 npm,但賣的是 AI 規範包)
- Skill 版本管理和衝突解析工具
- 與 IDE 更深度整合的 Skill 管理 UI
- 基於 Skill 效果的 A/B 測試框架
結語
Agent Skills 不是什麼革命性的技術突破,它的核心概念非常簡單:把你的規範寫成 AI 讀得懂的格式,讓 AI 記住它。但就像 Conventional Commits 和 ESLint 當初也只是「把規範寫下來」,Agent Skills 有可能成為 AI 輔助開發的基礎設施之一。
76K stars 不是巧合。它印證了一件事:開發者已經準備好用更系統化的方式使用 AI 工具了。
現在入手,趁社群還在快速成長,貢獻你自己的 Skill,也讓你的工作流程變得更聰明。