Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

page

БесплатноЗапускает вложенные скриптыНе проверен

Make a free page: one complete HTML document you write yourself, kept as index.html in the artifact's folder with any files it needs beside it, opened as a…

JimLiuот JimLiu★ 865 звёзд на GitHub

Об этом скилле

Page

A page artifact is a folder, <root>, whose index.html is the page: a whole HTML document, written by you. Files next to it (app.js, style.css, images/logo.svg) are served beside it, by relative URL. Nothing else is needed: no build step, no framework, no template. Open Artifact injects its runtime first in the page's <head>, so the page finds window.openArtifact ready when its own scripts run (window.claude is the same object, for a page written for claude.ai).

Say "your page" to the person (or the word they use: tool, game, widget), and refer to it by its title, never by ids or folders.

Make one

  1. Create it, declaring what the page will use:

    Artifact {"action": "publish", "type_url": "open-artifact://type/page", "title": "Team lunch poll",
              "capabilities": {"db": true}, "open": "after_first_write"}
    

    The result gives the folder (root). Until index.html exists, the page shows a quiet empty state.

  2. Write index.html (and any files beside it) into root, with your own file tools, or with Artifact {"action": "publish", "url": "<url>", "files": {"index.html": "<!doctype html>…"}}. Open views reload when the file changes.

  3. Give it a <title>. The page's title is the artifact's title, in the library and the page's top bar: a short, specific name ("Team lunch poll"), not a category and not a sentence.

  4. Look at it once, then hand it over. When you can look at images, take a picture of the page as it draws:

    Artifact {"action": "call", "url": "<url>", "name": "snapshot", "args": {"width": 400, "height": 900, "scheme": "dark"}}
    

    The answer's image is the path of a PNG. width (320 to 3840, default 1440), height (240 to 2160, default

    1. and scheme (light, the default, or dark) are all optional: one narrow picture and one in the other scheme catch most of what goes wrong (clipped text, a sideways scroll, a colour that vanishes). The snapshot only reads: a page that writes when it loads shows that write refused in the picture, and nothing is stored. A page that has not drawn within 8 seconds is pictured with its "did not start" card. It needs Chrome, Chromium or Edge on this computer (unsupported otherwise: then ask the person to look).

    A page that stores things: read back once what it wrote (ArtifactData list). Artifact {"action": "call", "url": "<url>", "name": "info"} lists the files the page has and what it declares. Fix what is visibly broken, in one pass, not a loop. Then tell the person in a line what you tried and what you could not.

Design it

Nothing styles a page for you: what you leave undecided shows as a browser default. Before you write index.html, read artifact-type/reference/design.md. The short form:

  • The person's words first, then a design system or styles already in their project, then your own choices.
  • Start from the subject, with its real content. Never placeholder text; examples are marked as examples.
  • Put the design at the top of <style> as tokens on :root (colours, type, spacing), with a dark set under @media (prefers-color-scheme: dark), and build every rule from them. Give body an explicit background.
  • System font stacks, or font files beside the page. It works from about 360px wide and never scrolls sideways.
  • Everything is visible when the page has loaded. A tool opens ready to work, with designed loading, empty and cannot-save states.
  • Quiet by default: one bold idea at most, and only where the request calls for it.

Before a flow, an architecture or a comparison drawn in the page, read artifact-type/reference/diagrams.md. Before a chart or a number tile, read artifact-type/reference/charts.md.

Declare capabilities, then use them

Capabilities are never written in the page. You declare them with the capabilities argument of Artifact publish, on create or on a later write (a write may carry capabilities alone, with no files):

capabilities Means
left out Keep the current declaration.
{} Declare none: the page keeps only artifact and permissions.
{"db": true, "assets": true} This is the whole set from now on (it replaces the previous one).

A value is true or an object of options. Open views reload with the new set. The declaration lives in the artifact's record and its .artifact.json; a page cannot change it, not even by replacing its own index.html.

In the page, ask for each one with use, and handle null (not declared, or not available here):

<script>
  (async () => {
    const db = await window.openArtifact.use('db');
    if (!db) return showOffline();
    const votes = db.collection('votes');
    votes.onSnapshot((snap) => render(snap.docs.map((d) => d.data())));
    document.querySelector('form').onsubmit = (e) => {
      e.preventDefault();
      votes.add({ choice: e.target.choice.value, at: Dat
Полный SKILL.md на GitHub

Установить page в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

artifact-type.jsonartifact-type/reference/capabilities.d.tsartifact-type/reference/capabilities.mdartifact-type/reference/charts.mdartifact-type/reference/design.mdartifact-type/reference/diagrams.md

FAQ

Что делает скилл page?

Make a free page: one complete HTML document you write yourself, kept as index.html in the artifact's folder with any files it needs beside it, opened as a live local page the person can use and comment on. The page can keep a small shared database, store files people add, hand the viewer a file to save, know who is viewing and talk to other open views, through the runtime capabilities you declare with the capabilities argument of Artifact publish. Use for a small interactive thing no other type fits: a widget or tool, a calculator, a mini game, an explainer page, a poll, checklist or sign-up sheet that remembers what people do on it. Not for a slide deck, a design to iterate on, a dashboard from data, a document, a spreadsheet or a film: those have types of their own.

Как установить скилл page?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл page запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить page с