kevintsai1202/teaching-site-skills/web-content-audit
Claude Code and agent skill by kevintsai1202/teaching-site-skills
- community
- ext:[{"type":"hook","description":"Pre/post lifecycle hooks"}]
Checking that the SKILL.md file is still in the repository.
Use this skill when you need to verify cross-file data/asset consistency in a content-driven site — not "does it render?" (that's `web-visual-verification`) but "do the data, files, and references all line up?". Triggers on phrases like "盤點內容", "稽核資產", "對照 course-data 跟 markdown", "找缺圖", "task ID 有沒有重複", "quiz 編號 vs 硬編碼總數", "audit", "content audit", "content drift", "asset coverage", "three-way sync check", "cross-file consistency", "find missing illustrations", "資料一致性檢查", "找出該補插圖的地方", or any moment when the user senses divergence between source files and deployed data. Output is a human-readable markdown report, not a pass/fail. Pair with `web-visual-verification` for full pre-release coverage.
Install
npx vskill@latest install kevintsai1202/teaching-site-skills/web-content-auditSemi-extensibleMentions customization, but needs skill-specific knowledge. Read the extensible skills standard
SKILL.md
The same SKILL.md was published earlier as kevintsai1202/teaching-site-skills/web-content-audit.
Web Content Audit
Schema authority: cross-file consistency rules (3-place sync for materials, task ID stability, quiz renumber trap) are codified in `_shared/domain-primitives.md` §13. Audit scripts in this skill operationalise those rules.Filename convention (English-first): audit reports land underdata/audit-*.md; scripts underscripts/audit-*.mjs.
This skill produces audit scripts that read source files and deployed data, compare them, and emit a human-readable report. The goal is not to gatekeep deployment (that's verification's job) — it's to surface drift that humans should review.
When to Invoke
- Before a major content release (catch outline ↔ course-data ↔ visuals drift before students see it).
- After adding/removing units / materials / quiz items (re-check the three-place sync rule).
- Before handing off a corporate edition to a client (confirm the condensed COURSE matches its source).
- When the user senses "something's off" but can't see a runtime bug — audit is for the invisible drift.
- When planning the next iteration (e.g. "which sections need new illustrations?").
Do NOT invoke when the question is "does the page render correctly?" — that's web-visual-verification.
Audit vs Verify — Operating Mode Difference
| Trait | Audit | Verify | |
|---|---|---|---|
| Output | Markdown report (human reads) | Pass/fail (CI gates) | |
| Tools | File reads, regex, JSON diffs, optionally Playwright | Playwright + asserts | |
| Failure mode | Always exits 0; report tells human what's worth fixing | Exits non-zero on bad state | |
| When run | Manually, at milestones | On every PR / pre-deploy | |
| Mental model | "Show me what's drifted" | "Don't let this regress" |
If your script ends with assert.* or process.exit(1), it's not an audit — move it to web-visual-verification.
The Five Audit Categories
Audit 1: Cross-Artifact Reference Resolution
The classic teaching-site bug: course-data.js:materials[] references a file the disk doesn't have, or getMaterialUrl() is missing a rule.
The output goes to data/audit-*.md; the human opens it and decides what to fix.
Audit 2: Asset Coverage / Gap Analysis
"Which sections still have no illustration?" — guide future work, don't fail anything.
This may use Playwright for screenshots (capture mode — no assertions) but the product is the gap list, not the screenshots. Don't conflate this with web-visual-verification's capture-*.mjs which has no analytical output.
Audit 3: Inlined Data ↔ Source Drift (Corporate Edition)
When window.COURSE is inlined in index.html (corporate edition), it can drift from the source files it was condensed from. Audit the diff:
The example workshop's audit-corp-6h-content.mjs does exactly this — produces a markdown dump for the instructor to skim before each corporate session.
Audit 4: ID Stability & Reuse
task.id, quiz.id, unit.id are stable contracts (localStorage keys, internal references). Audit them:
This is the audit that catches "we accidentally renamed d2-u3-t1 to d2-u3-task1" — silent localStorage-progress-wipe across all students.
Audit 5: Produced Artifact Inspection
When the pipeline produces a binary deliverable (DOCX, PDF, zip), audit its inner structure to catch broken builds early.
If you expect ~30 images and the DOCX has 3, something in the build went wrong silently. This is faster than opening Word and scrolling.
Output Convention
All audit outputs are versionable markdown (or JSON). Commit them at release milestones; the diff between releases tells you "what content actually changed".
Format the Report for Human Skimming
Auditors will skim, not read. Structure for skimming:
Lead with the summary and emoji-prefix every section. The audit's job is to be the world's most efficient code review.
The "Three-Place Sync" Audit (Critical for Teaching Sites)
The pattern from static-spa-conversion: every material must appear in (1) filesystem, (2) course-data.js:materials[], (3) getMaterialUrl() router. Audit script:
This single script catches 90% of "the material link is broken" bugs.
Audit Doesn't Block — It Informs
The strongest discipline: audit scripts always exit 0, even when they find problems. Why:
- Audits run regularly; you don't want CI red because of a known "we'll fix in next release" issue.
- Audits surface judgement calls (e.g. "section has no illustration — is that intentional?") that automation shouldn't decide.
- A failing audit feels like a verify; humans then treat audits as gates and the report falls into "didn't read it" hell.
If an issue MUST block release, promote it to a verify script (web-visual-verification) with assert.*. Audits inform; verifies gate.
When to Audit (Cadence)
| Trigger | Audits to run | |
|---|---|---|
| Adding/removing a unit | id-stability, material-references | |
| Adding a material file | material-references (esp. the three-place sync) | |
| Renumbering quiz | id-stability + manual check of hardcoded (N題) strings | |
| Before corporate edition handoff | corp-content (inline ↔ source) + material-references | |
| Before publishing ebook | inspect-docx-images / inspect-pdf-pagecount | |
| Quarterly maintenance | illustrations (gap analysis) → plan next content cycle |
Anti-Patterns
- Audit scripts with `assert.*` / non-zero exits — that's a verify, not an audit. Move it.
- Audit reports that nobody reads — keep them short, lead with summary counts, use emojis aggressively for scanability.
- One audit doing five jobs — split.
audit-materials.mjsandaudit-illustrations.mjsproduce different reports to different folders for different decisions. - Running audits in CI as if they were verifies — they become noise, get muted, become useless. Run on demand or at release milestones.
- No timestamp / version in the report — when comparing two audit runs, you need to know which is newer.
Hand-off
When this skill finishes:
- A set of
audit-*.mjs(and supportinginspect-*.mjs) scripts is inscripts/. - Their outputs land in
data/audit-*.md(or.jsonfor tooling consumption). - A README section in the project explains "how to read an audit report" (link to the convention above).
- The user knows to run audits at release milestones, not on every commit.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingweb-content-audit/SKILL.md
Popularity
- Repository stars
- 42
- Repository forks
- 9
- 7-day trend score
- 19
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 23 Jun 2026, 5 months ago.
Extension points
hookPre/post lifecycle hooks
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kevintsai1202/teaching-site-skills/web-content-audit)