Web Artifacts Builder
anthropics/skills
Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.
A skill your agent uses when adding interactive code examples to React docs.
$ npx skills add reactjs/ar.react.dev --skill docs-sandpack -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install reactjs/ar.react.dev docs-sandpack --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/reactjs/ar.react.dev.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/docs-sandpack .claude/skills/docs-sandpack && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "docs-sandpack" agent skill from https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpack into .claude/skills/docs-sandpack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docs-sandpack", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpackType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add reactjs/ar.react.dev --skill docs-sandpack -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install reactjs/ar.react.dev docs-sandpack --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactjs/ar.react.dev.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.claude/skills/docs-sandpack .agents/skills/docs-sandpack && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "docs-sandpack" agent skill from https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpack into .agents/skills/docs-sandpack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docs-sandpack", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add reactjs/ar.react.dev --skill docs-sandpack -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install reactjs/ar.react.dev docs-sandpack --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactjs/ar.react.dev.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.claude/skills/docs-sandpack .cursor/skills/docs-sandpack && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "docs-sandpack" agent skill from https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpack into .cursor/skills/docs-sandpack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docs-sandpack", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/reactjs/ar.react.dev.git --path .claude/skills/docs-sandpack--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add reactjs/ar.react.dev --skill docs-sandpack -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install reactjs/ar.react.dev docs-sandpack --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactjs/ar.react.dev.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.claude/skills/docs-sandpack .gemini/skills/docs-sandpack && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "docs-sandpack" agent skill from https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpack into .gemini/skills/docs-sandpack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docs-sandpack", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install reactjs/ar.react.dev docs-sandpackInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add reactjs/ar.react.dev --skill docs-sandpack -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/reactjs/ar.react.dev.git skills-src && mkdir -p .github/skills && cp -r skills-src/.claude/skills/docs-sandpack .github/skills/docs-sandpack && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "docs-sandpack" agent skill from https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpack into .github/skills/docs-sandpack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docs-sandpack", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add reactjs/ar.react.dev --skill docs-sandpack -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install reactjs/ar.react.dev docs-sandpack --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/reactjs/ar.react.dev.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.claude/skills/docs-sandpack .opencode/skills/docs-sandpack && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "docs-sandpack" agent skill from https://github.com/reactjs/ar.react.dev/tree/main/.claude/skills/docs-sandpack into .opencode/skills/docs-sandpack/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "docs-sandpack", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
docs-sandpackA skill your agent uses when adding interactive code examples to React docs.
Docs Sandpack is an agent skill from reactjs/ar.react.dev, published by the product's own GitHub organization. Use when adding interactive code examples to React docs.
Its SKILL.md is about 2.7k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It works with React. The repository describes itself as: React documentation website in Arabic 📘⚛️ — وثائق React باللغة العربية. The licence is CC-BY-4.0.
Read from SKILL.md and the folder at commit 2da48d6. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md (its code samples are javascript, mdx, css and json).
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Docs Sandpack loads about 2.7k tokens when it runs. Until then it costs about 18 tokens; SKILL.md has 386 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from reactjs/ar.react.dev at commit 2da48d6, republished under its CC-BY-4.0 licence (© reactjs). 386 words, ~2,683 tokens.
.claude/skills/docs-sandpack/SKILL.md (or your agent's skills folder).Most examples are single-file. Copy this and modify:
<Sandpack>
` ` `js
import { useState } from 'react';
export default function Example() {
const [value, setValue] = useState(0);
return (
<button onClick={() => setValue(value + 1)}>
Clicked {value} times
</button>
);
}
` ` `
</Sandpack>| Pattern | Usage |
|---|---|
```js | Main file (no prefix) |
```js src/FileName.js | Supporting files |
```js src/File.js active | Active file (reference pages) |
```js src/data.js hidden | Hidden files |
```css | CSS styles |
```json package.json | External dependencies |
Critical: Main file must have export default.
```js {2-4}
function Example() {
// Lines 2-4
// will be
// highlighted
return null;
}```js [[1, 4, "age"], [2, 4, "setAge"]]
// Creates numbered markers pointing to "age" and "setAge" on line 4```js {expectedErrors: {'react-compiler': [7]}}
// Line 7 shows as expected error<Sandpack>
```js src/App.js
import Gallery from './Gallery.js';
export default function App() {
return <Gallery />;
}export default function Gallery() {
return <h1>Gallery</h1>;
}h1 { color: purple; }</Sandpack>
```
<Sandpack>
```js
import { useImmer } from 'use-immer';
// ...{
"dependencies": {
"immer": "1.7.3",
"use-immer": "0.5.1",
"react": "latest",
"react-dom": "latest",
"react-scripts": "latest"
}
}</Sandpack>
```
Sandpack examples are held to strict code style standards:
e for event parametersconst unless reassignment needed({ props }) not ({props})Sandpack examples must produce the same output on server and client:
// 🚫 This will cause hydration warnings
export default function App() {
const isClient = typeof window !== 'undefined';
return <div>{isClient ? 'Client' : 'Server'}</div>;
}// 🚫 Don't trigger re-renders for non-visual state
const [mounted, setMounted] = useState(false);
useEffect(() => { setMounted(true); }, []);
// ✅ Use ref instead
const mounted = useRef(false);
useEffect(() => { mounted.current = true; }, []);// ✅ Named function for DevTools display name
const MyInput = forwardRef(function MyInput(props, ref) {
return <input {...props} ref={ref} />;
});
// 🚫 Anonymous loses name
const MyInput = forwardRef((props, ref) => { ... });// ✅ Preserves component name
const Greeting = memo(function Greeting({ name }) {
return <h1>Hello, {name}</h1>;
});| Pattern | Problem | Fix |
|---|---|---|
const Comp = () => {} | Not standard | function Comp() {} |
onClick={(event) => ...} | Conflicts with global | onClick={(e) => ...} |
useState for non-rendered values | Re-renders | Use useRef |
Reading window during render | Hydration mismatch | Check in useEffect |
| Single-line if without braces | Harder to debug | Use multiline with braces |
Chained createRoot().render() | Less clear | Two statements |
//... without space | Inconsistent | // ... with space |
| Tabs | Inconsistent | 2 spaces |
ReactDOM.render | Deprecated | Use createRoot |
| Fake package names | Confusing | Use './your-storage-layer' |
PropsWithChildren | Outdated | children?: ReactNode |
Missing key in lists | Warnings | Always include key |
// ✅ Correct
{items.map(item => <li key={item.id}>{item.name}</li>)}
// 🚫 Wrong - missing key
{items.map(item => <li>{item.name}</li>)}// ✅ Correct - descriptive path
import { fetchData } from './your-data-layer';
// 🚫 Wrong - looks like a real npm package
import { fetchData } from 'cool-data-lib';// ✅ Correct - labeled for clarity
console.log('User:', user);
console.log('Component Stack:', errorInfo.componentStack);
// 🚫 Wrong - unlabeled
console.log(user);// ✅ Correct - 1-1.5 seconds
setTimeout(() => setLoading(false), 1000);
// 🚫 Wrong - too long, feels sluggish
setTimeout(() => setLoading(false), 3000);When modifying code in examples with line highlights ({2-4}), always update the highlight line numbers to match the new code. Incorrect line numbers cause rendering crashes.
Gallery.js not gallery.jssrc/, refer to files by name only: Gallery.js not src/Gallery.jsComponents: PascalCase
Profile, Avatar, TodoList, PackingListState variables: Destructured pattern
const [count, setCount] = useState(0)[isOnline, setIsOnline], [isPacked, setIsPacked]'typing', 'submitting', 'success', 'error'Event handlers:
handleClick, handleSubmit, handleAddTaskProps for callbacks:
onClick, onChange, onAddTask, onSelectCustom Hooks:
useOnlineStatus, useChatRoom, useFormInputReducer actions:
'added', 'changed', 'deleted''changed_selection', 'sent_message'Updater functions: Single letter
setCount(n => n + 1)Wrong vs right code:
// 🔴 Avoid: redundant state and unnecessary Effect
// ✅ Good: calculated during renderingConsole.log for lifecycle teaching:
console.log('✅ Connecting...');
console.log('❌ Disconnected.');// Server Component
async function Notes() {
const notes = await db.notes.getAll();
}
// Client Component
"use client"
export default function Expandable({children}) {
const [expanded, setExpanded] = useState(false);
}import marked from 'marked'; // 35.9K (11.2K gzipped)
import sanitizeHtml from 'sanitize-html'; // 206K (63.3K gzipped)Include package.json when:
react: beta, react: 19.0.0-rc-*)Omit package.json when:
Always mark package.json as hidden:
```json package.json hidden
{
"dependencies": {
"react": "latest",
"react-dom": "latest",
"react-scripts": "latest",
"immer": "1.7.3"
}
}
**Version conventions:**
- Use `"latest"` for stable features
- Use exact versions only when compatibility requires it
- Include minimal dependencies (just what the example needs)
### Hidden File Patterns
**Always hide these file types:**
| File Type | Reason |
|-----------|--------|
| `package.json` | Configuration not the teaching point |
| `sandbox.config.json` | Sandbox setup is boilerplate |
| `public/index.html` | HTML structure not the focus |
| `src/data.js` | When it contains sample/mock data |
| `src/api.js` | When showing API usage, not implementation |
| `src/styles.css` | When styling is not the lesson |
| `src/router.js` | Supporting infrastructure |
| `src/actions.js` | Server action implementation details |
**Rationale:**
- Reduces cognitive load
- Keeps focus on the primary concept
- Creates cleaner, more focused examples
**Example:**
```mdx
```js src/data.js hidden
export const items = [
{ id: 1, name: 'Item 1' },
{ id: 2, name: 'Item 2' },
];
### Active File Patterns
**Mark as active when:**
- File contains the primary teaching concept
- Learner should focus on this code first
- Component demonstrates the hook/pattern being taught
**Effect of the `active` marker:**
- Sets initial editor tab focus when Sandpack loads
- Signals "this is what you should study"
- Works with hidden files to create focused examples
**Most common active file:** `src/index.js` or `src/App.js`
**Example:**
```mdx
```js src/App.js active
// This file will be focused when example loads
export default function App() {
// ...
}
### File Structure Guidelines
| Scenario | Structure | Reason |
|----------|-----------|--------|
| Basic hook usage | Single file | Simple, focused |
| Teaching imports | 2-3 files | Shows modularity |
| Context patterns | 4-5 files | Realistic structure |
| Complex state | 3+ files | Separation of concerns |
**Single File Examples (70% of cases):**
- Use for simple concepts
- 50-200 lines typical
- Best for: Counter, text inputs, basic hooks
**Multi-File Examples (30% of cases):**
- Use when teaching modularity/imports
- Use for context patterns (4-5 files)
- Use when component is reused
**File Naming:**
- Main component: `App.js` (capitalized)
- Component files: `Gallery.js`, `Button.js` (capitalized)
- Data files: `data.js` (lowercase)
- Utility files: `utils.js` (lowercase)
- Context files: `TasksContext.js` (named after what they provide)
### Code Size Limits
- Single file: **<200 lines**
- Multi-file total: **150-300 lines**
- Main component: **100-150 lines**
- Supporting files: **20-40 lines each**
### CSS Guidelines
**Always:**
- Include minimal CSS for demo interactivity
- Use semantic class names (`.panel`, `.button-primary`, `.panel-dark`)
- Support light/dark themes when showing UI concepts
- Keep CSS visible (never hidden)
**Size Guidelines:**
- Minimal (5-10 lines): Basic button styling, spacing
- Medium (15-30 lines): Panel styling, form layouts
- Complex (40+ lines): Only for layout-focused examples© reactjs, CC-BY-4.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .claude/skills/docs-sandpack of reactjs/ar.react.dev.
Open the folder on GitHubat commit 2da48d6
We found 3 copies of this SKILL.md (exact, near-identical or edited) in other folders. This page covers the copy in reactjs/ar.react.dev, which our catalogue first saw on October 7, 2026.
Docs Sandpack next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Docs Sandpack this skillreactjs/ar.react.dev | 164 | — | ~2.7k | Automated safety check: Pass | CC-BY-4.0 | |
| Web Artifacts Builderanthropics/skills | 180k | 40 repos | ~769 | Automated safety check: Pass | Apache-2.0 | |
| React Doctormakeplane/plane | 60k | 12 repos | ~657 | Automated safety check: Pass | AGPL-3.0 | |
| React Composition Patternsvercel-labs/openreview | 1.7k | 58 repos | ~721 | Automated safety check: Pass | MIT | |
| React Router Developmentremix-run/react-router | 57k | 1 repos | ~1.5k | Automated safety check: Pass | MIT | |
| Electron Multi-Process ArchitectureiOfficeAI/AionUi | 33k | 1 repos | ~1.8k | Automated safety check: Pass | Apache-2.0 |
anthropics/skills
Builds multi-component claude.ai HTML artifacts as a small React, TypeScript and Tailwind project, then bundles it into one shareable HTML file.
makeplane/plane
Scans React code for lint, accessibility, bundle size and architecture issues, reports a health score and checks that changes do not lower it.
vercel-labs/openreview
Rules for structuring React components with composition instead of boolean props, covering compound components, lifted state, variants and React 19 changes.
remix-run/react-router
Guides work on React Router apps by first identifying whether the app uses Framework, Data or Declarative mode, then loading the matching reference and the installed package docs.
iOfficeAI/AionUi
Tells the agent where new code belongs in an Electron multi-process project and which APIs each process may use, with rules for new bridges, services, agents and workers.
google-labs-code/stitch-skills
Builds walkthrough videos from Stitch design projects using Remotion, with transitions, zoom effects and text overlays on each screen.
reactjs/ar.react.dev
A skill your agent uses when researching React APIs or concepts for documentation.
reactjs/ar.react.dev
A skill your agent uses when adding interactive RSC (React Server Components) code examples to React docs using <SandpackRSC, or when modifying the RSC sandpack infrastructure.
reactjs/ar.react.dev
A skill your agent uses when writing any React documentation.
reactjs/ar.react.dev
A skill your agent uses when writing or editing files in src/content/blog/.
reactjs/ar.react.dev
A skill your agent uses when writing or editing files in src/content/learn/.
reactjs/ar.react.dev
A skill your agent uses when creating new React documentation pages or updating existing ones.
Works with
A skill your agent uses when adding interactive code examples to React docs. dev, published by the product's own GitHub organization. Use when adding interactive code examples to React docs.
Docs Sandpack fits situations like: adding interactive code examples to React docs.
Run `npx skills add reactjs/ar.react.dev --skill docs-sandpack -a claude-code`. Or copy the skill folder (.claude/skills/docs-sandpack in reactjs/ar.react.dev) into .claude/skills/docs-sandpack in your project. Claude Code loads it when a task matches its description.
Run `npx skills add reactjs/ar.react.dev --skill docs-sandpack -a codex`. Or copy the skill folder (.claude/skills/docs-sandpack in reactjs/ar.react.dev) into .agents/skills/docs-sandpack in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add reactjs/ar.react.dev --skill docs-sandpack -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/docs-sandpack, .gemini/skills/docs-sandpack, .github/skills/docs-sandpack and .opencode/skills/docs-sandpack in your project.
SKILL.md names no scripts, command-line tools or credentials: Docs Sandpack is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Docs Sandpack is published under the CC-BY-4.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.7k tokens (SKILL.md is roughly 11k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Docs Sandpack: Web Artifacts Builder (anthropics/skills, 180k stars), React Doctor (makeplane/plane, 60k stars), React Composition Patterns (vercel-labs/openreview, 1.7k stars) and React Router Development (remix-run/react-router, 57k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
reactjs (a GitHub organization, an official publisher) maintains it in reactjs/ar.react.dev, which has 164 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on October 5, 2026.
Source: reactjs/ar.react.dev on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.