> ## Documentation Index
> Fetch the complete documentation index at: https://docs.docdiagram.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Standalone diagrams

> Turn a prompt into an image file with one command. No docs project or repo required.

<Frame caption="Prompt to saved image, then refine in the editor if you want">
  <img src="https://mintcdn.com/docdiagram/sY1JQuLzhra0Zjci/images/diagrams/cc-standalone-flow-light.svg?fit=max&auto=format&n=sY1JQuLzhra0Zjci&q=85&s=a38d112707de87ceac1da46b355db531" alt="Prompt, generate light and dark, save to your folder, refine via the chat URL" className="block dark:hidden" width="824" height="220" data-path="images/diagrams/cc-standalone-flow-light.svg" />

  <img src="https://mintcdn.com/docdiagram/sY1JQuLzhra0Zjci/images/diagrams/cc-standalone-flow-dark.svg?fit=max&auto=format&n=sY1JQuLzhra0Zjci&q=85&s=822c348eabe90d663a206ea3a8fab3ed" alt="Prompt, generate light and dark, save to your folder, refine via the chat URL" className="hidden dark:block" width="824" height="220" data-path="images/diagrams/cc-standalone-flow-dark.svg" />
</Frame>

`/docdiagram:diagram` is the zero-setup path. You give it a prompt, it generates a diagram and saves the image to your current folder. Use it when you want a picture for a slide, a README, an issue, or a chat, and you do not need the diagram tied to a docs page.

<Note>
  First time? Finish [Setup](/claude-code/setup) so `/docdiagram:auth` has stored your key. The skill needs nothing else: no open file, no repo, no GitHub install.
</Note>

## 1. Run the command

Inside a Claude Code session, call the skill with your prompt:

```
> /docdiagram:diagram a sequence diagram of a user signing in with Google OAuth: browser, our API, Google, and the database
```

DocDiagram creates the diagram, waits for it to render, and downloads the image into the directory you launched Claude Code from.

## 2. Write a good prompt

The same prompting habits that work in the web app work here. Be specific about the diagram type and the pieces involved.

**Prompts that work well:**

* *"An architecture diagram for a Next.js app on Vercel with a Postgres database and a Redis cache."*
* *"A flowchart of a CI pipeline: lint, test, build, deploy, with a manual approval gate before deploy."*
* *"An ER diagram with Users, Posts, and Comments. Users have many Posts, Posts have many Comments."*

**Tips:**

* Name the diagram type (sequence, architecture, flowchart, ER, org chart).
* List the entities or steps explicitly.
* Mention the direction of flow if it matters, such as "left to right".

## 3. Use the output

The command reports two things:

* **The saved file path**, for example `oauth-refresh.png` in your current folder. Diagrams render in both light and dark; the light variant is saved by default.
* **A chat URL** like `https://app.docdiagram.com/c/<slug>`. Open it to refine the diagram in the web editor, switch themes, or export other formats.

<Tip>
  Ask for a specific name and Claude will use it, for example "save it as auth-flow". Otherwise the file is named `diagram`.
</Tip>

## Refining

Because the result is a plain image, you iterate by running the command again with a sharper prompt, or by opening the chat URL and editing there. To keep a diagram under version control and revise it in place over time, use [embedded diagrams](/claude-code/embedded-diagrams) instead.

## Watermarks

On the free tier, generated images carry a watermark. Upgrade your account for clean exports. Generation itself is unchanged either way.

## Troubleshooting

| What you see                                                   | What it means                                                                                                         |
| -------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| A prompt to run `/docdiagram:auth`                             | Your key is missing or expired. Re-run auth.                                                                          |
| `failed_geometry_qa`, `failed_off_topic`, or `failed_no_match` | A quality or topic gate rejected the prompt. Rephrase and try again.                                                  |
| `no_default_project`                                           | Your account has no project to attach the chat to. Create one in the [app](https://app.docdiagram.com).               |
| `render_timeout`                                               | The job is still running. The error includes the chat slug; open the chat URL shortly to pick up the finished render. |

## Next

<Card title="Embedded diagrams" icon="file-code" href="/claude-code/embedded-diagrams">
  Bind a diagram to a docs page and keep it synced in your repo.
</Card>
