mcpField
R
refine-prompt

refine-prompt

github.com/paulrbergAgent workflows10455 installsUpdated today
Repository

About refine-prompt

refine-prompt is a skill that turns a request into a structured, ready-to-copy prompt using techniques such as role definition and output constraints. It also instructs the user to display the prompt and save it in `.ai/PROMPT.md`.

Key features

  1. 01Generate an optimized prompt
  2. 02Define role and task clearly
  3. 03Specify output format and constraints
  4. 04Display the prompt in a code block
  5. 05Append or create `.ai/PROMPT.md`

Use cases

  1. 01Turn a rough request into a detailed prompt
  2. 02Set output requirements for an AI task
  3. 03Create reusable prompt text
  4. 04Save prompts in a project file

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/paulrberg/agent-skills --skill refine-prompt

After installing, type/refine-promptin Claude Code to confirm it loaded.

Details

From the project README

Context

  • Working directory: !pwd
  • Request: $ARGUMENTS

Task

You are an expert prompt engineer. Create an optimized prompt based on $ARGUMENTS.

1. Craft the Prompt

Apply relevant techniques:

  • Few-shot examples (when helpful)
  • Chain-of-thought reasoning
  • Role/perspective setting
  • Output format specification
  • Constraints and boundaries
  • Self-consistency checks

Structure with:

  • Clear role definition (if applicable)
  • Explicit task description
  • Expected output format
  • Constraints and guidelines
2. Display the Result

Show the complete prompt in a code block, ready to copy:

[Complete prompt text]

Briefly note which techniques you applied and why.

3. Save to .ai/PROMPT.md

First ensure the directory exists: mkdir -p .ai

If .ai/PROMPT.md exists:

Read current contents and append:

---

## [Brief title from $ARGUMENTS]

[The optimized prompt]

If .ai/PROMPT.md does not exist:

Create with:

# Optimized Prompts

## [Brief title from $ARGUMENTS]

[The optimized prompt]

Confirm: "Saved to .ai/PROMPT.md"

Comments

Markdown supported