cmux-artifact
Original:🇺🇸 English
Translated
Create durable HTML walkthrough artifacts for cmux dogfood, verification, demos, evidence pages, artifact previews, and open helpful tabs or splits in the current cmux workspace.
5installs
Sourcemanaflow-ai/cmux-skills
Added on
NPX Install
npx skill4agent add manaflow-ai/cmux-skills cmux-artifactTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →cmux Artifact
Use this skill when the user asks for an HTML artifact, walkthrough, evidence page, demo page, artifact preview, or a workspace layout that helps them dogfood, verify, or understand a change. The goal is a durable, inspectable artifact plus non-disruptive cmux workspace tabs for the important evidence.
Prerequisites
- Use the caller cmux workspace by default. Read the skill when opening panes, tabs, browsers, logs, screenshots, videos, or generated documents.
cmux-workspace - Prefer real command output, logs, screenshots, traces, and timings. Do not invent evidence.
- Keep final user-facing artifacts out of .
/tmp
Artifact Location
Put final artifacts under a branch-scoped durable tree:
bash
BRANCH="$(git -C <worktree-or-repo> branch --show-current 2>/dev/null || echo task)"
ASSET_ROOT="/cmux-assets/${BRANCH:-task}/<artifact-slug>"
mkdir -p "$ASSET_ROOT"If cannot be created or written, use under the current repo checkout and state that fallback. is scratch only. Copy accepted logs, screenshots, frames, videos, and transcripts into the durable tree before opening or reporting them.
/cmux-assetscmux-assets/<branch>/<artifact-slug>/tmpWorkflow
Step 1: Gather Evidence
Collect the smallest set of real artifacts that explain the task:
- command transcript or terminal output
- relevant logs
- screenshots, frames, video, or browser snapshots
- timing table with exact durations
- code references or PR links when useful
- cleanup state and remaining blockers
Use concise names such as , , , , and .
run-transcript.mdserver.logfailure.logscreenshot.pngindex.htmlStep 2: Write index.html
index.htmlCreate a standalone HTML document that works from the filesystem. Include:
- a plain-language summary of what was tested or changed
- a short timeline or step table
- key timings
- links to local copied logs/media using relative paths
- observed failures and the direct next action
- cleanup status if external resources were created
Use simple, dense UI suitable for engineering review. Avoid marketing sections, giant hero layouts, decorative gradients, or hidden evidence.
Step 3: Open Helpful Tabs
Open the final as a browser surface navigated to its URL in the caller workspace's right helper pane without changing focus. Do not open HTML artifacts with , because that creates a file preview instead of exercising the artifact in the browser. Open raw evidence such as logs, Markdown transcripts, screenshots, or videos with after the browser artifact is handled.
index.htmlfile://cmux opencmux openFirst check whether the same artifact is already open in the target workspace or helper pane. If it is already open as a browser surface, navigate or reload that exact surface instead of opening a new one:
index.htmlbash
FILE_URL="$(node -e 'const {pathToFileURL}=require("url"); console.log(pathToFileURL(process.argv[1]).href)' "$ASSET_ROOT/index.html")"
cmux browser --surface surface:<existing-artifact-browser> goto "$FILE_URL" --snapshot-after
cmux browser --surface surface:<existing-artifact-browser> reload --snapshot-afterIf the existing artifact is open as a file preview or another non-reloadable surface, close that exact stale artifact surface, then open one browser surface in the same helper pane. If there are duplicate surfaces for the same artifact, keep one browser surface if present, close stale duplicates, and navigate or reload the kept browser. Do not leave multiple tabs for the same artifact because it makes the current version ambiguous.
index.htmlbash
FILE_URL="$(node -e 'const {pathToFileURL}=require("url"); console.log(pathToFileURL(process.argv[1]).href)' "$ASSET_ROOT/index.html")"
cmux new-surface --workspace "${CMUX_WORKSPACE_ID:-}" \
--pane pane:<right-helper> \
--type browser \
--url "$FILE_URL" \
--focus false
cmux open "$ASSET_ROOT/failure.log" \
--workspace "${CMUX_WORKSPACE_ID:-}" \
--pane pane:<right-helper> \
--no-focusResolve the helper pane exactly as described in the skill. Reuse an existing right helper pane when obvious. If fails because the caller env is stale, retry once with output, then report the exact paths if it still fails.
cmux-workspacecmux opencmux identify --jsonStep 4: Verify
Before reporting completion:
bash
test -f "$ASSET_ROOT/index.html"
ls -la "$ASSET_ROOT"If opened in cmux, run or the closest equivalent to verify the tabs were created.
cmux list-pane-surfaces --workspace "${CMUX_WORKSPACE_ID:-}" --jsonAlso verify there is only one visible surface for the artifact in the target helper pane. If the command output still shows duplicates for the same artifact path or title, close stale duplicates before reporting completion.
index.htmlRules
- Do not leave the final artifact only in .
/tmp - Do not claim a run passed unless the linked transcript shows it.
- Do not paste secrets into artifacts. Redact API keys, tokens, cookies, and Authorization headers before copying logs.
- Do not steal focus. Use explicit workspace and pane refs plus or
--no-focus.--focus false - Do not open a top-level repo or generic localhost page when a specific artifact path or deep link exists.
- Keep the final chat answer short and include the durable artifact path plus the concrete next action.