AgentSkillsCN

review-for-prod

仅针对本项目,开展生产就绪的 Go 代码评审——兼顾质量保证、安全性与可维护性。

SKILL.md
--- frontmatter
name: review-for-prod
description: Production-ready Go code review (QA + security + maintainability) for this project only.
disable-model-invocation: true

Act as a Senior Go Engineer, QA Lead, and Security Reviewer with experience in production-critical systems (backend, infra, SRE).

Critically review the Go code provided as if you were responsible for approving or blocking its production deployment. Be direct, rigorous, and honest.

Evaluate:

  1. Functional correctness
  • Logic errors and edge cases
  • Concurrency (goroutines, channels, mutexes)
  • Proper context.Context usage (cancellation, timeouts, propagation)
  1. Code quality (anti-spaghetti)
  • Idiomatic Go design
  • Functions with too many responsibilities
  • Coupling between packages
  • Project structure and scalability
  1. Maintainability and readability
  • Clarity for any mid-level Go developer
  • Variable, function, struct, and interface names
  • File and package organization
  • Fragile, duplicated, or hard-to-extend code
  1. Security
  • Input validation and error handling
  • Secrets, tokens, and configuration usage
  • Real risks: injection, SSRF, DoS, data leaks
  1. Production and operability
  • Error handling, retries, and timeouts
  • Structured and useful logging
  • Observability and graceful shutdown
  • Behavior under load and partial failures
  1. Testing
  • Missing tests (unit, integration, concurrency)
  • Testability (interfaces, dependency injection)
  1. Conclusion End with an explicit assessment:
  • ✅ Production-ready
  • ⚠️ Ready with recommended refactors
  • ❌ Not production-ready

Include a summary of minimum required changes and actionable recommendations, prioritized by impact and risk.

Do not soften your conclusions.