<< All versions

Skill v1.0.1

currentAutomated scan100/100
automagik-dev/genie/refine

+5 new

──Details
PublishedAugust 14, 2026 at 01:24 AM
Content Hashsha256:fc3b04c4f0ffe1d7...
Git SHAb0aa39047968
Bump Typepatch
Compare with v1.0.0
──Files
Files (1 file, 2.8 KB)
SKILL.md2.8 KBactive
SKILL.md · 52 lines · 2.8 KB

version: "1.0.1" name: refine description: "Transform a brief or prompt into a structured, production-ready prompt via prompt-optimizer. File or text mode."


refine — Prompt Optimizer

Runtime syntax: invoke the plugin copy through the active runtime's owner-qualified skill selector; use a bare selector only when intentionally selecting a user-tier copy (a separately installed personal copy; Genie no longer seeds this tier). Cross-skill prose below uses bare names as portable semantic routes; the orchestrator resolves the selector for the active runtime.

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. Load the optimizer prompt: at dispatch time, Read prompts/optimizer.md (relative to this skill's directory — skills/refine/prompts/optimizer.md). Its full contents are the refiner's system prompt.
  4. Dispatch refiner subagent: system prompt = the full text of prompts/optimizer.md; user message = the input. Single turn.
  5. Write output: file mode overwrites the source file in place; text mode writes to /tmp/prompts/<slug>.md.
  6. Report: lead with the path of the written file — that is the deliverable.

Modes

File modeText mode
Invocationrefine @path/to/file.mdrefine <text>
Inputfile contents (strip @ prefix)the raw argument
Outputoverwrite the same file/tmp/prompts/<slug>.md (mkdir -p /tmp/prompts/ first)
Reportthe updated file paththe created file path

Slug: <unix-timestamp>-<word1>-<word2>-<word3> — first 3 words, lowercased, hyphenated. Example: 1708190400-fix-auth-bug.

Subagent Contract

The refiner is a single-turn subagent: input in, optimized prompt out.

  • System prompt: the full contents of prompts/optimizer.md — passed whole, never summarized.
  • Input: the raw text or file contents as the user message.
  • Output: optimized prompt body only — no labels, meta-commentary, rationale, or follow-up questions.
  • No tool calls. Receive input, produce output, terminate.

Rules

  • Preserve the original intent — the simplest rewrite that satisfies the input, no added features or scope.
  • Never execute the prompt — only rewrite it.
  • Never enter a clarification loop — act on what you have, single turn.
  • Never add wrapper text or status messages to the output file.
  • File mode overwrites in place; text mode writes only to /tmp/prompts/.
← v1.0.0All versions