policy-tester

policy-tester is an agent for Claude Code from spacelift-io/claude-plugins. It costs 21 tokens per session (332 once invoked), scanned A, original, MIT.

An agent that tests Spacelift policies by simulating them with sample inputs. It checks both a scenario that should trigger the policy and one that should not.

In plain words
What is it for?
Testing policies of types such as access, approval, plan, task, notification, and trigger, then reporting the sample inputs, decisions, language modes, and errors.
Why use it?
It helps reveal invalid input paths, parsing problems, and decisions that do not match the policy's intended behavior. It can compare the two supported Rego language modes when appropriate.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the spacelift plugin — 2 skills, 2 agents shipped together

Good fit Testing policies of types such as access, approval, plan, task, notification, and trigger, then reporting the sample inputs, decisions, language modes, and errors.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/spacelift-io/claude-plugins/tester
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.

Clone the repo
git clone --depth 1 https://github.com/spacelift-io/claude-plugins

Made for: Claude Code.

Or install spacelift, the plugin that ships this one along with the rest of its 2 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for policy-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/spacelift-io/claude-plugins/tester/github.svg)](https://agentmods.dev/agents/spacelift-io/claude-plugins/tester)
Your own site
<a href="https://agentmods.dev/agents/spacelift-io/claude-plugins/tester"><img src="https://agentmods.dev/badge/agents/spacelift-io/claude-plugins/tester/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for policy-tester

Your own site · 80×15
<a href="https://agentmods.dev/agents/spacelift-io/claude-plugins/tester"><img src="https://agentmods.dev/badge/agents/spacelift-io/claude-plugins/tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 332 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00021 $0.00332
Opus 5.5 $0.00008 $0.00133
Sonnet 5.5 $0.00004 $0.00066
Haiku 4.5 $0.00002 $0.00033

Measured 29d ago against content hash 2ce7feab22b2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

policy-tester 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 29d ago.

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.

plugins/spacelift/skills/spacelift-policy-writer/agents/tester.md · 14 lines

What it actually says

You test Spacelift policies. You are given a policy body and its type (ACCESS, APPROVAL, GIT_PUSH, INTENT, LOGIN, NOTIFICATION, PLAN, TASK, or TRIGGER).

Method:

  1. Call the Spacelift MCP policy_input_schema tool for the type (fall back to references/policy-contract.md). Build one input on which the policy should fire and one on which it should not - only fields the policy touches, correct nesting (e.g. PLAN uses input.spacelift.* for stack and run). Never invent field names. When the account has captures (policy_input_capture_read), simulate against them too.
  2. Call policy_simulate with { type, body, input } (or captures). The default engine is REGO_V1. Pass engineType: "REGO_V0" for bare v0 heads. Run both engines for portable policies (future.keywords imports plus if / contains heads).
  3. Read decision. If it contradicts intent or errors, add print() to the rule that misbehaves, read print_output, fix the input or policy, and re-simulate. For LOGIN, read save_refusal and simulate a session from outside the organization.
  4. Report: engine(s) used, each input in one line, the decision per scenario (the rules that fired), any compile errors, and any save_refusal.
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. 29d ago Changed · +2 tokens per session 2ce7feab22b2
  2. 3mo ago First seen · 14 lines · 19 tokens per session scan A 26b1e78ebfa1

Subscribe to this mod's changes

policy-tester is an agent published in the GitHub repository spacelift-io/claude-plugins (3 stars, last pushed 9d ago), licensed MIT. It adds 21 tokens to every session and 332 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

policy-tester compared with agents from other repositories

policy-tester next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
policy-testerspacelift-io/claude-pluginsAgent39d agoMITA21Claude Code
playwright-test-generatormicrosoft/playwrightAgent102ktodayApache-2.0A151Claude Code
.NET-Notebook-Migration-Agentmicrosoft/ai-agents-for-beginnersAgent82ktodayMITA33Claude Code
AVM Owner Triagegithub/awesome-copilotAgent42ktodayMITA61Claude Code
Ultimate Transparent Thinking Beast Modegithub/awesome-copilotAgent42ktodayMITA11Claude Code
Pimcore Expertgithub/awesome-copilotAgent42ktodayMITA26Claude Code
WinForms Expertgithub/awesome-copilotAgent42ktodayMITA19Claude Code