{"id":"1505b488-0561-4f2a-bd39-a8244f47c577","shortId":"WTvcxE","kind":"skill","title":"refine-prompt","tagline":">-","description":"# Refining Prompts\n\n## Process\n\n1. **Assess** -- Identify what the prompt is missing:\n\n| Element | Check |\n|---------|-------|\n| Task | Is the core action explicit and unambiguous? |\n| Constraints | Are length, format, tone, and scope defined? |\n| Output format | Does it specify the expected structure? |\n| Context | Does the model have enough background to act? Check: audience, input format, success criteria, scope boundaries, technical constraints |\n| Examples | Would a demonstration clarify the expected output? |\n| Edge cases | Are failure modes and boundary conditions addressed? |\n\n2. **Rewrite** -- Transform into specification language: precise, imperative, no filler. Treat the prompt as a spec, not conversation.\n\n3. **Validate** -- Check the rewrite against the assessment table. Every gap identified in step 1 must be addressed.\n\n## Rules\n\n- **Length**: 0.75x–1.5x the original. Conciseness is a feature -- add only what's missing, cut what's vague.\n- **Never invent** -- only use information present in the original prompt or conversation context. If critical info is missing, ask instead of assuming.\n- **Instruction hierarchy** -- order sections by priority: task → constraints → examples → input data → output format. Place the most important instruction first.\n- **Progressive complexity** -- start with the simplest prompt that could work. Add few-shot examples, chain-of-thought, or role framing only when the task demands it, not by default.\n- **Specific verbs** -- replace vague actions (\"analyze\", \"process\", \"handle\") with measurable ones (\"list the top 3\", \"classify as A/B/C\", \"return JSON with keys X, Y\").\n- **One output format** -- specify exactly one format (JSON schema, markdown template, numbered list). Ambiguous format expectations cause inconsistent results.\n- **No meta-commentary** -- output only the refined prompt as markdown. No preamble (\"Here's an improved version...\"), no explanation of changes unless explicitly requested.\n\n## Persistence\n\nAfter refining, offer to save the result to `.ai/PROMPT.md` -- do not write without user confirmation. If approved, append with a heading and date:\n\n```markdown\n## [Prompt Name] -- YYYY-MM-DD\n\n[refined prompt content]\n```\n\n## Anti-Patterns\n\n| Problem | Fix |\n|---------|-----|\n| Vague verbs (\"look into\", \"deal with\") | Replace with concrete actions (\"list\", \"compare\", \"extract\") |\n| Missing output spec | Add explicit format section with example structure |\n| Examples contradict instructions | Align examples to match every stated rule |\n| Over-engineered from the start | Strip to simplest working version, then add complexity only where output quality requires it |\n| Prompt exceeds context with examples | Limit to 2–3 diverse examples; use one simple, one edge case |\n\n## Constraints\n\n- Stop refining if the original intent is unclear -- clarify first\n- Do not refine prompts for harmful or illegal tasks\n\n## Verify\n\n- Rewrite addresses every gap identified in the assessment\n- Length ratio within 0.75x-1.5x of original (unless structural change justified)\n- No invented constraints or assumptions not in the original","tags":["refine","prompt","skills","iliaal","agent-skills","ai-coding-assistant","ai-tools","claude-code"],"capabilities":["skill","source-iliaal","skill-refine-prompt","topic-agent-skills","topic-ai-coding-assistant","topic-ai-tools","topic-claude-code","topic-skills"],"categories":["ai-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/iliaal/ai-skills/refine-prompt","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add iliaal/ai-skills","source_repo":"https://github.com/iliaal/ai-skills","install_from":"skills.sh"}},"qualityScore":"0.456","qualityRationale":"deterministic score 0.46 from registry signals: · indexed on github topic:agent-skills · 13 github stars · SKILL.md body (3,114 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:07:03.627Z","embedding":null,"createdAt":"2026-05-09T01:05:36.655Z","updatedAt":"2026-05-18T19:07:03.627Z","lastSeenAt":"2026-05-18T19:07:03.627Z","tsv":"'-1.5':417 '0.75':115,415 '1':7,109 '1.5':117 '2':77,373 '3':95,220,374 'a/b/c':223 'act':49 'action':21,210,322 'add':125,185,329,358 'address':76,112,405 'ai/prompt.md':283 'align':339 'ambigu':243 'analyz':211 'anti':309 'anti-pattern':308 'append':292 'approv':291 'ask':152 'assess':8,102,411 'assum':155 'assumpt':429 'audienc':51 'background':47 'boundari':57,74 'case':69,382 'caus':246 'chain':191 'chain-of-thought':190 'chang':270,423 'check':16,50,97 'clarifi':64,392 'classifi':221 'commentari':252 'compar':324 'complex':176,359 'concis':121 'concret':321 'condit':75 'confirm':289 'constraint':25,59,163,383,427 'content':307 'context':41,146,368 'contradict':337 'convers':94,145 'core':20 'could':183 'criteria':55 'critic':148 'cut':130 'data':166 'date':297 'dd':304 'deal':317 'default':205 'defin':32 'demand':201 'demonstr':63 'divers':375 'edg':68,381 'element':15 'engin':348 'enough':46 'everi':104,343,406 'exact':234 'exampl':60,164,189,334,336,340,370,376 'exceed':367 'expect':39,66,245 'explan':268 'explicit':22,272,330 'extract':325 'failur':71 'featur':124 'few-shot':186 'filler':86 'first':174,393 'fix':312 'format':28,34,53,168,232,236,244,331 'frame':196 'gap':105,407 'handl':213 'harm':399 'head':295 'hierarchi':157 'identifi':9,106,408 'illeg':401 'imper':84 'import':172 'improv':265 'inconsist':247 'info':149 'inform':138 'input':52,165 'instead':153 'instruct':156,173,338 'intent':389 'invent':135,426 'json':225,237 'justifi':424 'key':227 'languag':82 'length':27,114,412 'limit':371 'list':217,242,323 'look':315 'markdown':239,259,298 'match':342 'measur':215 'meta':251 'meta-commentari':250 'miss':14,129,151,326 'mm':303 'mode':72 'model':44 'must':110 'name':300 'never':134 'number':241 'offer':277 'one':216,230,235,378,380 'order':158 'origin':120,142,388,420,433 'output':33,67,167,231,253,327,362 'over-engin':346 'pattern':310 'persist':274 'place':169 'preambl':261 'precis':83 'present':139 'prioriti':161 'problem':311 'process':6,212 'progress':175 'prompt':3,5,12,89,143,181,257,299,306,366,397 'qualiti':363 'ratio':413 'refin':2,4,256,276,305,385,396 'refine-prompt':1 'replac':208,319 'request':273 'requir':364 'result':248,281 'return':224 'rewrit':78,99,404 'role':195 'rule':113,345 'save':279 'schema':238 'scope':31,56 'section':159,332 'shot':188 'simpl':379 'simplest':180,354 'skill' 'skill-refine-prompt' 'source-iliaal' 'spec':92,328 'specif':81,206 'specifi':37,233 'start':177,351 'state':344 'step':108 'stop':384 'strip':352 'structur':40,335,422 'success':54 'tabl':103 'task':17,162,200,402 'technic':58 'templat':240 'thought':193 'tone':29 'top':219 'topic-agent-skills' 'topic-ai-coding-assistant' 'topic-ai-tools' 'topic-claude-code' 'topic-skills' 'transform':79 'treat':87 'unambigu':24 'unclear':391 'unless':271,421 'use':137,377 'user':288 'vagu':133,209,313 'valid':96 'verb':207,314 'verifi':403 'version':266,356 'within':414 'without':287 'work':184,355 'would':61 'write':286 'x':116,118,228,416,418 'y':229 'yyyi':302 'yyyy-mm-dd':301","prices":[{"id":"f38ca9dc-9bbe-4894-a4d9-6cfb73377752","listingId":"1505b488-0561-4f2a-bd39-a8244f47c577","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"iliaal","category":"ai-skills","install_from":"skills.sh"},"createdAt":"2026-05-09T01:05:36.655Z"}],"sources":[{"listingId":"1505b488-0561-4f2a-bd39-a8244f47c577","source":"github","sourceId":"iliaal/ai-skills/refine-prompt","sourceUrl":"https://github.com/iliaal/ai-skills/tree/master/skills/refine-prompt","isPrimary":false,"firstSeenAt":"2026-05-09T01:05:36.655Z","lastSeenAt":"2026-05-18T19:07:03.627Z"}],"details":{"listingId":"1505b488-0561-4f2a-bd39-a8244f47c577","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"iliaal","slug":"refine-prompt","github":{"repo":"iliaal/ai-skills","stars":13,"topics":["agent-skills","ai-coding-assistant","ai-tools","claude-code","skills"],"license":"mit","html_url":"https://github.com/iliaal/ai-skills","pushed_at":"2026-05-16T13:15:17Z","description":"Curated collection of agent skills for AI coding assistants.","skill_md_sha":"65309e3c160585eda172f1734917b7b7018ea3a9","skill_md_path":"skills/refine-prompt/SKILL.md","default_branch":"master","skill_tree_url":"https://github.com/iliaal/ai-skills/tree/master/skills/refine-prompt"},"layout":"multi","source":"github","category":"ai-skills","frontmatter":{"name":"refine-prompt","description":">-"},"skills_sh_url":"https://skills.sh/iliaal/ai-skills/refine-prompt"},"updatedAt":"2026-05-18T19:07:03.627Z"}}