提交前综合验证审阅。执行静态代码审查、运行时错误检查和功能验证。包括代码质量检查、Aspire应用日志分析、租户后台登录测试。当用户准备提交代码、需要全面验证、或要求提交前审查时使用。
本技能在代码提交前执行三层验证,确保代码质量和系统稳定性:
git add 暂存目标:检查代码规范、安全性和最佳实践
步骤:
获取待提交文件列表
git status --short
调用代码审查技能
生成审查报告
目标:检查应用运行状态和错误日志
步骤:
检查 Aspire 应用状态
list_resources MCP 工具获取资源列表state 字段:
Running:正常运行Failed:启动失败(需要检查日志)Starting:启动中(等待后重试)Stopped:已停止(需要启动应用)如果应用未运行
aspire run检查控制台日志
list_console_logs 工具resourceName - 资源名称检查结构化日志
list_structured_logs 工具Database connection failedUnhandled exceptionDependency injection failedConfiguration loading error分析日志内容
目标:验证系统后台和租户后台登录功能正常
推荐方式:使用登录测试脚本(更快速、更可靠)
步骤:
准备测试配置
https://localhost:7120systemadmin / CodeSpirit@2025admin / 123@Admin(租户ID: default)运行系统后台登录测试
cd Scripts/login-tests
dotnet script login-system.cs -- <webHost> <username> <password> true
dotnet script login-system.cs -- https://localhost:7120 systemadmin CodeSpirit@2025 true运行租户后台登录测试
cd Scripts/login-tests
dotnet script login-tenant.cs -- <webHost> <tenantId> <username> <password> true
dotnet script login-tenant.cs -- https://localhost:7120 default admin 123@Admin true检查测试结果
0:登录成功1:登录失败或脚本执行错误验证关键功能
/{tenantId}/admin,标题包含租户信息备用方式:使用 Playwright MCP 工具
如果登录脚本不可用,可以使用 MCP 工具:
browser_navigatebrowser_fill_formbrowser_clickbrowser_snapshot测试配置请参考 test-config.md。
默认配置:
defaultadminAdmin@123(请根据实际情况修改)http://localhost:5000配置方式:
test-config.md 文件详细的检查清单请参考 validation-checklist.md。
快速检查项:
验证完成后,使用 report-template.md 生成综合验证报告。
报告包含:
如果 MCP 工具调用失败:
检查 MCP 服务器状态
手动验证步骤
aspire run 启动应用如果应用无法启动:
检查资源日志
list_console_logs 查看失败资源的详细日志常见问题:
如果登录测试失败:
检查页面加载
检查表单字段
检查网络请求
用户可以通过以下方式触发技能:
如果某个阶段失败:
npx skills add xin-lai/pre-commit-validation下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer