addyosmani / agent-skills

addyosmani / agent-skills

Agent Skills: Production-grade engineering skills for AI coding agents. Agent Skills:为 AI 编程助手提供的生产级工程技能。

Skills encode the workflows, quality gates, and best practices that senior engineers use when building software. These ones are packaged so AI agents follow them consistently across every phase of development. 这些技能将资深工程师在软件开发中使用的流程、质量门禁和最佳实践进行了编码。它们被打包封装,以便 AI 助手能够在开发的每个阶段始终如一地遵循这些标准。

Development Lifecycle (开发生命周期)

DEFINE    PLAN      BUILD     VERIFY    REVIEW    SHIP
┌──────┐  ┌──────┐  ┌──────┐  ┌──────┐  ┌──────┐  ┌──────┐
│ Idea │ ───▶ │ Spec │ ───▶ │ Code │ ───▶ │ Test │ ───▶ │ QA   │ ───▶ │ Go   │
│Refine│  │ PRD  │  │ Impl │  │Debug │  │ Gate │  │ Live │
└──────┘  └──────┘  └──────┘  └──────┘  └──────┘  └──────┘

Slash Commands (斜杠命令)

7 slash commands that map to the development lifecycle. Each one activates the right skills automatically. 7 个映射到开发生命周期的斜杠命令。每个命令都会自动激活相应的技能。

CommandKey principle
/specSpec before code (先有规范,后有代码)
/planSmall, atomic tasks (小而原子的任务)
/buildBuild incrementally (增量构建)
/testProve it works (证明其有效)
/reviewReview before merge (合并前审查)
/code-simplifySimplify the code (简化代码)
/shipShip to production (发布到生产环境)

Skills also activate automatically based on what you’re doing — designing an API triggers api-and-interface-design, building UI triggers frontend-ui-engineering, and so on. 技能也会根据你的操作自动激活——例如,设计 API 会触发 api-and-interface-design,构建 UI 会触发 frontend-ui-engineering,依此类推。


Quick Start (快速开始)

Claude Code (recommended) Marketplace install:

/plugin marketplace add addyosmani/agent-skills
/plugin install agent-skills@addy-agent-skills

SSH errors? The marketplace clones repos via SSH. If you don’t have SSH keys set up on GitHub, either add your SSH key or use the full HTTPS URL to force the HTTPS cloning: 遇到 SSH 错误? Marketplace 通过 SSH 克隆仓库。如果你没有在 GitHub 上配置 SSH 密钥,请添加你的 SSH 密钥,或者使用完整的 HTTPS URL 来强制进行 HTTPS 克隆:

/plugin marketplace add https://github.com/addyosmani/agent-skills.git
/plugin install agent-skills@addy-agent-skills

Local / development:

git clone https://github.com/addyosmani/agent-skills.git
claude --plugin-dir /path/to/agent-skills

Cursor Copy any SKILL.md into .cursor/rules/, or reference the full skills/ directory. See docs/cursor-setup.md. 将任何 SKILL.md 复制到 .cursor/rules/ 中,或引用整个 skills/ 目录。详见 docs/cursor-setup.md

Gemini CLI Install as native skills for auto-discovery, or add to GEMINI.md for persistent context. See docs/gemini-cli-setup.md. 作为原生技能安装以实现自动发现,或添加到 GEMINI.md 以获取持久上下文。详见 docs/gemini-cli-setup.md

Windsurf Add skill contents to your Windsurf rules configuration. See docs/windsurf-setup.md. 将技能内容添加到你的 Windsurf 规则配置中。详见 docs/windsurf-setup.md

OpenCode Uses agent-driven skill execution via AGENTS.md and the skill tool. See docs/opencode-setup.md. 通过 AGENTS.md 和技能工具使用代理驱动的技能执行。详见 docs/opencode-setup.md

