prompt-refinement

prompt-refinement is a skill for Claude Code, Codex from josix/agent-flow. It costs 36 tokens per session (1,806 once invoked), scanned A, original, MIT.

A skill for turning vague requests into clear task instructions that multiple coding agents can carry out and verify. It focuses on defining the goal, steps, scope, and success conditions.

In plain words
What is it for?
Use it to clarify ambiguous work, prepare tasks for orchestration or planning commands, identify missing requirements, and define outcomes that can be checked.
Why use it?
It prevents agents from guessing what “fix it” or “make it better” means when the target, requirements, or expected result are unclear.

Skill for Claude CodeCodex

Part of the agent-flow plugin — 11 skills, 5 commands, 6 agents, 9 hooks, 2 MCP servers shipped together

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.

agentmods
npx agentmods add skills/josix/agent-flow/prompt-refinement
Any agent
npx skills add josix/agent-flow --skill prompt-refinement
Clone the repo
git clone --depth 1 https://github.com/josix/agent-flow

Made for: Claude Code, Codex.

Or install agent-flow, the plugin that ships this one along with the rest of its 11 skills, 5 commands, 6 agents, 9 hooks, 2 MCP servers.

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 prompt-refinement

README.md
[![agentmods](https://agentmods.dev/badge/skills/josix/agent-flow/prompt-refinement.svg)](https://agentmods.dev/skills/josix/agent-flow/prompt-refinement)
Your own site
<a href="https://agentmods.dev/skills/josix/agent-flow/prompt-refinement"><img src="https://agentmods.dev/badge/skills/josix/agent-flow/prompt-refinement.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,806 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00036 $0.01806
Opus 5 $0.00018 $0.00903
Sonnet 5 $0.00007 $0.00361
Haiku 4.5 $0.00004 $0.00181

Measured 4d ago against content hash eb9c1e4426e7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prompt-refinement 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 4d 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.

skills/prompt-refinement/SKILL.md · 254 lines

How it starts

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

Prompt Refinement

Overview

Prompt refinement transforms ambiguous or incomplete user requests into clear, structured task specifications suitable for multi-agent orchestration. This skill bridges natural language input and the precise specifications required by downstream agents.

Purpose

Ensure tasks entering the orchestration pipeline have:

  • Clear Objectives: A single, well-defined goal that can be verified
  • Actionable Steps: Concrete actions that agents can execute
  • Measurable Outcomes: Success criteria that verification agents can check
  • Appropriate Scope: Boundaries that prevent scope creep

When to Use This Skill

Apply prompt refinement when:

  • User input contains ambiguous terms ("fix it", "make it better")
  • The request lacks specific targets (files, components, systems)
  • Multiple interpretations of the request are possible
  • Pre-processing is required for /orchestrate or /plan commands

Key Principles

  1. Ask First, Act Second: When genuinely ambiguous, clarify before proceeding
  2. One Question at a Time: Never overwhelm users with multiple clarification requests
  3. Provide Options: Give concrete choices to speed up clarification
  4. Default Gracefully: Make reasonable assumptions when users don't respond
  5. Preserve Intent: Refinement should clarify, not change the user's goal

Refinement Template

Standard Format

**Goal**: <one-sentence objective stating what will be accomplished>

**Description**: <2-3 sentences providing context and scope>

**Actions**:
1. <specific, atomic action with clear target>
2. <specific, atomic action with clear target>
3. ...

**Constraints**: <what must not be broken, changed, or violated>

**Assumptions**: <what is taken for granted — surfaces risks early>

Template Guidelines

Field Requirements Example
Goal Single sentence, verb-first, specific outcome "Implement rate limiting on /api/users endpoint"
Description Context, scope boundaries "Add rate limiting to prevent API abuse. Limit to 100 req/min per IP."
Actions Numbered, ordered, atomic steps "1. Explore existing middleware patterns"
Constraints Non-negotiable requirements; what must stay intact "Must not alter existing auth cookie format"
Assumptions Preconditions taken for granted "Redis is already provisioned"

Read the full file on GitHub · 254 lines

Files

What ships with it

5 files 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. 4d ago First seen · 254 lines · 36 tokens per session scan A eb9c1e4426e7

Subscribe to this mod's changes

prompt-refinement is a skill published in the GitHub repository josix/agent-flow (7 stars, last pushed 19d ago), licensed MIT. It adds 36 tokens to every session and 1,806 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-31.

Related

Other skills, from other repositories

commonly

You are a member of a Commonly workspace — a shared space where humans and AI agents from any origin collaborate in pods (chat rooms with memory). Use this whenever you are connected to Commonly via the commonly MCP tools: to read what's happening, post, remember things across sessions, react, DM other agents, and…

Team-Commonly/commonly · 0 tokens

pandic-office

Convert Markdown to PDF (or DOCX/EPUB/HTML) using the pandoc CLI. Use when asked to produce a PDF report, brief, summary, or any document where the input is Markdown and the output should be a polished, paginated file.

Team-Commonly/commonly · 59 tokens

tmux

Manage long-running shell sessions with tmux — start a detached session, run a long task, reattach later, capture output. Use when a task takes longer than a single tool call (build, test, log tail).

Team-Commonly/commonly · 48 tokens

ship-and-babysit

End-to-end PR shipping workflow for tinyhumansai/openhuman: commit local changes, push to the user's fork, open or reuse a PR against main, then babysit CI and CodeRabbit feedback until the PR is green and clean. Use when the user asks to ship, open a PR, monitor CI, address review comments, or 'babysit' a branch.

tinyhumansai/openhuman · 83 tokens

shogun-screenshot

スクリーンショットの取得・加工を行う。ローカルスクショから最新画像を取得、 PlaywrightでWebページをキャプチャ、画像のトリミング・リサイズ、機微情報を黒塗りマスキング。 記事執筆、レポート作成、UI確認、画像加工時に起動。 「スクショ」「スクリーンショット」「画面キャプチャ」「最新のスクショ」「画像加工」「トリミング」「マスク」「写メ」「写メ撮った」「スクショ撮った」で起動。 Do NOT use for: 画像生成(shogun-imagegenを使え)。.

yohey-w/multi-agent-shogun · 149 tokens

shogun-agent-status

全エージェント(家老・足軽1-7・軍師)の稼働状態を一覧表示するスキル。tmux pane状態(稼働中/待機中/不在)とタスクYAML状態(taskid, status)と未読inbox数を統合表示。「稼働確認」「エージェント状態」「布陣確認」「agent status」で起動。.

yohey-w/multi-agent-shogun · 98 tokens