write-detection-rule SKILL.md skillF

write-detection-rule from akasecurity/ai-tc is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add akasecurity/ai-tc/write-detection-rule@git:20261014.d3788b8

Pins git:20261014.d3788b8 in mdr.lock. Pin the fingerprint instead.

Audit grade
F, 13 of 17 checks passed
Kind
SKILL.md skill
Repository
akasecurity/ai-tc
Path
skills/write-detection-rule/SKILL.md
Versions recorded
14
Latest version
git:20261014.d3788b8, committed Oct 14, 2026
First version recorded
Jul 29, 2026
Size
15,001 bytes
Repository stars
17
License
Apache-2.0

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Skill: write-detection-rule

This skill teaches Claude Code how to write detection rules for the AI Traffic Control rule engine. Read this before creating or modifying anything in `rules/`. The full rule schema is `Rule` in `packages/schema/src/zod/rule.ts` — it is the source of truth for every field below.

## Rule file format (specVersion 1)

Every rule is a JSON file named `<rule-name>.json` inside a pack directory:

```json
{
  "specVersion": 1,
  "id": "<pack-id>/<rule-name>",
  "name": "Human-readable name",
  "category": "pii|financial|secret|phi|code_context|code_flaw|custom|config",
  "severity": "critical|high|medium|low",
  "matcher": { ... },
  "postValidators": ["luhn"],
  "examples": ["example matching string"]
}
```

### A misspelled key fails the parse — it is not dropped

Every object in the rule tree is **strict**: an unrecognized key is a parse error naming the key,
at whatever depth it sits. This holds for the rule itself, for `matcher`, `appliesTo`,
`requiresNearby`, the object form of a `postValidators` entry, and for fixture files including each
entry of `expectedSpans`.
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add akasecurity/ai-tc/write-detection-rule@sha256:9dd92b07e27c5231

The line at the top of this page pins the label git:20261014.d3788b8, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_pu5eto52znh4yh2t.svg)](https://markdownregistry.com/a/art_pu5eto52znh4yh2t)

2 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 14 versions of this file, between Jul 29, 2026 and Oct 14, 2026, about one every 6 days.

versioncommittedcommitsizeaudit
git:20261014.d3788b8 latest2026-10-14 d3788b8 15,001 BF view · diff
git:20261013.ee419c02026-10-13 ee419c0 14,326 BF view · diff
git:20261007.566a4632026-10-07 566a463 14,476 BF view · diff
git:20261007.d1ce9aa2026-10-07 d1ce9aa 14,609 BF view · diff
git:20261006.a08e3652026-10-06 a08e365 13,934 BF view · diff
git:20261006.6dea3a12026-10-06 6dea3a1 13,918 BF view · diff
git:20261006.d45ae632026-10-06 d45ae63 13,848 BF view · diff
git:20261004.99b26ca2026-10-04 99b26ca 12,858 BF view · diff
git:20261001.05868022026-10-01 0586802 12,106 BF view · diff
git:20260815.621f8112026-08-15 621f811 11,857 BF view · diff
git:20260813.f32fc712026-08-13 f32fc71 11,860 BF view · diff
git:20260813.efbf8092026-08-13 efbf809 11,666 BF view · diff
git:20260813.ded45bd2026-08-13 ded45bd 9,774 BF view · diff
git:20260729.9d0d7042026-07-29 9d0d704 9,580 BF view

Audit of the latest version

F  13 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: Frontmatter block present
  • fail: Frontmatter declares a name
  • fail: Frontmatter declares a description
  • FAIL, critical: No credential-shaped string (matched: AKIAIOSFODNN7EXAMPLE)
  • pass: Size between 200 bytes and 200 KB (15001 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

akasecurity/ai-tc · 17 stars · license Apache-2.0 · pushed 2026-11-07 · branch dev

API

GET https://markdownregistry.com/api/v1/artifacts/art_pu5eto52znh4yh2t
GET https://markdownregistry.com/api/v1/resolve?ref=akasecurity/ai-tc/write-detection-rule
GET https://markdownregistry.com/api/v1/blob/9dd92b07e27c5231b8ac512ab224cc0138b50ce821898fffbe516f3cd1a16fb8

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from akasecurity/ai-tc

AGENTS.md AGENTS.md file
akasecurity/ai-tc · AGENTS.md
git:20260819.f34155d · audit A · 17 stars
CLAUDE.md CLAUDE.md file
akasecurity/ai-tc · CLAUDE.md
git:20261030.9596e17 · audit A · 17 stars
llms.txt llms.txt file
akasecurity/ai-tc · llms.txt
git:20261105.565e6e7 · audit A · 17 stars
aka-audit SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/audit/SKILL.md · Show AKA's recent enforcement decisions
git:20260804.bf91794 · audit A · 17 stars
aka-dashboard SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/dashboard/SKILL.md · Launch the AKA web dashboard in your browser (reads your local store)
git:20260804.bf91794 · audit A · 17 stars
aka-detections SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/detections/SKILL.md · List installed AKA detection packs, versions, and available updates
git:20260804.bf91794 · audit A · 17 stars
aka-exceptions SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/exceptions/SKILL.md · List active AKA detection exceptions (masked) from the local store
git:20260804.bf91794 · audit A · 17 stars
aka-findings SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/findings/SKILL.md · List recent AKA findings (masked) from the local store
git:20260804.bf91794 · audit A · 17 stars
aka-health SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/health/SKILL.md · Show AKA detection activity and local security posture
git:20260804.bf91794 · audit A · 17 stars
aka-recommend SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/recommend/SKILL.md · Surface AKA's top recommendations from recent findings
git:20260804.bf91794 · audit A · 17 stars
aka-scan SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/scan/SKILL.md · Scan working-tree source files for code security flaws
git:20261013.2aadc13 · audit A · 17 stars
aka-setup SKILL.md skill
akasecurity/ai-tc · plugins/antigravity/skills/setup/SKILL.md · Set up AKA Security — calibrate notifications and detection posture from Antigravity's real activity.
git:20261021.41d1827 · audit C · 17 stars

Every file in akasecurity/ai-tc

Browse by kind, by grade F, or by owner.