kaiord: Agent for Claude Code

.claude/agents/architecture-guardian.md

architecture-guardian is an agent for Claude Code from pablo-albaladejo/kaiord. It costs 20 tokens per session (1,439 once invoked), scanned A, original, MIT.

An autonomous reviewer and fixer for hexagonal architecture, a design that separates core business rules from outside tools and services.

In plain words
What is it for?
Use it in the Kaiord monorepo to enforce allowed imports between domain, application, ports, and adapter layers, and to check permitted dependencies between packages.
Why use it?
It detects dependencies crossing the project’s defined layer boundaries, which can make core code tied to external libraries or harder to change.

Agent for Claude Code

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter.

This is pablo-albaladejo/kaiord's own configuration. It tells Claude Code how to work on kaiord itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kaiord configures →

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import type { BinaryReader } from "../ports/reader.port";.

Reuse

Borrowing it

Nothing to install: this file belongs to pablo-albaladejo/kaiord. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pablo-albaladejo/kaiord/main/.claude/agents/architecture-guardian.md
Clone the repo
git clone --depth 1 https://github.com/pablo-albaladejo/kaiord

Made for: Claude Code.

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 architecture-guardian

README.md
[![agentmods](https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/architecture-guardian/github.svg)](https://agentmods.dev/agents/pablo-albaladejo/kaiord/architecture-guardian)
Your own site
<a href="https://agentmods.dev/agents/pablo-albaladejo/kaiord/architecture-guardian"><img src="https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/architecture-guardian/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.

agentmods 80×15 button for architecture-guardian

Your own site · 80×15
<a href="https://agentmods.dev/agents/pablo-albaladejo/kaiord/architecture-guardian"><img src="https://agentmods.dev/badge/agents/pablo-albaladejo/kaiord/architecture-guardian.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 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,439 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.00020 $0.01439
Opus 5 $0.00010 $0.00720
Sonnet 5 $0.00004 $0.00288
Haiku 4.5 $0.00002 $0.00144

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

Security

Grade A, and why

architecture-guardian 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 12d 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.

.claude/agents/architecture-guardian.md · 180 lines

How it starts

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

You are the Architecture Guardian agent for the Kaiord monorepo. Your mission is to enforce hexagonal architecture boundaries and fix any violations.

Architecture Rules

Layer Dependency Graph

domain/           -> Depends on NOTHING (pure types + Zod schemas)
    ^
application/      -> Only imports from domain/ and ports/
    ^
ports/            -> Pure type definitions (interfaces/contracts)
    ^
adapters/         -> Implements ports, may use external libraries

Forbidden Import Patterns

From Cannot Import Reason
domain/ ../adapters/, ../application/, external libs Domain is pure
application/ ../adapters/, external libs Application uses ports only
ports/ ../adapters/, external libs Ports are contracts
Any core layer @garmin, fast-xml-parser, @fitparser External libs in adapters only

Cross-Package Dependencies

Package May Depend On
@kaiord/core Nothing external (only zod for schemas)
@kaiord/fit @kaiord/core only
@kaiord/tcx @kaiord/core only
@kaiord/zwo @kaiord/core only
@kaiord/garmin @kaiord/core only
@kaiord/cli @kaiord/core + adapter packages
@kaiord/mcp @kaiord/core + adapter packages
@kaiord/ai @kaiord/core + ai peer dependency

Execution Protocol

Phase 1: Scan for Violations (5 turns)

  1. Domain layer violations:

    grep -rn "from ['\"]\.\.\/adapters" packages/core/src/domain/
    grep -rn "from ['\"]\.\.\/application" packages/core/src/domain/
    grep -rn "from ['\"]@garmin" packages/core/src/domain/
    grep -rn "from ['\"]fast-xml-parser" packages/core/src/domain/
    

Read the full file on GitHub · 180 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. 12d ago First seen · 180 lines · 20 tokens per session scan A f791d4b1bd58

Subscribe to this mod's changes

architecture-guardian is an agent published in the GitHub repository pablo-albaladejo/kaiord (9 stars, last pushed 3d ago), licensed MIT. It adds 20 tokens to every session and 1,439 once invoked, about $0.0001 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-08-31.

Related

Other agents, from other repositories

pre-commit-reviewer

Use this agent to review code changes before committing and pushing to a PR. This agent analyzes diffs for bugs, style issues, dead code, missing tests, and alignment with target repository conventions. Use as a fallback when the PR review toolkit is unavailable, or dispatch directly for standalone pre-commit review.…

costajohnt/oss-autopilot · 243 tokens

reviewer

Code review specialist for quality/security analysis.

can1357/oh-my-pi · 10 tokens

workflow-quality

Use this agent when you need expert guidance on Output SDK implementation patterns, code quality, and best practices. Invoke when writing or reviewing workflow code, troubleshooting implementation issues, or ensuring code follows SDK conventions.

growthxai/output · 43 tokens

ts-enforcer

TypeScript strict mode enforcement — no any types, schema-first at trust boundaries, type vs interface discipline, strict tsconfig audit.

bdfinst/agentic-dev-team · 29 tokens

typescript-software-architect-review

Expert TypeScript software architect that provides Clean Architecture, Domain-Driven Design (DDD), Node.js patterns, and modern TypeScript frameworks guidance. Reviews TypeScript codebases for architectural integrity, proper separation of concerns, and best practices across Express, Fastify, NestJS, and other…

giuseppe-trisciuoglio/developer-kit · 89 tokens

angular-reviewer

Angular 22 and TypeScript code review specialist — Signals, Signal Forms (stable), standalone components, RxJS, performance, zoneless change detection, httpResource.

TheBeardedBearSAS/claude-craft · 36 tokens