
Ia Refine Prompt
- 3 installs
- 28 repo stars
- Updated August 5, 2026
- iliaal/whetstone
Transforms vague prompts into precise structured AI instructions using an assessment table, specification-language rewrite, and validation.
About
A skill that turns vague prompts into precise, structured AI instructions by assessing gaps, rewriting in specification language, and validating against the assessment. A developer uses it when doing prompt engineering, writing system prompts, or sharpening AI instructions.
- Assessment table for task/constraints/format/context/examples/edge cases
- Instruction-hierarchy ordering and never-invent-missing-info constraint
Ia Refine Prompt by the numbers
- 3 all-time installs (skills.sh)
- Ranked #13,677 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/iliaal/whetstone --skill ia-refine-promptAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 3 |
|---|---|
| repo stars | ★ 28 |
| Last updated | August 5, 2026 |
| Repository | iliaal/whetstone ↗ |
What it does
Transforms vague prompts into precise structured AI instructions using an assessment table, specification-language rewrite, and validation.
Files
Refining Prompts
Process
1. Assess -- Identify what the prompt is missing:
| Element | Check |
|---|---|
| Task | Is the core action explicit and unambiguous? |
| Constraints | Are length, format, tone, and scope defined? |
| Output format | Does it specify the expected structure? |
| Context | Does the model have enough background to act? Check: audience, input format, success criteria, scope boundaries, technical constraints |
| Examples | Would a demonstration clarify the expected output? |
| Edge cases | Are failure modes and boundary conditions addressed? |
2. Rewrite -- Transform into specification language: precise, imperative, no filler. Treat the prompt as a spec, not conversation.
3. Validate -- Check the rewrite against the assessment table. Every gap identified in step 1 must be addressed.
Rules
- Length: 0.75x–1.5x the original. Conciseness is a feature -- add only what's missing, cut what's vague.
- Never invent -- only use information present in the original prompt or conversation context. If critical info is missing, ask instead of assuming.
- Instruction hierarchy -- order sections by priority: task → constraints → examples → input data → output format. Place the most important instruction first.
- 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.
- 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").
- One output format -- specify exactly one format (JSON schema, markdown template, numbered list). Ambiguous format expectations cause inconsistent results.
- No meta-commentary -- output only the refined prompt as markdown. No preamble ("Here's an improved version..."), no explanation of changes unless explicitly requested.
Persistence
After refining, offer to save the result to .ai/PROMPT.md -- do not write without user confirmation. If approved, append with a heading and date:
## [Prompt Name] -- YYYY-MM-DD
[refined prompt content]Anti-Patterns
| Problem | Fix |
|---|---|
| Vague verbs ("look into", "deal with") | Replace with concrete actions ("list", "compare", "extract") |
| Missing output spec | Add explicit format section with example structure |
| Examples contradict instructions | Align examples to match every stated rule |
| Over-engineered from the start | Strip to simplest working version, then add complexity only where output quality requires it |
| Prompt exceeds context with examples | Limit to 2–3 diverse examples; use one simple, one edge case |
Constraints
- Stop refining if the original intent is unclear -- clarify first
- Do not refine prompts for harmful or illegal tasks
Verify
- Rewrite addresses every gap identified in the assessment
- Length ratio within 0.75x-1.5x of original (unless structural change justified)
- No invented constraints or assumptions not in the original
ia-refine-prompt Specification
Intent
ia-refine-prompt is a meta-class skill (patterns about prompts, agents, or skills themselves). Transforms vague prompts into precise, structured AI instructions. Use when asked to refine, improve, or sharpen a prompt, do prompt engineering, write a system prompt, or make AI instructions more effective.
Scope
In scope:
- Behaviors described in
SKILL.mdand routed via the should_trigger phrasings indistillery/tests/fixtures/triggers/ia-refine-prompt.jsonl. - Updates to runtime behavior, structure, trigger precision, references, and validation.
Out of scope:
- Acting as the runtime instructions themselves (those live in
SKILL.md). - Trigger phrasings already covered by adjacent
ia-*skills (validate-pluginflags >70% description overlap as DUPLICATE_TRIGGER). - <!-- to fill in: domain-specific exclusions when the skill drifts -->
Trigger Context
- Class:
meta - Hook regex:
plugins/whetstone/hooks/skill-patterns.sh->SKILL_PATTERNS[ia-refine-prompt] - Common requests (from fixture should_trigger):
- "refine this prompt to get better code generation results"
- "optimize the prompt for the summarization task"
- "rewrite this prompt to be precise and structured"
- Should not trigger for (from fixture should_not_trigger):
- "set up a Kubernetes deployment for the API"
- "write a migration to add soft deletes"
- "write the documentation for this API"
Source And Evidence Model
Authoritative sources:
SKILL.md-- runtime instructions and reference routing.references/*.md-- bundled supplementary content (0 file(s)).distillery/tests/fixtures/triggers/ia-refine-prompt.jsonl-- positive and negative trigger phrasings under regression test.plugins/whetstone/hooks/skill-patterns.sh-- regex pattern that fires this skill.distillery/.eval-data/ia-refine-prompt/-- harvested session examples (when present).
Data that must not be stored in this skill or its references:
- Secrets, credentials, tokens.
- Machine-specific filesystem paths (
/home/...,/Users/...,~/ai/...). The validator (MACHINE_PATH_LEAK) flags these as HIGH. - Private URLs, customer data, or unredacted personal information.
Coverage matrix
| Dimension | Status | Evidence |
|---|---|---|
| Trigger fixtures | complete | distillery/tests/fixtures/triggers/ia-refine-prompt.jsonl (>=5 should_trigger, >=5 should_not_trigger) |
| Hook regex pattern | complete | plugins/whetstone/hooks/skill-patterns.sh (SKILL_PATTERNS[ia-refine-prompt]) |
| Reference architecture | n/a | no references; SKILL.md is self-contained |
| Real-usage signal | <!-- populated by harvest-sessions when sessions exist --> | distillery/.eval-data/ia-refine-prompt/ (created by harvest-sessions) |
Evaluation
Lightweight (run on every change):
python3 distillery/scripts/distiller.py validate-plugin --component ia-refine-prompt
python3 distillery/scripts/distiller.py test-triggers --skill ia-refine-promptDeeper (when behavior risk warrants):
python3 distillery/scripts/distiller.py dspy-eval ia-refine-prompt
python3 distillery/scripts/distiller.py diagnose-negatives ia-refine-promptAcceptance gates:
validate-plugin --component ia-refine-promptreturns 0 HIGH findings.test-triggers --skill ia-refine-promptreturns F1 = 1.0 with floors of 5 should_trigger and 5 should_not_trigger.- For dspy-eval, the composite score does not regress against the most recent saved baseline (see
distillery/.eval-data/ia-refine-prompt/history.json).
Known Limitations
<!-- to fill in over time as drift surfaces. Default rule: any time diagnose-negatives surfaces a recurring failure pattern, document it here so future maintainers understand the trade-off the current implementation accepts. -->
Maintenance Notes
- Update
SKILL.mdwhen the runtime workflow, branch conditions, or output contract changes. - Update this
SPEC.mdwhen intent, scope, evidence model, evaluation gates, or maintenance expectations change. - Update the trigger fixture when adding new positive phrasings, removing stale ones, or expanding scope (the 5/5 floor is a hard validator gate).
- Update the hook regex in
skill-patterns.shwhenever fixture positives expose a missed phrasing; verify F1 = 1.0 witheval-triggersbefore committing. - Run the full release pipeline via
/release-- never bump versions or update CHANGELOG.md from a per-skill edit.