domain-purity-auditor

domain-purity-auditor is an agent for Claude Code from richfrem/agent-plugins-skills. It costs 67 tokens per session (1,293 once invoked), scanned A, original, MIT.

A code auditor for the domain layer, the part of an application that contains core business rules. It checks that this layer does not depend on user-interface, web-server, database, or infrastructure technology.

In plain words
What is it for?
Checking files in a domain directory for imports and references to frontend frameworks, HTTP servers, databases, and other infrastructure.
Why use it?
Business rules become harder to reuse and test when they are tied to a particular framework or delivery system. The audit identifies those unwanted dependencies.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is "offending_import": "import { db } from '../utils/db-helper'",.

Part of the exploration-cycle-plugin plugin — 20 skills, 15 agents shipped together

Good fit Checking files in a domain directory for imports and references to frontend frameworks, HTTP servers, databases, and other infrastructure.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/richfrem/agent-plugins-skills
agentmods
npx agentmods add agents/richfrem/agent-plugins-skills/domain-purity-auditor

Made for: Claude Code.

Or install exploration-cycle-plugin, the plugin that ships this one along with the rest of its 20 skills, 15 agents.

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 domain-purity-auditor

README.md
[![agentmods](https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/domain-purity-auditor.svg)](https://agentmods.dev/agents/richfrem/agent-plugins-skills/domain-purity-auditor)
Your own site
<a href="https://agentmods.dev/agents/richfrem/agent-plugins-skills/domain-purity-auditor"><img src="https://agentmods.dev/badge/agents/richfrem/agent-plugins-skills/domain-purity-auditor.svg" alt="Measured on agentmods" height="20"></a>
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,293 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00067 $0.01293
Opus 5 $0.00034 $0.00647
Sonnet 5 $0.00013 $0.00259
Haiku 4.5 $0.00007 $0.00129

Measured 4d ago against content hash 8262c6632ef8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

domain-purity-auditor 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 4d 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.

plugins/exploration-cycle-plugin/agents/domain-purity-auditor.md · 97 lines

How it starts

The opening of the file, as written. The whole thing — 97 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Role: Domain Purity Auditor (v2)

You are an uncompromising, compiler-grade Architectural Fitness Auditor. Your sole mission is to ensure that AI-generated or migrated code inside the pure /domain layer contains absolutely zero technology, database, framework, UI, network, or infrastructure leakage. Most AI-generated "clean architecture" leaks Express, React, or Prisma into domain entities — your job is to enforce continuous domain purity using strict static and transitive validation gates.


1. Compliance Audit Rules

You must continuously check every file located inside the /domain namespace against the following synchronized restrictions. You must fail if a file imports, references, or links to any forbidden target:

1.1 Forbidden Frameworks & UI Elements

  • Target Symbols/Imports: react, vue, svelte, angular, @angular/*, jsx, tsx (containing markup), useState, useEffect, useContext.
  • Rationale: Domain entities represent pure mathematical business rules; they must never contain UI or presentation logic.

1.2 Forbidden Server & HTTP Layer

  • Target Symbols/Imports: express, koa, fastify, nest, router, req, res, http, cors.
  • Rationale: The domain layer must remain agnostic of network protocol. HTTP details are presentation concerns.

1.3 Forbidden Persistence & Database

  • Target Symbols/Imports: prisma, sequelize, typeorm, mongoose, pg, mysql2, select *, insert into, connect(), Client().
  • Rationale: Domain entities are stored in memory. Direct access to database clients or SQL strings represents persistence leakage. Database access must be done through pure Port interfaces.

1.4 Forbidden Vendor SDKs & Platforms

  • Target Symbols/Imports: aws-sdk, @google-cloud/*, firebase-admin, @stripe/*, stripe.
  • Rationale: Vendor SDKs change frequently. They must be quarantined inside the /infrastructure layer as Adapters.

1.5 Forbidden Network, Filesystem & Process I/O

  • Target Symbols/Imports: axios, fetch, node:fs, node:http, node:https, fs, http, https.
  • Rationale: File system read/writes and raw HTTP requests represent I/O side effects. The domain layer must remain mathematically pure. Any file-level or network interaction must go through a Port interface.

Read the full file on GitHub · 97 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. 4d ago First seen · 97 lines · 67 tokens per session scan A 8262c6632ef8

Subscribe to this mod's changes

domain-purity-auditor is an agent published in the GitHub repository richfrem/agent-plugins-skills (6 stars, last pushed yesterday), licensed MIT. It adds 67 tokens to every session and 1,293 once invoked, about $0.0003 per session on Opus 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.

Related

Other agents, from other repositories

fastify-reviewer

Reviews Fastify application code for anti-patterns, encapsulation violations, and production readiness issues. Use when completing Fastify feature work, before code review, or when the user says "review my Fastify code", "check for Fastify anti-patterns", "is my Fastify app production ready", "validate Fastify…

RadOrigin-LLC/RAD-Claude-Skills · 72 tokens

information-architect

Adversarial information architect who assumes the current documentation is harder to find, orient in, and comprehend than it needs to be. Audits READMEs, API docs, plugin docs, ADR collections, tutorials, and reference content against established IA practice — the four IA systems (organization, labeling, navigation…

testdouble/han · 193 tokens

architecture-reviewer

Review system architecture for scalability, security, and maintainability. User says: "Review our microservices architecture for potential issues" User says: "Is our database design scalable for 10x growth?" User says: "Check our API design for security vulnerabilities".

fattain-naime/engineering-docs · 69 tokens

architect

System architecture, data modeling, API contract design, and the creation of structured implementation blueprints for development teams.

martinffx/atelier · 23 tokens

astro-reviewer

Reviews Astro application code for anti-patterns, performance issues, security misconfigurations, and accessibility violations. Use when completing Astro feature work, before code review, or when the user says "review my Astro code", "check Astro performance", "audit my Astro site", "is my Astro app production ready"…

RadOrigin-LLC/RAD-Claude-Skills · 71 tokens

codebase-pattern-finder

You are a specialist at finding code patterns and examples in the codebase. Your job is to locate similar implementations that can serve as templates or inspiration for new work.

desplega-ai/agent-swarm · 76 tokens