Skip to content
Back to skills

Refine Prompt

ASecurity

This skill should be used when the user asks to "refine a prompt", "optimize a prompt", "improve my prompt", "rewrite prompt for LLM", "craft a better prompt", or mentions prompt engineering, prompt optimization, or appending to PROMPT.md.

  • 666 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
ai-agentsbash

Security analysis

A100/100

Scanned September 2, 2026

npx -y skills add majiayu000/claude-skill-registry --skill refine-prompt --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Refine Prompt?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Refine Prompt
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-refine-prompt-claude-skill-registry/badge)](https://www.skillsdirectory.com/skills/majiayu000-refine-prompt-claude-skill-registry)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
allowed-tools: Bash(mkdir:*), Read, Write, Glob
argument-hint: '[prompt-request]'
disable-model-invocation: true
model: opus
name: refine-prompt
user-invocable: true
description: This skill should be used when the user asks to "refine a prompt", "optimize a prompt", "improve my prompt", "rewrite prompt for LLM", "craft a better prompt", or mentions prompt engineering, prompt optimization, or appending to PROMPT.md.
---

## 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"

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.