用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/aibot88/sec_skill_store --skill gsd-secure-phase命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | gsd-secure-phase |
| description | Retroactively verify threat mitigations for a completed phase |
| argument-hint | [phase number] |
| allowed-tools | ["Read","Write","Edit","Bash","Glob","Grep","Task","AskUserQuestion"] |
Output: updated SECURITY.md.
Verify threat mitigations for a completed phase. Confirm PLAN.md threat register dispositions are resolved. Update SECURITY.md.<required_reading> @${CLAUDE_PLUGIN_ROOT}/references/ui-brand.md </required_reading>
<available_agent_types> Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
INIT=$(node "$GSD_TOOLS" init phase-op "${PHASE_ARG}")
if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
AGENT_SKILLS_AUDITOR=$(node "$GSD_TOOLS" agent-skills gsd-security-auditor 2>/dev/null)
Parse: phase_dir, phase_number, phase_name, phase_slug, padded_phase.
AUDITOR_MODEL=$(node "$GSD_TOOLS" resolve-model gsd-security-auditor --raw)
SECURITY_CFG=$(node "$GSD_TOOLS" config-get workflow.security_enforcement --raw 2>/dev/null || echo "true")
If SECURITY_CFG is false: exit with "Security enforcement disabled. Enable via /gsd-settings."
Display banner: GSD > SECURE PHASE {N}: {name}
SECURITY_FILE=$(ls "${PHASE_DIR}"/*-SECURITY.md 2>/dev/null | head -1)
PLAN_FILES=$(ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null)
SUMMARY_FILES=$(ls "${PHASE_DIR}"/*-SUMMARY.md 2>/dev/null)
SECURITY_FILE non-empty): Audit existingSECURITY_FILE empty, PLAN_FILES and SUMMARY_FILES non-empty): Run from artifactsSUMMARY_FILES empty): Exit — "Phase {N} not executed. Run /gsd-execute-phase {N} first."Read PLAN.md — extract <threat_model> block: trust boundaries, STRIDE register (threat_id, category, component, disposition, mitigation_plan).
Read SUMMARY.md — extract ## Threat Flags entries.
Per threat: { threat_id, category, component, disposition, mitigation_pattern, files_to_check }
Classify each threat:
| Status | Criteria |
|---|---|
| CLOSED | mitigation found OR accepted risk documented in SECURITY.md OR transfer documented |
| OPEN | none of the above |
Build: { threat_id, category, component, disposition, status, evidence }
If threats_open: 0 → skip to Step 6 directly.
Call AskUserQuestion with threat table and options:
Task(
prompt="Read $HOME/.claude/agents/gsd-security-auditor.md for instructions.\n\n" +
"<files_to_read>{PLAN, SUMMARY, impl files, SECURITY.md}</files_to_read>" +
"<threat_register>{threat register}</threat_register>" +
"<config>asvs_level: {SECURITY_ASVS}, block_on: {SECURITY_BLOCK_ON}</config>" +
"<constraints>Never modify implementation files. Verify mitigations exist — do not scan for new threats. Escalate implementation gaps.</constraints>" +
"${AGENT_SKILLS_AUDITOR}",
subagent_type="gsd-security-auditor",
model="{AUDITOR_MODEL}",
description="Verify threat mitigations for Phase {N}"
)
Handle return:
## SECURED → record closures → Step 6## OPEN_THREATS → record closed + open, present user with accept/block choice → Step 6## ESCALATE → present to user → Step 6State B (create):
${CLAUDE_PLUGIN_ROOT}/templates/SECURITY.md${PHASE_DIR}/${PADDED_PHASE}-SECURITY.mdState A (update):
## Security Audit {date}
| Metric | Count |
|--------|-------|
| Threats found | {N} |
| Closed | {M} |
| Open | {K} |
ENFORCING GATE: If threats_open > 0 after all options exhausted (user did not accept, not all verified closed):
GSD > PHASE {N} SECURITY BLOCKED
{K} threats open — phase advancement blocked until threats_open: 0
▶ Fix mitigations then re-run: /gsd-secure-phase {N}
▶ Or document accepted risks in SECURITY.md and re-run.
Do NOT emit next-phase routing. Stop here.
node "$GSD_TOOLS" commit "docs(phase-${PHASE}): add/update security threat verification"
Secured (threats_open: 0):
GSD > PHASE {N} THREAT-SECURE
threats_open: 0 — all threats have dispositions.
▶ /gsd-validate-phase {N} validate test coverage
▶ /gsd-verify-work {N} run UAT
Display /clear reminder.
<success_criteria>