refine

Solid

Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode.

AI & Automation 321 stars 53 forks Updated today MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /refine — Prompt Optimizer Transform any brief, draft, or one-liner into a production-ready structured prompt. ## When to Use - User wants to improve a prompt or brief - User references `/refine` with text or a file path - A worker needs to optimize a prompt before dispatching it ## Flow 1. **Detect mode:** argument starts with `@` -> file mode; otherwise -> text mode. 2. **Read input:** file mode reads the target file; text mode uses the raw argument. 3. **Spawn refiner subagent:** system prompt = the Prompt Optimizer System Prompt below. Send input as the user message. 4. **Receive output:** the subagent returns the optimized prompt body only. 5. **Write output:** file mode overwrites the source file in place; text mode writes to `/tmp/prompts/<slug>.md`. 6. **Report:** print the path of the written file. ## Modes ### File Mode Invocation: `/refine @path/to/file.md` | Step | Action | |------|--------| | Parse | Strip `@` prefix to get target file path | | Read | Load file contents as refiner input | | Write | Overwrite the same file with optimized output | | Return | Print the file path that was updated | ### Text Mode Invocation: `/refine <text>` | Step | Action | |------|--------| | Setup | `mkdir -p /tmp/prompts/` | | Slug | `<unix-timestamp>-<word1>-<word2>-<word3>` (first 3 words, lowercased, hyphenated) | | Write | Save optimized output to `/tmp/prompts/<slug>.md` | | Return | Print the created file path | Example slug: `1708190400-fix-auth-bug` ## Subag...

Details

Author
automagik-dev
Repository
automagik-dev/genie
Created
10 months ago
Last Updated
today
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

refine-prompt

Transforms vague or rough prompts into precise, structured AI instructions. Use when asked to "refine prompt", "improve prompt", "make this prompt better", "promptify", "optimize prompt", "rewrite prompt", "enhance prompt", or "sharpen instructions".

20 Updated today
iliaal
AI & Automation Listed

ia-refine-prompt

Transforms vague prompts into precise, structured AI instructions. Use when asked to refine, improve, or sharpen a prompt, do prompt engineering, write a system prompt, or make AI instructions more effective.

20 Updated today
iliaal
AI & Automation Listed

prompt-optimizer

Rigorous mode prompt optimizer — audits a polished prompt, decides output architecture (single-turn vs. chained multi-stage), and rewrites it to elicit state-of-the-art output from Claude. Triages every input into OUT OF PURVIEW / BORDERLINE / IN PURVIEW; rigorous optimization (architecture decision, 9-dim diagnostic, archetype detection, capability activation) applies ONLY to IN PURVIEW. When chain signals fire, produces a chain deliverable (README + Project orchestrator + per-stage prompts) instead of a single-turn prompt. Simple prompts return substantially unchanged with a triage note. Use when the user asks to optimize, audit, score, diagnose, sharpen, or level up a prompt; trigger phrases include "optimize this prompt", "PO this", "run this through the optimizer", "sharpen this prompt". For messy dictated or flow-state input, a separate flow-mode counterpart exists. Do NOT trigger when the user wants the prompt EXECUTED rather than optimized.

0 Updated 5 days ago
viktor-milev
AI & Automation Listed

prompt-optimizer

Prompt analysis and optimization workflow for turning rough requests into clearer task prompts. Use when the user asks to improve or rewrite a prompt.

0 Updated today
JunMystery
AI & Automation Listed

prompt-engineer

Optimize system prompts for Claude Code agents using proven prompt engineering patterns. Use when users request prompt improvement, optimization, or refinement for agent workflows, tool instructions, or system behaviors.

34 Updated today
rjmurillo