detector-engineer

detector-engineer is an agent for coding agents from rostradamus/klaws. It costs 0 tokens per session (630 once invoked), scanned A, original, MIT.

An agent for implementing detector modules that scan source code for patterns that may create legal or compliance risk.

In plain words
What is it for?
Building Java/Spring detectors, registering them, handling comments and multiline code, and writing unit tests with realistic examples.
Why use it?
It gives a defined approach for finding possible risks while preserving context and avoiding unsupported legal claims.

Agent

Install

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.

agentmods
npx agentmods add agents/rostradamus/klaws/detector-engineer
Clone the repo
git clone --depth 1 https://github.com/rostradamus/klaws

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 detector-engineer

README.md
[![agentmods](https://agentmods.dev/badge/agents/rostradamus/klaws/detector-engineer.svg)](https://agentmods.dev/agents/rostradamus/klaws/detector-engineer)
Your own site
<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>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 630 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00630
Opus 5 $0.00000 $0.00315
Sonnet 5 $0.00000 $0.00126
Haiku 4.5 $0.00000 $0.00063

Measured 3d ago against content hash d0fa9fbbf189, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

agents/detector-engineer.md · 53 lines

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 Detector interface (5 methods: ID, Name, Description, RelatedLawIDs, Scan) as defined in internal/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 regexp stdlib 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 @Encrypted or encrypt(. 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 no consent|동의|agree keyword in that 30-line window, emit a finding.
  • Risk: HIGH
  • Law: PIPA-15

Files Owned

  • internal/detector/logging.go
  • internal/detector/encryption.go
  • internal/detector/consent.go
  • internal/detector/registry.go (registration logic only)
  • internal/detector/*_test.go
  • testdata/*.java

Read the full file on GitHub · 53 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. 3d ago First seen · 53 lines · 0 tokens per session scan A d0fa9fbbf189

Subscribe to this mod's changes

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.

Related

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.

ebeirne/Lians2 · 55 tokens

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".

jeremylongshore/tons-of-skills-marketplace · 60 tokens

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.

NOMARJ/sigil · 49 tokens

coppa-privacy-officer

Supports FTC COPPA compliance for child-directed apps and under-13 users—VPC, direct notice, service providers. Not FTC representation.

vaquarkhan/compliance-agent-skills · 0 tokens

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.

FutureRootsDE/legal-audit-de · 62 tokens

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.

FutureRootsDE/legal-audit-de · 57 tokens