skills/self-test/SKILL.md
Usage `rdc:self-test [--strict]` — Validate all rdc:* skills, plugin manifest, and tooling consistency. Use after editing skills, upgrading the plugin, or when a skill behaves unexpectedly.
npx skillsauth add LIFEAI/rdc-skills rdc:self-testInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
⚠️ OUTPUT CONTRACT (READ FIRST):
guides/output-contract.mdChecklist-only output. No tool-call narration. No raw runner dumps — summarize. One checklist upfront, updated in place, shown again at end with a 1-line verdict.
Sandbox contract: This skill honors
RDC_TEST=1perguides/agent-bootstrap.md§ RDC_TEST Sandbox Contract. Tier 2 behavioral runs and any git push are skipped underRDC_TEST=1; Tier 1 static lint runs normally.
rdc:release rdc-skills tag push| Tier | What it checks | Status | |------|----------------|--------| | Tier 1 | Static lint — frontmatter, Usage line, referenced files, name match | ✅ live | | Tier 2 | Behavioral — headless Claude runs each skill in sandbox, asserts artifacts | ✅ live — 13 manifests, blocked by check-cwd.js hook (see Rules) | | Tier 3 | Golden checklists — snapshot output format, regress on drift | 🔒 future |
Launch the interactive menu — pick tier, pick skill, see live output:
node {RDC_SKILLS_ROOT}/scripts/self-test-ui.mjs
Menu options:
Test output streams live to the terminal. No server, no extra processes.
Run the linter (direct or via UI):
node {RDC_SKILLS_ROOT}/scripts/self-test.mjs
# or interactively:
node {RDC_SKILLS_ROOT}/scripts/self-test-ui.mjs
Interpret exit codes:
0 = all skills pass1 = at least one FAIL or (in --strict mode) at least one WARN2 = runner itself crashed (e.g., skills dir unreadable)3 = .claude-plugin/plugin.json missing entirely (distinct from skill failures)Common findings and fixes:
| Finding code | Cause | Fix |
|---|---|---|
| description-backtick-leading | Folded YAML starts with ` — parser drops skill | Rewrite description to start with a word |
| usage-marker-missing | No Usage `rdc:name <args>` in description | Front-load arg contract |
| usage-marker-mismatch | Usage line references a different skill's name (copy-paste drift) | Fix the skill name in the Usage marker |
| name-filename-mismatch | frontmatter name: ≠ filename | --fix auto-renames; or rewrite name |
| guide-not-found / rule-not-found / hook-not-found | Dead reference in skill body | Create file or fix link |
| banner-missing | Skill missing OUTPUT CONTRACT banner | --fix auto-inserts |
| manifest-missing / manifest-version-mismatch | .claude-plugin/plugin.json missing or out-of-sync with package.json | Create/update manifest |
| duplicate-skill-name / skill-guide-filename-collision | Two skills claim same name, or skill collides with agent guide | Rename one |
| orphan-hook | File under hooks/ isn't referenced by any skill, settings.json, or plugin.json | Wire it up or delete |
Flags:
--strict — promotes warnings to failures (use in CI and before release)--skill <name> — run against a single skill (e.g. --skill rdc:build)--json — machine-readable schema v2 (per-skill findings[] with code + level, plugin_manifest block, global_findings, summary.exit_code). Consumed by Tier 2 runner as pre-gate.--fix — auto-repair fixable findings: insert missing OUTPUT CONTRACT banner, rename files to match frontmatter name. Prints FIXED: lines + touched file list so you can git diff + commit. Backtick-leading descriptions are NOT auto-fixed (need human rewrite).Report to the project lead:
Self-test: X/Y pass, Z warnings, W failures
Failures: <list>
Verdict: PASS | FAIL
Tier 2 runs each skill end-to-end in an isolated sandbox and asserts on observed state (files touched, commits made, work items, exit code). Use it before shipping behavioral changes — Tier 1 alone can't catch runtime drift.
Prerequisites:
claude CLI on PATH (headless mode: claude --print)curl -s http://127.0.0.1:52437/ping)rdc-skills (worktrees are added under .rdc/sandbox/<run-id>/)Run:
node scripts/self-test.mjs --tier2 # all skills with manifests
node scripts/self-test.mjs --tier2 --skill rdc:build # single skill
node scripts/self-test.mjs --tier2 --parallel 3 # up to 3 skills in parallel
node scripts/self-test.mjs --tier2 --quick # skip long-running assertions
What it does:
git worktree add into .rdc/sandbox/<run-id>/<skill>/, sets RDC_TEST=1, invokes claude --print with the skill prompt, waits for exitReports:
.rdc/reports/self-test-tier2-<iso>.json — full per-skill result, findings, timings0 pass, 1 fail (one or more skills failed assertions), 2 runner error (couldn't set up sandbox / branch)Adding a new manifest:
skills/tests/<skill>.test.json (one per skill, colocated)scripts/lib/manifest-schema.mjsnode scripts/self-test.mjs --tier2 --skill rdc:namerdc:release rdc-skills — it catches the backtick-drift class of bugs that break the skill menu silently.--strict in CI. Warnings matter in the release path.check-cwd.js SessionStart hook blocks headless sessions not launched from the monorepo root — runner uses --dangerously-skip-permissions to bypass. If tier2 tests fail with exit_code: -1, verify the flag is present in scripts/lib/runner.mjs.tools
Convert Office documents to/from Markdown with the build-corpus CLI: .docx/.pptx/.ppt → Markdown (Word OMML equations become KaTeX-readable TeX; tables, images, headings preserved), and Markdown → Word (.docx) where inline $...$ and display $$...$$ LaTeX become NATIVE Office Math (OMML) that Word renders as real equations. Use this skill whenever the user asks to convert a Word/PowerPoint document to Markdown, build a Markdown corpus from Office files, turn Markdown into a .docx (optionally with a .dotx template), or "open the report" to edit. Install build-corpus straight from GitHub and run it in the session.
development
Usage `rdc:brochure <input> [--out <path>] [--template <name>] [--format Letter|A4]` — Turn a zip, folder, HTML file, URL, or markdown folder into a print-quality PDF brochure via Puppeteer. Auto-detects print-variant HTML, honors @page CSS, falls back to a Studio-token-aware template when no HTML exists.
tools
Usage `rdc:convert <input> [--out <dir>] [--to markdown|word] [--images assets|base64|s3]` — Convert .docx/.pptx/.ppt → Markdown (Word OMML equations as KaTeX TeX, tables, images) or Markdown → Word via the build-corpus CLI (PyPI `build-corpus`, npm `regen-mde`). Portable: runs in any session that can reach npm or PyPI — Claude Code CLI and claude.ai both fetch + run it. Use whenever the user asks to convert an Office document, build a Markdown corpus from .docx/.pptx, turn Markdown into a .docx, or 'open the report' in the regen-mde editor (Windows).
tools
Usage `rdc:fs-mcp <task>` — Use the File System MCP bridge for live repo reads, safe writes, cloud-to-local ingest, and GitHub-branch imports into a dirty local monorepo. Use when Claude.ai, Cowork, or CLI agents need fs_read/fs_write/fs_import_git_files guidance.