From html-artifacts
Use when the user requests visually complex output that does not fit cleanly in markdown chat - comparisons, plans, status reports, post-mortems, flowcharts, explainers of features or concepts, PR reviews, triage or kanban boards, config editors, prompt tuning UIs. Generates a self-contained HTML artifact in .claude/_html/artifacts/ from a curated 17-template library (Thariq Shihipar, Anthropic Claude Code team).
How this skill is triggered — by the user, by Claude, or both
Slash command
/html-artifacts:html-artifactsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
> **O que faz:** quando o pedido casar com um gatilho visualmente complexo
base.cssexamples/02-exploration-visual-designs.htmlexamples/03-code-review-pr.htmlexamples/04-code-understanding.htmlexamples/05-design-system.htmlexamples/06-component-variants.htmlexamples/08-prototype-interaction.htmlexamples/10-svg-illustrations.htmlexamples/11-status-report.htmlexamples/12-incident-report.htmlexamples/13-flowchart-diagram.htmlexamples/14-research-feature-explainer.htmlexamples/15-research-concept-explainer.htmlexamples/16-implementation-plan.htmlexamples/17-pr-writeup.htmlexamples/18-editor-triage-board.htmlexamples/19-editor-feature-flags.htmlexamples/20-editor-prompt-tuner.htmlexamples/INDEX.mdsrc/artifact_engine.pyO que faz: quando o pedido casar com um gatilho visualmente complexo (comparacao, plano, status, fluxograma, explainer, review de PR, kanban, config editor, prompt tuner), gera um arquivo HTML auto-contido em
.claude/_html/artifacts/<tipo>-<timestamp>.htmlbaseado num template real do Thariq Shihipar, e avisa o caminho no chat.Por que: terminal renderiza markdown em monospace. HTML inline na chat aparece como tag literal — pior que markdown. HTML em arquivo separado ganha SVG, navegacao, interatividade, hierarquia espacial, tipografia editorial. Tese central da "unreasonable effectiveness".
Lista dos 17 templates + decision tree + convencao de estilo + naming convention vive em examples/INDEX.md (single source of truth). Sempre consultar la antes de gerar artifact.
Catalogo trading (schemas pydantic + renderers em scripts/artifact_engine.py):
type_id | Template / Render | Gatilho |
|---|---|---|
table | gen_artifact | Dataset tabular simples |
report | gen_artifact | Texto + tabelas estruturado |
interactive | Interactive Moderno | Painel com 10 tipos de input, validacao, localStorage |
backtest-comparison | Thariq 16 (comparison) | Comparar N estrategias de backtest |
risk-dashboard | Thariq 12 (kanban) | Painel de risco / exposicao |
signal-audit | Thariq 13 (flowchart) | Audit trail de sinais / execucao |
market-regime | Thariq 15 (concept) | Timeline de regimes / estados |
spec-requirements | Spec Renderer | Spec de requirements (Kiro/GSD/generic) |
spec-design | Spec Renderer | Spec de design / arquitetura |
spec-tasks | Spec Renderer | Spec de tasks / checkpoints |
from scripts.artifact_engine import ArtifactEngine
from pathlib import Path
engine = ArtifactEngine()
# 1. Dataset dict → artifact
path = engine.render("<type_id>", dataset_dict) # pydantic valida + dispatch
# 2. Spec markdown → artifact (auto-detecta tipo: requirements/design/tasks)
path = engine.render_from_spec(Path(".kiro/specs/feat/requirements.md"))
# path → .claude/_html/artifacts/<type_id>-<timestamp>.html
# index.html atualizado automaticamente
Sob o capo:
ArtifactEngine consulta _SCHEMA_MAP e valida dataset_dict via pydantic_RENDERERS — gen_artifact (legacy) ou ThariqRenderer (templates 11-20).claude/_html/artifacts/scripts/build_artifact_index.py gera .claude/_html/artifacts/index.htmlPara regenerar o index manualmente:
python scripts/build_artifact_index.py .claude/_html/artifacts
| Erro | Correcao |
|---|---|
| Despejar HTML inline no chat | Salvar como arquivo .html em .claude/_html/artifacts/, avisar path |
| Re-renderizar conteudo do HTML em markdown | Path + 1 linha resumo, deixar o user abrir no browser |
Ignorar o catalogo de INDEX.md e improvisar | Sempre tentar bater com 1 dos templates primeiro |
| Combinar 2 templates sem pensar | Combinar e ok (ex: 16 + 13 para plano com fluxograma), mas estrutura comum vem do template "dominante" |
| Trocar a paleta editorial Thariq por cores aleatorias | Manter ivory/slate base. Pode trocar accent quente (clay) por algo do tema (ouro, verde gain). |
| Gerar artifact com dados sensiveis (secrets, IDs privados) sem confirmar | Perguntar antes de salvar |
Esquecer de ler INDEX.md e usar gatilhos fora da decision tree | Decision tree e a SSOT — atualizar la se aparecer caso novo recorrente |
Criar CSS inline duplicado em vez de herdar base.css | Templates novos devem linkar ../base.css e conter apenas overrides |
| Acao | Comando ou onde |
|---|---|
| Re-baixar exemplos quando Thariq publicar mais | Ver bloco curl no fim de examples/INDEX.md §Manutencao |
| Promover artifact recorrente a template proprio | Salvar em examples/9N-<descricao>.html (N = numero sequencial). Adicionar linha em INDEX.md §Catalogo. |
| Verificar saude | ls .claude/skills/html-artifacts/examples/*.html | wc -l deve ser 17 (+ proprios 9N) |
| Atualizar gatilhos | Editar apenas examples/INDEX.md (decision tree e tabela). SKILL.md so referencia. |
| Testar suite | pytest tests/html_artifacts/ -v (102 tests) |
| Type check / lint | mypy scripts/artifact_engine.py scripts/artifact_schemas.py scripts/build_artifact_index.py |
gen_artifact.py table|report (templates basicos sem estilo Thariq) — sao complementares.npx claudepluginhub fernandoxavier02/fx-studio-ai --plugin html-artifactsProvides UI/UX resources: 50+ styles, color palettes, font pairings, guidelines, charts for web/mobile across React, Next.js, Vue, Svelte, Tailwind, React Native, Flutter. Aids planning, building, reviewing interfaces.
Fetches up-to-date documentation from Context7 for libraries and frameworks like React, Next.js, Prisma. Use for setup questions, API references, and code examples.