preview-site

preview-site is a skill for Claude Code from mr-devs/cc-academic-website. It costs 52 tokens per session (495 once invoked), scanned A, original, MIT.

A local preview and checking tool for an academic website whose page content comes from JSON data files.

In plain words
What is it for?
Use it after changing data or design files to validate every JSON file, serve the site at a local address, and check that each populated section is visible.
Why use it?
A small JSON formatting mistake can make an entire section disappear without an obvious page error. This checks the data and confirms that the sections appear in the browser.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/mr-devs/cc-academic-website/preview-site
Any agent
npx skills add mr-devs/cc-academic-website --skill preview-site
Clone the repo
git clone --depth 1 https://github.com/mr-devs/cc-academic-website

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for preview-site

README.md
[![agentmods](https://agentmods.dev/badge/skills/mr-devs/cc-academic-website/preview-site.svg)](https://agentmods.dev/skills/mr-devs/cc-academic-website/preview-site)
Your own site
<a href="https://agentmods.dev/skills/mr-devs/cc-academic-website/preview-site"><img src="https://agentmods.dev/badge/skills/mr-devs/cc-academic-website/preview-site.svg" alt="Measured on agentmods" height="20"></a>
Per session 52 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 495 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00052 $0.00495
Opus 5 $0.00026 $0.00247
Sonnet 5 $0.00010 $0.00099
Haiku 4.5 $0.00005 $0.00049

Measured 6d ago against content hash 66641e01ac9b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

preview-site scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/skills/preview-site/SKILL.md · 48 lines

What it actually says

Preview the Site

Serve the site locally and verify it works. The site renders all content client-side from data/*.json, so a malformed JSON file silently hides its entire section — always validate the data files, not just the page load.

Steps

Step 1: Validate the data files

for f in data/*.json; do python3 -m json.tool "$f" > /dev/null && echo "OK $f" || echo "FAIL $f"; done

Fix any failures before continuing (a trailing comma is the usual culprit).

Step 2: Serve

python3 -m http.server 8000 --bind 127.0.0.1

Run in the background (pick another port if 8000 is busy). Tell the user the URL: http://127.0.0.1:8000/.

Step 3: Verify the rendered page

If a headless browser is available (e.g., a Playwright-cached Chromium under ~/Library/Caches/ms-playwright/), dump the rendered DOM and check that each section with data is populated and not hidden:

<chrome-headless-shell> --headless --disable-gpu --dump-dom --virtual-time-budget=3000 http://127.0.0.1:8000/

Otherwise, ask the user to open the URL and check the page (and the browser console for fetch errors).

Step 4: Report

Tell the user the URL, what was verified, and any sections that failed to render (with the offending file). Leave the server running for them unless they say otherwise.

Debugging a hidden section

  1. Its JSON failed to parse → Step 1 catches this.
  2. Its JSON is an empty array/object → the section hides by design.
  3. The page was opened via file:// instead of the local server → fetch fails; must use HTTP.
  4. Renderer error → check the browser console; the JS module for each section lives in js/.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 48 lines · 52 tokens per session scan A 66641e01ac9b

Subscribe to this mod's changes

preview-site is a skill published in the GitHub repository mr-devs/cc-academic-website (5 stars, last pushed 25d ago), licensed MIT. It adds 52 tokens to every session and 495 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

chronicle

Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…

microsoft/vscode · 72 tokens

chat-pet-sprite-creation

Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.

microsoft/vscode · 53 tokens

cpu-profile-analysis

Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…

microsoft/vscode · 71 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens