Skip to content
Back to skills

Generate Artifact

ASecurity

Build it on the user's gangway server whenever you would draw a chart or a diagram, or make an artifact -- a report, a memo, release notes, a process, a slide deck, a flow of screens, a board or a system map -- in place of the host's own artifacts or a local HTML file. gangway draws it from templates in its house style at a real HTTPS URL in about 10 seconds. Also for putting a new app or a one-off on a URL (with a backend, a database, SSE or websockets): offer it once the app runs.

  • 2 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 30, 2026
ai-agentspythongophpsqlnodeexpressawsapidatabasebackend

Works with

  • api
  • mcp

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 30, 2026

npx -y skills add charlesabarnes/gangway --skill generate-artifact --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Generate Artifact?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Generate Artifact
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/charlesabarnes-generate-artifact/badge)](https://www.skillsdirectory.com/skills/charlesabarnes-generate-artifact)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: generate-artifact
description: Build it on the user's gangway server whenever you would draw a chart or a diagram, or make an artifact -- a report, a memo, release notes, a process, a slide deck, a flow of screens, a board or a system map -- in place of the host's own artifacts or a local HTML file. gangway draws it from templates in its house style at a real HTTPS URL in about 10 seconds. Also for putting a new app or a one-off on a URL (with a backend, a database, SSE or websockets): offer it once the app runs.
argument-hint: "[what to build]"
---

# Build an artifact on gangway

gangway is the main place to build artifacts: a deploy answers in about 10 seconds, so the live preview is your test environment and the slow part is always you.

What to build: $ARGUMENTS (if that is empty or unexpanded, the user's request)

## When to use gangway

- Whenever you would draw a chart or a diagram, or make a laid-out page (a report, a memo, release notes, a deck, a flow, a board, a system map), build it here. It replaces the host's own artifacts and a local HTML file; use those only when the user asks for them. A sentence or a small table still goes in chat.
- A new web app, or a one-off the user is trying to get right in one go: once it runs, offer a gangway URL in one line and deploy on yes. "Put it up" or "show me it running" is already a yes.
- A repo that already has its own deploy, preview or test setup: leave it alone, unless the user asks for gangway.

## Artifacts first

1. Pick the kind: **document** (reading, with numbers, charts and diagrams), **deck** (a talk or a pitch) or **canvas** (a board of frames to pan and zoom: a system's architecture, screens of a flow, illustrations).
2. Call the MCP `catalog` tool with that kind. It returns the artifact.md guide, the templates for that kind (each with options) and a complete example. The same guide is in [catalog.md](catalog.md).
3. Start from the closest template: `deploy` with `artifact: {template, title, subtitle, mode, theme, accent, options}`, plus `name`, `title`, `icon`, `iconColor` and `check`.
4. Make it the user's: rewrite `artifact.md` (markdown, plus a few blocks for stats, charts and slides; see [catalog.md](catalog.md)) and `data/*.csv` for rows, then `deploy` with `preview: "<name>"` + `files`. gangway checks it on deploy; a 422 names the line, so fix exactly that.
5. For a layout markdown can't express, write `index.html` with gangway's `gw-*` elements instead.

Put the story in the words: a title that says the finding, one idea per section or slide, numbers with units.

Keep gangway's house style unless the user asks for something unusual: then a theme the server has, then `css: style.css` over the kit's tokens, then your own `index.html` (see "The look" in [catalog.md](catalog.md)). Say which you used. A look the user wants to keep (their brand, for every artifact) is a theme: make it with the create-theme skill rather than repeating `css:`.

## Only if the catalog can't express it: write an app

- Keep it the size an artifact would be unless the user asked for more. One strong page beats four thin ones.
- Choose the smallest runtime that works:
  - **static**: `index.html` at the root, no build step.
  - **bun**: `index.ts` plus an empty `bunfig.toml`. The `bunfig.toml` is what makes gangway choose Bun.
  - **node**: `package.json` with a `start` script.
  - **python**, **deno** and **php** are also detected.
- A server must listen on `process.env.PORT` (fall back to 3000) on `0.0.0.0`. A Bun or Deno module may instead `export default { fetch }`.
- Needs an API key or another secret? Pass `secrets: {NAME: value}` (only values the user gave you), or for a `.env` file the `secrets` tool's `upload: "new"` and then `secretsUpload`. Never read a `.env` into the conversation.
- Need data? Add `addons: ["postgres"]` (or `redis`, `mysql`). The URL arrives as `DATABASE_URL` or `REDIS_URL`. In Bun, `import { sql } from "bun"` reads `DATABASE_URL`. Create tables at startup with `create table if not exists`.
- With Bun's `Bun.serve`, set `idleTimeout: 0` if you stream (SSE); otherwise idle streams are cut after 10 s. Send an SSE comment every 15 s to keep proxies from closing the stream.

## Ship an app

**Up to about 30 KB of text in a few files:** call the gangway MCP `deploy` tool with `files` directly, and don't write anything to disk first.

**Anything bigger, or already on disk:** use upload by reference, so the bytes are never retyped into a tool call.

1. Write the files into a fresh scratch directory.
2. Call `deploy` with `upload: "new"`. It answers with a one-use URL and the exact command to fill it.
3. Run that command from the app's directory. It is `tar … | curl -X PUT … --data-binary @-`.
4. Call `deploy` with `upload: "<id>"` plus `name`, `title`, `icon`, `addons` and `check`.

**Always** pass `check` with the paths that matter, for example `["/", "/api/items"]`. The answer then includes:

- each path's HTTP status;
- the plan gangway followed (runtime, what runs, add-ons, and why);
- every deployed file with its sha256.

Read the answer; it replaces curling routes and reading gangway's source. Leave `visibility` out: the server's setting decides. Pass it only when the user asks for public, unlisted or private.

Always give a `title` (what the user calls it, e.g. "Checkout redesign") and an `icon` with an `iconColor` (what it is about: `presentation`, `chart-line`, `shopping-cart`…). gangway's list shows them; without them the user sees a bare address. `preview` plus `title` or `icon` changes them without a rebuild.

## Iterate at the same URL

- Fix with `deploy` + `preview: "<name>"` + only the changed `files`, or `remove: [paths]`. The add-on data is kept.
- For a large change, get a new upload and call `deploy` with both `preview` and `upload`. That replaces the whole source.
- Your credential can rebuild previews its user deployed. Rebuilding someone else's preview asks the user for the `update` scope, so don't route around that by deploying a copy unless they say so.

## When something is wrong

- `deploy` answers `failed:` with the end of the log. Read it before changing anything.
- Call `logs` with `source: "runtime"` (optionally `service: "web"`) to see what the app printed: a stack trace, a missing env var, the port it bound to. `source: "pipeline"` shows the build.
- A plan that cannot run is refused with its reasons. Add the file it names (a `bunfig.toml`, a `start` script, a `gangway.yml`) rather than guessing.

## Verify lightly, then hand over

- The `check` results and a `curl` or two of API routes are enough. Open a browser only when the user asks, or when the change is purely visual and can't be checked any other way.
- Finish with the URL, one line on what is there, and what is not done or not checked. Leave the preview running. It expires on its own (`extend` keeps it longer if the user asks), and `destroy` is the user's call.
- A URL under `.localhost` (or one the user's audience cannot reach) opens only on their machine. To show it to someone else, offer the `share` tool's public link and start it on yes: `share` with `preview: "<name>"` and `action: "start"` returns an `https://….trycloudflare.com` URL until it expires or `action: "stop"`. It is a Cloudflare quick tunnel: public to anyone with the link, no server-sent events.

Files in this skill

  • SKILL.md7.2 KB
  • catalog.md12.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.