{"id":"2a928e47-5efb-4ea1-95d2-6276b41e21c0","shortId":"ZPRWp5","kind":"skill","title":"ralph-prompt-generator","tagline":"Use when a user has a rough prompt that needs a staged prompt-improvement workflow for `$ralph-wiggum-codex`, with saved draft/final files and explicit review checkpoints.","description":"# Ralph Prompt Generator\n\nCompanion skill for `$ralph-wiggum-codex`.\n\nThis skill does not exist to synthesize flags first. Its primary job is to improve the prompt itself through a staged prompt-improvement workflow, then finish with a small Ralph-specific handoff.\n\n## Core Rule\n\nClarify, do not prescribe.\n\nThe receiving agent is equally capable. Improve the briefing, preserve the user's boundaries, and avoid doing the downstream agent's job.\n\n## When To Use\n\nUse this skill when:\n- The source prompt is ambiguous, bloated, or structurally weak.\n- The user wants a reusable prompt for `$ralph-wiggum-codex`.\n- The task needs critique and revision, not just runner flag suggestions.\n- The user wants saved planning, draft, and final prompt files in the repo.\n\nDo not use this skill when:\n- The user already has a production-ready Ralph prompt.\n- The user wants `$ralph-wiggum-codex` executed immediately with no prompt rewrite.\n- The only missing detail is a minor flag choice that can be handled inline.\n\n## Inputs\n\nPrimary input:\n- `<user_prompt>`\n\nOptional supporting context:\n- `<examples>`\n- `<feedback>`\n\nTreat `<examples>` as demonstrations, not new requirements. Treat `<feedback>` as revision guidance, not permission to weaken the original constraints.\n\n## Repo-Backed Workspace\n\nUse this workspace for all saved outputs:\n- `docs/prompt-improver-spec/artifacts/implementation_plan.md`\n- `docs/prompt-improver-spec/artifacts/task.md`\n- `docs/prompt-improver-spec/artifacts/walkthrough.md`\n- `docs/prompt-improver-spec/final-prompts/<prompt-name>-draft.md`\n- `docs/prompt-improver-spec/final-prompts/<prompt-name>.md`\n\nDetermine `<prompt-name>` during planning using a descriptive kebab-case filename. Reuse the saved files on resume instead of redoing earlier analysis from scratch.\n\nDelete the draft file after creating the final prompt.\n\n## Required Workflow\n\nFollow the staged workflow defined in `references/prompt-improver-workflow-codex.md`.\n\n### Phase A\n\nPlanning only. Complete Steps 1-2.\n\nRequired work:\n- Read `<user_prompt>` and any optional `<examples>` / `<feedback>`.\n- Extract and normalize examples.\n- Quote unclear or problematic phrases from the source prompt.\n- Preserve all explicit MUST, MUST NOT, and DO NOT constraints.\n- Create `docs/prompt-improver-spec/artifacts/implementation_plan.md`.\n- Create `docs/prompt-improver-spec/artifacts/task.md`.\n- Choose `<prompt-name>`.\n\n`implementation_plan.md` must include:\n- Step 1 example identification\n- Step 2 planning analysis\n- intent summary\n- deployment summary\n- task flowchart\n- lessons from examples\n- chain-of-thought approach assessment\n- output format analysis\n- variable plan\n- structural notes\n- ambiguities and questions\n- prompt filename\n- constraint-preservation checklist\n\nEnd Phase A at a native Codex review checkpoint after Steps 1-2. Pause and ask the user to review the saved planning artifacts before continuing.\n\n### Phase B\n\nInitial draft only. Complete Step 3.\n\nRequired work:\n- Read the saved planning artifacts instead of redoing them.\n- Write the first improved prompt draft to `docs/prompt-improver-spec/final-prompts/<prompt-name>-draft.md`.\n- Update `docs/prompt-improver-spec/artifacts/task.md` to mark Steps 1-3 complete.\n- Include clarifying questions only if ambiguities remain.\n\nThe draft must:\n- define the assistant role clearly\n- introduce descriptive XML variables when useful\n- preserve all constraints\n- clarify the objective\n- specify output expectations without pre-solving the task\n- add anti-patterns or verification checklists only when they help\n\nEnd Phase B with the saved draft path and any remaining clarifying questions. Do not emit the Ralph-ready invocation snippet yet.\n\n### Phase C\n\nCritique and revision planning only. Complete Step 4.\n\nRequired work:\n- Read `docs/prompt-improver-spec/final-prompts/<prompt-name>-draft.md`.\n- Append the critique and revision plan to `docs/prompt-improver-spec/artifacts/implementation_plan.md`.\n- Update `docs/prompt-improver-spec/artifacts/task.md` for Step 4.\n\nThe critique must quote specific problem text and describe:\n- issues identified\n- areas needing expansion\n- structural improvements\n- constraint-preservation check\n\nEnd Phase C at a second native Codex review checkpoint after Step 4. Pause and ask the user to review the critique before continuing.\n\n### Phase D\n\nRevision, final polish, and delivery. Complete Steps 5-6.\n\nRequired work:\n- Read and reuse all existing prompt-improver artifacts.\n- Apply the revision plan to strengthen weak sections.\n- Save the final prompt to `docs/prompt-improver-spec/final-prompts/<prompt-name>.md`.\n- Delete the draft file at `docs/prompt-improver-spec/final-prompts/<prompt-name>-draft.md`.\n- Create `docs/prompt-improver-spec/artifacts/walkthrough.md`.\n- Update `docs/prompt-improver-spec/artifacts/task.md` to mark all steps complete.\n\nThe final polish must verify:\n- all original constraints are preserved\n- XML tag usage is consistent when tags are used\n- instructions are logically ordered\n- the prompt is complete without doing the receiving agent's work\n\nFinal delivery must include:\n- the completion message ending with `All 6 Steps Complete.`\n- the saved final prompt path\n- confirmation that the draft file was removed\n- a short Ralph-ready invocation snippet that points to the saved final prompt file\n- a final prompt structure that clearly covers `Objective`, `Acceptance Criteria`, `Source of Truth`, `Optional Verification`, and `Blocker Policy`\n\n## Ralph-Specific Tailoring Is Secondary\n\nAfter the prompt itself is finished, add only a small Ralph-specific wrapper:\n- how to use the saved prompt with `$ralph-wiggum-codex`\n- optional validation or progress-scope guidance if it materially helps\n- optional flags only when they materially improve the run\n\nThe final deliverable is a production-ready prompt file plus a Ralph-ready invocation snippet, not a flags-first handoff block.\n\nWhen the improved prompt is intended for `$ralph-wiggum-codex`, the prompt itself should normally include these sections:\n- `Objective`\n- `Acceptance Criteria`\n- `Source of Truth`\n- `Optional Verification`\n- `Blocker Policy`\n\n## Non-Negotiable Constraints\n\nYou must not:\n- execute or answer the source prompt's underlying task\n- remove or weaken original constraints\n- invent missing facts without labeling them\n- redo earlier phases from scratch when saved artifacts already exist\n- leave the draft file behind after finalizing\n- fill the prompt with example outputs that amount to doing the agent's work\n- prescribe low-level execution steps unless the user explicitly asked for them\n\n## Prompt Quality Checks\n\nWhen drafting or revising, explicitly check:\n- Clarity: quote confusing phrases and rewrite them\n- Structure: fix ordering, grouping, and entry point issues\n- Completeness: add missing briefing context, not extra deliverables\n- Variables: keep placeholders and XML tags consistent\n- Constraints: preserve MUST / MUST NOT / DO NOT rules\n- Output format: show structure, not pre-filled answers\n- Anti-over-engineering: remove content that does the downstream agent's job\n\n## Optional Ralph Guidance\n\nModel and flag guidance are secondary.\n\nOnly consult these references when the final Ralph wrapper actually needs them:\n- `references/prompt-improver-principles.md`\n- `references/openai-codex-prompting-2026.md`\n- `references/ralph-flag-selection-matrix.md`\n\nIf a model name or OpenAI capability is uncertain, consult the `openaiDeveloperDocs` MCP dependency declared in `agents/openai.yaml`.","tags":["ralph","prompt","generator","wiggum","codex","mattmagg","agent-skills","agentic-workflows","ai-agents","ai-coding-agent","automation","autonomous-agents"],"capabilities":["skill","source-mattmagg","skill-ralph-prompt-generator","topic-agent-skills","topic-agentic-workflows","topic-ai-agents","topic-ai-coding-agent","topic-automation","topic-autonomous-agents","topic-autonomous-coding","topic-codex","topic-codex-skill","topic-developer-tools","topic-iterative-refinement"],"categories":["ralph-wiggum-codex"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/MattMagg/ralph-wiggum-codex/ralph-prompt-generator","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add MattMagg/ralph-wiggum-codex","source_repo":"https://github.com/MattMagg/ralph-wiggum-codex","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (7,524 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:08:55.499Z","embedding":null,"createdAt":"2026-04-23T13:04:19.298Z","updatedAt":"2026-05-18T19:08:55.499Z","lastSeenAt":"2026-05-18T19:08:55.499Z","tsv":"'-2':289,378 '-3':426 '-6':580 '1':288,328,377,425 '2':332 '3':399 '4':507,525,558 '5':579 '6':667 'accept':705,810 'actual':977 'add':464,727,915 'agent':86,103,654,874,956 'agents/openai.yaml':999 'alreadi':165,854 'ambigu':117,357,433 'amount':870 'analysi':261,334,352 'answer':828,945 'anti':466,947 'anti-over-engin':946 'anti-pattern':465 'append':513 'appli':592 'approach':348 'area':537 'artifact':389,406,591,853 'ask':381,561,887 'assess':349 'assist':440 'avoid':99 'b':393,477 'back':225 'behind':860 'bloat':118 'block':789 'blocker':713,817 'boundari':97 'brief':92,917 'c':499,548 'capabl':89,989 'case':249 'chain':345 'chain-of-thought':344 'check':545,892,898 'checklist':365,470 'checkpoint':33,374,555 'choic':194 'choos':323 'clarifi':80,429,452,486 'clariti':899 'clear':442,702 'codex':25,43,132,179,372,553,745,800 'companion':37 'complet':286,397,427,505,577,622,649,662,669,914 'confirm':675 'confus':901 'consist':637,928 'constraint':222,318,363,451,543,630,822,839,929 'constraint-preserv':362,542 'consult':969,992 'content':951 'context':205,918 'continu':391,569 'core':78 'cover':703 'creat':269,319,321,614 'criteria':706,811 'critiqu':136,500,515,527,567 'd':571 'declar':997 'defin':279,438 'delet':264,607 'deliver':768,921 'deliveri':576,658 'demonstr':208 'depend':996 'deploy':337 'describ':534 'descript':246,444 'detail':189 'determin':241 'docs/prompt-improver-spec/artifacts/implementation_plan.md':234,320,520 'docs/prompt-improver-spec/artifacts/task.md':235,322,421,522,617 'docs/prompt-improver-spec/artifacts/walkthrough.md':236,615 'docs/prompt-improver-spec/final-prompts':237,239,418,511,605,612 'downstream':102,955 'draft':149,266,395,416,436,481,609,678,858,894 'draft.md':238,419,512,613 'draft/final':28 'earlier':260,847 'emit':490 'end':366,475,546,664 'engin':949 'entri':911 'equal':88 'exampl':299,329,343,867 'execut':180,826,881 'exist':48,587,855 'expans':539 'expect':457 'explicit':31,311,886,897 'extra':920 'extract':296 'fact':842 'file':29,153,254,267,610,679,696,775,859 'filenam':250,361 'fill':863,944 'final':151,271,573,602,624,657,672,694,698,767,862,974 'finish':70,726 'first':52,413,787 'fix':907 'flag':51,142,193,758,786,964 'flags-first':785 'flowchart':340 'follow':275 'format':351,938 'generat':4,36 'group':909 'guidanc':215,752,961,965 'handl':198 'handoff':77,788 'help':474,756 'identif':330 'identifi':536 'immedi':181 'implementation_plan.md':324 'improv':19,58,67,90,414,541,590,763,792 'includ':326,428,660,806 'initi':394 'inlin':199 'input':200,202 'instead':257,407 'instruct':642 'intend':795 'intent':335 'introduc':443 'invent':840 'invoc':495,687,781 'issu':535,913 'job':55,105,958 'kebab':248 'kebab-cas':247 'keep':923 'label':844 'leav':856 'lesson':341 'level':880 'logic':644 'low':879 'low-level':878 'mark':423,619 'materi':755,762 'mcp':995 'md':240,606 'messag':663 'minor':192 'miss':188,841,916 'model':962,985 'must':312,313,325,437,528,626,659,824,931,932 'name':986 'nativ':371,552 'need':14,135,538,978 'negoti':821 'new':210 'non':820 'non-negoti':819 'normal':298,805 'note':356 'object':454,704,809 'openai':988 'openaideveloperdoc':994 'option':203,295,710,746,757,815,959 'order':645,908 'origin':221,629,838 'output':233,350,456,868,937 'path':482,674 'pattern':467 'paus':379,559 'permiss':217 'phase':282,367,392,476,498,547,570,848 'phrase':304,902 'placehold':924 'plan':148,243,284,333,354,388,405,503,518,595 'plus':776 'point':690,912 'polici':714,818 'polish':574,625 'pre':460,943 'pre-fil':942 'pre-solv':459 'prescrib':83,877 'preserv':93,309,364,449,544,632,930 'primari':54,201 'problem':531 'problemat':303 'product':169,772 'production-readi':168,771 'progress':750 'progress-scop':749 'prompt':3,12,18,35,60,66,115,127,152,172,184,272,308,360,415,589,603,647,673,695,699,723,740,774,793,802,831,865,890 'prompt-improv':17,65,588 'qualiti':891 'question':359,430,487 'quot':300,529,900 'ralph':2,23,34,41,75,130,171,177,493,685,716,732,743,779,798,960,975 'ralph-prompt-gener':1 'ralph-readi':492,684,778 'ralph-specif':74,715,731 'ralph-wiggum-codex':22,40,129,176,742,797 'read':292,402,510,583 'readi':170,494,686,773,780 'receiv':85,653 'redo':259,409,846 'refer':971 'references/openai-codex-prompting-2026.md':981 'references/prompt-improver-principles.md':980 'references/prompt-improver-workflow-codex.md':281 'references/ralph-flag-selection-matrix.md':982 'remain':434,485 'remov':681,835,950 'repo':156,224 'repo-back':223 'requir':211,273,290,400,508,581 'resum':256 'reus':251,585 'reusabl':126 'review':32,373,385,554,565 'revis':138,214,502,517,572,594,896 'rewrit':185,904 'role':441 'rough':11 'rule':79,936 'run':765 'runner':141 'save':27,147,232,253,387,404,480,600,671,693,739,852 'scope':751 'scratch':263,850 'second':551 'secondari':720,967 'section':599,808 'short':683 'show':939 'skill':38,45,111,161 'skill-ralph-prompt-generator' 'small':73,730 'snippet':496,688,782 'solv':461 'sourc':114,307,707,812,830 'source-mattmagg' 'specif':76,530,717,733 'specifi':455 'stage':16,64,277 'step':287,327,331,376,398,424,506,524,557,578,621,668,882 'strengthen':597 'structur':120,355,540,700,906,940 'suggest':143 'summari':336,338 'support':204 'synthes':50 'tag':634,639,927 'tailor':718 'task':134,339,463,834 'text':532 'thought':347 'topic-agent-skills' 'topic-agentic-workflows' 'topic-ai-agents' 'topic-ai-coding-agent' 'topic-automation' 'topic-autonomous-agents' 'topic-autonomous-coding' 'topic-codex' 'topic-codex-skill' 'topic-developer-tools' 'topic-iterative-refinement' 'treat':206,212 'truth':709,814 'uncertain':991 'unclear':301 'under':833 'unless':883 'updat':420,521,616 'usag':635 'use':5,108,109,159,227,244,448,641,737 'user':8,95,123,145,164,174,383,563,885 'valid':747 'variabl':353,446,922 'verif':469,711,816 'verifi':627 'want':124,146,175 'weak':121,598 'weaken':219,837 'wiggum':24,42,131,178,744,799 'without':458,650,843 'work':291,401,509,582,656,876 'workflow':20,68,274,278 'workspac':226,229 'wrapper':734,976 'write':411 'xml':445,633,926 'yet':497","prices":[{"id":"c2345bbb-2923-4071-903f-0118151f5278","listingId":"2a928e47-5efb-4ea1-95d2-6276b41e21c0","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"MattMagg","category":"ralph-wiggum-codex","install_from":"skills.sh"},"createdAt":"2026-04-23T13:04:19.298Z"}],"sources":[{"listingId":"2a928e47-5efb-4ea1-95d2-6276b41e21c0","source":"github","sourceId":"MattMagg/ralph-wiggum-codex/ralph-prompt-generator","sourceUrl":"https://github.com/MattMagg/ralph-wiggum-codex/tree/main/skills/ralph-prompt-generator","isPrimary":false,"firstSeenAt":"2026-04-23T13:04:19.298Z","lastSeenAt":"2026-05-18T19:08:55.499Z"}],"details":{"listingId":"2a928e47-5efb-4ea1-95d2-6276b41e21c0","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"MattMagg","slug":"ralph-prompt-generator","github":{"repo":"MattMagg/ralph-wiggum-codex","stars":8,"topics":["agent-skills","agentic-workflows","ai-agents","ai-coding-agent","automation","autonomous-agents","autonomous-coding","codex","codex-skill","developer-tools","iterative-refinement"],"license":"mit","html_url":"https://github.com/MattMagg/ralph-wiggum-codex","pushed_at":"2026-03-06T05:14:04Z","description":"Installable Codex skill for long-running autonomous coding refinement loops with validation and resumable state","skill_md_sha":"50bb1d4a5e014a9cf4a0f8d2a0d74e104c647174","skill_md_path":"skills/ralph-prompt-generator/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/MattMagg/ralph-wiggum-codex/tree/main/skills/ralph-prompt-generator"},"layout":"multi","source":"github","category":"ralph-wiggum-codex","frontmatter":{"name":"ralph-prompt-generator","description":"Use when a user has a rough prompt that needs a staged prompt-improvement workflow for `$ralph-wiggum-codex`, with saved draft/final files and explicit review checkpoints."},"skills_sh_url":"https://skills.sh/MattMagg/ralph-wiggum-codex/ralph-prompt-generator"},"updatedAt":"2026-05-18T19:08:55.499Z"}}