Compiler Verification

VerifiedCaution

Run all compiler checks (tests, lint, format) before committing. Detects whether TS or Rust code changed and runs appropriate verification steps.

Sby Skills Guide Bot
DevelopmentIntermediate
8/29/2026
Claude CodeCursorCodex
#compiler#test-runner#pre-commit#rust#typescript

Recommended for

Automated summary

Detects TypeScript or Rust changes in the compiler repo and runs the matching verification chain (tests, lint, format) before committing.

Strengths

  • Automatically picks TS, Rust, or both check sets from `git diff --name-only`
  • Runs steps sequentially, halts on first failure, and reports each step as passed/failed
  • Supports an optional test pattern for focused snap-test runs
  • Ships with a 'common mistakes' section covering root-level prettier and skipped Rust tests

Limitations

  • Tightly bound to this specific repo: package names, `yarn snap` / `test-rust-port.sh` scripts and the `compiler/` layout
  • Assumes a fully provisioned toolchain (yarn workspaces, Rust, Babel) is already installed
  • Does not diagnose failures beyond echoing the error and suggesting fixes
When to use it

Use it right before committing or opening a PR that touches `compiler/packages/` or `compiler/crates/`.

When not to use it

Avoid it on other repositories or non-compiler code, where the referenced scripts and paths do not exist.

Security analysis

Caution
Quality score90/100

The skill is a normal developer verification workflow: it inspects git changes and runs tests, lint, formatting, and repo-local test scripts. It does not exfiltrate data, disable safety, delete files broadly, or use obfuscated payloads. The only caution is that it uses shell and executes repository-provided scripts, which is powerful but appropriate for the stated purpose.

Findings
  • •No allowed-tools are declared, but the workflow invokes git, yarn, and repo-local bash scripts.
  • •Executes compiler/scripts/*.sh from the repository; this is legitimate for the task but assumes the repository scripts are trusted.
How this analysis is made

Examples

Pre-commit verification
I'm about to commit my changes to the compiler, can you run the full verification first?
Focused Rust check
Run the Rust compiler checks but only the snap tests matching 'hooks'.
TS-only lint pass
Only TypeScript files changed in compiler/packages — run the snap tests, full test suite and lint, then format.

name: compiler-verify description: Use when you need to run all compiler checks (tests, lint, format) before committing. Detects whether TS or Rust code changed and runs the appropriate checks.

Compiler Verify

Run all verification steps for compiler changes.

Arguments:

  • $ARGUMENTS: Optional test pattern for yarn snap -p <pattern>

Instructions

  1. Detect what changed by running git diff --name-only HEAD (or vs the base branch). Categorize changes:

    • TS changes: files in compiler/packages/
    • Rust changes: files in compiler/crates/
    • Both: run all checks
  2. If TS changed, run these sequentially (stop on failure):

    • yarn snap (or yarn snap -p <pattern> if a pattern was provided) — compiler tests
    • yarn test — test full compiler
    • yarn workspace babel-plugin-react-compiler lint — lint compiler source
  3. If Rust changed, run these sequentially (stop on failure):

    • bash compiler/scripts/test-babel-ast.sh — Babel AST round-trip tests
    • bash compiler/scripts/test-rust-port.sh — full Rust port test suite (compares Rust vs TS compiler output across all passes; must have 0 failures — do not regress)
    • yarn snap --rust — end-to-end snap tests using the Rust compiler (compares compiled output and logger events against .expect.md fixtures; use yarn snap --rust -p <pattern> for focused checks)
  4. Always run (from the repo root):

    • yarn prettier-all — format all changed files
  5. If implementing a plan doc, check:

    • Plan doc has no unaddressed "Remaining Work" items
    • Plan doc status is updated to reflect current state
  6. Report results: list each step as passed/failed. On failure, stop and show the error with suggested fixes.

Common Mistakes

  • Running yarn snap without -p is fine for full verification, but slow. Use -p for focused checks.
  • Running prettier from compiler/ — must run from the repo root.
  • Forgetting Rust tests — if you touched .rs files, always run the round-trip test and yarn snap --rust.

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/compiler-verification-mte1lis3/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/compiler-verification-mte1lis3' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/compiler-verification-mte1lis3/download' --output '.skill-downloads/compiler-verification-mte1lis3/SKILL.md.part' && mv '.skill-downloads/compiler-verification-mte1lis3/SKILL.md.part' '.skill-downloads/compiler-verification-mte1lis3/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/compiler-verification-mte1lis3/SKILL.md' && test -s '.skill-downloads/compiler-verification-mte1lis3/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/compiler-verify' && cp -R '.skill-downloads/compiler-verification-mte1lis3' '.claude/skills/compiler-verify'

Cursor
test -f '.skill-downloads/compiler-verification-mte1lis3/SKILL.md' && test -s '.skill-downloads/compiler-verification-mte1lis3/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/compiler-verify' && cp -R '.skill-downloads/compiler-verification-mte1lis3' '.cursor/skills/compiler-verify'

Codex
test -f '.skill-downloads/compiler-verification-mte1lis3/SKILL.md' && test -s '.skill-downloads/compiler-verification-mte1lis3/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/compiler-verify' && cp -R '.skill-downloads/compiler-verification-mte1lis3' '.agents/skills/compiler-verify'

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/compiler-verification-mte1lis3'

openskills read 'compiler-verification-mte1lis3'

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/compiler-verification-mte1lis3/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