一键导入
refactor-review-request
Generates and sends a mailbox request for advisory refactor review against a target scope without asking the reviewer to implement changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generates and sends a mailbox request for advisory refactor review against a target scope without asking the reviewer to implement 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 | refactor-review-request |
| description | Generates and sends a mailbox request for advisory refactor review against a target scope without asking the reviewer to implement changes. |
Generate a concise mailbox message that asks a refactor reviewer to inspect code for duplication and simplification opportunities.
Workflow protocol baseline: use the agent-deck-workflow skill.
task_idrequester_session_idrequester_rolescoperefactor_goalconstraintsoriginal_taskcurrent_pain_pointsreviewer_toolreviewer_tool_profileplanner_session_idroundLater rounds / existing reviewer lane:
refactor_reviewer_session_idRound 1 or new reviewer allocation:
refactor_reviewer_session_ref1 uses the full body belowUse the agent-deck-workflow skill for shared protocol.
Skill-specific context resolution:
task_id: explicit -> workflow context -> askrequester_session_id: explicit -> current session id -> askrequester_role: explicit -> infer from current workflow stage -> default requesterplanner_session_id: explicit -> workflow context -> default N/Arefactor_reviewer_session_id: explicit actual id -> workflow context actual id -> askrefactor_reviewer_session_ref: explicit -> workflow context -> default refactor-reviewer-<task_id>
scope: explicit -> workflow context -> askrefactor_goal: explicit -> workflow context -> default identify duplication and simplification opportunitiesreviewer_tool_profile: explicit -> workflow context -> omit when reviewer_tool is already a full command -> default resolver role default reviewerreviewer_tool_cmd: explicit full command -> workflow context resolved command -> shared tool-resolution contract for role reviewerround: explicit -> workflow context -> default 1Round 1 or new reviewer session: use the full body below.
Task: <task_id>
Action: refactor_review_requested
From: <requester_role> <requester_session_id>
To: refactor-reviewer {{TO_SESSION_ID}}
Planner: <planner_session_id_or_N/A>
Round: <round>
## Summary
[One-line refactor review request summary]
## Scope
[Files, module, branch, or code area in scope]
## Refactor Goal
[What kind of simplification is wanted]
## Original Task
[Original task or `N/A`]
## Constraints
- [constraint or `None`]
## Current Pain Points
- [pain point or `None`]
## Review Boundaries
- advisory only
- no implementation
- preserve existing behavior unless explicitly stated otherwise
## Tool Context
- Reviewer tool profile: [reviewer_tool_profile or `explicit`]
- Reviewer tool cmd: [reviewer_tool_cmd]
Round >1 to the same reviewer session: send only delta.
Task: <task_id>
Action: refactor_review_requested
From: <requester_role> <requester_session_id>
To: refactor-reviewer {{TO_SESSION_ID}}
Planner: <planner_session_id_or_N/A>
Round: <round>
## Summary
[One-line delta summary]
## Delta Since Last Round
- Scope changes: [what changed or `None`]
- New pain points: [what changed or `None`]
- Constraints changed: [what changed or `None`]
- Previous advice adopted or rejected: [brief summary or `N/A`]
## Current Review Goal
[What this round should focus on]
## Tool Context
- Reviewer tool profile: [reviewer_tool_profile or `existing-session`]
- Reviewer tool cmd: [reviewer_tool_cmd or `existing-session`]
Recommended subject:
refactor review request: <task_id> r<round>Use the agent_mailbox MCP tools:
agent_mailbox{{TO_SESSION_ID}} where the real reviewer session id must appear1 for a new reviewer session, resolve reviewer_tool_profile / reviewer_tool_cmd by the shared tool-resolution contract for role reviewer
reviewer_tool unchanged when providedreviewer command1 for a new reviewer session, call agent_deck_create_session
ensure_title = <refactor_reviewer_session_ref>ensure_cmd = <reviewer_tool_cmd>workdir = <current workspace>parent_session_id = <requester_session_id>group_path = <requester session group; empty string for root>no_parent_link = falserefactor_reviewer_session_id and carry it in all later workflow turnsagent_deck_require_session
session_id = <refactor_reviewer_session_id>workdir = <current workspace>session_id as the authoritative refactor_reviewer_session_idmailbox_send with:
from_address = agent-deck/<requester_session_id>to_address = agent-deck/<refactor_reviewer_session_id>subject = "refactor review request: <task_id> r<round>"body = <refactor review request body>agent_deck_create_session with parent_session_id = <requester_session_id>, group_path = <requester session group; empty string for root>, and no_parent_link = falserefactor_reviewer_session_id; do not fall back to refactor_reviewer_session_ref