check-and-test

A workflow for running a project's standard quality checks: code style checks, type checks, and several levels of automated tests. It covers Python, TypeScript or JavaScript, unit tests, end-to-end tests, and tests normally skipped before commits.

In plain words
What is it for?
Use it to run the project's linting, type checking, unit tests, end-to-end tests, and additional skipped test groups in the prescribed order.
Why use it?
It reveals code-quality problems, type errors, and regressions before changes are merged, while investigating whether failures come from the code or the tests.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/reflexioai/reflexio/check-and-test
Any agent
npx skills add ReflexioAI/reflexio --skill check-and-test
Clone the repo
git clone --depth 1 https://github.com/ReflexioAI/reflexio

Made for: Claude Code, Codex.

Per session 97 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,959 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 98% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00097 $0.01959
Opus 5 $0.00048 $0.00979
Sonnet 5 $0.00019 $0.00392
Haiku 4.5 $0.00010 $0.00196

Measured yesterday against content hash 973d00e40fe7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

check-and-test scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

98% identical to check-and-test — 6 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

.claude/commands/check-and-test/SKILL.md · 229 lines

How it starts

The opening of the file, as written. The whole thing — 229 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Check and Test

Run the standard check-and-test flow (lint + type-check + pytest tiers), including tests normally skipped during pre-commit hooks.

Overview

This command runs the standard check-and-test tiers:

  • Python lint checks via ruff (code quality, security, complexity)
  • Python type checks via pyright (type safety)
  • TypeScript/JavaScript lint checks via Biome (code quality, formatting, import sorting)
  • TypeScript/JavaScript type checks via tsc (type safety)
  • Unit tests in reflexio/tests/ (excluding e2e and tests under reflexio/tests/server/llm/)
  • E2E tests in reflexio/tests/e2e_tests/ (skip all the low priority test by NOT setting RUN_LOW_PRIORITY env variable)
  • Tests skipped during pre-commit (those decorated with @skip_in_precommit)

The key difference from pre-commit is that PRECOMMIT env var is NOT set, so all tests run.

Prerequisites

Before running tests, activate the virtual environment:

source .venv/bin/activate

Test Execution

IMPORTANT: Run all tests sequentially using -n 0 to avoid test conflicts. The default pytest config uses parallel execution (-n auto), but this can cause race conditions and shared state issues between tests.

Step 0: Run Lint and Type Checks

Run lint and type checks across the full codebase before running tests.

0a. Ruff auto-fix:

ruff check --fix reflexio/
ruff format reflexio/

0b. Ruff remaining errors:

ruff check reflexio/

If any errors remain that ruff could not auto-fix, read each error, understand the issue, and fix the code yourself. Do NOT skip unfixed lint errors.

0c. Pyright type check:

pyright

Pyright uses pyrightconfig.json for scope. If any type errors are reported, read each error, understand the type issue, and fix the code yourself. Do NOT skip unfixed type errors.

0d. Biome auto-fix (TypeScript/JavaScript):

cd reflexio/website && npx biome check --write . && cd ../..
cd reflexio/public_docs && npx biome check --write . && cd ../..

Read the full file on GitHub · 229 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 229 lines · 97 tokens per session scan A 973d00e40fe7

Subscribe to this mod's changes

check-and-test is a skill published in the GitHub repository ReflexioAI/reflexio (338 stars, last pushed 2d ago), licensed Apache-2.0. It adds 97 tokens to every session and 1,959 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. It is 98% identical to check-and-test, differing in 6 lines, and is treated as a copy.

Related

Other skills, from other repositories

review

Rigorous code review of all uncommitted changes. Analyzes architecture, code quality, security, and engineering best practices. Embeds questions and assumptions inline, then summarizes all proposed changes as a plan for user approval before any edits are made.

ReflexioAI/claude-smart · 52 tokens

fastapi

FastAPI best practices and conventions. Use when working with FastAPI APIs and Pydantic models for them. Keeps FastAPI code clean and up to date with the latest features and patterns, updated with new versions. Write new code or refactor and update old code.

ReflexioAI/claude-smart · 57 tokens

commit

Git commit workflow with precommit hook handling, lint/type checking, README updates, and API reference updates. Use when the user wants to commit changes. Handles precommit hooks that modify files (formatting, linting) by re-staging and retrying. Runs ruff lint and pyright type checks on staged Python files, and…

ReflexioAI/claude-smart · 122 tokens

check-and-test

Run lint checks (ruff for Python, Biome for TS/JS), type checks (pyright for Python, tsc for TS/JS), and the standard pytest tiers (unit + e2e + tests skipped during pre-commit). Investigates failures to determine if they are application bugs or test issues, and fixes application bugs rather than weakening tests. Does…

ReflexioAI/claude-smart · 97 tokens

update-pr

Update an existing pull request with new changes. Use when the user wants to update a PR, push follow-up changes to a PR, refresh a PR description, or sync a PR with latest commits. Triggers on: update pr, update-pr, update the pr, push to pr, refresh pr, sync pr, update pull request.

ReflexioAI/claude-smart · 71 tokens

create-pr

Create high-quality pull requests via gh pr create. Use when the user wants to create a PR, submit a PR, open a pull request, submit for review, or push changes for review. Triggers on: create a pr, create-pr, submit a pr, open a pull request, submit for review, make a pr, gh pr create.

ReflexioAI/claude-smart · 74 tokens