Build It

Author a canvas

Dry-run, fix analyzer warnings, commit with the echoed specHash. Preview URL on the web app.

Dry-run, fix analyzer warnings, commit with the echoed specHash. Preview URL on the web app. This is the first write call in the canonical sequence.

The flow

  1. Write your HTML (use design-system classes, fire both completion calls).
  2. Call canvas_create with dryRun: true.
  3. Check the response for analyzer warnings and errors. Fix any severity: "error" issues.
  4. Open the previewUrl in a browser. Verify the canvas looks right.
  5. Call canvas_create again with dryRun: false and the echoed specHash.
  6. Store the returned canvasId for skill_write.
Shell
# Step 1: dry-run
canvas_create({
name: "Evening reflection",
html: "<!doctype html><html>...</html>",
dryRun: true
})
# Returns: { specHash: "abc123...", previewUrl: "https://...", issues: [...] }
# Step 2: commit with the echoed specHash
canvas_create({
name: "Evening reflection",
html: "<!doctype html><html>...</html>",
dryRun: false,
specHash: "abc123..."
})
# Returns: { canvasId: "757c5bb0-...", previewUrl: "https://..." }

Analyzer warnings

The dry-run response includes an issues array. Common ones:

infoAlways read sprout://canvas/sdk before writing canvas HTML. The SDK reference has the latest completion call signatures and signal types.

Further reading

Was this page helpful?
Wrap a skill chevron_right