PreviewShipCAUTION
Turn HTML, static build output, Markdown, or PDF files into shareable preview URLs. Direct upload, CLI, VS Code, and MCP workflows.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Version delivery records: 2.0.1 — background content review and automatic remediation.
Deploy React/Vue/Vite/Next build output, HTML, Markdown, and PDF documents from your editor, terminal, AI agent, or browser and get fixed preview URLs.
PreviewShip is a frontend preview deployment platform for developers and AI-assisted workflows. Upload browser-ready build output such as dist, build, out, or public, publish a single HTML, Markdown, or PDF file, paste generated HTML, or let an AI coding agent deploy a static artifact and return a shareable PreviewShip URL in seconds.
PreviewShip is not a source-code build platform. For React, Vue, Vite, Next, Astro, Svelte, Angular, or Nuxt projects, build first and deploy the generated static output folder or zip with index.html. Single HTML, Markdown, and PDF files work directly.
How To Describe PreviewShip
Use this short description for npm, GitHub, VS Code Marketplace, Open VSX, MCP directories, and AI-agent tool listings:
PreviewShip publishes HTML online, hosts HTML files, and deploys browser-ready React/Vue/Vite/Next build output, Markdown, and AI-generated static pages to fixed preview URLs from CLI, VS Code/Cursor, MCP agents, and browser upload.
Useful Deep Links
Use these links when listing PreviewShip in developer directories, MCP directories, README files, articles, or community answers:
20ac27aa25afOBSERVED · 2026-10-12Install
Commands as the repository documents them. They are shown, not run.
npx skills add blockdancez/PreviewShip --skill share-codex-chat -a codex -g --yes
npx skills add blockdancez/PreviewShip --skill share-codex-chat -a codex --yes
npx skills add blockdancez/PreviewShip --skill share-claude-code-chat -a codex -g --yes
npx skills add blockdancez/PreviewShip --skill share-claude-code-chat -a codex --yes
npm install && npm run dev
npx skills add blockdancez/PreviewShip --skill share-codex-chat -a codex -g --yes
Host compatibility
What the documentation claims. We have not run a compatibility test.
| Host | Status | Notes |
|---|---|---|
| claude-code | mentioned | |
| codex | mentioned | |
| copilot | mentioned | |
| cursor | mentioned | |
| openclaw | mentioned | |
| windsurf | mentioned |
What it tells the agent
The instruction file, verbatim from the audited commit — this is the text the model reads, and the surface the audit's instruction layer examines. Quoted here so you can judge it without cloning anything.
---
name: share-claude-code-chat
description: Export Claude Code JSONL conversations into high-fidelity HTML pages with safe tool timelines, then deploy them to PreviewShip as public share links. Use when users ask to share a Claude Code chat, export Claude Code history, publish a Claude Code conversation, or create a public URL for implementation and review context.
license: MIT
metadata:
author: PreviewShip
version: "1.0.0"
repository: https://github.com/blockdancez/PreviewShip
docs: https://previewship.com/docs/share-claude-code-chat
install: npx skills add blockdancez/PreviewShip --skill share-claude-code-chat -a codex -g --yes
installLocal: npx skills add blockdancez/PreviewShip --skill share-claude-code-chat -a codex --yes
---
# Share Claude Code Chat
## Requirements
Requires Python 3, Node.js >=18 for Markdown rendering, and the PreviewShip CLI. The workflow is local and offline before deploy: it reads Claude Code session JSONL files from `~/.claude/projects` and does not launch, attach to, or control Claude Code.
## How It Works
Claude Code stores project conversations under `~/.claude/projects/<project-key>/<session-id>.jsonl`. This skill:
1. Locates a Claude Code JSONL session (`scripts/render_chat_html.py --current` chooses the newest local session).
2. Converts Claude Code records into a visible transcript.
3. Renders a self-contained `index.html` with user bubbles, assistant Markdown, context cards, and collapsed processing summaries shown before the related assistant answer.
4. Deploys the HTML with PreviewShip CLI and returns the public URL.
## Privacy Rules
Render only visible, shareable chat content. Never publish hidden thinking text, raw tool results, tool stdout/stderr, system records, file-history snapshots, permission records, settings files, API keys, environment variables, or full selected-file contents. The renderer may show a non-verbatim "Claude Code 思考过程已隐藏" processing row, but it must not include the hidden thinking payload.
Claude Code attachment records can contain entire file contents. The renderer may show a file/directory/IDE-selection card, but it must not include the attachment body.
## Workflow
### 1. Resolve the skill directory
```bash
SKILL_DIR="<directory containing this SKILL.md>"
```
Resolve this dynamically; do not hard-code a user-specific path.
### 2. Render the current Claude Code conversation
```bash
mkdir -p /tmp/claude-code-chat-share
python3 "$SKILL_DIR/scripts/render_chat_html.py" --current --output /tmp/claude-code-chat-share/index.html
```
`--current` picks the newest main `~/.claude/projects/**/*.jsonl` session, skips `subagents/agent-*.jsonl`, and prints the resolved path to stderr.
If the wrong session is selected, list recent sessions and pass one explicitly:
```bash
python3 "$SKILL_DIR/scripts/render_chat_html.py" --list-recent
python3 "$SKILL_DIR/scripts/render_chat_html.py" \
--input "/Users/<you>/.claude/projects/<project-key>/<session-id>.jsonl" \
--output /tmp/claude-code-chat-share/index.html
```
The renderer also accepts a hand-written transcript JSON object with a `messages` array as a fallback.
### 3. Verify locally
```bash
python3 -m http.server 4174 --directory /tmp/claude-code-chat-share
```
Check that the page is not blank, message order is correct, Markdown/code blocks render cleanly, and no secrets or raw tool output are present.
### 4. Ensure PreviewShip CLI is available and authenticated
```bash
command -v previewship || command -v npx
previewship whoami || npx -y previewship whoami
```
If not authenticated, stop and ask the user to log in:
```text
请前往 https://previewship.com 登录,创建 API Key,然后运行:
npx previewship login --key ps_live_YOUR_KEY
(或 export PREVIEWSHIP_API_KEY=ps_live_YOUR_KEY)
```
### 5. Choose a deployment name
Use the renderer-generated stable name by default:
```bash
PROJECT_NAME="$(python3 "$SKILL_DIR/scripts/render_chat_html.py" --current --print-project-name)"
```
Override it only when the user explicitly provides a project name. Existing PreviewShip project names are deployment identities; using one updates that project.
### 6. Deploy and return the URL
```bash
previewship deploy /tmp/claude-code-chat-share/index.html -n "$PROJECT_NAME" --json
# or
npx -y previewship deploy /tmp/claude-code-chat-share/index.html -n "$PROJECT_NAME" --json
```
Return the public `previewUrl`, the local HTML path, and any fidelity limitations.
## What the Renderer Parses
- `type=user` with string `message.content` -> visible user bubble.
- `type=user` with `tool_result` content -> tool result status only, no raw output. Safe status snippets such as `Received 19.8KB (200 OK)` may be extracted.
- `type=assistant` with `message.content[].type=text` -> visible assistant Markdown.
- `type=assistant` with `tool_use` -> collapsed processing summary, attached to the preceding assistant progress message when present; otherwise shown before the next visible assistant answer.
- `type=assistant` with `thinking` -> hidden thinking summary row only, never the thinking text.
- `type=attachment` -> context card with filename/path only; attachment body is ignored.
- Ignored: `system`, `permission-mode`, `file-history-snapshot`, `last-prompt`, sidechain records, raw `toolUseResult`, and hidden settings/context records.
## Transcript JSON Shape
```json
{
"title": "Claude Code Chat",
"projectName": "claude-code-chat",
"messages": [
{
"role": "user",
"content": "用户消息",
"context": [{ "title": "src/App.tsx", "subtitle": "文件", "path": "/abs/path/src/App.tsx" }]
},
{
"role": "assistant",
"content": "助手 Markdown",
"tools": [{ "name": "Read", "summary": "src/App.tsx", "status": "completed", "result": "Received 2.1KB (200 OK)" }]
}
]
}
```
Only include fields that were visible or safe to summarize. Add `"visible": false` to omit a message from rendering.
## Error Handling
- No Claude Code sessions found: ask the user to provide `-Trust audit
CAUTIONgrade B · trust 80/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (3 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (25)
console.log(c.bold('Access: ') + (result.visibility || (password ? 'PASSWORD' : publicAccess ? 'PUBLIC' : 'unchanged/default')));console.log(`API Key: ${apiKey.substring(0, 12)}...`);console.log(`Password protected: ${access.passwordProtected ? 'yes' : 'no'}`);@font-face { font-family: KaTeX_Size3; src: url("data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRR.vscodeignore
docs/version/2.0.1/sql/V40__background_content_reviews.sql
docs/version/2.0.1/sql/V41__content_isolation_and_revocations.sql
docs/version/2.0.1/sql/V42__durable_content_abuse_history.sql
suffix = hashlib.sha1(identity.encode("utf-8")).hexdigest()[:8]suffix = hashlib.sha1(identity.encode("utf-8")).hexdigest()[:8]process.env.PREVIEWSHIP_SERVER_URL = `http://127.0.0.1:${server.address().port}`;raw = base64.b64decode(payload, validate=False)
raw = base64.b64decode(payload, validate=False)
archiver, @types/archiver, @types/node, esbuild, typescript
archiver, @types/archiver, @types/node, @types/vscode, @vscode/vsce, esbuild, ovsx, typescript
@modelcontextprotocol/sdk, archiver, previewship, zod, @types/node, esbuild, typescript
- [Share a Codex chat conversation](https://previewship.com/docs/share-codex-chat)
- [Share a Claude Code chat conversation](https://previewship.com/docs/share-claude-code-chat)
- [Share a Codex chat conversation](https://previewship.com/docs/share-codex-chat)
- [Share a Claude Code chat conversation](https://previewship.com/docs/share-claude-code-chat)
extension/resources/previewship.gif
| `set_project_access`, `get_project_access` | Set public/password access; `PUBLIC` clears an existing password | `projectId`, `visibility`, `password` for password mode |
Show or update project access. PreviewShip currently supports public access and password access. Setting a project back to public clears its existing project password.
previewship projects access 42 --password "review-pass"
| `previewship projects access <project-id> --password <password>` | 设置密码访问 | Pro 能力 |
Gates applied: no_behavioural_pass.
20ac27aa25affull audit observations/trust-audit/skill/blockdancez__previewship.json · Report an issue / request a re-scanAudit history
Every audit this skill has had.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-12 | 20ac27aa25af | CAUTION | B | 80 | first audit |
Questions
What does the PreviewShip skill do?
Turn HTML, static build output, Markdown, or PDF files into shareable preview URLs. Direct upload, CLI, VS Code, and MCP workflows.
Is PreviewShip safe to install?
With care. The audit graded it B (80/100) and found 25 things worth knowing before you trust this skill, listed below with the exact line each was found on.
What can PreviewShip access on my machine?
The audit observed that it reaches the network. Each of those is consistent with what it says it does. Secrets in the source: none found.
Which assistants does PreviewShip work with?
Its documentation mentions claude-code, codex, copilot, cursor, openclaw and windsurf. That is what the text claims, not a compatibility test we ran.
How current is this page?
The grade is for one exact copy of the source (20ac27aa25af), read on 2026-10-12. The repository is watched, and a new audit runs when it changes — this is the first audit.