local-artifact
Skill10 starsChanged 19 days agoMITView on GitHub
Build an HTML page (report, dashboard, explainer, small app) and keep it in a local gallery you can list, reopen, update and delete. Replacement for the built-in Artifact tool, with zero context cost until you type /local-artifact.
In this repository25 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-md-improverSkill
- ai-tutorialSkill
- deassembleSkill
- excalidraw-diagramSkill
- find-overlapping-skillsSkill
- first-principlesSkill
- humanizerSkill
- improve-skillsSkill
- loom-transcriptSkill
- manage-contextSkill
- organize-skill-mcpSkill
- pair-consultSkill
- pair-optimizeSkill
- pair-ratchetSkill
- pr-classifySkill
- pr-reportSkill
- scan-sessions-and-learnSkill
- simplify-pythonSkill
- skill-flowSkill
- slack-commSkill
- socratesSkill
- step-by-stepSkill
- sub-consultSkill
- to-dbmlSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 1 is distinctive, and 6 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Run python3 -I ${CLAUDE_SKILL_DIR}/scripts/gallery.py --help for flags.
- Very specific: line 22
Update, don't fork: If the user means an existing page, run list and edit <gallery>/<slug>/index.html in place.
- Very specific: line 25
Read references/page-contract.md, then write the page to the scratchpad (or wherever the user says).
- Very specific: line 39
If the page's meta.json has artifact_url, suggest the update form instead (prompt: "Read the Artifact at <url>, then publish <page> to it …
- Very specific: line 42
When the user pastes back a new URL, run link <slug> <url>.
- Very specific: line 46
Keep the prompt first: --tools takes a list and would swallow a prompt placed after it.
- Distinctive: line 47
Never run this command yourself.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Local artifact
The built-in Artifact tool is denied in permissions.deny because its schema
and companion tools cost thousands of tokens in every session. This skill does
the same job but loads only when you invoke it. Pages go to a local gallery
(~/.local/share/local-artifacts/<slug>/, override with LOCAL_ARTIFACTS_DIR)
instead of claude.ai.
scripts/gallery.py keeps the gallery: publish, list, open, link, delete.
Run python3 -I ${CLAUDE_SKILL_DIR}/scripts/gallery.py --help for flags.
Build or update a page
- Update, don't fork. If the user means an existing page, run
listand edit<gallery>/<slug>/index.htmlin place. Itsfile://link and history stay with the slug, the way republishing an artifact kept its URL. - Read
references/page-contract.md, then write the page to the scratchpad (or wherever the user says). The contract is what made artifact pages render the same everywhere, so keep it even for quick pages. publish <file-or-dir> --description "<one sentence>". Pass--slugto replace an existing page. Publish runs the contract checks and opens the page. Fix every!warning and publish again until none are left.Reply with the slug, the
file://link, and one line on what the page shows. End with an optional copy-paste command for the user to run in another terminal if they want the page on claude.ai, with<page>set to the absolute gallery path:claude "Read <page> and publish it as an Artifact. Reply with only the artifact URL." --setting-sources project,local --tools Artifact,ReadIf the page's
meta.jsonhasartifact_url, suggest the update form instead (prompt:"Read the Artifact at <url>, then publish <page> to it with url=<url>. Reply with only the artifact URL."). A new session must passurl, or it creates a separate artifact, and it must read the artifact first, or the publish is refused. When the user pastes back a new URL, runlink <slug> <url>.This is the only place the Artifact tool still exists. Skipping user settings drops the deny for that one session, and the user approves the publish there. Keep the prompt first:
--toolstakes a list and would swallow a prompt placed after it. Never run this command yourself. It gets around the user's deny, so the user runs it.
Things a local page can't do
claude.ai artifacts had a hosted runtime: shared database, comments, viewer
identity, ask-Claude. A file:// page has none of these. What replaces each:
- Input to collect from the user: a Copy as JSON button, and the user pastes the result back into chat, like the manage-context plan flow.
- Live data: pull it when you build the page and print the timestamp on it.
- Per-viewer state (tabs, filters, drafts):
localStoragewrapped in try/catch.
Sharing
The gallery is private to this machine. Sending a page anywhere else (a Superset page
via superset:page, a gist, Slack) publishes it, so ask the user first and
read the whole file before it leaves the machine.
Delete
delete <slug> --yes removes the folder and can't be undone. Run it only when the
user names the page, after they confirm.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

