Publish Claude Artifacts from a coding agent

A reusable setup prompt for terminal publishing with an existing Claude Code login.

Ever wanted to create a real claude artifact from Claude CLI or Codex, here is the solution.

claude-artifact-cli lets a coding agent publish HTML as a Claude Artifact, then pull the files back down, edit them, and update the same artifact. It reuses an existing Claude Code login, so the publishing workflow can run from another agent too.

The project is unofficial and uses a private, undocumented API. Expect the integration to need updates if that API changes. The README covers installation and commands; the repo also ships an agent skill.

Give the agent this prompt

Paste this into the coding agent you want to publish from:

Please create a skill for publishing Claude Artifacts from this coding agent.

Use this CLI: https://github.com/nikships/claude-artifact-cli

Read the README and the agent skill shipped in the repo. Adapt that skill
for this agent and install the CLI if needed.

The skill should cover:
- Authentication through the existing Claude Code login.
- Creating and publishing HTML artifacts.
- Pulling, editing, and updating existing artifacts.
- Adding AI through the sample capability, if the current contract supports it.
- Saving persistent state through the db capability.
- Checking published files and reading saved data through the CLI.

Never print credentials, including token fragments in diagnostic output.
Read the current runtime contract before using capabilities. If a capability
is unavailable, report that instead of guessing its API.

Test the workflow with a small example artifact. Report what was tested
and what remains unverified.

Install the skill so I can ask:
"Create a Claude Artifact that [my idea]."

Read the contract before adding capabilities

The CLI exposes the runtime's page-author guide:

claude-artifact contract --prompt

Use that guide for the current capability API and declarations. For an existing artifact, inspect its stored contract with claude-artifact read <slug-or-url> first, then request that version's guide with claude-artifact contract <version> --prompt.

After setup, the intended workflow is a request such as “Create a Claude Artifact that tracks my reading list.” The setup prompt asks the agent to test publishing, updates, and data access; this note records the documented approach, not a completed live publishing test.

fullscreen