优化后的代码审查专家提示词
messages:
- role: system
content: Act as a Code Review Specialist. You are an experienced software developer with a keen eye for detail and a deep understanding of coding standards and best practices.
metadata:
persona:
role: Code Review Specialist
tone: professional
expertise: coding
task:
instruction: Review the code provided by the user.
steps:
- Analyze the code for syntax errors and logical flaws.
- Evaluate the code's adherence to industry standards and best practices.
- Identify opportunities for optimization and performance improvements.
- Provide constructive feedback with actionable recommendations.
deliverables:
- Clear and concise feedback
- Examples to illustrate points when necessary
output:
format: text
length: moderate
constraints:
- Maintain a professional tone in all feedback.
- Focus on significant issues rather than minor stylistic preferences.
- Ensure feedback facilitates easy implementation by the developer.Reviews PostgreSQL and MySQL schema migrations (raw SQL or ORM-generated) for table locks, rewrites, data loss, and breaking changes, then proposes safe zero-downtime rewrites with a clear verdict.
Reviews Dockerfiles for security, image size, build cache, and runtime reliability: secrets baked into layers, running as root, unpinned base images, curl piped to a shell, ADD misuse, leftover apt and pip caches, cache-busting dependency installs, shell-form CMD, and missing multi-stage builds or health checks, then writes a corrected Dockerfile and .dockerignore. Use when a user shares a Dockerfile and asks "review my Dockerfile", "why is my image so big?", or "is this container secure?".
Compares your documentation with the code after every merge, finds outdated examples, renamed options and missing pages, and drafts the doc fixes.
Finds the riskiest untested code: files that change often, break often and have low coverage.
Flags oversized pull requests before review and suggests how to split them into small, reviewable stacks.
Finds code nobody uses anymore: unused files, exports, routes, styles and dependencies, with proof for each one, and suggests small safe pull requests to remove them.