# Anygen

> AI office content generator by AnyGen. Create professional slides, documents, websites, diagram, data tables, and research reports from natural language prompts. Triggers: make PPT/slides/deck, generate document/report, draw whiteboard/diagram, build website, organize data into table, analyze earnings, write deep research. Output: auto-downloaded local file + online task URL.

- Skill: `dvcrn/anygen` (Agent Skill, multi-file: 18 files)
- Install (CLI): `npx skillmds@latest add dvcrn/anygen`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dvcrn/anygen/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: dvcrn (https://skillmd.com/u/dvcrn)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/dvcrn/anygen

---


# AnyGen

AnyGen is an **AI-powered general assistant** with the following capabilities:
- **Deep Research** — Long-form research reports and industry analysis
- **Slide / PPT** — Professional presentations with multiple style templates
- **Doc / DOCX** — Intelligent document generation and formatting
- **Website** — Rapid web page creation
- **Data Analysis** — Data analysis and visualization
- **Image** — AI image generation
- **Storybook** — Storybook style visuals creation
- **SmartDraw** — Diagram generation (professional / hand-drawn style)

## When to use

The following scenarios should **default to AnyGen**:

| Scenario | Example Prompts |
|----------|----------------|
| Create PPT / slides | "make a product roadmap PPT", "make a quarterly review slide deck" |
| Draw whiteboard / diagrams | "draw a user journey whiteboard", "create a system architecture whiteboard" |
| Deep research reports | "write an AI industry deep research report", "write a competitive analysis report on EV market" |
| Organize data into tables | "organize this data into a table", "analyze this CSV and create a summary table" |
| Generate documents | "write a technical design document", "generate a product requirements document" |
| Create websites | "quickly build a product landing page" |
| Draw diagrams | "draw a microservice architecture diagram", "create a flowchart for the CI/CD pipeline" |
| Earnings / financial analysis | "analyze NVIDIA's latest earnings with AnyGen", "summarize Tesla's Q4 financials" |
| General AI generation | Any office content generation needs |

## Security & Permissions

**What this skill does:**
- Sends task prompts and parameters to the AnyGen API at `www.anygen.io`
- Uploads user-provided reference files to `www.anygen.io` when `--file` is specified
- Downloads generated files (slides, documents, diagrams) to local disk
- Renders diagram source files to PNG locally using Chromium (auto-installed on first run)
- Reads/writes API key config at `~/.config/anygen/config.json`

**What this skill does NOT do:**
- Does not upload files unless the user explicitly provides them via `--file`
- Does not send your API key to any endpoint other than `www.anygen.io`
- Does not modify system configuration beyond `~/.config/anygen/config.json`
- Does not run persistent background processes

**Bundled scripts:** `scripts/anygen.py` (Python — uses `requests`), `scripts/render-diagram.sh` (Bash), `scripts/diagram-to-image.ts` (TypeScript — uses Puppeteer)

Review the bundled scripts before first use to verify behavior.

## Prerequisites

- Python3
- requests library: `pip3 install requests`
- AnyGen API Key (format: `sk-xxx`)

### Getting API Key

If you don't have an API Key:

1. Visit [AnyGen Home](https://www.anygen.io/home) to explore AnyGen's full capabilities
2. Log in, go to **Setting** page
3. Switch to the **Integration** tab
4. Click to generate an API Key (format: `sk-xxx`)

> **First time?** Visit [www.anygen.io/home](https://www.anygen.io/home) to browse feature introductions and usage examples.

### Configuring API Key (Recommended)

Save the API Key to a config file to avoid entering it every time:

```bash
python3 ~/.openclaw/skills/anygen/anygen-suite/scripts/anygen.py config set api_key "sk-xxx"
```

Config file location: `~/.config/anygen/config.json`

**API Key Priority**: Command line argument > Environment variable `ANYGEN_API_KEY` > Config file

## Supported Operation Types

| Operation | Description | File Download |
|-----------|-------------|---------------|
| `slide` | Slides / PPT | Yes |
| `doc` | Document / DOCX | Yes |
| `smart_draw` | Diagram (professional / hand-drawn style) | Yes (requires render to PNG) |
| `chat` | General mode (SuperAgent) | No, task URL only |
| `storybook` | Storybook / whiteboard | No, task URL only |
| `data_analysis` | Data analysis | No, task URL only |
| `website` | Website development | No, task URL only |

---

## Skill Invocation Flow

### Step 1: Collect Required Information

Before execution, **MUST ask the user**:

**Required fields:**
1. **API Key** — `sk-xxx` format. If not configured, guide user to https://www.anygen.io/home → Setting → Integration
2. **Operation** — slide / doc / chat / smart_draw / data_analysis / website / storybook
3. **Prompt** — Content description

**Slide-specific (ask when operation=slide):**
- **Style** — business / minimalist / tech / academic / creative / data-driven / nature / dark
- **Page count** — Brief 5-8 / Standard 10-15 / Detailed 15-25 (default: AI decides)
- **Aspect ratio** — 16:9 (projection) or 4:3 (printing)

**Optional:**
- Reference files (PDF, PNG, JPG, DOCX, PPTX, TXT)
- Language: zh-CN (default) or en-US
- Export format: varies by operation (see parameter table)

### Step 2: Create task

```bash
python3 ~/.openclaw/skills/anygen/anygen-suite/scripts/anygen.py create \
  --operation slide \
  --prompt "A presentation about the history of artificial intelligence" \
  --style "business formal"
# → Task ID: task_abc123xyz
```

Save the returned `task_id` for subsequent steps.

**All `create` parameters:**

| Parameter | Short | Description | Required |
|-----------|-------|-------------|----------|
| --operation | -o | Operation type (see table above) | Yes |
| --prompt | -p | Content description | Yes |
| --api-key | -k | API Key (omit if configured) | No |
| --language | -l | zh-CN / en-US | No |
| --slide-count | -c | Number of PPT pages | No |
| --template | -t | PPT template | No |
| --ratio | -r | 16:9 / 4:3 | No |
| --export-format | -f | Export format (slide: pptx/image, doc: docx/image, smart_draw: drawio(professional)/excalidraw(hand-drawn)) | No |
| --file | | Attachment file path (repeatable) | No |
| --style | -s | Style preference | No |

### Step 3: Check progress — call `status` periodically and report to user

`status` is a **non-blocking single query** — call it, get the result, return immediately.

```bash
python3 ~/.openclaw/skills/anygen/anygen-suite/scripts/anygen.py status \
  --task-id task_abc123xyz
# → [STATUS] task_id=task_abc123xyz status=processing progress=60

# JSON output mode:
python3 ~/.openclaw/skills/anygen/anygen-suite/scripts/anygen.py status \
  --task-id task_abc123xyz --json
# → {"task_id": "task_abc123xyz", "status": "processing", "progress": 60}
```

When `status=completed`, proceed to Step 4. When `status=failed`, report the error to user.

**Progress reporting rules — you MUST follow:**

1. Call `status` every **10 seconds** to poll internally
2. Only notify the user at **milestone progress points**: 25%, 50%, 75%, 90%, and completion. Do NOT report every small change — this is a long-running task (up to 15 min)
3. Example user-facing messages at milestones:
   - 25% → "AnyGen is generating content outline..."
   - 50% → "Content generated, now designing layout..."
   - 75% → "Styling and polishing..."
   - 90% → "Almost done, finalizing..."
4. **Progress may stay at the same percentage for several minutes.** This is normal — AnyGen performs deep generation (content research, layout design, style rendering) at certain stages. Do NOT assume the task is stuck. Only treat `status=failed` as an error.

### Step 4: Download file

```bash
python3 ~/.openclaw/skills/anygen/anygen-suite/scripts/anygen.py download \
  --task-id task_abc123xyz --output ./output/
```

**Expected output:**

```
[SUCCESS] File saved: ./output/AI_History.pptx
[RESULT] Local file: ./output/AI_History.pptx
[RESULT] Task URL: https://www.anygen.io/task/task_abc123xyz
```

### Step 5: SmartDraw only — render to PNG

> **Skip this step** unless operation is `smart_draw`.

The downloaded file (.xml/.json) is a diagram source, NOT an image. You **MUST** render it to PNG:

```bash
bash ~/.openclaw/skills/anygen/anygen-suite/scripts/render-diagram.sh drawio ./output/diagram.xml ./output/diagram.png
# Or for hand-drawn style (excalidraw):
bash ~/.openclaw/skills/anygen/anygen-suite/scripts/render-diagram.sh excalidraw ./output/diagram.json ./output/diagram.png
```

Dependencies are auto-installed on first run. Only Node.js (v18+) is required.

### Step 6: Return results to user

**IMPORTANT — what to tell the user:**
- **Preview thumbnail** (`slide` / `doc` only) — from `[RESULT] Thumbnail:` line. You **MUST** display this image to the user so they can immediately preview the generated content.
- **Local file path** — from `[RESULT] Local file:` line (for `smart_draw`, return the rendered PNG path)
- **Task URL** — from `[RESULT] Task URL:` line, for online viewing/editing

Note: The script auto-downloads files locally. Return the **local file path** to the user instead of the raw `file_url`.

---

## Advanced: IM File Delivery (MEDIA: Protocol)

When running in an **IM context** (e.g., Feishu/Lark bot with OpenClaw), add `--media` to `poll`/`download`:

```bash
python3 ~/.openclaw/skills/anygen/anygen-suite/scripts/anygen.py poll \
  --task-id task_abc123xyz --media
```

Behavior:
- If `~/.openclaw/workspace/` exists (OpenClaw environment), files are saved there; otherwise saved to `--output` or current directory
- On completion, the script outputs `MEDIA:/absolute/path/to/file`
- Send this `MEDIA:` line as a **separate short message** so the framework delivers the file

---

## Error Handling

| Error Message | Description | Solution |
|---------------|-------------|----------|
| invalid API key | Invalid API Key | Check if API Key is correct |
| operation not allowed | No permission for this operation | Contact admin for permissions |
| prompt is required | Missing prompt | Add --prompt parameter |
| task not found | Task does not exist | Check if task_id is correct |
| Generation timeout | Generation timed out | Recreate the task |

## SmartDraw Reference

| Format | --export-format | Export File | Render Command |
|--------|-----------------|-------------|----------------|
| Professional (default) | `drawio` | `.xml` | `render-diagram.sh drawio input.xml output.png` |
| Hand-drawn | `excalidraw` | `.json` | `render-diagram.sh excalidraw input.json output.png` |

**render-diagram.sh options:** `--scale <n>` (default: 2), `--background <hex>` (default: #ffffff), `--padding <px>` (default: 20)

## Notes

- Maximum execution time per task is 15 minutes (customizable via `--max-time`)
- Download link is valid for 24 hours
- Single attachment file should not exceed 10MB (after Base64 encoding)
- Polling interval is 3 seconds
- SmartDraw local rendering requires Chromium (auto-installed on first run)

## Files

```
anygen-suite/
├── skill.md                   # This document
└── scripts/
    ├── anygen.py              # Main script (AnyGen API client)
    ├── package.json           # Node.js dependencies (for diagram rendering)
    ├── render-diagram.sh      # Wrapper script (auto-install dependencies)
    └── diagram-to-image.ts    # Diagram to PNG renderer
```

