Probity plugin
Probity checks every file write and shell command before it runs and blocks actions that break your rules, TDD included
- 247 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The hook reads the agent's file writes and commands and can block them
- AI-validated rules send session context to a model through the agent SDK
- A wrong rule stops the agent on a legitimate action
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add plugins/probityDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The hook reads the agent's file writes and commands and can block them
- AI-validated rules send session context to a model through the agent SDK
- A wrong rule stops the agent on a legitimate action
This is third-party code. Review the repository files before installing.
What it does
Probity plugs into agent hooks (Claude Code, Codex, GitHub Copilot CLI) and intercepts file writes and commands before they run. When an action breaks a rule, Probity rejects it and tells the agent why and what the allowed next step is, for example "add one test and run it to its first failure". Rules live in `probity.config.ts` and are written in TypeScript. Built in: `enforceTdd()` (failing test first, minimal implementation, refactor on green), `forbidCommandPattern()`, `requireCommand()` (for example, tests before commit), `forbidContentPattern()` and `enforceFilenameCasing()`. Rules can be deterministic, matching a string or regex, or AI-validated through vendors' official SDKs. Both kinds read recent session activity to judge an action in context.
Who it is for. Developers and teams who let a coding agent write code and want it to follow a process: TDD, banned commands, tests before commit.
Good fit when
- The agent writes production code before a test and you want the red, green, refactor loop back
- Certain commands, such as deletes or force pushes, must be forbidden to the agent
- A commit is allowed only after a passing test run
- The repository has a filename scheme and the agent breaks it
- One rule should behave the same in Claude Code, Codex and Copilot CLI
Not a fit when
- You need real protection from harmful shell commands: rules filter patterns but do not replace a sandbox
- You want to author a rule outside TypeScript: config and rules are written in it
- The project uses an agent not on the list: Claude Code, Codex and Copilot CLI are supported today
Example request
Wire Probity into this project and turn on the TDD rule for the src and test foldersLimitations
Rules and config are written in TypeScript, and the package installs through npm; for non-Node projects a global install fits. The agent list is short for now: Claude Code, Codex and GitHub Copilot CLI. AI-validated rules run through the official SDK and reuse the login the agent already has, which adds model requests and their cost. Probity reads the agent's session transcript to judge an action in context, so it depends on the format each agent provides.
How to disable. Remove the Probity hook from the agent settings; in Claude Code run /plugin uninstall probity or delete the PreToolUse entry from .claude/settings.json. Remove the package with npm uninstall @nizos/probity.
FAQ
Which agents does Probity support?
Claude Code, Codex and GitHub Copilot CLI. A hook is wired once for each: a plugin in Claude Code, a PreToolUse entry in ~/.codex/hooks.json for Codex.
Does it need its own API key?
No. AI-validated rules use the vendors' official SDKs and the login the agent already has, so Probity needs no separate access or billing.
Which languages and test runners work?
Any the agent can work with. Probity reads the session transcript directly, so no per-framework reporters are required.
What does the agent see when a rule fires?
The reason for the refusal and the next allowed step. For a TDD violation that means adding one focused test in the right file and running it to an assertion failure.
How do I migrate from TDD Guard?
The docs include a dedicated migration page: docs/migrating-from-tdd-guard.md.
Discussion
No questions or reviews yet.
Related
PluginsA Claude Code hooks plugin that blocks code without a failing test and implementation beyond the current test
A Playwright and TypeScript project template with rules and 17 skills so Claude Code, Codex and Cursor write tests to a standard
Hooks for Claude Code and Codex CLI keep a ledger of agent actions and refuse a "done" claim until a check has passed.
A team of AI testers that uses your app, finds bugs, fixes them in a separate worktree and opens pull requests and issues.
The evidence-code-review skill for Codex and Claude Code: evidence-based change review with MUST, SHOULD, BETTER and NITS levels
An adversarial code-audit skill: Hunter finds bugs, Skeptic challenges them, Referee rules, and no source edit happens without your permission
README in short
The project presents itself as a set of guardrails that check agent actions before they run. It goes on with a quick start for npm and the config, a list of built-in rules, answers on supported agents, languages and API keys, and links to setup and rules docs.