PaulRBerg

refine-prompt

2
0
# Install this skill:
npx skills add PaulRBerg/dot-agents --skill "refine-prompt"

Install specific skill from multi-skill repository

# Description

Optimize prompts for LLMs and append to PROMPT.md

# SKILL.md


name: refine-prompt
argument-hint: '[prompt-request]'
disable-model-invocation: true
allowed-tools: Bash(mkdir:*), Read, Write, Glob
description: Optimize prompts for LLMs and append to PROMPT.md
model: opus


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"

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.