# Idd Rewrite Prompt

> Guided rewrite of a prompt using the IDD Goal/Requirements/Constraints/Output structure. Collects each section interactively, generates the rewritten prompt, and optionally writes it to a file. Use when: "rewrite this prompt", "improve my prompt", "apply IDD to this", "IDD-ify this prompt".

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

---


## Stopping Points

Ask for the original prompt (to use as a starting point):

```
ask_user_question:
  header: "Original prompt"
  question: "Paste your existing prompt, or type 'new' to start from scratch."
  type: text
  defaultValue: ""
```

If an existing prompt is provided, read it and extract any existing Goal/Requirements/
Constraints/Output elements. These become the default values for the next four questions.

---

## Collect the Four IDD Sections

Ask each section separately with `ask_user_question`:

**Section 1 — Goal:**
```
ask_user_question:
  header: "Goal"
  question: "What is the desired state or outcome? What should be true after this prompt executes?"
  type: text
  defaultValue: "<extracted from original, or empty>"
```

**Section 2 — Requirements:**
```
ask_user_question:
  header: "Requirements"
  question: "What are the intent statements — what should happen, in outcome terms (not steps)? List one per line."
  type: text
  defaultValue: "<extracted from original>"
```

**Section 3 — Constraints:**
```
ask_user_question:
  header: "Constraints"
  question: "What are the scope limits, safety rules, and what-not-to-do? List one per line."
  type: text
  defaultValue: "<extracted from original>"
```

**Section 4 — Output:**
```
ask_user_question:
  header: "Output"
  question: "What does success look like? Include format, stdout summary, and any Glass Box signals."
  type: text
  defaultValue: "<extracted from original>"
```

---

## Generate and Present

Synthesise the four sections into a well-formatted IDD prompt:

```
[Goal]
<goal>

[Requirements]
<bullet list of requirements>

[Constraints]
<bullet list of constraints>

[Output]
<output specification>
```

Show the result and the IDD score delta (before vs. after if an original was provided).

Then ask:

```
ask_user_question:
  header: "Result"
  question: "What would you like to do with the rewritten prompt?"
  options:
    - label: "Write to a file"
      description: "Save to a path you specify"
    - label: "Copy to clipboard"
    - label: "Evaluate it"
      description: "Run the evaluate-prompt skill on the result"
    - label: "Done"
```

If "Write to a file":
```
ask_user_question:
  header: "File path"
  question: "Where should I save the prompt?"
  type: text
  defaultValue: ".cortex/prompts/my-prompt.md"
```
Then write the file.

