/adef:detection-authorfrom adef
Interviews detection engineers to author schema-grounded detection rules, capturing threat context and querying against declared fields.
Ships in adef. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
You are helping a detection engineer author a new detection. A good detection is not just a query — it's a query plus the reasoning behind it. Your two jobs are equally important:
adef; don't hand-write catalog YAML. adef detection new --source scaffolds the record; the query and context are filled in through the
journal and the record's query field.Before any command, interview the engineer. Cover — in conversation, not as a form dump:
H-XXXX), incident,
gap in coverage. Capture references.adef schema ingest); flag it.Read the declared schema ONCE (adef schema show <source>) before the
interview and work from context — don't re-run it between steps. When a
question is about thresholds or trigger conditions, put the relevant schema
evidence in front of the engineer as you ask (e.g. "the schema shows action
values include denied, dest_port is typed int") — they should decide
with data, not from memory.
Don't proceed to a query until you can state the hypothesis and the source back to the engineer and they confirm it.
adef detection list --report json
Scan for an existing detection covering the same behavior/technique/source. If one looks close, show it to the engineer — authoring a near-duplicate is waste; maybe they want to tune the existing one instead. (At Refine, ADEF's similarity/ overlap agents check this rigorously; you're doing the cheap early pass.)
adef detection new "<title>" --source <declared-schema>
This creates the journal (Find stage) and a draft catalog record grounded in
the schema's platform, query language, and scope literals. If --source errors
("no schema …"), the source isn't declared — stop and get it declared first.
Read the declared schema (<workspace>/schema/<source>.yml): field names,
observed values, and type. Draft the detection logic in the source's query
language, using only fields that exist in the schema and values consistent
with what's been observed.
The scaffold gives you the addressing, not the logic: for spl/kql/cql/sql it
seeds the real index/table literals plus a <condition> placeholder to
replace. If the schema had no scope literals, or the source's query language
isn't one of those four, the query field is empty — you write it from
scratch (the adef detection new output tells you when this happens). Either
way, the behavior clause is yours to author.
Explain each clause to the engineer in terms of the behavior from step 1 — the query should be legible as "this is how we catch that hypothesis."
SIEMs expose the same fact under multiple field names with different value
vocabularies (raw Status=0xc000006d vs normalized status=failure on the
same Splunk event). A schema field's values were harvested from its
canonical name only — its aliases are valid names but the schema does
NOT record their vocabularies. Three rules, all platforms:
values are known-good. Name + value from the same spelling = a query
that fires.Status=failure
passes schema check (the name exists) and matches nothing in the SIEM,
forever — the worst detection is one that never fires and never errors.
If the engineer wants the alias spelling, get its real values from them,
or have them split the merge (adef schema reshape ... --no-fold <name>)
so each spelling carries its own vocabulary in the schema.--no-fold split rather than fighting
the schema per-rule.Platform-specific traps (verified against vendor docs, 2026-07-22):
User=SUDOSHIPPING\grace.ssh vs user=grace.ssh;
Direction=%%14592 vs direction=inbound). Also: tstats/data-model
fields (Processes.process_name) are a third namespace that index schemas
don't contain — don't ground a tstats query in an index-derived schema.ActorUsername) exist only
inside parser functions (_Im_ProcessCreate) — they are not columns on raw
tables, so never mix ASIM names into a SecurityEvent query or raw column
names into an ASIM query. Vocabularies differ in shape: ASIM concatenates
(ActorUsername = DOMAIN\user) where the raw table splits
(SubjectUserName + SubjectDomainName). String == is case-sensitive,
=~ is not — choose deliberately. dynamic (JSON) columns hide nested
keys from getschema, so the schema may not list every addressable path.user.name) and raw passthroughs
(winlog.event_data.SubjectUserName) may both exist — but raw retention is
integration-specific (some ingest pipelines delete winlog.event_data.*);
trust the declared schema over assumptions. ECS splits user.name /
user.domain (never concatenated), and omits them entirely when SID
resolution fails. keyword fields are case-sensitive exact-match by
default; text vs .keyword sub-field choice changes matching semantics.principal.* vs target.* vs src.* by event
role — a rule scoped to the wrong noun silently misses. Values are
decomposed (userid bare; domain a separate field). YARA-L strings are
case-sensitive without nocase (and nocase is illegal on enum fields)._raw, not under the
normalized name.username) vs Custom Event
Properties are distinct layers, and the username form (bare vs
domain-qualified) varies by DSM — trust the schema's observed values.
CEP names with spaces must be double-quoted ("Parent Process Path");
=/LIKE are case-sensitive (ILIKE for insensitive).Fill the journal's Find section with what you drew out in step 1: the gap/ trigger, references, the one-sentence hypothesis, MITRE mapping, and the known false-positive notes. This is the durable "why" — write it for the engineer who inherits this rule, not for now.
There is no CLI write-seam yet for the record's query: or the journal's Find
template — editing those files directly is the supported interim path (they
are ADEF's own origin: authored artifacts, never a user's rule repo). When
you edit the record YAML, also bump its updated: timestamp — hand-edits
that skip it make the record lie about its freshness.
adef schema check --detection <D-XXXX> — scope the check to the rule you
just authored (whole-catalog output buries it and drags in unrelated
findings). Fields flagged "missing from schema" mean a typo, an undeclared
alias, or a real gap — resolve each with the engineer.adef detection tag-mitre <D-XXXX> <T…> (or hand
off to the mitre-tagger skill).adef detection observe/refine …) runs the
telemetry and similarity/overlap/verification gates — offer it as the path to
production-readiness.Report: the new detection ID, its schema grounding, whether schema check is
clean, and what context was captured. Then be explicit: the rule is in the
ADEF catalog — to get it into their detection repo, they export/copy it
themselves for now. Offer next steps (tag MITRE, advance to Observe, or author
another).
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub nebulock-inc/agentic-detection-engineering-framework --plugin adef9 skills in this plugin
/catalog-onboardingOnboard a detection-rule repository into the ADEF catalog. Use when the user wants to catalog a rules repo, when `adef catalog` leaves files unrecognized or needs_review, or when a repo contains a custom/in-house rule format ADEF doesn't parse yet. Drafts extraction profiles for unknown formats via the profile-author sub-agent, validates them deterministically, and gets human approval before installing./catalog-syncKeep the ADEF catalog current after the source rules repo changes, using `adef sync`. Use when the user says their rules repo changed and the catalog needs refreshing, asks to reconcile / re-sync / "what's new, modified, or orphaned since we catalogued", wants a CI staleness check, or asks why the catalog disagrees with the repo. Read-only on the source repo; preserves enrichment. For first-time cataloging use catalog-onboarding; for browsing use detection-explorer./coverage-reviewAssess MITRE ATT&CK coverage from the ADEF catalog (read-only) and turn it into a work plan. Use when the user asks how good their detection coverage is, where the gaps or blind spots are, which techniques are single points of failure or ride one log source, what to build or tune next, or wants a shareable MITRE Navigator layer. To find or inspect individual detections, use the detection-explorer skill./detection-explorerBrowse and inspect the ADEF detection catalog (read-only). Use when the user asks which detections exist or wants to find/filter them (by platform, ATT&CK tactic, engine, status, stage, origin, or review state), asks what needs MITRE tagging or review, or wants one detection's record, query, tactics, and journal history. For coverage or gap analysis, use the coverage-review skill./forge-stageDrive a detection through the FORGE stages after Find — Observe (baseline real telemetry, validate or kill the hypothesis), Refine (similarity/overlap/verification gates), Govern (deployment gate decision), Evolve (tune or deprecate). Use when the user advances a detection stage, runs or interprets baseline queries, says a query returned zero results, tunes a threshold, preps a detection for deployment, asks whether to tune/deprecate, or reports that Evolve came back `insufficient-data`. Encodes the workspace conventions — artifacts in analysis/<D-XXXX>/ never /tmp, findings as journal notes, one summary per stage, honest status claims. For creating detections use detection-author; for MITRE changes use mitre-tagger; to get the health numbers Evolve reads into the workspace use health-capture./health-captureGet real detection-health numbers into the ADEF workspace so the Evolve stage has evidence — signal volume, false/true positive counts, runtime cost, deployed-vs-catalogued drift, and telemetry-source liveness. Use when the user has metrics from their SIEM and asks how to record them, wants to know why `adef detection evolve` says `insufficient-data`, asks what ADEF knows about a detection's FP rate or volume, wants to track whether a deployed rule still matches the catalogued one, or asks whether a log source went quiet. Drives `adef ingest` / `adef health show`; never queries the SIEM itself. For the stage work those numbers feed, use forge-stage.Other plugins' skills for the same job