Cp skill validate

From zby/commonplace · View interactive version

Cp skill validate is an AI agent skill from the GitHub repository zby/commonplace. Run deterministic validation on KB artifacts, collections, collection landings, and the published redirect map, including schemas, links, required sections, and batch signals.

How to use this skill

Skill file

EXECUTE NOW

Run the packaged validation command. For a draft at an intended set member

role, use the supplied paths as separate arguments:

commonplace-validate <draft> --artifact <directory> --role <role>

Quote each path as needed. The role must be a declared relative member

filename. This mode writes nothing, including no receipt or scratch log;

do not use --output. It checks the candidate's content in the working artifact,

not job acceptance. Acceptance may add labelled invocation residue. Report

that distinction with a pass. Use --json for findings with explicit repair

fields, or default/--full output for the shared rendered finding text.

For today or recent, require a collection name or path; ask for it if

missing. Run commonplace-validate today --collection <collection> (or

recent), quoting the collection path as needed. Do not pass the target and

options as one quoted argument. The date filter applies to validation targets

inside that collection; collection structure and ignore-marker checks remain.

For other ordinary targets, follow the script below. For all, invoke each top-level collection separately because the CLI deliberately rejects a repository-wide literal scope. Run every check even after a failure, and report failure at the end:

if [ "$ARGUMENTS" = "all" ]; then
  status=0
  for contract in kb/*/COLLECTION.md; do
    commonplace-validate "$(basename "$(dirname "$contract")")" || status=1
  done
  commonplace-validate landings || status=1
  if [ -f properdocs.yml ]; then
    commonplace-validate redirects || status=1
  fi
  exit $status
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.

collection through the same generic target lookup

supplied --collection scope, using the separate invocation above

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

For judgment-based frontmatter checks, run run-review-batches, resolved from this skill's real location, with the frontmatter bundle.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.