Skip to content
Back to skills

Canvas

ASecurity

Canvas 交互视图。用 `.canvas.tsx` 工件做原生交互界面。

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 16, 2026
ai-agentstypescriptnodedocumentation

Works with

  • cursor

Security analysis

A100/100

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

Scanned October 16, 2026

npx -y skills add 0mlkrizzz655335v/claude-skills-zh --skill canvas --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Canvas?

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

Security grade badge for Canvas
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/0mlkrizzz655335v-canvas/badge)](https://www.skillsdirectory.com/skills/0mlkrizzz655335v-canvas)

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: canvas
description: "Canvas 交互视图。用 `.canvas.tsx` 工件做原生交互界面。"
metadata:
  surfaces:
    - ide
    - cloud
environments:
  - local
  - cloud
---


# Codex Canvas

Create or edit a standalone `.canvas.tsx` artifact when an interactive view helps the user's task. Use an existing requested output format or application when specified. A short table or an intermediate investigation does not by itself require a canvas.

## Runtime and location

Before authoring a new native canvas, confirm that the current host supports `.canvas.tsx` rendering and obtain its output directory from the current environment or host documentation. Do not infer a renderer from the presence of TypeScript declaration files. Do not use a guessed `/Users/.../.cursor/projects/...` path on Windows or assume that a generic file write registers or compiles a canvas.

If native canvas rendering is unavailable, complete the requested analysis or artifact with an available inline visualization, ordinary HTML file, chart, or concise chat output, as appropriate. Explain the limitation only when it affects the requested result. Do not make a replacement artifact when the user explicitly requires native Canvas and the format matters; prepare the content and identify the unavailable runtime.

For an existing `.canvas.tsx`, preserve its supported location and imports. If the current host cannot run it, distinguish source edits from runtime verification.

## Authoring contract

- One `.canvas.tsx` file, default-exporting its main component.
- Import only from `cursor/canvas`; no relative imports, npm packages, or Node built-ins in the artifact.
- Embed the required data inline. No `fetch()` or network calls.
- Read the bundled [SDK exports](sdk/index.d.ts) and the specific sibling declaration files needed for exact props and hooks. Use the installed declarations rather than guessing exports.
- Use `useHostTheme()` tokens; see [hooks](sdk/hooks.d.ts). Keep decorative styling restrained and preserve readable hierarchy.
- Omit empty decorative sections and placeholders. Represent actual zeros and missing observations accurately when they are meaningful data.
- Label plots with specific metrics, units, series, source, time range, and transformations. Distinguish missing data from zero.

## Verification and delivery

Use host diagnostics or the available renderer to check the file and inspect the result when available. A successful write alone is not evidence of compilation or rendering. Report any unverified runtime behavior plainly.

Link a delivered canvas with its full absolute file path. Say it opens beside chat only when the host actually supports that behavior. Keep the explanation proportional to the task.

Files in this skill

  • SKILL.md2.7 KB
  • sdk/callout-tone-icons.d.ts586 B
  • sdk/canvas-tokens.d.ts9.4 KB
  • sdk/chart-primitives.d.ts10.2 KB
  • sdk/collapsible-section.d.ts2.4 KB
  • sdk/dag-layout.d.ts3.3 KB
  • sdk/diff-view.d.ts4.8 KB
  • sdk/form-primitives.d.ts6.5 KB
  • sdk/hooks.d.ts5.2 KB
  • sdk/index.d.ts3.6 KB
  • sdk/swatch.d.ts1.3 KB
  • sdk/theme.d.ts1.7 KB
  • sdk/todo-list.d.ts1.5 KB
  • sdk/ui-primitives.d.ts18.8 KB
  • sdk/ui-primitives.test.d.ts59 B
  • sdk/usage-bar.d.ts2.3 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.

Comments

Loading comments…

Newsletter

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