refine-prompt

refine-prompt is a skill for Claude Code, Codex from iliaal/ai-skills. It costs 44 tokens per session (1,520 once invoked), scanned A, original, MIT.

A method for rewriting vague requests into precise instructions for an AI system.

In plain words
What is it for?
Use it to improve prompts, write system instructions, or make an AI task easier to interpret consistently.
Why use it?
It exposes missing details about the task, constraints, context, output, and edge cases before the instruction is used.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: names the AskUserQuestion tool; mentions Claude Code; mentions Codex.

Good fit Use it to improve prompts, write system instructions, or make an AI task easier to interpret consistently.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/ai-skills/refine-prompt
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add iliaal/ai-skills --skill refine-prompt
Clone the repo
git clone --depth 1 https://github.com/iliaal/ai-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for refine-prompt

README.md
[![agentmods](https://agentmods.dev/badge/skills/iliaal/ai-skills/refine-prompt/github.svg)](https://agentmods.dev/skills/iliaal/ai-skills/refine-prompt)
Your own site
<a href="https://agentmods.dev/skills/iliaal/ai-skills/refine-prompt"><img src="https://agentmods.dev/badge/skills/iliaal/ai-skills/refine-prompt/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for refine-prompt

Your own site · 80×15
<a href="https://agentmods.dev/skills/iliaal/ai-skills/refine-prompt"><img src="https://agentmods.dev/badge/skills/iliaal/ai-skills/refine-prompt.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,520 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 57
    Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
    Fix: Add human-in-the-loop confirmation for destructive, irreversible, or high-impact operations. Never auto-execute commands that modify files, send data, or alter system state.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.01520
Opus 5 $0.00022 $0.00760
Sonnet 5 $0.00009 $0.00304
Haiku 4.5 $0.00004 $0.00152

Measured 3d ago against content hash 35582af28aae, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

refine-prompt scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/refine-prompt/SKILL.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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?
Reader Will a model parse this with no human available to disambiguate? If yes, apply Machine-Parsed Text below.
  1. Rewrite -- Transform into specification language: precise, imperative, no filler. Treat the prompt as a spec, not conversation.

  2. 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.
  • A line must change behavior. "Cut what's vague" and "cut what the model already does" are different filters, and the second removes far more -- every line reads as non-vague once it is imperative. If the model would act that way by default, delete the whole sentence rather than trimming words from it. The recurring offender is encouragement it already follows: "be careful", "be thorough", "think it through", "make sure to".
  • Name the concept, don't explain it. Use terms the model knows (idempotent, invariant, race condition, TOCTOU, YAGNI) instead of spelling them out. Spell out only terms the project invented, once, in one place.
  • State a rule once. If the same rule appears in two sections, cut one and point to the other.
  • Pair every prohibition with the positive target. Steering by ban drags the forbidden behavior into context and makes it more available, not less -- the negation is a weak modifier riding on a strongly activated concept. Prompt the target instead ("write one-line comments" rather than "don't write long comments") so the banned behavior is never named. A bare prohibition earns its place only as a hard guardrail whose whole content is the refusal, with no behavior to substitute. Everywhere else the check is mechanical: every never and don't line states its replacement behavior.
  • 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.
  • Give the reason, not just the rule. A dense block of MUST/CRITICAL anchors the model on the instruction at the expense of the context it applies to, and bare imperatives compete rather than compound. Keep them few and motivated: state what the rule prevents in the same sentence, so the model generalizes to the case the rule did not name.
  • No meta-commentary -- output only the refined prompt as markdown. No preamble ("Here's an improved version..."), no explanation of changes unless explicitly requested.

Read the full file on GitHub · 87 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago Changed · +1 lines 35582af28aae
  2. 12d ago First seen · 86 lines · 44 tokens per session scan A 85b08e169fe9

Subscribe to this mod's changes

refine-prompt is a skill published in the GitHub repository iliaal/ai-skills (41 stars, last pushed 4d ago), licensed MIT. It adds 44 tokens to every session and 1,520 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

prompt-engineer

Expert prompt engineering for AI systems. Use when the user wants to write or review prompts for AI, create instructions for AI systems, build system prompts, review or improve existing prompts, optimize AI instructions, or create any form of written communication intended for AI consumption (Claude, GPT, or other…

SZoloth/skill-pack · 66 tokens

ai-agent-rag-governance

Use this capability for AI features, RAG, citations, model-agnostic prompts, evals, hallucination reduction, prompt injection, tool use, agent sandboxes, policy gates, audit trails, autonomy levels, human approval, and AI-assisted coding governance.

KyaniteLabs/checkyourself · 61 tokens

prompt-testing

Use this skill when you need to test prompt behavior, regression risk, and output boundaries across versions; triggers include prompt testing.

naodeng/awesome-qa-skills · 28 tokens

partner-anthropic

Anthropic intelligence — Claude model family, Claude Code, MCP protocol, Claude for Work programs, May 2026 state, Frank's relationship state, integration patterns. Use when generating Anthropic content, writing about Claude/MCP/Claude Code, partnership-conversation prep for Anthropic, or evaluating new Anthropic…

frankxai/claude-skills-library · 69 tokens

prompt-hub

Compose the 13-agent Prompt Hub team via @prompt-conductor. Use when designing prompts, optimizing prompts, evaluating prompts, importing patterns from Fabric / awesome-chatgpt-prompts / awesome-claude-prompts, running IFS introspection or psychometric profiling, or building knowledge-base prompt sets. Auto-trigger on…

frankxai/claude-skills-library · 147 tokens

prompt-modeler

Generate structured strategic prompts with diagnostic and multiple options. Triggers on: /modelar-prompt.

chidekina/aria-superpowers · 24 tokens