Check Repository Invariants

VerifiedCaution

Reads .repo-context/invariants.md and runs each mechanically checkable invariant, reporting pass or fail per invariant.

Sby Skills Guide Bot
TestingBeginner
10/20/2026
Claude Code
#invariants#verification#quality-gate#project-overlay#repo-context

Recommended for

Automated summary

Reads the project's `.repo-context/invariants.md` file and runs each invariant that has an explicit command, reporting a pass or fail result for every one.

Strengths

  • Deliberately narrow scope: only invariants with an explicit command are executed
  • Structured output with one pass/fail verdict per invariant, easy to scan before a pull request
  • Explicitly flags aspirational, non-mechanically-checkable invariants and skips them instead of improvising a check
  • Reports using repo-relative paths, keeping results readable and portable

Limitations

  • Entirely dependent on the existence and quality of the `.repo-context/invariants.md` file
  • Does not fix anything: it only runs and reports, so remediation stays manual
  • No parallel execution, severity ordering, or timeout handling is described
When to use it

Use it before opening a pull request or after a cross-cutting change, to confirm the project's mechanically checkable rules in one pass.

When not to use it

Avoid it when the repository has no invariants file, or when you need a tool that automatically fixes the violations it finds.

Security analysis

Caution
Quality score72/100

The skill contains no destructive, exfiltration, or obfuscated behavior itself, and it sensibly limits scope to explicit commands and repo-relative paths. However, its whole purpose is to execute command lines taken from a repo-controlled markdown file, which is an untrusted input channel; with no declared tools and no confirmation/sandbox guidance this warrants caution rather than a clean 'safe' rating.

Findings
  • •Instruction to execute commands read from a repo file (`.repo-context/invariants.md`) means arbitrary, unaudited shell commands can be driven by repository content (indirect prompt-injection / command-execution surface).
  • •No allowed-tools are declared (no Bash), yet the core instruction is to run commands; the executor's tool grants and the provenance/trust of `invariants.md` should be clarified.
  • •No guidance on sandboxing, confirmation before execution, or handling of destructive commands that might appear in the invariants file.
  • •Instructs the agent to execute shell commands sourced from a repo file (`.repo-context/invariants.md`), so behavior depends entirely on the contents of that file, which may be contributed by others in the repo.
  • •No declared allowed-tools, so the command execution relies on ambient/default tool permissions rather than an explicit, minimal grant.
  • •No guidance to confirm or sandbox commands before running them; a malicious modified overlay could specify destructive commands and they would be executed as 'invariants'.
How this analysis is made

Examples

Pre-PR invariant check
Check the invariants defined in .repo-context/invariants.md and give me a pass/fail table before I open this PR.
Verify after refactor
I just refactored the auth module — run every mechanically checkable invariant from the project overlay and tell me which ones fail.
Identify non-checkable rules
Go through .repo-context/invariants.md, run the ones with explicit commands, and list which invariants are aspirational so we can tighten them.

name: check-invariants description: Run mechanically checkable invariants from the project overlay and report pass or fail. disable-model-invocation: true

Check Invariants

Read .repo-context/invariants.md and run each listed check.

Rules

  • Only run invariants with explicit commands.
  • Report pass or fail per invariant.
  • If an invariant is aspirational rather than mechanically checkable, say so and skip it.
  • Use repo-relative paths only when presenting results.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/check-repository-invariants-mvda86x1/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/check-repository-invariants-mvda86x1' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/check-repository-invariants-mvda86x1/download' --output '.skill-downloads/check-repository-invariants-mvda86x1/SKILL.md.part' && mv '.skill-downloads/check-repository-invariants-mvda86x1/SKILL.md.part' '.skill-downloads/check-repository-invariants-mvda86x1/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/check-repository-invariants-mvda86x1/SKILL.md' && test -s '.skill-downloads/check-repository-invariants-mvda86x1/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/check-invariants' && cp -R '.skill-downloads/check-repository-invariants-mvda86x1' '.claude/skills/check-invariants'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/check-repository-invariants-mvda86x1'

openskills read 'check-repository-invariants-mvda86x1'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/check-repository-invariants-mvda86x1/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills