<< All versions

Skill v1.0.0

currentAutomated scan93/100
wibus-wee/cradle-app/cradle-artifacts
──Details
PublishedOctober 25, 2026 at 04:50 PM
Content Hashsha256:59d8253c7b3c6526...
Git SHA03cdaf6eea04
──Files
Files (1 file, 5.1 KB)
SKILL.md5.1 KBactive
SKILL.md · 129 lines · 5.1 KB

version: "1.0.0" name: cradle-artifacts description: Use when creating or updating Cradle Agent Artifacts via write_artifact — interactive JSX dashboards, audits, review boards, charts, and tables rendered beside chat. Prefer this over dumping structured UI as markdown. Covers cradle/artifact imports, export default, component inventory, artifactId reuse, and ActionButton prompts.


Cradle Artifacts

Use write_artifact to publish an interactive JSX view in the chat side panel (Cursor Canvas analogue). Prefer Artifacts when a structured UI is clearer than markdown prose.

When To Use

Prefer write_artifactPrefer markdown / chat text
Dashboards, audits, review boardsShort answers, prose explanations
Charts, metric grids, comparison tablesSimple lists or one-off code snippets
Click-through follow-ups via ActionButtonOne-shot status updates
Living docs the user revisits / refreshesThrowaway notes

After writing, tell the user the Artifact is in the side panel. Do not dump the full JSX into chat.

The tool result is metadata-only (artifactId, sessionId, title, revision, …). Full JSX is persisted server-side and loaded by the panel — do not expect source in the tool result.

Tool

text
write_artifact
title: string # panel tab + chat card label
source: string # full JSX module
artifactId?: string # omit to create; reuse to update (revision++)

Ambient session comes from CRADLE_CHAT_SESSION_ID. No separate session id arg.

Authoring Rules

  1. Import only from cradle/artifact (optionally react). No app modules, Electron, fs, network SDKs, or dynamic imports.
  2. export default a React component (required).
  3. Compose with the kit below — do not invent host components.

Component Inventory

ComponentRole
ArtifactRoot shell (quiet document column)
HeaderEyebrow / title / summary / meta fragments
SectionTitled block; sections separate by space, not borders
MetricsQuiet KPI strip — big tabular values, optional delta + sparkline: number[]
DeltaBadgeTrend indicator (up / down / flat + pre-formatted label)
SparklineTiny trend line for recent values
BarChartVertical bars, peak highlighted, hover tooltip
LineChartTime-series area chart
DonutChartShare-of-total donut with legend rows
GaugePercent radial gauge with center readout
ShareListShare-of-total progress rows (label + track + value + %)
ProgressDeterminate goal bar with percent
TableColumnar data; right-aligned columns render as mono numerics
ListItem rows with status icons via tone (info/success/warning/danger)
TimelineVertical event stream with tone ticks and meta
StepsHorizontal workflow indicator (done/current/upcoming)
CalloutHighlight / warning wash with tone icon
BadgeCompact status chip
KeyValueLabel/value metadata rows
CodeBlockMono snippet well with optional title + language badge
CollapsibleExpandable block for long secondary content
TabsView-local tab switcher (content passed inline)
EmptyStateQuiet placeholder for empty collections
ActionButtonSends prompt into the owning chat
Stack / HStackLayout
TextBody copy
DividerSeparator

Prefer real visualizations over prose or color-coded text: give Metrics sparklines, use BarChart/LineChart for series, DonutChart/ShareList for share-of-total.

Updates

Reuse the same artifactId from a prior write_artifact result to revise in place. Revision increments; the panel refreshes by id. Omit artifactId only when creating a new Artifact.

ActionButton Pattern

tsx
<ActionButton prompt="Explain the high-risk auth changes in detail.">
Dig into auth
</ActionButton>

prompt is required. Click injects that text into the session composer/run — use concrete follow-up asks, not vague labels.

Example

tsx
import { Artifact, Header, Metrics, Section, Table, ActionButton } from 'cradle/artifact'
export default function ReviewBoard() {
return (
<Artifact>
<Header
eyebrow="PR Review"
title="Priority changes"
summary="Grouped by risk. Click through to dig into each cluster."
/>
<Metrics
items={[
{ label: 'Files', value: '24', caption: 'changed' },
{ label: 'High risk', value: '3', caption: 'review first' },
]}
/>
<Section title="Clusters">
<Table
columns={[
{ key: 'area', header: 'Area' },
{ key: 'risk', header: 'Risk', align: 'right' },
]}
rows={[
{ area: 'auth', risk: 'high' },
{ area: 'ui', risk: 'low' },
]}
/>
<ActionButton prompt="Explain the high-risk auth changes in detail.">
Dig into auth
</ActionButton>
</Section>
</Artifact>
)
}

Pass that source to write_artifact with a short title. On later turns, pass the returned artifactId to update.

All versions