/powertools:screaming-architecturefrom powertools
Apply Robert C. Martin's "Screaming Architecture" principle at every scale — the whole system, and each name, function, class, schema, and API contract inside it — should scream what it DOES (its intent and use cases), not which framework or mechanism built it. Use this skill when designing or reviewing a codebase's directory/module layout, naming a variable/function/class/module, modeling a domain, designing a database schema or table, shaping an API/endpoint/event contract, deciding where code goes, or evaluating whether something is too framework-coupled or too generic to read. Also trigger when someone asks "how should I structure this project?", "where does this code go?", "what should I name this?", "does this name/schema/API reveal intent?", "is my architecture too tied to Rails/Spring/Django/Next?", "how do I keep the framework out of my business logic?", "how do I make my use cases testable without a database or web server?", or complains that the codebase, model, or API looks like a framework tutorial or generic CRUD rather than a product. Pairs with clean-code, ddd, naming-guidelines, and functional-design-architecture. Domain-agnostic.
Trending skills
7-day visitors to each skill page
Ships in powertools. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Look at the top-level directory structure of a project. What does it scream?
A good architecture screams the use cases of the application — Health Care System, Accounting System, Inventory Management. It does not scream Rails, Spring, Hibernate, Django, or Next.js. The framework is scaffolding you happened to use; it is not the point of the system.
Uncle Bob's analogy: blueprints for a house scream "house" — you see the foyer, the kitchen by the dining room, the bedrooms. Blueprints for a library scream "library." Your code should be as legible. A new developer should be able to glance at the structure and understand what the system does before learning what it was built with.
"Software architectures are structures that support the use cases of the system." — Ivar Jacobson, Object Oriented Software Engineering
The principle is fractal. Uncle Bob framed it at the top-level directory, but the same test applies at every zoom level. A name, a function, a class, a table, an endpoint — each is a tiny architecture, and each should scream its intent, not its mechanism. Zoom all the way in and the rule is identical: reveal what this does and why it exists; hide what it was built with. See "Screaming at every scale" below.
Open the repo root and read the top-level names. Ask: framework or purpose?
| Screams the framework (bad) | Screams the purpose (good) |
|---|---|
controllers/ models/ views/ | ordering/ billing/ shipping/ |
app/ config/ db/ lib/ | patients/ appointments/ claims/ |
pages/ api/ components/ | catalog/ checkout/ inventory/ |
services/ repositories/ dtos/ | underwriting/ policies/ payouts/ |
If someone can name your web framework faster than they can name your business, the architecture is screaming the wrong thing.
This isn't about banning controllers/. It's about the top level. Frameworks and delivery
mechanics belong in a lower, replaceable layer — not as the primary organizing principle.
The web is an I/O device — a detail. So is the database, the message queue, the CLI, the mobile app. These are ways to deliver the use cases to a user; they are not the use cases.
A system organized around its use cases lets you defer the big technical decisions:
If those decisions are baked into the center of your system, you've coupled your business to tools that will outlive their welcome. Push them to the edge.
Frameworks are tools, not ways of life. When a framework's docs say "structure your whole app like this," ask two questions:
Use the framework; do not marry it. Keep your domain able to run when the framework is gone.
The directory listing is just the widest zoom. Take the same test — intent, or mechanism? — all the way down. At each level, the failure mode is the same: the code names the how (the data structure, the generic operation, the framework) instead of the what (the business concept, the use case, the intent).
A name should scream what a thing is for in the business, not its type or its plumbing.
| Screams the mechanism (bad) | Screams the intent (good) |
|---|---|
data, info, obj, temp, val | pendingInvoice, expiredSession |
list, arr, map1, flag | overdueAccounts, isEligibleForRefund |
handleData(), process(), doIt() | settleClaim(), reserveInventory() |
UserManager, DataHelper, Utils | LoyaltyTier, ShippingQuote |
If the name would fit unchanged in any app in any industry, it's screaming "generic CRUD," not
your product. (For the full discipline, see naming-guidelines.)
A function's signature should read like a sentence about the domain. applyLateFee(account)
tells you the use case; update(account, field, value) tells you it touches a database.
Name for the business operation, not the mechanical one. A function that screams its intent
needs no comment explaining what it does — only, occasionally, why.
A type is a claim about the domain. Money, EmailAddress, PolicyNumber scream intent and
carry their own rules; String, int, Map<String,Object> scream "I didn't model this yet."
Make illegal states unrepresentable so the type itself screams the invariant — a
VerifiedEmail that can't be constructed from an unverified string says more than any doc.
(See ddd for value objects and functional-design-architecture for type-driven modeling.)
The domain model should read like the business talks. Its entities, events, and operations
should be words a domain expert recognizes — Subscription, renewed, cancelPolicy — not
technical stand-ins (Record, statusChanged, setFlag). If you can't map a model element to
a sentence a stakeholder would say, it's screaming the implementation, not the domain. This is
the Ubiquitous Language: the same words in the conversation, the model, and the code.
A schema screams intent when its tables and columns name business facts, not a framework's conventions or a bag of generic slots.
| Screams the mechanism (bad) | Screams the intent (good) |
|---|---|
data table with a JSON payload column | orders, line_items, shipments |
type, status as opaque ints | subscription_state, refund_reason |
field1, meta, extra | billed_at, canceled_at, net_cents |
| everything nullable "just in case" | NOT NULL / constraints that state rules |
Constraints and column names are documentation the database enforces. A schema that lets any row hold anything screams "we deferred every decision"; one whose constraints encode the rules screams what the business actually permits.
The contract is the loudest scream to the outside world — treat it as domain-first, not a thin skin over your tables or a CRUD reflex.
POST /policies/{id}/renew,
PaymentSettled, ClaimApproved — not POST /update, RowChanged, genericEvent.estimatedDeliveryDate,
not ts2. Enumerated states with meaning, not magic numbers.The same litmus everywhere: could a newcomer read this — the name, the signature, the table, the endpoint — and tell you what the business does, before knowing what built it? If not, it's screaming the wrong thing.
The reliable check that your architecture actually screams the right thing:
You can unit-test all your use cases without the framework, without a database, and without a web server running.
If your business rules can only be exercised through an HTTP request that hits a live database, they are entangled with the delivery mechanism. If you can instantiate a use case, hand it plain input, and assert on plain output — in a fast test, no I/O — the domain is properly independent.
This is the litmus test. It's also why the discipline pays off: independence from frameworks buys you fast tests, swappable infrastructure, and a domain a human can read.
When starting a project:
main / the framework entry point contain business rules. It should wire things
up and get out of the way.When reviewing an existing project:
import rails, from django, @nestjs/...,
next/...). Framework symbols deep in business logic = leakage. Push them to adapters.When a framework fights you:
ponytail-sized version of this: even one folder named for a capability, with the
business rule callable without booting the server, beats a textbook layer cake.controllers/ folder ever" — it's about what the top level organizes around.At every scale — the system, the module, the name, the function, the class, the schema, the API — it should scream what it does, not what it was built with. The proof at the top is that you can test the use cases without the framework, database, or web; the proof lower down is that a newcomer can read one name or contract and tell you the business behind it.
Based on Robert C. Martin (Uncle Bob), "Screaming Architecture" (2011), taken from the
top-level directory down to every identifier and contract.
See also: clean-code, naming-guidelines, ddd, functional-design-architecture.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub jordangaston/claude-plugins --plugin powertools79 skills in this plugin
/ai-camera-movementsLibrary of 46 camera movement prompt blocks for AI video generation (Seedance, Kling, Veo, Runway, Higgsfield). Use this skill EVERY time the user needs a camera move for a video prompt, asks "what camera movement should I use", wants a dolly/pan/orbit/zoom/crane/drone/tracking/handheld/whip-pan/FPV/snorricam/tilt-shift/earth-zoom prompt, asks to add camera motion to a shot, wants to compare camera moves for a scene, or says "Run Camera" / "camera move for this shot". Also trigger when building shot lists or video prompts with other skills (ai-filmmaking, seedance-prompt-structure, genhq-seedance-2-prompt-builder) and a camera instruction is needed — this skill supplies the camera block./ai-image-promptsTurn a seed idea into a polished AI image-generation prompt using a 6-part structure: [medium], [subject], [action/pose], [environment], [style/vibe], [technical specs]. Use this skill whenever the user wants a prompt for generating an image with any model — Midjourney, DALL-E, Imagen, Nano Banana, Flux, Stable Diffusion, Freepik, or unnamed — or asks to 'write an image prompt,' 'make a prompt for this idea,' 'improve my image prompt,' or gives a rough visual idea ('a red panda barista,' 'cyberpunk samurai in the rain') and wants it image-ready. Also trigger when the user asks why their image prompts produce weak or inconsistent results. Covers any visual medium: photorealistic, digital painting, 3D render, anime, illustration, pixel art, watercolor, concept art, and more./ai-videoTurn a seed idea into a polished AI video-generation prompt. Picks the right mode — T2V (text-to-video), I2V (image-to-video), or V2V (video-to-video) — then builds the prompt: for T2V, an 8-part structure [medium] + [shot] + [angle] + [movement] + [focus] + [subject] + [lighting] + [color]; for I2V, a shorter motion-first structure. Use whenever the user wants a prompt for generating video with any model — Sora, Veo, Runway, Kling, Pika, Luma/Dream Machine, Hailuo/MiniMax, Wan, Seedance, or unnamed — or asks to 'write a video prompt,' 'make a prompt for this clip,' 'animate this image,' 'improve my video prompt,' or gives a rough motion idea ('a samurai on a neon rooftop,' 'my logo forming from smoke') and wants it video-ready. Also trigger when the user asks why their generated video looks static, frozen, or like a moving JPEG, or how to describe camera moves./apple-designApple's approach to interface design and fluid, physical motion, translated for the web. Use when building or reviewing gesture-driven UI, spring animations, drag/swipe/sheet interactions, momentum and interruptible transitions, translucent materials and depth, typography (optical sizing, tracking, leading), reduced-motion, or the design foundations (feedback, spatial consistency, restraint) behind Apple-style interfaces./autonomous-sprintRun a full feature sprint from user stories to verified, demoed, shipped code with minimal supervision. Use when the user hands over a set of user stories / acceptance criteria and wants them built end-to-end overnight (or unattended): analyze reference material, ask ONE batch of clarifying questions, (optionally, on request, hold one design review), write per-story specs, run a pre-mortem, implement without stopping (decide-and-log every blocker), demo each story, and write a sprint report. Trigger on "run this sprint", "build these stories overnight", "complete this sprint autonomously", "/autonomous-sprint", or any hand-off of a story list with an expectation of unattended completion.
/binstackRun a Binstack decision-making analysis. Binstack chooses between competing options by checking each against stack-ranked priorities using binary materiality (does this option materially move the needle -- yes or no?) rather than weighted scoring. Best for: (1) Prioritizing a backlog of features, projects, or initiatives where you need one winner, (2) Choosing between alternatives that seem 'close' on paper but differ in strategic impact, (3) Decisions where defensibility matters -- explaining 'why this and not that' to stakeholders. Not ideal for: cost/effort tradeoff analysis (use ROI), exploring a problem space (use HEAD), or decisions with a single dominant criterion that needs no framework. Trigger on: 'binstack', 'prioritize these options', 'which should we build next', 'rank these features', or when the user has multiple options and needs a clear, defensible pick.Other plugins' skills for the same job