ARTICLE DETAIL

资讯详情

深耕网站建设与运营推广的一线实战洞察。

Project Coding Standards

Project Coding Standards Project Coding Standards【免费下载链接】agent-skillsProduction-grade engineering skills for AI coding agents.项目地址: https://gitcode.com/GitHub_Trending/agentskill/agent-skillsTestingWrite tests before code (TDD)For bugs: write a failing test first, then fix (Prove-It pattern)Test hierarchy: unit integration e2e (use the lowest level that captures the behavior)Runnpm testafter every changeCode QualityReview across five axes: correctness, readability, architecture, security, performanceEvery PR must pass: lint, type check, tests, buildNo secrets in code or version controlImplementationBuild in small, verifiable incrementsEach increment: implement → test → verify → commitNever mix formatting changes with behavior changesBoundariesAlways: Run tests before commits, validate user inputAsk first: Database schema changes, new dependenciesNever: Commit secrets, remove failing tests, skip verification这份文件与技能体系一一对应five axes 评审标准来自 [skills/code-review-and-quality/SKILL.md](https://link.gitcode.com/i/735a882bd830c6f28c90d0645516ffc7) 的五维评审框架Prove-It pattern先写失败测试再修 bug来自 [skills/test-driven-development/SKILL.md](https://link.gitcode.com/i/5b780e67d7380d043f5beb21d7d793f1) 的测试即证据原则小步增量、implement → test → verify → commit 则是 [skills/incremental-implementation/SKILL.md](https://link.gitcode.com/i/a5f3e2ff6bb04a5059a087bbf6ddf66b) 的核心循环。项目指令负责常驻约束斜杠命令负责按需触发两者互补。 此外文档建议在 Copilot Chat 中配合专门的 agent 人格做定向评审即上文 code-reviewer 等用法形成项目指令兜底 人格按需深审的双层质量闸口。 ## 生命周期工作流六个阶段全部以技能名调用 技能默认即用户可调用因此只要被发现整个开发生命周期无需额外配置即可用技能本名触发 | 阶段 | Copilot 调用方式 | 说明 | |------|------------------|------| | Define | /spec-driven-development | 写代码前先产出结构化 spec | | Plan | /planning-and-task-breakdown | 产出 tasks/plan.md 与 tasks/todo.md | | Build | /incremental-implementation | 与 /test-driven-development 搭配一次只做一个切片 | | Verify | /test-driven-development | 红-绿-重构bug 用 Prove-It 模式 | | Review | /code-review-and-quality | 五轴评审 | | Ship | /shipping-and-launch | 上线就绪检查 | 在 Copilot 聊天框输入 / 即可浏览当前工作区实际加载了哪些命令。 斜杠命令不可见时的兜底是**自然语言**它在任何 Copilot 界面都可用无论斜杠命令是否显示 Use the spec-driven-development skill to write a spec for [the feature]. Use the code-review-and-quality skill to review my staged changes. ### 可选自建 /spec 风格短别名 VS Code 的 extension-host 本地 agent 支持放在 .github/prompts/name.prompt.md 的提示词文件prompt files每个文件对应一个 /name 斜杠命令。**但要注意Agent Host 不使用 prompt 文件**——如果你运行在 Agent Host 上请直接用技能全名。 先明确别名的定位别名只是到某个技能的薄快捷方式仅此而已。它们**不复现**本仓库 Claude Code 命令里的编排逻辑——例如 /build auto 的单次批准后连续实施全部任务、/ship 的多人格并行扇出。在 Copilot 上复刻那些编排是另一项独立工作不是一个单文件别名能覆盖的。因此默认优先用技能名只有当短形式确实值得多维护一个文件时才建别名。 官方给出的 /spec 别名创建示例[ -e ... ] || 保护避免覆盖已有文件 bash mkdir -p .github/prompts [ -e .github/prompts/spec.prompt.md ] || cat .github/prompts/spec.prompt.md EOF --- description: Write a structured spec before writing code --- Use the spec-driven-development skill. Ask clarifying questions about the objective and target users, core features and acceptance criteria, stack preferences and constraints, and known boundaries. Then write a spec covering objective, commands, project structure, code style, testing strategy, and boundaries. Save it as SPEC.md in the project root and confirm with me before any code is written. EOF【免费下载链接】agent-skillsProduction-grade engineering skills for AI coding agents.项目地址: https://gitcode.com/GitHub_Trending/agentskill/agent-skills创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表