hexagonal
Skill0 starsChanged 7 days agoMITView on GitHub
Use when designing or reviewing package or module boundaries in any language pack - ports, adapters, dependency direction, cross-layer interfaces, wiring at the composition root, or SOLID size limits and splitting a god type.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- AnyOrgName/php-skillstheir own version, first seen Nov 8, 2026
- G1Joshi/Agent-Skillstheir own version, first seen Oct 13, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- G1Joshi/Agent-Skills★ 15same name
- AnyOrgName/php-skills★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository35 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/work/platforms/claude.mdCLAUDE.md
- llms.txtllms.txt
- clarifySkill
- consistencySkill
- debuggingSkill
- documentationSkill
- featureSkill
- initSkill
- jobs-and-state-machinesSkill
- lang-clojureSkill
- lang-cppSkill
- lang-csharpSkill
- lang-elixirSkill
- lang-erlangSkill
- lang-goSkill
- lang-javaSkill
- lang-kotlinSkill
- lang-phpSkill
- lang-pythonSkill
- lang-rubySkill
- lang-rustSkill
- lang-scalaSkill
- lang-swiftSkill
- lang-typescriptSkill
- memorySkill
- parallel-workSkill
- performanceSkill
- qualitySkill
- reportSkill
- review-integrationSkill
- statusSkill
- testingSkill
- workSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Create a port only at a real boundary.
- Distinctive: line 24
Do not create an interface merely because a concrete type exists, but always create one at an adapter/application or application/domain …
- Distinctive: line 34
Before adding a shared interface or type: search for an existing one.
- Very specific: line 49
When a change adds a method or field to an existing type, declares an interface, adds module-level mutable state or import-time …
- Very specific: line 51
Read specs/SOLID.md §8 before adding to a type or package already over a limit.
- Distinctive: line 52
Put new state and behaviour on its own type with a consumer-owned interface and a constructor called from the composition root.
- Very specific: line 54
Run loops arch (and the pack's native arch check if it has one: loops lang show <id>).
- Very specific: line 74
Write or update an ADR (templates/ADR.md) for changes to layers, state ownership, canonical primitives, the command protocol, the …
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Hexagonal architecture
Load
specs/ARCHITECTURE.md §3dependency rule,§6consumer-owned ports,§15package boundaries,§27smells,§29compliance.specs/SOLID.md §6-7interfaces,§8limits,§9package state,§10splitting.- Your language's layout tree and its domain bans (
arch.forbidden_in_domain,impure_calls):skills/lang-<id>/architecture.md(loadloops:lang-<id>).
Boundary test
For every dependency ask: does the inner model need to know this technology exists? If not, keep it outside.
Forbidden in domain: HTTP/gRPC, SQL drivers and ORMs, queue clients, OS and filesystem access, generated transport or persistence types, YAML/JSON parsers, CLI frameworks, config loaders, vendor SDKs, behaviour-changing logging.
Ports
- Create a port only at a real boundary. Consumer-owned, narrow, at most 8 methods. The language's form of a port (interface, protocol, trait, behaviour, abstract class) is in its language skill.
- Consumers depend on a small interface for the behaviour they call, never the concrete type; construct concrete types only at the composition root.
- Do not create an interface merely because a concrete type exists, but always create one at an adapter/application or application/domain boundary.
Go example:
type OrderWriter interface { Save(ctx context.Context, o order.Order) error }Cross-package design
Before adding a shared interface or type: search for an existing one; find the consumer; define the minimum behaviour; keep technology types out; document ownership and ordering assumptions.
Domain vs application
- Domain:
PriceOrder,ApplyDiscount,AllocateStock,TransferFunds. - Application:
PlaceOrder,CancelSubscription,ImportCatalog,RetryFailedPayments.
Transport and persistence rules
- Handlers receive requests, build typed commands, call an inbound port, map the result and errors to the transport. They hold no business rules.
- Domain types are not the storage schema; repositories translate (
specs/ARCHITECTURE.md §18). - Reads return read models, never mutable entities or rows (
§11).
Adding to a type, interface or package
When a change adds a method or field to an existing type, declares an interface, adds module-level mutable state or import-time registration (Go: a package var or init()), or creates or splits a package or module:
- Read
specs/SOLID.md §8before adding to a type or package already over a limit. - Put new state and behaviour on its own type with a consumer-owned interface and a constructor called from the composition root.
- Register tables at the composition root, never at import time (Go:
init()); a test hook is a field, not a global. - Run
loops arch(and the pack's native arch check if it has one:loops lang show <id>); fix errors, and treat warnings on code you touched as a prompt to split.
Skip this for a task that touches no type, interface, module-level state or layout.
Architecture review checklist
Reject or request redesign when:
- domain imports adapter or platform code;
- a "service" owns unrelated concerns;
- an interface has broad CRUD merely for abstraction;
- mutable stores or entities cross the adapter boundary;
- a package becomes a dumping ground;
- a change adds import-time registration (Go
init()) or grows a type already over its limit instead of splitting it; - shared primitives are duplicated;
- technology dictates domain modelling;
- a new abstraction adds indirection without boundary value.
ADR trigger
Write or update an ADR (templates/ADR.md) for changes to layers, state ownership, canonical primitives, the command protocol, the persistence or wire schema strategy, the concurrency model or the consistency model (specs/ARCHITECTURE.md §26).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

