enhance-arch-boundaries

enhance-arch-boundaries is a skill for Claude Code from kensaurus/cursor-kenji. It costs 55 tokens per session (1,632 once invoked), scanned A, original, MIT.

A system of automated rules that enforces how code modules may depend on one another, which layers may import which, and which features must remain isolated.

In plain words
What is it for?
Use it to enforce module boundaries, prevent forbidden imports, protect feature separation, and keep intended layering intact.
Why use it?
It catches architecture-damaging imports in checks and continuous integration before gradual changes turn the codebase into tangled dependencies.

Skill for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: mentions AGENTS.md.

Part of the cursor-kenji plugin — 132 skills, 63 commands, 6 agents, 1 hook, 3 MCP servers shipped together

Good fit Use it to enforce module boundaries, prevent forbidden imports, protect feature separation, and keep intended layering intact.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kensaurus/cursor-kenji/enhance-arch-boundaries
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.

Any agent
npx skills add kensaurus/cursor-kenji --skill enhance-arch-boundaries
Clone the repo
git clone --depth 1 https://github.com/kensaurus/cursor-kenji

Made for: Claude Code.

Or install cursor-kenji, the plugin that ships this one along with the rest of its 132 skills, 63 commands, 6 agents, 1 hook, 3 MCP servers.

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 enhance-arch-boundaries

README.md
[![agentmods](https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/enhance-arch-boundaries/github.svg)](https://agentmods.dev/skills/kensaurus/cursor-kenji/enhance-arch-boundaries)
Your own site
<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/enhance-arch-boundaries"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/enhance-arch-boundaries/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 enhance-arch-boundaries

Your own site · 80×15
<a href="https://agentmods.dev/skills/kensaurus/cursor-kenji/enhance-arch-boundaries"><img src="https://agentmods.dev/badge/skills/kensaurus/cursor-kenji/enhance-arch-boundaries.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,632 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.00055 $0.01632
Opus 5.5 $0.00022 $0.00653
Sonnet 5.5 $0.00011 $0.00326
Haiku 4.5 $0.00006 $0.00163

Measured 1mo ago against content hash cbf4cfac39e4, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

enhance-arch-boundaries 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 1mo 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.

skills/enhance-arch-boundaries/SKILL.md · 155 lines

How it starts

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

enhance-arch-boundaries — Architecture as a fitness function

Degree of freedom: MIXED. Recovering the model [HIGH freedom]; do-not-invent, shrink-only baseline, and deliberate-violation probes [LOW freedom — run exactly].

Codify the repo's intended structure as rules that block merge. Import spaghetti is how agents degrade architecture: each import looks locally reasonable, no single diff is wrong, and after forty sessions the layering is gone. A rule in AGENTS.md is advisory. A dependency-cruiser rule in the aggregator gate is physics.

This skill vs neighbors

Skill Owns
enhance-arch-boundaries (this) Mechanical boundary rules + shrink-only baseline
audit-backend-architecture Advises which pattern to adopt — does not enforce
housekeep-gates Wires this check into the aggregator
docs-adr Records why the model was chosen
enhance-agent-guardrails Broader guard install; this owns the import graph

How to reason

  1. Observe — folder layout, existing conventions, any architecture audit
  2. Interpret — what layering does the repo already mean to have?
  3. Classify — recoverable model / no intended structure (stop) / inventing (forbidden)
  4. Severity — client → server-only / service-role is the worst edge

Worked example

Observe: app/dashboard/page.tsx imports @/lib/supabase/admin (service-role). No boundary rule. Interpret: the intended split exists in folder names but is not physics. Classify: forbidden edge — client → server-only. Fix: dependency-cruiser / eslint-boundaries rule; grandfather other violations into a shrink-only baseline; probe a new forbidden import fails CI.


Phase 0 — Recover the intended architecture (do not invent one) [LOW freedom — stop if none]

The rules must encode the architecture the repo means to have.

  • Read folder structure and existing conventions (features/*, app/, lib/, server/, components/, monorepo packages).
  • Read audit-backend-architecture output if it exists — that is the drift to stop.
  • Confirm with the user in one pass: layers and allowed direction (e.g. ui → application → domain → infrastructure, never reverse), feature units that must stay isolated, special zones (server-only, secrets, generated).

Read the full file on GitHub · 155 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. 1mo ago Changed · -11 tokens per session cbf4cfac39e4
  2. 1mo ago First seen · 155 lines · 66 tokens per session scan A fac0ad5ac9dc

Subscribe to this mod's changes

enhance-arch-boundaries is a skill published in the GitHub repository kensaurus/cursor-kenji (9 stars, last pushed 26d ago), licensed MIT. It adds 55 tokens to every session and 1,632 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.

Related

Other skills, from other repositories

code-review-codex

Final-gate code review via Codex CLI (codex-5.3, xhigh). Finds bugs, security issues, and regressions before commit. No edits — findings report only.

jaansokk/cursor_tools · 45 tokens

spec-review-codex

Audit project specs for conflicts, goal drift, ambiguity, and gaps via Codex CLI (gpt-5.2, xhigh). Read-only findings report.

jaansokk/cursor_tools · 39 tokens

codex-review

Run code reviews with the Codex CLI, prioritizing bugs, regressions, security risks, and missing tests. Use when the user asks for code review, PR review, diff review, or commit-range review via codex.

jaansokk/cursor_tools · 50 tokens

code-simplifier

Use after implementing features to simplify and refine code for clarity, consistency, and maintainability.

luisabwk/kraken · 17 tokens

blind-spot-pass

Run a pre-build blind spot pass before the agent builds anything. Treat the user's prompt as the map and the real project as the territory: classify gaps across known knowns, known unknowns, unknown knowns, and unknown unknowns (with deps, edge cases, and blast radius under unknown unknowns); ask 5 to 10 high-leverage…

emaraschio/cursor-commands · 138 tokens

thermo-nuclear-code-quality-review

Extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use only when explicitly asked for a thermo-nuclear or thermonuclear code quality review, a deep code quality audit, or an especially harsh maintainability review.

emaraschio/cursor-commands · 58 tokens