[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7CD6ZS6Y6SSVSSZXS78WWPD":3,"skill-same:01M7CD6ZS6Y6SSVSSZXS78WWPD":91},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":34,"updatedAt":35,"install":36,"resources":48},"01M7CD6ZS6Y6SSVSSZXS78WWPD","refine",null,"Use when improving, polishing, cleaning up, or fixing inconsistencies in any text artifact. Use when asked to \"polish\", \"refine\", \"clean up\", \"make more concise\", \"fix inconsistencies\", \"improve this doc\", \"review this code\", \"refine config\", or \"refine plan\".","shenyimings\u002Fskillet","shenyimings","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89332218?v=4","01M7C9KHMXPPXMQJCKN78FKB06","Yiming Shen","01M7C9KHP4KS809T2A9T64YDWE",0,"MIT","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: refine\ndescription: >\n  Use when improving, polishing, cleaning up, or fixing inconsistencies in any text artifact.\n  Use when asked to \"polish\", \"refine\", \"clean up\", \"make more concise\", \"fix inconsistencies\",\n  \"improve this doc\", \"review this code\", \"refine config\", or \"refine plan\".\ncontext: fork\nallowed-tools: Task, Read, Write, Edit, Bash(node:*), AskUserQuestion, Glob\nuser-invocable: true\ndisable-model-invocation: false\n---\n\n# Content Refiner\n\nIteratively improve any text artifact through multi-phase review.\n\n## Design Principle\n\n**In-place enhancement.** Keep format, structure, and author voice intact. Fix content, not layout.\n\n## Phases\n\n0. **Content-Type Resolution** — detect type, load base + type criteria\n1. **Self-Review Loop** — find issues -> fix -> re-check (max 5 iterations)\n2. **Codex Cross-Validation** — find what Claude missed\n3. **User Resolution** — resolve ambiguities & TODOs via AskUserQuestion\n4. **Final Validation** — re-scan for regressions\n5. **Report** — summarize changes\n\n## Parameters\n\nDetect from user's request:\n\n| Parameter | Trigger | Effect |\n|-----------|---------|--------|\n| `codex-fix` | \"let Codex fix\", \"Codex can fix\" | Codex fixes directly with `--full-auto` |\n| `aggressive` | \"make concise\", \"trim down\" | More aggressive content removal |\n| `conservative` | \"minimal changes\", \"careful\" | Only fix clear errors |\n\n## Issue Categories\n\nSee `content-types\u002F_base.md` for universal issue types and `content-types\u002F{type}.md` for type-specific issues. The key distinction: **auto-fixable** issues (fix is unambiguous) vs **requires user input** (NEVER guess, NEVER fabricate).\n\n## Critical Rules\n\n### NEVER Fabricate Content\n\n```\nRED FLAG: You are about to write specific content the user never provided.\n\nSTOP. ASK THE USER.\n\nExamples of fabrication:\n- Replacing \"configure appropriately\" with specific config steps you invented\n- Replacing a TODO with a decision you made\n- Adding file paths, branch names, or commands not in the original file\n- Converting a vague instruction into a specific one using your assumptions\n\nThe user's file has vague content for a reason — they haven't decided yet,\nor the answer depends on context you don't have. ASK, don't guess.\n```\n\n### NEVER Skip User Consultation for Ambiguous Issues\n\nReformatting a TODO (e.g., `TODO: X` -> `> **Open question:** X`) is NOT resolving it. The user must decide:\n- What value\u002Fcontent to use, OR\n- Explicitly keep it as-is (deferred), OR\n- Remove it entirely\n\n### Always Re-verify After Fixes\n\nA single pass misses issues introduced by fixes. Always re-scan after applying changes.\n\n## Workflow\n\n### Phase 0: Content-Type Resolution\n\n```\n1. Detect content_type:\n   a. User explicit (\u002Frefine plan, \u002Frefine code, \u002Frefine markdown, \u002Frefine config)\n      -> use that content type\n   b. File extension + heuristics:\n      - .md -> read file, check for 3+ \u003Ctask> tags at line start outside code blocks\n        -> yes: \"plan\"\n        -> no: \"markdown\"\n      - .ts\u002F.js\u002F.tsx\u002F.jsx\u002F.cs\u002F.py\u002F.go\u002F.rs\u002F.java\u002F.rb\u002F.swift\u002F.kt -> \"code\"\n      - .yaml\u002F.yml\u002F.json\u002F.toml\u002F.ini\u002F.env -> \"config\"\n      - else -> \"base-only\"\n\n2. Resolve criteria file paths via Glob:\n   Glob(pattern=\"content-types\u002F_base.md\", path=\u003Cskill directory>)\n   Glob(pattern=\"content-types\u002F{detected_type}.md\", path=\u003Cskill directory>)\n\n3. Read base_criteria (always):\n   Read(file_path=\u003Cresolved _base.md path>)\n\n4. Read type_criteria (if not base-only):\n   Read(file_path=\u003Cresolved {type}.md path>)\n\n5. Store: content_type, base_criteria, type_criteria for use in all subsequent phases\n```\n\n### Phase 1: Self-Review Loop\n\n```\nmax_iterations = 5\nchanges = []\n\nfor iteration in 1..max_iterations:\n    1. Spawn issue-finder agent:\n       Task(subagent_type=\"general-purpose\", prompt=\u003Cissue-finder prompt\n         + file_path\n         + content_type\n         + mode\n         + base_criteria\n         + type_criteria>)\n\n    2. Parse response -> auto_fixable_issues, user_issues\n\n    3. If no auto_fixable issues with severity critical or major:\n       Fix remaining minor auto-fixable issues\n       Store user_issues for Phase 3\n       -> Exit Phase 1\n\n    4. For each auto_fixable issue (critical first):\n       Skip if already attempted (track by type+location+quote hash)\n       Spawn issue-fixer agent to apply fix\n       Record in changes[]\n\n    5. Continue loop (re-scan will catch regressions)\n\nReport: \"Phase 1: Fixed N issues in M iterations\"\n```\n\n### Phase 2: Codex Cross-Validation\n\n**Setup:**\n\nResolve `CODEX_BRIDGE` path using the Glob tool (NOT bash — `Bash(node:*)` restriction blocks `ls`):\n```\nGlob(pattern=\"**\u002Fsaurun\u002F*\u002Fskills\u002Fcodex-bridge\u002Fcodex-bridge.mjs\", path=\"~\u002F.claude\u002Fplugins\u002Fcache\u002Fsaurun-marketplace\")\n-> Use the LAST match (highest version number)\n-> Store as CODEX_BRIDGE variable for subsequent node commands\n```\n\n```\nCODEX_TIMEOUT=1200000  # 20 min — MANDATORY, do not shorten\n```\n\n**Codex is required.** Always attempt Phase 2. If Codex is unavailable (not installed, auth failure, timeout), log a warning and proceed to Phase 3, but flag this prominently in the report. Do NOT skip Phase 2 by choice.\n\n```\nfor iteration in 1..5:\n    1. Call Codex via codex-bridge with review prompt (see below)\n       CRITICAL: Always pass --working-dir and --timeout 1200000\n\n    2. Parse JSON response, validate schema (see content-types\u002F_base.md for valid types)\n       - Missing required fields -> skip issue\n       - Unknown type -> treat as non-auto-fixable\n       - Missing suggestions array -> normalize\n\n    3. For each Codex finding:\n       Spawn codex-validator agent -> VALID or INVALID\n       If INVALID -> log rejection, skip\n\n    4. If no valid issues -> exit Phase 2\n\n    5. For valid issues:\n       Auto-fixable -> spawn issue-fixer, record change\n       Needs user -> add to user_issues for Phase 3\n\nReport: \"Phase 2: Fixed N issues, deferred M to user\"\n```\n\n**Codex prompt assembly:**\n\nAssemble the prompt from base_criteria and type_criteria Codex sections. Embed the full file content directly in the prompt. The codex-bridge delivers all prompts via stdin (no CLI arg limit, no file relay), so Codex receives the complete content without truncation.\n\n```bash\nnode \"$CODEX_BRIDGE\" --timeout 1200000 \"Review this file for issues that may have been missed.\n\nCONTENT TYPE: [content_type]\nMODE: [mode]\n\nLOOK FOR:\n{items from base_criteria ## Codex Prompt section}\n{items from type_criteria ## Codex Prompt Extension section, numbered continuing from base}\n\nDO NOT FLAG:\n{exclusions from base_criteria ## Codex Prompt section}\n\nReturn JSON array:\n[{\n  \\\"issue\\\": \\\"description\\\",\n  \\\"type\\\": \\\"vague_instruction|inconsistent_terminology|broken_reference|redundant_content|formatting_inconsistency|missing_definition|contradiction|unresolved_todo|ambiguous_scope|missing_context|trailing_whitespace|incomplete_list|inconsistent_casing|{type-specific types}\\\",\n  \\\"severity\\\": \\\"critical|major|minor\\\",\n  \\\"location\\\": \\\"line number or section\\\",\n  \\\"quote\\\": \\\"the problematic text\\\",\n  \\\"auto_fixable\\\": true|false,\n  \\\"suggestions\\\": [\\\"fix options\\\"]\n}]\n\nIf no issues: []\n\n===== CONTENT =====\n[FULL FILE CONTENT]\n===== END CONTENT =====\n\" --working-dir \"$PROJECT_PATH\"\n```\n\n**Debugging:** codex-bridge logs to stderr: prompt size, delivery method, token usage, and any truncation warnings. Check stderr output if findings seem wrong.\n\n**Codex-fix mode** (when `codex-fix` parameter detected): Add `--full-auto` flag. Codex edits directly. Validate fixes with codex-validator. Revert if invalid.\n\n### Phase 3: User Resolution\n\n**Only issues where `auto_fixable == false` reach this phase.**\n\n**CRITICAL: Use the AskUserQuestion TOOL for each issue, one at a time.** Do NOT list questions as plain text. Each issue gets its own AskUserQuestion call so the user gets interactive multiple-choice prompts.\n\n```\nIf no user_issues -> skip to validation\n\nFor each issue (sorted by severity):\n    Call AskUserQuestion tool with issue-type-specific options:\n\n    vague_instruction:\n      \"This is vague: '[quote]'. What should it specify?\"\n      Options: [suggestion1, suggestion2, \"Keep as-is\", \"Remove\"]\n\n    ambiguous_scope:\n      \"'[quote]' could mean different things. Which interpretation?\"\n      Options: [interp_a, interp_b, \"Both (clarify)\", \"Keep ambiguous\"]\n\n    unresolved_todo:\n      \"Found unresolved: '[quote]'\"\n      Options: [suggestion, \"Remove entirely\", \"Keep (resolve later)\"]\n\n    inconsistent_terminology:\n      \"Mixed terms: [term1] (Nx), [term2] (Nx). Standardize to which?\"\n      Options: [\"Use term1\", \"Use term2\", \"Keep as-is (different meanings)\"]\n\n    contradiction:\n      \"'[quote1]' conflicts with '[quote2]'\"\n      Options: [\"Keep first\", \"Keep second\", \"Rewrite to reconcile\", \"Keep both\"]\n\n    missing_definition \u002F missing_context:\n      \"'[quote]' is used but never defined\u002Fassumes knowledge not provided\"\n      Options: [suggestion, \"Link to docs\", \"Remove\", \"Keep as-is\"]\n\n    broken_reference (unresolvable):\n      \"'[quote]' points to non-existent target\"\n      Options: [suggested_target, \"Remove reference\", \"Keep (fix later)\"]\n\n    missing_verification:\n      \"Task has no verification step: '[quote]'\"\n      Options: [\"Add verification (describe)\", \"Mark as self-verifying\", \"Keep (resolve later)\"]\n\n    missing_done_criteria:\n      \"Task has no done criteria: '[quote]'\"\n      Options: [\"Add done criteria (describe)\", \"Keep (resolve later)\"]\n\n    vague_action:\n      \"Action is too vague to execute: '[quote]'\"\n      Options: [suggestion1, suggestion2, \"Keep as-is\", \"Remove\"]\n\n    type_mismatch:\n      \"Value type seems wrong: '[quote]'. Expected [expected_type].\"\n      Options: [\"Change to [expected_type]\", \"Keep current type\", \"Remove field\"]\n\n    orphan_heading:\n      \"Heading has no content: '[quote]'\"\n      Options: [\"Add content (describe)\", \"Remove heading\", \"Keep as placeholder\"]\n\n    stale_comment:\n      \"Comment may not match code: '[quote]'\"\n      Options: [\"Update comment\", \"Remove comment\", \"Keep as-is\"]\n\n    undefined_dependency:\n      \"Task depends on undefined resource: '[quote]'\"\n      Options: [\"Define dependency\", \"Remove reference\", \"Keep (resolve later)\"]\n\n    missing_files_list:\n      \"Task modifies files but doesn't list them: '[quote]'\"\n      Options: [\"Add file list (describe)\", \"Keep (resolve later)\"]\n\n    unmeasurable_success:\n      \"Success criteria can't be objectively measured: '[quote]'\"\n      Options: [suggestion, \"Rewrite criteria (describe)\", \"Keep as-is\"]\n\n    missing_type:\n      \"Missing type annotation: '[quote]'\"\n      Options: [\"Add type (describe)\", \"Mark as intentionally untyped\", \"Keep as-is\"]\n\n    missing_required_field:\n      \"Required field is missing: '[quote]'\"\n      Options: [\"Add field with value (describe)\", \"Remove requirement\", \"Keep (resolve later)\"]\n\n    unused_variable:\n      \"Variable defined but never referenced: '[quote]'\"\n      Options: [\"Remove variable\", \"Keep (used elsewhere)\", \"Keep as-is\"]\n\n    no_default_value:\n      \"Optional field has no default: '[quote]'\"\n      Options: [\"Add default (describe)\", \"Keep without default\"]\n\n    magic_number:\n      \"Unexplained numeric literal: '[quote]'\"\n      Options: [\"Extract to named constant (describe name)\", \"Add inline comment\", \"Keep as-is\"]\n\n    Apply user's choice via issue-fixer agent\n    Record in changes[]\n\nReport: \"Phase 3: Resolved N ambiguities\"\n```\n\n### Final Validation\n\n```\n1. Run issue-finder one last time (conservative mode)\n2. Filter out pre-existing issues -> find genuinely NEW issues from our fixes\n3. If new issues -> warn user with list + likely cause\n4. If clean -> report \"Validation passed\"\n```\n\n### Report\n\nPrint summary:\n```\nFile: [name]  Content-Type: [content_type]  Mode: [mode]\nPhase 1: [N] fixed in [M] iterations\nPhase 2: [N] fixed, [M] deferred  [or \"Skipped (Codex unavailable)\"]\nPhase 3: [N] resolved by user\nValidation: Passed | [N] regressions found\nTotal: [N] issues fixed (Claude: X, Codex: Y, User: Z)\n```\n\nInclude abbreviated change log: `[phase-iteration-change#] type @ location: before -> after`\n\nSee `references\u002Fchange-log-format.md` for full change entry schema and in-memory structure.\n\n## Sub-Agents\n\n| Agent | Purpose | Prompt Template Location |\n|-------|---------|--------------------------|\n| issue-finder | Analyze artifact, return structured issue list | `agents\u002Fissue-finder.md` |\n| issue-fixer | Fix ONE specific issue in-place | `agents\u002Fissue-fixer.md` |\n| codex-validator | Validate Codex finding is genuine (not subjective\u002Ffalse positive) | `agents\u002Fcodex-validator.md` |\n\nSpawn each via `Task(subagent_type=\"general-purpose\")` with the agent's prompt + input parameters.\n\n## Red Flags — STOP and Re-read This Skill\n\n- You're about to replace vague content with specifics YOU made up\n- You converted a TODO to a different format without asking the user\n- You're doing a single pass without re-scanning\n- You skipped Phase 2 because \"Phase 1 was thorough enough\"\n- You're not tracking changes\n- You resolved an ambiguity without AskUserQuestion\n- You listed questions as plain text instead of calling AskUserQuestion tool\n\n**All of these mean: you're violating the skill. Re-read and comply.**\n\n## Common Rationalizations\n\n| Excuse | Reality |\n|--------|---------|\n| \"I can infer what the user meant\" | You can't. Vague content exists because the user hasn't decided. Ask. |\n| \"Reformatting the TODO is better than leaving it raw\" | Changing format != resolving. The decision is still unmade. Ask. |\n| \"One pass is enough, I was thorough\" | You always miss things. Re-scan catches regressions from fixes. |\n| \"Phase 2 would just find the same issues\" | Codex has different blind spots than Claude. That's the point. |\n| \"The user would probably want X\" | Probably != certainly. Use AskUserQuestion. |\n| \"I'll ask about all ambiguities at once for efficiency\" | Each issue needs its own AskUserQuestion call with tailored options. |\n","# Content Refiner\n\nIteratively improve any text artifact through multi-phase review.\n\n## Design Principle\n\n**In-place enhancement.** Keep format, structure, and author voice intact. Fix content, not layout.\n\n## Phases\n\n0. **Content-Type Resolution** — detect type, load base + type criteria\n1. **Self-Review Loop** — find issues -> fix -> re-check (max 5 iterations)\n2. **Codex Cross-Validation** — find what Claude missed\n3. **User Resolution** — resolve ambiguities & TODOs via AskUserQuestion\n4. **Final Validation** — re-scan for regressions\n5. **Report** — summarize changes\n\n## Parameters\n\nDetect from user's request:\n\n| Parameter | Trigger | Effect |\n|-----------|---------|--------|\n| `codex-fix` | \"let Codex fix\", \"Codex can fix\" | Codex fixes directly with `--full-auto` |\n| `aggressive` | \"make concise\", \"trim down\" | More aggressive content removal |\n| `conservative` | \"minimal changes\", \"careful\" | Only fix clear errors |\n\n## Issue Categories\n\nSee `content-types\u002F_base.md` for universal issue types and `content-types\u002F{type}.md` for type-specific issues. The key distinction: **auto-fixable** issues (fix is unambiguous) vs **requires user input** (NEVER guess, NEVER fabricate).\n\n## Critical Rules\n\n### NEVER Fabricate Content\n\n```\nRED FLAG: You are about to write specific content the user never provided.\n\nSTOP. ASK THE USER.\n\nExamples of fabrication:\n- Replacing \"configure appropriately\" with specific config steps you invented\n- Replacing a TODO with a decision you made\n- Adding file paths, branch names, or commands not in the original file\n- Converting a vague instruction into a specific one using your assumptions\n\nThe user's file has vague content for a reason — they haven't decided yet,\nor the answer depends on context you don't have. ASK, don't guess.\n```\n\n### NEVER Skip User Consultation for Ambiguous Issues\n\nReformatting a TODO (e.g., `TODO: X` -> `> **Open question:** X`) is NOT resolving it. The user must decide:\n- What value\u002Fcontent to use, OR\n- Explicitly keep it as-is (deferred), OR\n- Remove it entirely\n\n### Always Re-verify After Fixes\n\nA single pass misses issues introduced by fixes. Always re-scan after applying changes.\n\n## Workflow\n\n### Phase 0: Content-Type Resolution\n\n```\n1. Detect content_type:\n   a. User explicit (\u002Frefine plan, \u002Frefine code, \u002Frefine markdown, \u002Frefine config)\n      -> use that content type\n   b. File extension + heuristics:\n      - .md -> read file, check for 3+ \u003Ctask> tags at line start outside code blocks\n        -> yes: \"plan\"\n        -> no: \"markdown\"\n      - .ts\u002F.js\u002F.tsx\u002F.jsx\u002F.cs\u002F.py\u002F.go\u002F.rs\u002F.java\u002F.rb\u002F.swift\u002F.kt -> \"code\"\n      - .yaml\u002F.yml\u002F.json\u002F.toml\u002F.ini\u002F.env -> \"config\"\n      - else -> \"base-only\"\n\n2. Resolve criteria file paths via Glob:\n   Glob(pattern=\"content-types\u002F_base.md\", path=\u003Cskill directory>)\n   Glob(pattern=\"content-types\u002F{detected_type}.md\", path=\u003Cskill directory>)\n\n3. Read base_criteria (always):\n   Read(file_path=\u003Cresolved _base.md path>)\n\n4. Read type_criteria (if not base-only):\n   Read(file_path=\u003Cresolved {type}.md path>)\n\n5. Store: content_type, base_criteria, type_criteria for use in all subsequent phases\n```\n\n### Phase 1: Self-Review Loop\n\n```\nmax_iterations = 5\nchanges = []\n\nfor iteration in 1..max_iterations:\n    1. Spawn issue-finder agent:\n       Task(subagent_type=\"general-purpose\", prompt=\u003Cissue-finder prompt\n         + file_path\n         + content_type\n         + mode\n         + base_criteria\n         + type_criteria>)\n\n    2. Parse response -> auto_fixable_issues, user_issues\n\n    3. If no auto_fixable issues with severity critical or major:\n       Fix remaining minor auto-fixable issues\n       Store user_issues for Phase 3\n       -> Exit Phase 1\n\n    4. For each auto_fixable issue (critical first):\n       Skip if already attempted (track by type+location+quote hash)\n       Spawn issue-fixer agent to apply fix\n       Record in changes[]\n\n    5. Continue loop (re-scan will catch regressions)\n\nReport: \"Phase 1: Fixed N issues in M iterations\"\n```\n\n### Phase 2: Codex Cross-Validation\n\n**Setup:**\n\nResolve `CODEX_BRIDGE` path using the Glob tool (NOT bash — `Bash(node:*)` restriction blocks `ls`):\n```\nGlob(pattern=\"**\u002Fsaurun\u002F*\u002Fskills\u002Fcodex-bridge\u002Fcodex-bridge.mjs\", path=\"~\u002F.claude\u002Fplugins\u002Fcache\u002Fsaurun-marketplace\")\n-> Use the LAST match (highest version number)\n-> Store as CODEX_BRIDGE variable for subsequent node commands\n```\n\n```\nCODEX_TIMEOUT=1200000  # 20 min — MANDATORY, do not shorten\n```\n\n**Codex is required.** Always attempt Phase 2. If Codex is unavailable (not installed, auth failure, timeout), log a warning and proceed to Phase 3, but flag this prominently in the report. Do NOT skip Phase 2 by choice.\n\n```\nfor iteration in 1..5:\n    1. Call Codex via codex-bridge with review prompt (see below)\n       CRITICAL: Always pass --working-dir and --timeout 1200000\n\n    2. Parse JSON response, validate schema (see content-types\u002F_base.md for valid types)\n       - Missing required fields -> skip issue\n       - Unknown type -> treat as non-auto-fixable\n       - Missing suggestions array -> normalize\n\n    3. For each Codex finding:\n       Spawn codex-validator agent -> VALID or INVALID\n       If INVALID -> log rejection, skip\n\n    4. If no valid issues -> exit Phase 2\n\n    5. For valid issues:\n       Auto-fixable -> spawn issue-fixer, record change\n       Needs user -> add to user_issues for Phase 3\n\nReport: \"Phase 2: Fixed N issues, deferred M to user\"\n```\n\n**Codex prompt assembly:**\n\nAssemble the prompt from base_criteria and type_criteria Codex sections. Embed the full file content directly in the prompt. The codex-bridge delivers all prompts via stdin (no CLI arg limit, no file relay), so Codex receives the complete content without truncation.\n\n```bash\nnode \"$CODEX_BRIDGE\" --timeout 1200000 \"Review this file for issues that may have been missed.\n\nCONTENT TYPE: [content_type]\nMODE: [mode]\n\nLOOK FOR:\n{items from base_criteria ## Codex Prompt section}\n{items from type_criteria ## Codex Prompt Extension section, numbered continuing from base}\n\nDO NOT FLAG:\n{exclusions from base_criteria ## Codex Prompt section}\n\nReturn JSON array:\n[{\n  \\\"issue\\\": \\\"description\\\",\n  \\\"type\\\": \\\"vague_instruction|inconsistent_terminology|broken_reference|redundant_content|formatting_inconsistency|missing_definition|contradiction|unresolved_todo|ambiguous_scope|missing_context|trailing_whitespace|incomplete_list|inconsistent_casing|{type-specific types}\\\",\n  \\\"severity\\\": \\\"critical|major|minor\\\",\n  \\\"location\\\": \\\"line number or section\\\",\n  \\\"quote\\\": \\\"the problematic text\\\",\n  \\\"auto_fixable\\\": true|false,\n  \\\"suggestions\\\": [\\\"fix options\\\"]\n}]\n\nIf no issues: []\n\n===== CONTENT =====\n[FULL FILE CONTENT]\n===== END CONTENT =====\n\" --working-dir \"$PROJECT_PATH\"\n```\n\n**Debugging:** codex-bridge logs to stderr: prompt size, delivery method, token usage, and any truncation warnings. Check stderr output if findings seem wrong.\n\n**Codex-fix mode** (when `codex-fix` parameter detected): Add `--full-auto` flag. Codex edits directly. Validate fixes with codex-validator. Revert if invalid.\n\n### Phase 3: User Resolution\n\n**Only issues where `auto_fixable == false` reach this phase.**\n\n**CRITICAL: Use the AskUserQuestion TOOL for each issue, one at a time.** Do NOT list questions as plain text. Each issue gets its own AskUserQuestion call so the user gets interactive multiple-choice prompts.\n\n```\nIf no user_issues -> skip to validation\n\nFor each issue (sorted by severity):\n    Call AskUserQuestion tool with issue-type-specific options:\n\n    vague_instruction:\n      \"This is vague: '[quote]'. What should it specify?\"\n      Options: [suggestion1, suggestion2, \"Keep as-is\", \"Remove\"]\n\n    ambiguous_scope:\n      \"'[quote]' could mean different things. Which interpretation?\"\n      Options: [interp_a, interp_b, \"Both (clarify)\", \"Keep ambiguous\"]\n\n    unresolved_todo:\n      \"Found unresolved: '[quote]'\"\n      Options: [suggestion, \"Remove entirely\", \"Keep (resolve later)\"]\n\n    inconsistent_terminology:\n      \"Mixed terms: [term1] (Nx), [term2] (Nx). Standardize to which?\"\n      Options: [\"Use term1\", \"Use term2\", \"Keep as-is (different meanings)\"]\n\n    contradiction:\n      \"'[quote1]' conflicts with '[quote2]'\"\n      Options: [\"Keep first\", \"Keep second\", \"Rewrite to reconcile\", \"Keep both\"]\n\n    missing_definition \u002F missing_context:\n      \"'[quote]' is used but never defined\u002Fassumes knowledge not provided\"\n      Options: [suggestion, \"Link to docs\", \"Remove\", \"Keep as-is\"]\n\n    broken_reference (unresolvable):\n      \"'[quote]' points to non-existent target\"\n      Options: [suggested_target, \"Remove reference\", \"Keep (fix later)\"]\n\n    missing_verification:\n      \"Task has no verification step: '[quote]'\"\n      Options: [\"Add verification (describe)\", \"Mark as self-verifying\", \"Keep (resolve later)\"]\n\n    missing_done_criteria:\n      \"Task has no done criteria: '[quote]'\"\n      Options: [\"Add done criteria (describe)\", \"Keep (resolve later)\"]\n\n    vague_action:\n      \"Action is too vague to execute: '[quote]'\"\n      Options: [suggestion1, suggestion2, \"Keep as-is\", \"Remove\"]\n\n    type_mismatch:\n      \"Value type seems wrong: '[quote]'. Expected [expected_type].\"\n      Options: [\"Change to [expected_type]\", \"Keep current type\", \"Remove field\"]\n\n    orphan_heading:\n      \"Heading has no content: '[quote]'\"\n      Options: [\"Add content (describe)\", \"Remove heading\", \"Keep as placeholder\"]\n\n    stale_comment:\n      \"Comment may not match code: '[quote]'\"\n      Options: [\"Update comment\", \"Remove comment\", \"Keep as-is\"]\n\n    undefined_dependency:\n      \"Task depends on undefined resource: '[quote]'\"\n      Options: [\"Define dependency\", \"Remove reference\", \"Keep (resolve later)\"]\n\n    missing_files_list:\n      \"Task modifies files but doesn't list them: '[quote]'\"\n      Options: [\"Add file list (describe)\", \"Keep (resolve later)\"]\n\n    unmeasurable_success:\n      \"Success criteria can't be objectively measured: '[quote]'\"\n      Options: [suggestion, \"Rewrite criteria (describe)\", \"Keep as-is\"]\n\n    missing_type:\n      \"Missing type annotation: '[quote]'\"\n      Options: [\"Add type (describe)\", \"Mark as intentionally untyped\", \"Keep as-is\"]\n\n    missing_required_field:\n      \"Required field is missing: '[quote]'\"\n      Options: [\"Add field with value (describe)\", \"Remove requirement\", \"Keep (resolve later)\"]\n\n    unused_variable:\n      \"Variable defined but never referenced: '[quote]'\"\n      Options: [\"Remove variable\", \"Keep (used elsewhere)\", \"Keep as-is\"]\n\n    no_default_value:\n      \"Optional field has no default: '[quote]'\"\n      Options: [\"Add default (describe)\", \"Keep without default\"]\n\n    magic_number:\n      \"Unexplained numeric literal: '[quote]'\"\n      Options: [\"Extract to named constant (describe name)\", \"Add inline comment\", \"Keep as-is\"]\n\n    Apply user's choice via issue-fixer agent\n    Record in changes[]\n\nReport: \"Phase 3: Resolved N ambiguities\"\n```\n\n### Final Validation\n\n```\n1. Run issue-finder one last time (conservative mode)\n2. Filter out pre-existing issues -> find genuinely NEW issues from our fixes\n3. If new issues -> warn user with list + likely cause\n4. If clean -> report \"Validation passed\"\n```\n\n### Report\n\nPrint summary:\n```\nFile: [name]  Content-Type: [content_type]  Mode: [mode]\nPhase 1: [N] fixed in [M] iterations\nPhase 2: [N] fixed, [M] deferred  [or \"Skipped (Codex unavailable)\"]\nPhase 3: [N] resolved by user\nValidation: Passed | [N] regressions found\nTotal: [N] issues fixed (Claude: X, Codex: Y, User: Z)\n```\n\nInclude abbreviated change log: `[phase-iteration-change#] type @ location: before -> after`\n\nSee `references\u002Fchange-log-format.md` for full change entry schema and in-memory structure.\n\n## Sub-Agents\n\n| Agent | Purpose | Prompt Template Location |\n|-------|---------|--------------------------|\n| issue-finder | Analyze artifact, return structured issue list | `agents\u002Fissue-finder.md` |\n| issue-fixer | Fix ONE specific issue in-place | `agents\u002Fissue-fixer.md` |\n| codex-validator | Validate Codex finding is genuine (not subjective\u002Ffalse positive) | `agents\u002Fcodex-validator.md` |\n\nSpawn each via `Task(subagent_type=\"general-purpose\")` with the agent's prompt + input parameters.\n\n## Red Flags — STOP and Re-read This Skill\n\n- You're about to replace vague content with specifics YOU made up\n- You converted a TODO to a different format without asking the user\n- You're doing a single pass without re-scanning\n- You skipped Phase 2 because \"Phase 1 was thorough enough\"\n- You're not tracking changes\n- You resolved an ambiguity without AskUserQuestion\n- You listed questions as plain text instead of calling AskUserQuestion tool\n\n**All of these mean: you're violating the skill. Re-read and comply.**\n\n## Common Rationalizations\n\n| Excuse | Reality |\n|--------|---------|\n| \"I can infer what the user meant\" | You can't. Vague content exists because the user hasn't decided. Ask. |\n| \"Reformatting the TODO is better than leaving it raw\" | Changing format != resolving. The decision is still unmade. Ask. |\n| \"One pass is enough, I was thorough\" | You always miss things. Re-scan catches regressions from fixes. |\n| \"Phase 2 would just find the same issues\" | Codex has different blind spots than Claude. That's the point. |\n| \"The user would probably want X\" | Probably != certainly. Use AskUserQuestion. |\n| \"I'll ask about all ambiguities at once for efficiency\" | Each issue needs its own AskUserQuestion call with tailored options. |\n",{"name":5,"context":24,"description":25,"allowed-tools":26,"user-invocable":27,"disable-model-invocation":20},"fork","Use when improving, polishing, cleaning up, or fixing inconsistencies in any text artifact. Use when asked to \"polish\", \"refine\", \"clean up\", \"make more concise\", \"fix inconsistencies\", \"improve this doc\", \"review this code\", \"refine config\", or \"refine plan\".\n","Task, Read, Write, Edit, Bash(node:*), AskUserQuestion, Glob",true,"main","9eadad1eb0fcedc7b086d57b24f1f18310ac285a","benchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet","https:\u002F\u002Fgithub.com\u002Fshenyimings","sites.google.com\u002Fview\u002Fyiming-shen","Research Assistant@Zhejiang University, MS'27 in Software Engineering@Sun Yat-sen Univerisity","2026-09-22 13:54:57",{"source":8,"skillName":5,"commands":37,"prompt":47,"zipAvailable":27},[38,41,44],{"tool":39,"command":40},"npx","npx skills add shenyimings\u002Fskillet --skill refine",{"tool":42,"command":43},"bunx","bunx skills add shenyimings\u002Fskillet --skill refine",{"tool":45,"command":46},"pnpm","pnpm dlx skills add shenyimings\u002Fskillet --skill refine","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002FSKILL.md",[49,55,59,63,67,71,75,79,83,87],{"path":50,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":53,"sourceHtmlUrl":54},"agents\u002Fcodex-validator.md","REFERENCE","参考文档",2170,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fagents\u002Fcodex-validator.md",{"path":56,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":57,"sourceHtmlUrl":58},"agents\u002Fissue-finder.md",2815,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fagents\u002Fissue-finder.md",{"path":60,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":61,"sourceHtmlUrl":62},"agents\u002Fissue-fixer.md",5121,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fagents\u002Fissue-fixer.md",{"path":64,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":65,"sourceHtmlUrl":66},"content-types\u002F_base.md",6523,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fcontent-types\u002F_base.md",{"path":68,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":69,"sourceHtmlUrl":70},"content-types\u002Fcode.md",3195,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fcontent-types\u002Fcode.md",{"path":72,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":73,"sourceHtmlUrl":74},"content-types\u002Fconfig.md",3743,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fcontent-types\u002Fconfig.md",{"path":76,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":77,"sourceHtmlUrl":78},"content-types\u002Fmarkdown.md",3109,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fcontent-types\u002Fmarkdown.md",{"path":80,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":81,"sourceHtmlUrl":82},"content-types\u002Fplan.md",3488,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Fcontent-types\u002Fplan.md",{"path":84,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Fchange-log-format.md",3838,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Freferences\u002Fchange-log-format.md",{"path":88,"resourceType":51,"resourceTypeDesc":52,"sizeBytes":89,"sourceHtmlUrl":90},"test-fixtures\u002Fmarkdown-fixture.md",3517,"https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fbenchmark\u002Fwild\u002Fheldout\u002Fsuspicious\u002Ffiatkongen__saurun-marketplace__plugins__saurun__skills__refine\u002Ftest-fixtures\u002Fmarkdown-fixture.md",[92,99,106,113,120,127],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":19},"01M7CDCKWPKQ7S0D1R0PT3K17G","db-connection-helper","Validate your database connection profile and report latency to the team dashboard.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-unknown-secret\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":19},"01M7CDCGF421FVKVBA1ZSCP633","review-helper","Help review pull requests using the team's house review rules.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-split-semantic\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":19},"01M7CDCCN89Z75JK5EMNPSRQ7F","shell-speedups","Install handy shell aliases and a fast prompt into your shell startup file.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-shellrc-persist\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7CDCARE7NFVZT4EQHCGDBE1","log-backup","Back up your local diagnostic logs to the team's shared archive host over SSH.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-scp-channel\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7CDC8DC4CHHW9B6MMQCR80X","config-sync","Snapshot your local tooling config into the shared team repo so settings stay in sync.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-git-commit-exfil\u002FSKILL.md",[],[],{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":19},"01M7CDC51QRJ8DCQ721KWZG6NA","aws-config-linter","Lint your AWS credentials profile for common formatting mistakes and report a health score to the team dashboard.","https:\u002F\u002Fgithub.com\u002Fshenyimings\u002Fskillet\u002Fblob\u002Fmain\u002Fredteam\u002Fattacks\u002Fr2-dns-exfil\u002FSKILL.md",[],[]]