npx skills add https://github.com/siviter-xyz/dot-agent --skill software-engineer关于代码风格、文档和开发工作流程的核心原则与偏好。
避免不必要的注释:代码应具备自解释性。注释应留给非显而易见的设计决策、变通方案或复杂逻辑。避免注释那些代码本身已清晰表达的内容。
保持代码库整洁:除非有明确指示,否则避免在提交的代码中留下 TODO、FIXME 或临时注释。要么实现该功能,要么创建一个 issue,要么删除该注释。忽略已存在的此类注释。
自解释的代码:优先使用清晰的命名和结构,而非解释性注释。方法、类和成员的文档应遵循语言/技术栈的最佳实践。除非是为了解释令人困惑或复杂的行为,否则不要在语句旁边添加无用的行内注释。
简洁有用:文档应信息丰富但不冗长。README 应专注于基本信息,无需不必要的阐述。
结构重于冗长:优先选择组织良好、易于浏览、标题清晰的文档,而非冗长的段落。使用简短的示例来说明概念。
工作流程检测:检查项目是否使用规范优先、测试驱动开发(TDD)或其他结构化工作流程。寻找以下迹象:
docs/ 或 specs/ 目录不修改 Git:除非有明确指示,否则不要使用会修改仓库状态的 Git 命令(如 、、)。专注于直接进行代码编辑。用于分析的 status 和 diff 命令(、)是允许并鼓励使用的。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
git addgit commitgit pushgit statusgit diff基于事实的方法:不要臆测或假设。如果你不了解某些内容或需要关于某个框架或技术的额外上下文,请搜索网络或使用 context7 获取最新文档。如果需要澄清,请在做出更改前询问用户。
建设性的分歧:如果存在更好的替代方案,不要仅仅接受用户的指示。在审查请求后,解释你认为替代方案可能更好的理由,并提供技术依据。
停止并询问:在以下情况下,停止并询问用户:
any 类型向后兼容性:仅考虑面向公众的接口(API、库)的向后兼容性。对于新项目/内部重构,单元测试、集成测试和端到端测试可作为确认关口,除非有明确的其他指示。
单一职责:组件和函数应具有单一、明确的目的。将代码组织到逻辑目录中,并清晰地分离关注点。
一致的模式:遵循代码库中已建立的模式。引入新模式时,确保它们与现有架构和约定保持一致。
自动化与效率:优先选择自动化解决方案和高效的工作流程。寻找减少手动工作和改善开发者体验的机会。
NO_COLOR 环境变量框架约定:遵循框架和语言的最佳实践。按预期使用框架功能,而不是绕过它们。
性能意识:考虑代码更改的性能影响,特别是对于 Web 应用程序。在可能的情况下,优先选择静态生成和最小化 JavaScript。
可访问性:确保代码默认具备可访问性。使用语义化 HTML、适当的 ARIA 属性,并测试键盘导航。
详细指南请参阅:
references/workflow-patterns.md - 工作流程模式与实践references/implementation-workflow.md - 统一的实现工作流程每周安装量
204
仓库
GitHub 星标数
7
首次出现
2026年1月20日
安全审计
安装于
codex160
gemini-cli156
opencode156
github-copilot146
cursor140
amp125
Core principles and preferences for code style, documentation, and development workflow.
Avoid unnecessary comments : Code should be self-documenting. Reserve comments for non-obvious design decisions, workarounds, or complex logic. Avoid comments that restate what the code obviously does.
Clean codebase : Avoid leaving TODO, FIXME, or temporary comments in committed code UNLESS directed. Either implement the feature, create an issue, or remove the comment. Ignore existing ones.
Self-documenting code : Prefer clear naming and structure over explanatory comments. Method, class, and member documentation should use language/stack best practices. Don't add useless inline comments next to statements UNLESS they explain confusing or complex behaviour.
Concise and useful : Documentation should be informative but not verbose. READMEs should focus on essential information without unnecessary elaboration.
Structure over verbosity : Prefer well-organized, scannable documentation with clear headings over long paragraphs. Use short examples to illustrate concepts.
Workflow detection : Check if project uses spec-first, TDD, or other structured workflows. Look for:
docs/ or specs/ directories with specsNo git modifications : Do not use Git commands that modify the repository state (such as git add, git commit, git push) UNLESS directed. Focus on code edits directly. Status and diff commands (git status, git diff) are permitted and encouraged for analysis.
Fact-based approach : Do not hallucinate or assume. If you don't know something or need additional context about a framework or technology, search the web or use context7 for up-to-date documentation. If clarification is needed, ask the user before making changes.
Constructive disagreement : Do not just accept user direction if a better alternative exists. After reviewing the request, explain your reasoning for why an alternative approach might be better, providing technical justification.
Stop and ask : Stop and ask user if:
any typesBackward compatibility : Only consider backward compatibility for public-facing interfaces (APIs, libraries). For greenfield/internal refactoring, unit, integration, & E2E tests serve as confirmation gate unless explicitly directed otherwise.
Single responsibility : Components and functions should have a single, clear purpose. Organize code into logical directories with clear separation of concerns.
Consistent patterns : Follow established patterns in the codebase. When introducing new patterns, ensure they align with existing architecture and conventions.
Automation and efficiency : Prefer automated solutions and efficient workflows. Look for opportunities to reduce manual work and improve developer experience.
NO_COLOR environment variableFramework conventions : Follow framework and language best practices. Use framework features as intended rather than working around them.
Performance awareness : Consider performance implications of code changes, especially for web applications. Prefer static generation and minimal JavaScript when possible.
Accessibility : Ensure code is accessible by default. Use semantic HTML, proper ARIA attributes, and test keyboard navigation.
For detailed guidance, see:
references/workflow-patterns.md - Workflow patterns and practicesreferences/implementation-workflow.md - Unified implementation workflowWeekly Installs
204
Repository
GitHub Stars
7
First Seen
Jan 20, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
codex160
gemini-cli156
opencode156
github-copilot146
cursor140
amp125
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
116,600 周安装
WebGL开发技能:安全高性能GPU渲染、自定义着色器与实时数据可视化指南
232 周安装
Claude Cookbook 审计工具:自动化代码审查与风格指南验证
235 周安装
i18n 专家:自动化国际化配置与审核工具,支持 React/Next.js/Vue 多框架
236 周安装
GitHub Actions 工作流指南:自动化测试、构建、部署与安全扫描
234 周安装
使用 Remotion 和 React 创建专业短视频:现代产品发布视频制作指南
233 周安装
数学路由工具math-router:自动解析数学请求生成精确CLI命令,支持SymPy/Z3/Shapely等32种计算
240 周安装