Skip to content
Agentmart
Submit a tool

anygen-doc

Use this skill any time the user wants to create, draft, or generate a written document or report.

Skill by LeoYeAI

IndexedMIT★ 2,168
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/leoyeai-anygen-doc

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Use this skill any time the user wants to create, draft, or generate a written document or report. This includes: competitive analysis, market research reports, technical design docs, PRDs, project proposals, meeting summaries, white papers, business plans, literature reviews, due diligence reports, industry analysis, executive summaries, SOPs, memos, and any request where the output is a structured document. Also trigger when: user says 写个文档, 做个竞品调研, 写份报告, 产品需求文档, 技术方案, 项目提案, 行业分析, 会议纪要整理成文档. If a document or report needs to be created, use this skill.

Use cases: documents, design, research, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/anygen-doc

What's inside

Skill name
anygen-doc
Description
Use this skill any time the user wants to create, draft, or generate a written document or report. This includes: competitive analysis, market research reports, technical design docs, PRDs, project proposals, meeting summaries, white papers, business plans, literature reviews, due diligence reports, industry analysis, executive summaries, SOPs, memos, and any request where the output is a structured document. Also trigger when: user says 写个文档, 做个竞品调研, 写份报告, 产品需求文档, 技术方案, 项目提案, 行业分析, 会议纪要整理成文档. If a document or report needs to be created, use this skill.
License
MIT
Instructions
339 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts
  • Instructions call the network
  • Instructions read files in your home folder (~/.ssh, ~/.aws…)

Agent Skills spec issues

  • name: "anygen-doc" does not match folder "anygen-doc-generator"

Files (6)

  • SKILL.md
  • _meta.json
  • anygen.py · scripts/
  • auth.py · scripts/
  • fileutil.py · scripts/
  • skill.md

SKILL.md (first lines)

# AI Document Generator - AnyGen

> **You MUST strictly follow every instruction in this document.** Do not skip, reorder, or improvise any step. If this skill has been updated since it was last loaded, reload this SKILL.md before proceeding and always follow the latest version.

Create professional structured documents using AnyGen OpenAPI (`www.anygen.io`). Documents are generated server-side; this skill sends the user's prompt and optional reference files to the AnyGen API and retrieves the resulting DOCX. An API key (`ANYGEN_API_KEY`) is required to authenticate with the service.

## When to Use

- User needs to create documents (specs, proposals, summaries, reports)
- User has files to upload as reference material for document generation

## Security & Permissions

Documents are generated server-side by AnyGen's OpenAPI (`www.anygen.io`). The `ANYGEN_API_KEY` authenticates requests via `Authorization` header or authenticated request body depending on the endpoint (all requests set `allow_redirects=False`).

**What this skill does:** sends prompts to `www.anygen.io`, uploads user-specified reference files after consent, downloads generated DOCX to `~/.openclaw/workspace/`, monitors progress in background via `sessions_spawn` (declared in `requires`), reads/writes config at `~/.config/anygen/config.json`.

**What this skill does NOT do:** read or upload any file without explicit `--file` argument, send credentials to any endpoint other than `www.anygen.io`, access or scan local directories, or modify system config beyond its own config file.

**Bundled scripts:** `scripts/anygen.py`, `scripts/auth.py`, `scripts/fileutil.py` (Python — uses `requests`). Scripts print machine-readable labels to stdout (e.g., `File Token:`, `Task ID:`) as the standard agent-tool communication channel. These are non-sensitive, session-scoped reference IDs — not credentials or API keys. The agent should not relay raw script output to the user to keep the conversation natural (see Communication Style).

## Prerequisites