GitHub Copilot Use agent definitions from agents/ as Copilot personas and skill content in .github/copilot-instructions.md. See docs/copilot-setup.md. 将 agents/ 中的代理定义用作 Copilot 人设,并将技能内容放入 .github/copilot-instructions.md。详见 docs/copilot-setup.md

Kiro IDE & CLI Skills for Kiro reside under .kiro/skills/ and can be stored under Project or Global level. Kiro also supports Agents.md. See Kiro docs at https://kiro.dev/docs/skills/ Kiro 的技能位于 .kiro/skills/ 下,可以存储在项目级或全局级。Kiro 也支持 Agents.md。详见 Kiro 文档:https://kiro.dev/docs/skills/

Codex / Other Agents Skills are plain Markdown - they work with any agent that accepts system prompts or instruction files. See docs/getting-started.md. 技能是纯 Markdown 文件——它们适用于任何接受系统提示词或指令文件的代理。详见 docs/getting-started.md


All 20 Skills (全部 20 项技能)

The commands above are the entry points. Under the hood, they activate these 20 skills — each one a structured workflow with steps, verification gates, and anti-rationalization tables. 上述命令是入口点。在底层,它们会激活这 20 项技能——每一项都是一个结构化的工作流,包含步骤、验证门禁和反合理化表格。

Define - Clarify what to build (定义 - 明确构建目标)

SkillWhat It DoesUse When
idea-refineStructured divergent/convergent thinking to turn vague ideas into concrete proposalsYou have a rough concept that needs exploration
spec-driven-developmentWrite a PRD covering objectives, commands, structure, code style, testing, and boundaries before any codeStarting a new project, feature, or significant change

Plan - Break it down (规划 - 任务拆解)

SkillWhat It DoesUse When
planning-and-task-breakdownDecompose specs into small, verifiable tasks with acceptance criteria and dependency orderingYou have a spec and need implementable units

Build - Write the code (构建 - 编写代码)

SkillWhat It DoesUse When
incremental-implementationThin vertical slices - implement, test, verify, commit. Feature flags, safe defaults, rollback-friendly changesAny change touching more than one file
test-driven-developmentRed-Green-Refactor, test pyramid (80/15/5), test sizes, DAMP over DRY, Beyonce Rule, browser testingImplementing logic, fixing bugs, or changing behavior
context-engineeringFeed agents the right information at the right time - rules files, context packing, MCP integrationsStarting a session, switching tasks, or when output quality drops
source-driven-developmentGround every framework decision in official documentation - verify, cite sources, flag what’s unverifiedYou want authoritative, source-cited code for any framework or library
frontend-ui-engineeringComponent architecture, design systems, state management, responsive design, WCAG 2.1 AA accessibilityBuilding or modifying user-facing interfaces
api-and-interface-designContract-first design, Hyrum’s Law, One-Version Rule, error semantics, boundary validationDesigning APIs, module boundaries, or public interfaces

Verify - Prove it works (验证 - 证明有效)

SkillWhat It DoesUse When
browser-testing-with-devtoolsChrome DevTools MCP for live runtime data - DOM inspection, console logs, network traces, performance profilingBuilding or debugging anything that runs in a browser
debugging-and-error-recoveryFive-step triage: reproduce, localize, reduce, fix, guard. Stop-the-line rule, safe fallbacksTests fail, builds break, or behavior is unexpected

Review - Quality gates before merge (审查 - 合并前的质量门禁)

SkillWhat It DoesUse When
code-review-and-qualityFive-axis review, change sizing (~100 lines), severity labels (Nit/Optional/FYI), review speed norms, splitting strategiesBefore merging any change
code-simplificationChesterton’s Fence, Rule of 500, reduce complexity while preserving exact behaviorCode works but is harder to read or maintain than it should be
security-and-hardeningOWASP Top 10 prevention, auth patterns, secrets management, dependency auditing, three-tier boundary systemHandling user input, auth, data storage, or external integrations
performance-optimizationMeasure-first approach - Core Web Vitals target