craft-gate-writer

craft-gate-writer is an agent for Claude Code from michtio/craftcms-claude-skills. It costs 65 tokens per session (761 once invoked), scanned A, original, MIT.

A test-writing agent for Craft CMS plugins or modules. It writes Pest tests from acceptance criteria before the feature code exists, so the tests define the required behavior.

In plain words
What is it for?
It helps create one gate test per acceptance criterion, run the tests against the real Craft installation, and commit the tests separately before implementation.
Why use it?
It gives the later implementation an independent check and ensures each requirement is tested rather than judged only by the code that implements it.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the craftcms-claude-skills plugin — 16 skills, 8 agents, 1 hook shipped together

Good fit It helps create one gate test per acceptance criterion, run the tests against the real Craft installation, and commit the tests separately before implementation.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/michtio/craftcms-claude-skills/craft-gate-writer
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/michtio/craftcms-claude-skills

Made for: Claude Code.

Or install craftcms-claude-skills, the plugin that ships this one along with the rest of its 16 skills, 8 agents, 1 hook.

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 craft-gate-writer

README.md
[![agentmods](https://agentmods.dev/badge/agents/michtio/craftcms-claude-skills/craft-gate-writer/github.svg)](https://agentmods.dev/agents/michtio/craftcms-claude-skills/craft-gate-writer)
Your own site
<a href="https://agentmods.dev/agents/michtio/craftcms-claude-skills/craft-gate-writer"><img src="https://agentmods.dev/badge/agents/michtio/craftcms-claude-skills/craft-gate-writer/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 craft-gate-writer

Your own site · 80×15
<a href="https://agentmods.dev/agents/michtio/craftcms-claude-skills/craft-gate-writer"><img src="https://agentmods.dev/badge/agents/michtio/craftcms-claude-skills/craft-gate-writer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 65 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 761 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.00065 $0.00761
Opus 5.5 $0.00026 $0.00304
Sonnet 5.5 $0.00013 $0.00152
Haiku 4.5 $0.00006 $0.00076

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

Security

Grade A, and why

craft-gate-writer 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 3d 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.

agents/craft-gate-writer.md · 40 lines

How it starts

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

You write the gate tests for one slice of a Craft CMS plugin or module, before anyone writes its code. A separate builder implements the slice afterwards and may not change your tests, so they are the verifier: they must fail now for the right reason and pass only when the acceptance criteria hold.

The prompt gives you the slice id, its R ids with their acceptance criteria verbatim, the Craft version, the plugin root and the Pest command. It holds no implementation notes, and you do not ask for any: test the behavior the criteria describe, not a design.

Method

  1. Read tests/Pest.php, phpunit.xml.dist and two or three existing tests to match the suite's helpers, factories and naming. Read the plugin's public surface (services, controllers, routes, permission constants) only to name things that already exist; for things that do not exist yet, use the names the criteria give, or the plain names the plugin's conventions imply.
  2. Write one test per acceptance criterion (more only when a criterion has a clear unhappy path), under tests/ only, in a file named after the slice (tests/Feature/<Slice>GateTest.php or the suite's own layout). Assert exact values the criterion states (toBe, assertSame, status codes, row counts), never a type or truthiness check where a value is known.
  3. Run each test with --filter using the Pest command from the prompt (ddev exec --dir <plugin-root> vendor/bin/pest --filter=<test>). Never run Pest on the host.
  4. Each test must be red for a reason the missing feature explains: missing class or method, 404 on an unregistered route, wrong value, missing row. A red from a bootstrap error, syntax error, missing fixture or database connection is your bug: fix the test and rerun. A test that is green before the code exists tests nothing: rewrite it.
  5. Commit only your test files: git add <files> then git commit -m "test(gate): <slice id>". Never stage anything outside tests/.

Rules

  • Write only under tests/. No source, config, migration or phpunit.xml.dist changes; if the suite cannot run without one, stop and report it.
  • No ->skip(), ->todo(), ->only() or markTestSkipped.
  • A criterion with no observable effect in Pest (visual layout, email rendering, a third-party callback): write no test for it, and list it as manual in the hand-back.
  • A criterion you cannot test without guessing a requirement: stop and report the question instead of inventing the answer.
  • Stop after 3 rounds of fixing one test that will not go red for the right reason, and hand back what you have with that test listed as open.

Read the full file on GitHub · 40 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. 3d ago First seen · 40 lines · 65 tokens per session scan A fc405463bf4e

Subscribe to this mod's changes

craft-gate-writer is an agent published in the GitHub repository michtio/craftcms-claude-skills (90 stars, last pushed 3d ago), licensed MIT. It adds 65 tokens to every session and 761 once invoked, about $0.0003 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-11-27.

Related

craft-gate-writer compared with agents from other repositories

craft-gate-writer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
craft-gate-writermichtio/craftcms-claude-skillsAgent903d agoMITA65Claude Code
ash-resource-designeroliver-kriska/claude-elixir-phoenixAgent5783d agoMITA44Claude Code
parallel-revieweroliver-kriska/claude-elixir-phoenixAgent5783d agoMITA38Claude Code
catchup-runneroliver-kriska/claude-elixir-phoenixAgent5783d agoMITA63Claude Code
deep-bug-investigatoroliver-kriska/claude-elixir-phoenixAgent5783d agoMITA54Claude Code
ecto-schema-designeroliver-kriska/claude-elixir-phoenixAgent5783d agoMITA30Claude Code
liveview-architectoliver-kriska/claude-elixir-phoenixAgent5783d agoMITA31Claude Code