- Python3 and `requests`: `pip3 install requests`
- AnyGen API Key (`sk-xxx`) — [Get one from AnyGen](https://www.anygen.io/home?auto_create_openclaw_key=1)
- Configure key: `python3 scripts/anygen.py config set api_key "sk-xxx"` (saved to `~/.config/anygen/config.json`, chmod 600). Or set `ANYGEN_API_KEY` env var.

> All `scripts/` paths below are relative to this skill's installation directory.

## Communication Style

Use natural language. Never expose `task_id`, `file_token`, `task_xxx`, `tk_xxx`, `anygen.py`, or command syntax to the user. Say "your document", "generating", "checking progress" instead. When presenting `reply` and `prompt` from `prepare`, preserve the original content as much as possible — translate into the user's language if needed, but do NOT rephrase, summarize, or add your own interpretation. Ask questions in your own voice (NOT "AnyGen wants to know…"). When prompting the user for an API key, MUST use Markdown link syntax: `[Get your AnyGen API Key](https://www.anygen.io/home?auto_create_openclaw_key=1)` so the full URL is clickable.

## Document Workflow (MUST Follow All 5 Phases)

### Phase 1: Understand Requirements

If the user provides files, handle them before calling `prepare`:

1. **Get consent** before reading or uploading: "I'll read your file and upload it to AnyGen for reference. This may take a moment..."
2. **Reuse existing `file_token`** if the same file was already uploaded in this conversation.
3. **Read the file** and extract key information relevant to the document.
4. **Upload** to get a `file_token`.
5. **Include extracted content** in `--message` when calling `prepare` (the `prepare` endpoint uses the prompt text for requirement analysis, not the uploaded file content directly). Summarize key points only — do not paste raw sensitive data verbatim.

```bash
python3 scripts/anygen.py upload --file ./report.pdf
# Output: File Token: tk_abc123

python3 scripts/anygen.py prepare \
  --message "I need a technical design document based on this report. Key content: [extracted summary]" \
  --file-token tk_abc123 \
  --save ./conversation.json
```

Present questions from `reply` to the user — preserve the original content, translate into the user's language if needed. Continue with user's answers:

```bash
python3 scripts/anygen.py prepare \
  --input ./conversation.json \
  --message "The audience is engineering managers, goal is to document the auth system architecture" \
  --save ./conversation.json
```

Repeat until `status="ready"` with `suggested_task_params`.

Special cases:
- `status="ready"` on first call → proceed to Phase 2.
- User says "just create it" → skip to Phase 3 with `create` directly.

### Phase 2: Confirm with User (MANDATORY)

When `status="ready"`, present the `reply` and the `prompt` from `suggested_task_params` to the user as the document outline. The prompt returned by `prepare` is already a detailed, well-structured outline — preserve its original content as much as possible. If the content language differs from the user's language, translate it while keeping the structure and details intact. Do NOT rephrase, summarize, or add your own interpretation.

Ask the user to confirm or request adjustments. NEVER auto-create without explicit approval.

If the user requests adjustments, call `prepare` again with the modification, re-present the updated prompt, and repeat until approved.

### Phase 3: Create Task

```bash
python3 scripts/anygen.py create \
  --operation doc \
  --prompt "<prompt from suggested_task_params>" \
  --file-token tk_abc123 \
  --export-format docx
# Output: Task ID: task_xxx, Task URL: https://...
```

**Immediately tell the user (natural language):**
1. Document is being generated.
2. Online preview/edit link: "You can follow the progress here: [URL]".
3. Takes about **10–15 minutes** — free to do other things.
4. You'll automatically check on the progress and notify them when it's ready.

### Phase 4: Monitor and Deliver Result

> **Requires `sessions_spawn`.** If unavailable, skip to **Fallback** below.

#### Background Monitoring (preferred)

**CRITICAL**: When calling `sessions_spawn`, you MUST set a timeout of at least 25 minutes to ensure the background monitor completes. The poll operation can take up to 20 minutes.

Example spawn call syntax (adjust to match your OpenClaw/sessions API):

```
sessions_spawn(
    prompt=<subagent prompt below>,
    runTimeoutSeconds=1500  # REQUIRED: 25 minutes (1500s) to cover 20-min poll + buffer
)
```

If your sessions API uses different parameter names (e.g., `timeout`, `maxDuration`), use the equivalent parameter to set a 25-minute (1500 second) timeout.

---

**Subagent prompt** (it has NO conversation context):

```

From LeoYeAI/openclaw-master-skills, MIT.

More from LeoYeAI/openclaw-master-skills

Signals

Stars
2,168
Forks
325
Open issues
13
Last commit (this folder)
Jul 6, 2026 (3 months ago)
Last release
Jul 20, 2026 (3 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
MIT
Website
myclaw.ai
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from LeoYeAI

Cite this page

anygen-doc skill. Agent Mart. https://agentmart.dev/skills/leoyeai-anygen-doc (last updated 2026-10-24)