argot-write-rule

argot-write-rule is a skill for Claude Code from get-tmonier/argot. It costs 131 tokens per session (3,476 once invoked), scanned A, original, MIT.

A guide for creating custom Argot code checks that enforce conventions unique to a repository. Each check uses a manifest and a sandboxed Rhai script, then is tested with fixtures before use.

In plain words
What is it for?
Use it to turn a repository convention into a repeatable check. The check can run when the repository explicitly invokes its local or CI workflow.
Why use it?
Built-in checks cannot know every team's local rules, such as how database queries or HTTP calls must be made. This lets a repository encode those rules without changing Argot itself.

Skill for Claude Code

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { loadConfig } from "../config";.

Part of the argot plugin — 7 skills, 1 hook, 1 MCP server shipped together

Good fit Use it to turn a repository convention into a repeatable check. The check can run when the repository explicitly invokes its local or CI workflow.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/get-tmonier/argot
agentmods
npx agentmods add skills/get-tmonier/argot/argot-write-rule

Made for: Claude Code.

Or install argot, the plugin that ships this one along with the rest of its 7 skills, 1 hook, 1 MCP server.

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 argot-write-rule

README.md
[![agentmods](https://agentmods.dev/badge/skills/get-tmonier/argot/argot-write-rule.svg)](https://agentmods.dev/skills/get-tmonier/argot/argot-write-rule)
Your own site
<a href="https://agentmods.dev/skills/get-tmonier/argot/argot-write-rule"><img src="https://agentmods.dev/badge/skills/get-tmonier/argot/argot-write-rule.svg" alt="Measured on agentmods" height="20"></a>
Per session 131 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,476 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00131 $0.03476
Opus 5 $0.00066 $0.01738
Sonnet 5 $0.00026 $0.00695
Haiku 4.5 $0.00013 $0.00348

Measured 8d ago against content hash 1d99faf49685, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

argot-write-rule 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 8d 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.

skills/argot-write-rule/SKILL.md · 279 lines

How it starts

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

argot-write-rule

argot's built-in rules cover patterns most repos eventually hit — foreign imports, reinvented functions, layering breaks, gamed tests. Some conventions are the repo's own: "route SQL through the query builder, never a string-concatenated query," "HTTP calls go through the shared client, not a bare one-off request," "retries always back off, never a hard-coded sleep loop." For those, write a custom rule: a small rule.toml manifest plus a sandboxed Rhai script under .argot/rules/<name>/, committed with the rest of the repo. argot check discovers it fresh every run — no recompiling argot. Its findings behave exactly like a built-in's: same severities, same suppressions, same output formats, one more group, custom. Full reference: https://argot.tmonier.com/docs/custom-rules/.

Rule authoring is a later, explicit workflow: use audit and ordinary checks to establish current behavior first. A custom rule must never turn a probabilistic finding into an unreviewed default gate. Writing or installing this skill does not schedule a check; a repository may choose to run its committed custom rules through an explicit local or CI workflow.

The gate: argot rules test <name> must be green

A custom rule is not done until its fixture suite is green. This is not polish at the end — it is the loop:

  1. Write fixtures before touching the script: at minimum one case that should fire and one that should stay silent. The silent case is what protects the team from a noisy rule — a rule that only ever proves it can fire has never been checked for false alarms.
  2. Run argot rules test <name> with no script yet (or a stub) and watch it fail.
  3. Write or fix check.rhai until every case passes.
  4. Every time you touch the script afterward — while iterating, while narrowing a false alarm, right before you hand it off — re-run argot rules test <name> first. A script you haven't re-tested since your last edit is a script you don't know still works.

Read the full file on GitHub · 279 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. 8d ago First seen · 279 lines · 131 tokens per session scan A 1d99faf49685

Subscribe to this mod's changes

argot-write-rule is a skill published in the GitHub repository get-tmonier/argot (48 stars, last pushed 5d ago), licensed MIT. It adds 131 tokens to every session and 3,476 once invoked, about $0.0007 per session on Opus 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-30.