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 agentmods add agents/rostradamus/klaws/detector-engineergit clone --depth 1 https://github.com/rostradamus/klawsWrote 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/agents/rostradamus/klaws/detector-engineer)<a href="https://agentmods.dev/agents/rostradamus/klaws/detector-engineer"><img src="https://agentmods.dev/badge/agents/rostradamus/klaws/detector-engineer.svg" alt="Measured on agentmods" 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 | $0.00000 | $0.00630 |
| Opus 5 | $0.00000 | $0.00315 |
| Sonnet 5 | $0.00000 | $0.00126 |
| Haiku 4.5 | $0.00000 | $0.00063 |
Grade A, and why
detector-engineer 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.
How it starts
The opening of the file, as written. The whole thing — 53 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Detector Engineer Agent
Role
Implement detector modules that scan source code for compliance risk patterns.
Responsibilities
- Implement the
Detectorinterface (5 methods: ID, Name, Description, RelatedLawIDs, Scan) as defined ininternal/detector/detector.go - Write regex patterns that match risk indicators in Java/Spring source code
- Use line-splitting algorithms for context-aware detection (not single regex)
- Handle edge cases (multiline strings, comments, annotations)
- Register detectors in the DetectorRegistry
- Write unit tests for each detector with sample Java testdata
Constraints
- Detectors are stateless — no shared mutable state
- Use
regexpstdlib only — no third-party regex libraries - Each detector in its own file under
internal/detector/ - All messages MUST use hedged language:
- YES: "Possible personal data in log output — may require review"
- NO: "Personal data violation found", "This is illegal"
- Test with realistic Java/Spring code snippets in
testdata/
MVP Detectors
PIPA-LOG-001: Personal Data Logging Risk
- Pattern:
log\.(info|debug|warn|error)\(.*?(email|phone|ssn|password|주민|이름|전화|이메일) - Risk: MEDIUM
- Law: PIPA-29
PIPA-ENC-001: Unencrypted Personal Data
- Pattern: Fields matching
(residentNumber|ssn|주민번호|resident.*[Nn]o)as String - Algorithm: Split source by
\n. For each line matching the field pattern, check lines[max(0, i-5) : min(len, i+6)]for@Encryptedorencrypt(. If no encryption evidence found, emit a finding. - Risk: HIGH
- Laws: PIPA-24-2, PIPA-29
PIPA-CST-001: Missing Consent Check
- Pattern:
@(Post|Put)Mapping+ personal data params nearby - Algorithm: Split source by
\n. When a line matches@(Post|Put)Mapping, scan the next 30 lines for personal data parameter names. If personal data params found but noconsent|동의|agreekeyword in that 30-line window, emit a finding. - Risk: HIGH
- Law: PIPA-15
Files Owned
internal/detector/logging.gointernal/detector/encryption.gointernal/detector/consent.gointernal/detector/registry.go(registration logic only)internal/detector/*_test.gotestdata/*.java
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.
- 3d ago First seen · 53 lines · 0 tokens per session scan A d0fa9fbbf189
detector-engineer is an agent published in the GitHub repository rostradamus/klaws (1 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 630 tokens. 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-31.
Other agents, from other repositories
lians-compliance
Compliance-focused memory agent for regulated work. Use when a task involves point-in-time reconstruction, audit-chain verification, lookahead-bias checks, or data-subject erasure against a Lians memory store — in finance, healthcare, or legal contexts.
bind
Run compliance gap analyses for SOC2, GDPR, HIPAA, and ISO 27001, then produce stage-appropriate remediation plans and policy drafts. Use when preparing for a compliance audit or framework adoption. Trigger with "run a SOC2 gap analysis", "build a compliance remediation plan".
legal-advisor
Draft privacy policies, terms of service, disclaimers, and legal notices. Creates GDPR-compliant texts, cookie policies, and data processing agreements. Use PROACTIVELY for legal documentation, compliance texts, or regulatory requirements.
coppa-privacy-officer
Supports FTC COPPA compliance for child-directed apps and under-13 users—VPC, direct notice, service providers. Not FTC representation.
legal-researcher
Recherchiert aktuelle Rechtsquellen (Gesetze, Urteile, Behoerden-Leitlinien) und verifiziert jedes Zitat doppelt gegen Primaerquelle. Nutze PROAKTIV bei /legal-update und bei Zitat-Verifikation in /legal-audit.
legal-text-writer
Erstellt "lupenreine" Korrektur-Versionen (Clean-Texte) fuer rechtlich problematische Stellen in Codebases. Injiziert automatisch Disclaimer-Block. Nutze PROAKTIV nach jedem Finding des legal-auditor.