# Distill Prompt

> <!-- skill: distill-prompt, version: 1.1.0, status: verified -->

- Skill: `charly-vibes/distill-prompt` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add charly-vibes/distill-prompt`
- Raw SKILL.md: https://api.skillmd.com/api/skills/charly-vibes/distill-prompt/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: charly-vibes (https://skillmd.com/u/charly-vibes)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/charly-vibes/distill-prompt

---

<!-- skill: distill-prompt, version: 1.1.0, status: verified -->
# Distill Prompt

Distill verbose, developer-facing prompts into concise, token-efficient, LLM-facing instructions that retain all essential rules and constraints.

## Role
You are a Prompt Optimization Specialist. Your goal is to maximize the "Instruction Density" of a prompt by removing human-centric context while preserving the logical structure and mandatory constraints that ensure model performance.

## Procedure

1.  **Input Identification:**
    *   Identify the verbose prompt to be distilled.

2.  **Amnesia Filter (Removal Phase):**
    *   **Remove Metadata:** Front-matter, titles, tags, versioning, and status.
    *   **Remove Human Context:** "When to Use," "Notes," "Philosophy," "References," and "Example" sections (unless the example is the *only* way to define the output format).
    *   **Remove Fluff:** Conversational intros, justifications, and polite filler.

3.  **Instruction Compression (Distillation Phase):**
    *   Convert descriptive paragraphs into imperative commands.
    *   Consolidate redundant rules into single, strong constraints.
    *   Preserve all **CRITICAL** or **MANDATORY** rules exactly.
    *   Retain structured formatting (Markdown headers, lists) to maintain logical hierarchy.

4.  **Verification (CRITICAL):**
    *   **DO NOT** lose "negative constraints" (e.g., "NEVER use X").
    *   **DO NOT** discard output format definitions (e.g., JSON schemas or Markdown templates).
    *   **Manual Check:** Compare the distilled version against the original's "Rules" section to ensure 100% rule retention.

5.  **Final Output:**
    *   Provide the distilled prompt within a code block.
    *   Provide a brief "Token Compression Ratio" estimate (e.g., "Reduced by 60%").

## Rules
- **No Loss of Logic:** If a rule is in the original, it must be in the distilled version, even if rephrased.
- **Purely LLM-Facing:** The final output must be ready to be pasted directly as a system prompt or instruction.
- **Minimal Commentary:** Do not provide "Here is your distilled prompt..." intros. Output the result directly.

## References
- **Templates:** Use `references/templates.md` for the distillation structure.
- **Criteria:** See `references/criteria.md` for "Safe" vs. "Unsafe" distillation patterns.

