بنقرة واحدة
approve-design
Record per-PR design-review approval (UI merge gate). ONLY on an explicit per-PR designer "approved".
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Record per-PR design-review approval (UI merge gate). ONLY on an explicit per-PR designer "approved".
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
| name | approve-design |
| description | Record per-PR design-review approval (UI merge gate). ONLY on an explicit per-PR designer "approved". |
| disable-model-invocation | false |
| argument-hint | <pr-number> |
| effort | low |
Writes .claude/session/reviews/<owner>__<repo>__<pr>-design.approved (repo-qualified path, see AgDR-0060) with the current HEAD SHA so the require-design-review-for-ui.sh merge-gate hook will let a UI PR through. Without this marker, the hook blocks merges on any PR that touches .tsx, .jsx, .vue, .svelte, .css, .scss, .sass, .less, or design-tokens* files.
This skill is the design-review analog of /approve-merge (which writes the CEO marker for the merge gate). Same pattern, different gate.
INVOKE THIS SKILL ONLY ON EXPLICIT, PER-PR, DESIGN-REVIEW APPROVAL.
The valid invocation triggers look like this:
Invalid triggers (do NOT run this skill):
/approve-merge.If in doubt: STOP AND ASK. "PR #X has UI changes — has the design been reviewed and approved?" is one message. Merging a PR with incorrect UI that needs a follow-up revert is much worse.
Extract the PR number from $ARGUMENTS. If no argument is given, try to infer from:
gh pr view --json number --jq '.number'If the PR number is ambiguous, STOP and ask.
Also resolve the repo (REPO). Accept the fully-qualified owner/repo#N form, or an explicit owner/repo second token. In split-portfolio v2 the PR lives in a sibling repo, so a bare gh pr view <pr> resolved against the ops-fork cwd hits the WRONG repo — the marker would then be written under the ops-fork qualifier and the require-design-review-for-ui.sh gate (which keys on the PR's real repo, derived from the merge command's cd-target, me2resh/apexyard#687) would never find it → false-block. Pass --repo "$REPO" to every gh pr view call below when REPO is known. Fail loud: if only a bare number was given and gh pr view <pr> cannot resolve the PR from the current cwd, STOP and ask for the owner/repo#N form — never write the marker under a guessed qualifier.
Before writing the marker, re-read the user's most recent message. Ask yourself:
If any of these are unclear — STOP. Reply with a per-PR explicit question:
"PR #X touches UI files (.tsx/.css/etc). Has the design review been completed on the actual PR diff — approved?"
Run gh pr view <pr> ${REPO:+--repo "$REPO"} --json state,isDraft,mergeable. Sanity checks:
state must be OPEN.MERGED, CLOSED, or DRAFT.mergeable should be MERGEABLE or UNKNOWN.Design review is a stamp on top of a Rex-approved HEAD, not parallel to code review. Resolve the ops fork root and source the marker path helper:
REPO_ROOT=$(git rev-parse --show-toplevel)
OPS_ROOT=""
r="$REPO_ROOT"
while [ -n "$r" ] && [ "$r" != "/" ]; do
if [ -f "$r/.apexyard-fork" ]; then OPS_ROOT="$r"; break; fi
if [ -f "$r/onboarding.yaml" ] && [ -f "$r/apexyard.projects.yaml" ]; then OPS_ROOT="$r"; break; fi
r=$(dirname "$r")
done
MARKER_HOME="${OPS_ROOT:-$REPO_ROOT}"
# shellcheck source=/dev/null
. "$MARKER_HOME/.claude/hooks/_lib-review-markers.sh"
# Base (host) repo — the canonical marker key: it matches Rex's marker AND the
# merge gate's lookup (which keys on the merge command's base repo, #765). Prefer
# the repo resolved in step 1 (already the base, #687) as the hint; else
# headRepository. pr_base_repo confirms the base from the PR URL and falls back to
# the hint when base == head, so same-repo PRs are unchanged.
HINT_REPO="${REPO:-$(gh pr view <pr> --json headRepository --jq '.headRepository.nameWithOwner' 2>/dev/null)}"
PR_HOST_REPO=$(pr_base_repo <pr> "$HINT_REPO")
PR_REPO="$PR_HOST_REPO"
REX=$(review_marker_path "$PR_HOST_REPO" <pr> rex "$MARKER_HOME")
[ -f "$REX" ] && [ "$(tr -d '[:space:]' < "$REX")" = "$(git rev-parse HEAD)" ]
If Rex's marker is missing or its SHA doesn't match HEAD, refuse and tell the user to re-invoke the code-reviewer first. Do not write the design marker on a stale base.
Check whether the PR's diff includes files that would trigger the design-review gate. If the PR has NO UI files, the marker is unnecessary — tell the user and skip.
gh pr diff <pr> --name-only | grep -qE '\.(tsx|jsx|vue|svelte|css|scss|sass|less)$|design-tokens'
Use the repo-qualified path via _lib-review-markers.sh (already sourced in step 4):
# (MARKER_HOME and PR_HOST_REPO already resolved in step 4 — reuse them here.)
mkdir -p "$MARKER_HOME/.claude/session/reviews"
# design marker keyed on the BASE repo — same key as Rex's marker + the gate (#765).
DESIGN=$(review_marker_path "$PR_HOST_REPO" <pr> design "$MARKER_HOME")
git rev-parse HEAD > "$DESIGN"
The file contains exactly one line: the 40-character HEAD SHA.
Output a single-line confirmation:
Design approval recorded for PR #<pr> at <sha>. The design-review merge gate will now allow this PR through.
Do NOT run gh pr merge yourself in the same turn. The skill's job ends at recording the marker. The merge is a separate action that still requires the CEO marker via /approve-merge plus an explicit merge instruction.
.claude/session/ is in .gitignore). It's session state, not code./approve-design <pr> is idempotent — it overwrites the marker with the current HEAD.Designer: "The mockup in Figma looks great, ship it"
You: *invokes /approve-design 42* ← WRONG
The designer approved a mockup, not the PR's implementation of that mockup. The implementation might differ from the mockup. The correct flow:
Designer: "The mockup in Figma looks great, ship it"
You: *implements the mockup in PR #42*
You: "PR #42 implements the approved mockup. Can you review the PR diff to confirm the implementation matches?"
Designer: "Reviewed PR #42, implementation matches the mockup. Design approved."
You: *invokes /approve-design 42* ← CORRECT
Two distinct moments. One is mockup approval (design phase). The other is implementation-review approval (code-review phase). They are not the same approval.
| Skill | Marker (repo-qualified, see AgDR-0060) | Gate hook | Who invokes |
|---|---|---|---|
/approve-merge | <owner>__<repo>__<pr>-ceo.approved | block-unreviewed-merge.sh | On explicit CEO per-PR merge nod |
/approve-design | <owner>__<repo>__<pr>-design.approved | require-design-review-for-ui.sh | On explicit designer per-PR design nod |
Both skills follow the same pattern: verify PR state → verify Rex marker → write marker at ops fork root → confirm → stop. Both refuse to write on a stale Rex base. Both are invalidated by new commits. Neither runs gh pr merge.
The merge flow for a UI PR requires three markers before the merge-gate hooks allow through:
<pr>-rex.approved — from the code-reviewer agent<pr>-design.approved — from this skill<pr>-ceo.approved — from /approve-mergePart of ApexYard — multi-project SDLC framework for Claude Code · MIT.
Review a PR for quality, security, and standards compliance. Invokes the Code Reviewer agent (Rex).
Review a technical design / migration AgDR / feature spec for architectural soundness BEFORE the Build phase. Invokes the Solution Architect agent (Tariq) — the non-code analog of /code-review.
Score a review agent (Rex/Hakim/Tariq) against a labeled PR corpus — ground-truth defect-set overlap, never a prose rubric. Headline metric is approve-precision.
Security-focused PR review for vulnerabilities and best practices. Invokes the Security Reviewer agent (Shield).
Record per-PR CEO approval and merge in one turn. ONLY on an explicit per-PR "approved" — never on umbrella "go".
Generate C4 L1 (Context) + L2 (Container) Mermaid diagrams from a project's codebase. Structurizr DSL escape hatch (--dsl) for L3+ component precision.