# skill.cc/imagine

> **Generate images from descriptions.**

---

## Quick Start

```
Agent: Mount skill.cc/imagine
Human: "Generate an image of..." / "Visualize this concept"
```

---

## What You Get

- **Text-to-image generation** — Describe what you want, get an image
- **Concept visualization** — Turn abstract ideas into visuals
- **Iterative refinement** — Improve images through conversation
- **Style control** — Photorealistic, illustration, diagram, etc.

---

## Usage

### Basic Generation
```
imagine.create(prompt)                    → Generate image from prompt
imagine.create(prompt, style="diagram")   → With style guidance
imagine.create(prompt, size="1024x1024")  → With size
```

### Iterative
```
imagine.refine(previous_image, "make it more colorful")
imagine.variations(image, n=4)
```

### For Humans
```
"Generate an image of a mind palace floating in space"
"Visualize this architecture as a diagram"
"Create a logo for skill.cc"
"Draw what you think this concept looks like"
```

---

## Platform Routing

| Platform | Implementation |
|----------|----------------|
| Claude.ai | Request via artifact or external generation |
| Claude Code (Mac) | Gemini API via `/gemini` skill |
| Claude Code (Mac) | OpenAI DALL-E 3 via API |
| API | Integrate with image generation service |

---

## Claude Code Implementation (Mac)

Claude Code doesn't have native image generation, but can invoke external services:

### Option 1: Gemini (Recommended)
```bash
# Use the gemini skill for image generation
gemini -p "Generate an image: [your prompt]"
```

Gemini has Imagen integration for image generation.

### Option 2: OpenAI DALL-E 3
```bash
# Via OpenAI API
curl https://api.openai.com/v1/images/generations \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "dall-e-3",
    "prompt": "your prompt here",
    "n": 1,
    "size": "1024x1024"
  }'
```

### Option 3: Replicate (Various Models)
```bash
# Via Replicate API
curl -X POST https://api.replicate.com/v1/predictions \
  -H "Authorization: Token $REPLICATE_API_TOKEN" \
  -d '{"version": "...", "input": {"prompt": "..."}}'
```

---

## Configuration

```yaml
# ~/.skillcc/imagine.yaml

# Preferred provider
default_provider: gemini

providers:
  gemini:
    enabled: true
    via: /gemini skill

  openai:
    enabled: true
    model: dall-e-3
    api_key: ${OPENAI_API_KEY}

  replicate:
    enabled: false
    api_token: ${REPLICATE_API_TOKEN}
    model: stability-ai/sdxl

output:
  directory: ~/Mind Palace/canvas/generated/
  auto_persist: true
  tags: [generated, imagine]
```

---

## Mind Palace Integration

Generated images are automatically saved:

```
imagine.create(prompt) → image
  → saves to ~/Mind Palace/canvas/generated/[timestamp].png
  → persists metadata to memory
  → searchable: memory.search("generated image of X")
```

---

## Style Presets

| Style | Description |
|-------|-------------|
| `photorealistic` | Photo-quality, realistic |
| `illustration` | Digital art, illustration style |
| `diagram` | Technical diagram, flowchart |
| `sketch` | Hand-drawn, sketch style |
| `abstract` | Abstract, conceptual |
| `logo` | Clean, logo-appropriate |
| `ui` | UI/UX mockup style |

---

## Examples

### Concept visualization
```
Human: "Visualize the skill.cc architecture"
Agent: [generates] Architecture diagram showing layers and connections...
```

### Creative generation
```
Human: "Generate a mind palace floating in a nebula"
Agent: [generates] Ethereal palace structure among cosmic clouds...
```

### Technical diagram
```
Human: "Create a diagram of the bridge architecture"
Agent: [generates] Clean technical diagram showing claude.ai ↔ CC ↔ API flow...
```

---

## Output Handling

Generated images are:
1. **Saved locally** — `~/Mind Palace/canvas/generated/`
2. **Metadata persisted** — Prompt, timestamp, provider stored
3. **Viewable** — Returned path can be opened or served
4. **Searchable** — "Find images I generated about X"

---

## Related Skills

- `skill.cc/eyes` — See and analyze images (complement)
- `skill.cc/dream` — Continuous generation stream
- `skill.cc/persist` — Save to memory
- `skill.cc/craft` — Create custom generation pipelines

---

*Describe it. See it.*

---

*Parent: skill.cc*