clean-architecture

clean-architecture is a skill for Claude Code, Codex from clubpay/ronykit. It costs 83 tokens per session (3,705 once invoked), scanned A, a copy of clean-architecture, BSD-3-Clause.

A software design approach that keeps business rules separate from web frameworks, databases, and other outside tools.

In plain words
What is it for?
Use it when placing code in handlers, application services, or repositories, and when reviewing or refactoring RonyKit features.
Why use it?
It helps prevent application logic from becoming tied to one technology and makes layer boundaries easier to review.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when placing code in handlers, application services, or repositories, and when reviewing or refactoring RonyKit features.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/clubpay/ronykit/clean-architecture
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 clubpay/ronykit --skill clean-architecture
Clone the repo
git clone --depth 1 https://github.com/clubpay/ronykit

Made for: Claude Code, Codex.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/clubpay/ronykit/clean-architecture.svg)](https://agentmods.dev/skills/clubpay/ronykit/clean-architecture)
Your own site
<a href="https://agentmods.dev/skills/clubpay/ronykit/clean-architecture"><img src="https://agentmods.dev/badge/skills/clubpay/ronykit/clean-architecture.svg" alt="Measured on agentmods" height="20"></a>
Per session 83 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,705 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 91% copy Near-identical to another mod 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.00083 $0.03705
Opus 5 $0.00042 $0.01852
Sonnet 5 $0.00017 $0.00741
Haiku 4.5 $0.00008 $0.00370

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

Security

Grade A, and why

clean-architecture 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 8d 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.

Origin

This is a copy

91% identical to clean-architecture — 54 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

ronyup/internal/skeleton/skills/clean-architecture/SKILL.md · 245 lines

How it starts

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

Clean Architecture Framework

A disciplined approach to structuring software so that business rules remain independent of frameworks, databases, and delivery mechanisms. Apply these principles when designing system architecture, reviewing module boundaries, or advising on dependency management.

When to use

  • Designing or reviewing a RonyKit feature module's layer boundaries.
  • Deciding whether logic belongs in a handler, internal/app, or internal/repo.
  • A PR puts SQL, HTTP details, or framework types inside business logic.
  • Planning a new service before scaffolding (design-new-service / SDD).

RonyKit mapping (scaffolded apps)

RonyKit feature modules already follow Clean Architecture — use this table to place code and review PRs:

Clean Architecture RonyKit layer Rule
Interface Adapters (controllers) internal/handler Thin: decode input, call app, encode output. No business rules.
Use Cases internal/app Orchestration and application rules. Depends on repo ports only.
Entities / domain rules internal/app (types + methods) Pure logic; no imports from handler, sqlc, or rony context.
Gateways (repos) internal/repo/port.go + v0/ sqlc Port defined inward; Postgres/sqlc implementation is outer.
Frameworks & drivers service.go, Rony contracts, gateway Wiring and delivery at the edge.

Dependency direction: handlerapprepo.Portrepo/v0 (sqlc). Never import handler or sqlc from app. Read MCP architecture/service-structure, architecture/repo-ports, and architecture/api-handler-files.

Pair with go-testing (mandatory app unit + repo integration tests) and go-modern for idiomatic Go at each layer.

Core Principle

Source code dependencies must point inward — toward higher-level policies. Nothing in an inner circle can know anything about an outer circle. This single rule produces systems that are testable and independent of frameworks, UI, database, and any external agency. Business rules are what matter; databases, web frameworks, and delivery mechanisms are details — when details depend on policies, you can defer decisions, swap implementations, and test business logic in isolation.

Read the full file on GitHub · 245 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 8d ago First seen · 245 lines · 83 tokens per session scan A 2cbb1de03f3d

Subscribe to this mod's changes

clean-architecture is a skill published in the GitHub repository clubpay/ronykit (38 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 83 tokens to every session and 3,705 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. It is 91% identical to clean-architecture, differing in 54 lines, and is treated as a copy.

Related

Other skills, from other repositories

db-infra-mocks

Propose minimal seams and local substitutes so tests run without real RDBMS/Redis/Mongo infrastructure.

pilinux/gorest · 27 tokens

golang-database

Comprehensive guide for Go database access — parameterized queries, struct scanning, NULLable columns, transactions, isolation levels, SELECT FOR UPDATE, connection pool, batch processing, context propagation, and migration tooling. Use when writing, reviewing, or debugging Golang code that interacts with PostgreSQL…

samber/cc-skills-golang · 99 tokens

golang-samber-hot

In-memory caching in Golang using samber/hot — eviction algorithms (LRU, LFU, TinyLFU, W-TinyLFU, S3FIFO, ARC, TwoQueue, SIEVE, FIFO), TTL, cache loaders, sharding, stale-while-revalidate, missing key caching, and Prometheus metrics. Apply when using or adopting samber/hot, when the codebase imports…

samber/cc-skills-golang · 122 tokens

sq

Guides use of the sq CLI to query SQL databases and tabular files with SLQ (sq's jq-like query language) or native SQL, manage sources, choose output formats, and run inspect, diff, and table commands. Use when the user mentions sq, SLQ, wrangling CSV/Excel/JSON/DB data, cross-source joins, or command-line data…

neilotoole/sq · 89 tokens

vendor-update

Upgrade Go/Node.js vendor dependencies and sync tool versions. Use whenever the user says "upgrade dependencies", "update vendors", "vendor update", "run vendor-upgrade", "bump dependencies", "update packages", or asks to run the vendor-update Make target. This skill also checks scripts/build/version.mk after…

apache/skywalking-banyandb · 95 tokens

compiling

Compile and build the SkyWalking BanyanDB project. Use when the user asks to compile, build, or generate code for this project.

apache/skywalking-banyandb · 31 tokens