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.
npx skills add tmj-90/gaffer --skill threat-detectiongit clone --depth 1 https://github.com/tmj-90/gafferWrote 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.
[](https://agentmods.dev/skills/tmj-90/gaffer/threat-detection)<a href="https://agentmods.dev/skills/tmj-90/gaffer/threat-detection"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/threat-detection/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.
<a href="https://agentmods.dev/skills/tmj-90/gaffer/threat-detection"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/threat-detection.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00051 | $0.01659 |
| Opus 5.5 | $0.00020 | $0.00664 |
| Sonnet 5.5 | $0.00010 | $0.00332 |
| Haiku 4.5 | $0.00005 | $0.00166 |
Grade A, and why
threat-detection 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 113 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Detect threats with tested, ATT&CK-mapped rules
A detection only counts if it fires on the attack and stays quiet on normal activity,
and that can only be shown with sample events. In a Gaffer worktree you have the repo
and whatever log samples the ticket supplies. You have no live SIEM or EDR. So the
deliverables are detection-as-code (Sigma or the repo's rule format, with test
events), security events emitted by the application so detections have something
to match, and hunt packages (hypothesis, queries and findings over supplied data).
Sources: MITRE ATT&CK, the Sigma specification and sigma-cli, Splunk's PEAK framework
(Prepare, Execute, and Act with Knowledge), the Pyramid of Pain, OWASP Logging
Vocabulary, and ASVS 5.0 V16. A declared incident belongs to the incident-response
skill, and cloud misconfiguration to the cloud-security skill.
Procedure
- Frame the hypothesis (PEAK: Prepare). Write one sentence in the form: "An
adversary performing ATT&CK technique
T1110.003password spraying against the login API would produce manyauthn_login_failevents for different accounts from one source within five minutes." Name the technique ID, the log source and the observable. "Look for anything suspicious" is not a hypothesis. Callsearch_lorefor existing rules, log schemas, field mappings and known false-positive sources. - Confirm the data exists. Find the log source and field names in the repo's log
schema, logging code or the supplied samples. If the application does not emit the
event yet, add it first, following the
structured-logging-and-tracingskill and the OWASP vocabulary (authn_login_fail,authz_fail,session_use_after_expire,input_validation_fail,excess_rate_limit_exceeded). Include who, what, where and a UTC timestamp, and no secrets or unnecessary personal data. Missing telemetry is itself a finding. - Prefer behaviour over indicators. On the Pyramid of Pain, hashes, IPs and domains
are trivial for an attacker to change. Tools and TTPs are not. Write the rule
against the technique's behaviour. IOC sweeps are a supplement:
- Record each indicator's source, first-seen date and confidence, and drop stale or low-confidence ones. IP and domain indicators decay within weeks.
- Defang indicators in docs and evidence (
hxxp://evil[.]example). - Never resolve, browse or download an IOC, and never execute a sample.
- Write the rule (PEAK: Execute) in the repo's format, or as Sigma:
- Include
title, a UUIDid,status: experimentalfor new rules,description,references,logsource,detectionandcondition. - Add
falsepositivesnaming real benign causes, and alevelfrom the spec (informational, low, medium, high or critical). - Tag it with
attack.<tactic>andattack.tNNNN, for exampleattack.credential-accessandattack.t1110.003. - Use thresholds and correlation instead of single-event matches where the technique is volumetric.
- Include
- Test the rule with events. For every rule, commit at least one true-positive
sample (the attack) and one near-miss true-negative (the closest benign
behaviour, for example one user mistyping a password three times). Then:
- If
sigmais on PATH, runsigma check <rules-dir>, and runsigma convert -t <backend> -p <pipeline> <rule>for the repo's backend (list them withsigma list targetsandsigma list pipelines). - Run the repo's rule test harness, or a small test that evaluates the rule logic over the samples, and assert that the true positive matches and the negative does not.
- Do not install tooling. If none exists, the sample-driven test is the evidence.
- If
- Hunt over supplied data, when the ticket asks for one. Run the queries over the
provided logs or exports only. Establish a per-entity baseline (logins per hour,
destinations per host, bytes out per user) and flag outliers. Use a robust score
(median and MAD) because security data is heavy-tailed. Corroborate every hit with
a second, independent source before calling it malicious. If the hunt needs
production telemetry you cannot reach, the deliverable is the hunt package
(hypothesis, queries, expected results), and you raise
request_decisionso a human runs it. - Close (PEAK: Act with Knowledge). Every hypothesis ends in exactly one outcome:
- Confirmed activity: stop, record the evidence and raise
request_decisionwithseverity: security_requiredpointing at theincident-responseskill. Do not remediate on your own. - Refuted: record the queries, the data window and why the hypothesis did not hold.
- Detection gap: ship the new rule with its tests in this ticket, or state exactly what telemetry is missing.
- Confirmed activity: stop, record the evidence and raise
- Evidence. Record the rule test output as
test_output, plus a short hunt summary (hypothesis, ATT&CK IDs, data window, outcome), through therecord-evidenceskill, then stop.
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.
- 2mo ago Changed · +40 lines · -17 tokens per session 56c882f46b19
- 3mo ago First seen · 73 lines · 68 tokens per session scan A e3619ec443c1
threat-detection is a skill published in the GitHub repository tmj-90/gaffer (1 stars, last pushed 4d ago), licensed Apache-2.0. It adds 51 tokens to every session and 1,659 once invoked, about $0.0002 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-09-03.
threat-detection compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| threat-detectiontmj-90/gaffer | Skill | 1 | 4d ago | Apache-2.0 | A | 51 | Claude Code, Codex |
| bulwark-brainstormQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 50 | Claude Code |
| plan-creationQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 38 | Claude Code |
| anthropic-validatorQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 40 | Claude Code |
| create-subagentQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 42 | Claude Code |
| test-auditQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 0 | Claude Code |
| code-reviewQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 61 | Claude Code |