OpenSource-Hub

agent-skills

其他

addyosmani/agent-skills

AI 编码代理的工作流与最佳实践。

项目简介

一套结构化的技能,为 AI 编码代理编码了工作流程、质量关卡和最佳实践,覆盖从需求定义到交付的整个开发周期。

README 预览

# Agent Skills\n\n**Production-grade engineering skills for AI coding agents.**\n\nSkills 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.\n\n```\n  DEFINE          PLAN           BUILD          VERIFY         REVIEW          SHIP\n ┌──────┐      ┌──────┐      ┌──────┐      ┌──────┐      ┌──────┐      ┌──────┐\n │ Idea │ ───▶ │ Spec │ ───▶ │ Code │ ───▶ │ Test │ ───▶ │  QA  │ ───▶ │  Go  │\n │Refine│      │  PRD │      │ Impl │      │Debug │      │ Gate │      │ Live │\n └──────┘      └──────┘      └──────┘      └──────┘      └──────┘      └──────┘\n  /spec          /plan          /build        /test         /review       /ship\n```\n\n---\n\n## Commands\n\n7 slash commands that map to the development lifecycle. Each one activates the right skills automatically.\n\n| What you're doing | Command | Key principle |\n|-------------------|---------|---------------|\n| Define what to build | `/spec` | Spec before code |\n| Plan how to build it | `/plan` | Small, atomic tasks |\n| Build incrementally | `/build` | One slice at a time |\n| Prove it works | `/test` | Tests are proof |\n| Review before merge | `/review` | Improve code health |\n| Simplify the code | `/code-simplify` | Clarity over cleverness |\n| Ship to production | `/ship` | Faster is safer |\n\nSkills 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.\n\n---\n\n## Quick Start\n\n\nClaude Code (recommended)\n\n**Marketplace install:**\n\n```\n/plugin marketplace add addyosmani/agent-skills\n/plugin install agent-skills@addy-agent-skills\n```\n\n> **SSH errors?** The marketplace clones repos via SSH. If you don't have SSH keys set up on GitHub, either [add your SSH key](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/

常见问题 (2)

how_to
如何在OpenCode中自动加载AGENTS.md,类似于Claude Code的session_start钩子?

使用 OpenCode 插件钩子 experimental.chat.messages.transform 将 AGENTS.md 的内容注入到聊天中。创建一个插件,读取 AGENTS.md 文件并将其前置到消息列表中。参考 superpowers 插件:[superpowers.js#L120](https://github.com/obra/superpowers/blob/f2cbfbefebbfef77321e4c9abc9e949826bea9d7/.opencode/plugins/superpowers.js#L120)。示例:api.on('experimental.chat.messages.transform', async (messages) => { const content = await fs.readFile('AGENTS.md', 'utf-8'); messages.unshift({ role: 'user', content }); });

来源 Issue #98
故障排除
为什么Claude Code对agent-skills插件中的所有技能都显示'Unknown skill'?

插件的 plugin.json 未显式声明 skills 和 agents 目录,这可能导致 Claude Code 的插件加载器无法发现它们。要修复,请编辑 .claude-plugin/plugin.json,在现有 "commands" 字段旁添加 "skills": "./skills" 和 "agents": "./agents"。保存文件并重启 Claude Code 会话。此解决方案尚待确认,但与其他插件成功暴露 skills 的方式一致。

来源 Issue #112