بنقرة واحدة
code-health-review
Review systemic maintainability and reliability risks without making code changes.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Review systemic maintainability and reliability risks without making code changes.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Use for non-trivial implementation tasks that require meaningful code changes.
Shared mailbox transport protocol for Agent Deck workflows.
Handles a `closeout_delivered` workflow message and completes planner-side closeout.
Generates a browser-check mailbox message for runtime page validation and sends it to a browser-tester session.
Claim pending agent mail with `mailbox_recv` and immediately execute the requested workflow action.
Send an `execute_plan` workflow message to a planner that should complete one supervisor-assigned goal inside one workspace and report back to a supervisor.
| name | code-health-review |
| description | Review systemic maintainability and reliability risks without making code changes. |
Review code with a senior-engineer lens focused on maintainability, reliability, and provability. Prefer structural diagnoses that explain multiple symptoms at once instead of listing isolated cleanup ideas.
This skill is advisory only.
Workflow protocol baseline: use the agent-deck-workflow skill.
Use this skill when the real question is structural, for example:
Do not use this skill for:
review-codeProvide one of:
code_health_review_requestedDirect-use mode is valid. This skill may be run without mailbox workflow when the user wants an immediate advisory review.
Useful pain signals include:
If history-heavy diagnosis is important, state it explicitly. Otherwise, use git history only when it is likely to change the conclusion.
Before reviewing, verify:
If critical context is missing:
Scope GapsScope GapsWhen asking a clarification question, prioritize the missing fact that most affects whether the problem is local or systemic, usually:
Form one or two structural hypotheses. Each hypothesis should explain multiple symptoms, not just the latest report item.
Stress-test the hypotheses:
references/signals.md.references/signals.md to classify signals.
Use references/remediation-patterns.md to shape recommendations.Evaluate code using these lenses:
Highest-signal patterns under those lenses:
dict-shaped or loosely-typed payloads crossing important boundariescritical: structural faults are causing recurring bugs, non-converging fixes, or behavior that cannot be proven cheaplyconcerning: ownership, duplication, or boundary problems are already raising maintenance risk, but the system still works with acceptable proof costacceptable: the code may be locally ugly, but the current structure is stable enough and does not show meaningful systemic riskMailbox mode uses the full structure below:
Task: <task_id_or_N/A>
Action: code_health_review_report
From: code-health-reviewer <code_health_reviewer_session_id_or_N/A>
To: <requester_role_or_user> <requester_session_id_or_N/A>
Planner: <planner_session_id_or_N/A>
Round: <round_or_N/A>
## Code Health Assessment
Verdict: [critical / concerning / acceptable]
Scope: [what was reviewed]
Core diagnosis: [1-2 sentence structural judgment]
## Scope Gaps
- [missing context or `None`]
## Primary Signals
- [Signal]: Evidence | Why it matters
If none, write: `- None.`
## Systemic Findings
- [P1] [Area]: Symptom pattern | Structural diagnosis | Why it hurts maintainability or reliability | Recommended direction
- [P2] [Area]: Symptom pattern | Structural diagnosis | Why it hurts maintainability or reliability | Recommended direction
If none, write: `- None.`
## Hotspots
- [Module or boundary]: Why this area keeps attracting churn, bugs, or patch layering
If none, write: `- None.`
## Proof and Testability Gaps
- [Gap]: What cannot currently be proven cheaply | What should change
If none, write: `- None.`
## Suggested Structural Order
1. [First high-leverage correction]
2. [Second safe follow-up]
3. [Optional cleanup after the design issue is fixed]
## Guardrails
- tests or checks that must stay green
- compatibility or behavior boundaries that must remain stable
- rollout cautions if the structural change is broad
## Keep As-Is
- [Area]: Why changing it now is not worth the risk
If none, write: `- None.`
## Open Questions
- [Question]
If none, write: `- None.`
Direct-use mode skips the header block and starts at ## Code Health Assessment.
references/signals.md when judging whether a code smell is local or systemic.references/remediation-patterns.md when proposing structural corrections or sequencing.When invoked directly by the user instead of mailbox workflow:
Use the agent-deck-workflow skill for shared protocol.
Skill-specific context resolution:
task_id: explicit -> mailbox body -> default N/Aplanner_session_id: explicit -> mailbox body -> default N/Acode_health_reviewer_session_id: explicit -> mailbox body To header -> bound mailbox sender context -> askrequester_session_id: explicit -> mailbox body From header -> askrequester_role: explicit -> mailbox body From header -> default requesterround: explicit -> mailbox body Round header -> default 1Execution flow in Agent Deck mode:
code_health_review_reportagent_mailboxagent_deck_require_session with:
session_id = <requester_session_id>workdir = <current workspace>mailbox_send
from_address = agent-deck/<code_health_reviewer_session_id>to_address = agent-deck/<requester_session_id>subject = "code health review report: <task_id> r<round>"body = <code health review report body>mailbox_send back to the requester has succeeded