cp-skill-validate

$npx mdskill add zby/commonplace/cp-skill-validate

Run deterministic validation script on KB notes for frontmatter validity and schema constraints

  • Identifies specific note paths to validate for correctness.
  • Depends on Bash scripting environment and the `commonplace-validate` command.
  • Decides based on user input (single note, directory, or 'all' option) and validates accordingly.
  • Delivers validation output directly without interpretation or supplementation.

SKILL.md

.github/skills/cp-skill-validateView on GitHub ↗
---
name: cp-skill-validate
description: Run the deterministic validation script on KB notes. Checks frontmatter validity, schema constraints, link health, required sections, and batch signals such as orphans.
type: kb/types/instruction.md
user-invocable: true
allowed-tools: Bash
context: fork
---

## EXECUTE NOW

Run the packaged validation command. For `all`, invoke each top-level collection separately because the CLI deliberately rejects a repository-wide literal scope:

```bash
if [ "$ARGUMENTS" = "all" ]; then
  for contract in kb/*/COLLECTION.md; do
    commonplace-validate "$(basename "$(dirname "$contract")")" || exit $?
  done
else
  commonplace-validate "$ARGUMENTS"
fi
```

**Target: $ARGUMENTS**

Prefer the narrowest target that covers the user's request. For write/edit workflows, validate the new or edited file paths explicitly; do not validate the whole KB unless the user asked for a full maintenance check.

- Note path or name: validate that specific note
- Multiple note paths: validate those specific notes, one command per path if needed
- Directory path or collection name: validate `.md` files under that directory, only when the edited set is directory-scoped
- "all": validate each top-level collection in a separate command
- "notes": validate all `.md` files in `kb/notes/`
- "recent" or "today": validate notes modified today
- Empty: ask which note to validate

Report the script output directly. Do not interpret, supplement, or override its findings.

For judgment-based frontmatter checks, run `kb/instructions/run-review-batches.md` with the `frontmatter` bundle.

More from zby/commonplace

SkillDescription
cp-skill-connectDiscover connections for a single artifact. Writes a connect-report under kb/reports/connect/<collection>/ without mutating library artifacts or indexes. Use with an artifact path or artifact name.
cp-skill-convertConvert notes between types. Currently supports text to note by adding unverified structured frontmatter, renaming the file to match the title, and fixing backlinks. Use with a note path or note name.
cp-skill-health-checkRun a Commonplace health check when agents, skills, or commonplace-* commands do not work correctly. Diagnoses project layout, promoted skill discovery, direnv/PATH state, package commands, and common launch-environment failures.
cp-skill-ingestUse when asked to ingest a URL or existing kb/sources snapshot into a .ingest.md source analysis.
cp-skill-revise-autoreasonExperimental: revise a note with an AutoReason-style loop using fresh Codex sub-agents for critic, revision, synthesis, and blind judging. Keep the incumbent, generate a critique-driven revision and synthesis, then use blind Borda judging to decide whether to continue. Triggers on \"/cp-skill-revise-autoreason [note]\".
cp-skill-revise-iterativeIteratively revise a note for flow, readability, and cohesion using non-interactive Claude calls. Each pass produces a numbered copy; the outer agent reviews for semantic fidelity and significance before continuing. Triggers on "/cp-skill-revise-iterative [note]".
cp-skill-snapshot-webSnapshot any URL into kb/sources/. Routes by URL type — GitHub issues/PRs via gh API, X/Twitter via xdk, PDFs via download+Read, web pages via WebFetch. One skill, URL in, markdown snapshot out. Triggers on "/cp-skill-snapshot-web", "/cp-skill-snapshot-web [url]".
cp-skill-writeWrite a single KB note — apply the target collection's conventions and path-valued type-spec, commit only in-hand links plus a cheap duplicate check, validate, then hand graph discovery to cp-skill-connect.
evaluate-scenariosDecompose each scenario into clean-context forks, measure framework-overhead bytes and hops per fork, and report a feasibility signal (heaviest fork's net load) and a cost signal (overhead summed across forks). Use to measure the operational overhead the framework imposes per agent.
roughdraft-reviewOpen a Markdown file in Roughdraft for the user to review, wait for Done Reviewing, then respond to the CriticMarkup feedback. Use when the user wants to review, comment on, or annotate a Markdown file (they may call the tool "rd"), and when presenting a plan — write the plan to disk and offer it for review this way.