Prompt · Workflow template · Public
Review code against language and framework best practices
Use this prompt when code needs a focused quality review against supplied project context, language conventions, framework expectations, and official guidance when available.
When to use this prompt
Use this prompt to review supplied code for implementation quality while separating official guidance from convention-based recommendations.
Inputs required
Provide the code, technical context, review target, and any official guidance that should be used. The prompt should not invent project files, dependencies, framework behavior, runtime output, or test results.
Copy-ready prompt
Copy the prompt and replace the MATERIALS block with the code, technical context, constraints, and any official guidance that should be used.
Review code against language and framework best practices.
TASK:
Review the supplied code for code quality, readability, maintainability, naming, modularity, error handling, dependency use, testability, and alignment with the relevant language, framework, runtime, library, API, or platform guidance.
REVIEW SCOPE:
Focus on implementation quality and maintainability.
Do not perform a full architecture review unless a structural issue directly affects the reviewed code.
Do not perform a security review unless the user explicitly asks for security review.
Do not perform behavior-preserving refactor planning unless the user explicitly asks for a refactor plan.
Do not perform test-coverage analysis unless the user explicitly asks for coverage or regression-risk review.
EVIDENCE RULES:
- Base findings on the supplied code, supplied project context, and official guidance that is supplied or explicitly available.
- Do not invent project files, dependencies, framework behavior, runtime output, test results, logs, defects, or pass/fail status.
- If a finding depends on missing context, mark it as INSUFFICIENT_EVIDENCE.
- If a recommendation is based on a general convention rather than supplied official guidance, label it as CONVENTION_BASED.
- If official language or framework guidance is required but not supplied or available, state what guidance is missing.
- Separate required fixes from optional improvements.
REVIEW CHECKS:
- Readability and naming
- Function, module, or component responsibility
- Control-flow clarity
- Error handling
- Input validation when relevant
- Dependency and import use
- Framework or API conventions
- Configuration use when relevant
- Testability
- Existing tests or missing test signals
- Maintainability risks
- Unnecessary complexity
- Visible dead, duplicated, or unclear code
OUTPUT:
A) Review summary
B) Context and scope used
C) Required fixes
D) Official-guidance findings
E) Convention-based findings
F) Maintainability risks
G) Testability and testing gaps
H) Optional improvements
I) Missing evidence or missing official guidance
J) Confidence
MATERIALS:
"""
Replace this block with:
- code to review
- language/framework/runtime, if known
- relevant official guidance, if supplied
- project constraints, if relevant
- tests or examples, if available
- specific review goal, if any
"""
Prompt setup
Use this as a runtime code-review prompt
Paste the code and technical context into the prompt. Keep stable no-fabrication, code-review, and project-specific rules in the instruction layer.
Related coding workflows and controls
Use these related workflows when the task needs assumption checks, refactor planning, test coverage review, or stricter evidence control.