/agent-skills:cohesionfrom agent-skills
Cohesion — the members of a module or class belong together because they share data or jointly accomplish one purpose, not because they were filed under the same name. Use when several functions in a module all take the same parameter (a data clump), when a class's methods don't obviously need each other, when deciding whether to combine loose functions into a class, or when a module's contents are grouped by category or by when they run rather than by what they share.
Ships in agent-skills. 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.
A module (function, class, or file) is cohesive when its members belong together because they operate on the same data or jointly accomplish one well-defined purpose. Low cohesion isn't a missing abstraction — it's usually a wrong one already in place: a utils.ts, a Helpers class, a module-level grab-bag that holds things which don't actually depend on each other, just because they were convenient to put in the same place.
Worst to best:
utils.ts that collects whatever didn't fit elsewhere.handle(kind, payload) with a switch over cases that share a name but no mechanism.initializeEverything() wiring up logging, config, and a DB connection because they all happen at startup, not because any one needs another's result.An agent doesn't need to classify real code precisely on a seven-point scale. The actionable split is two-sided: coincidental / logical / temporal means "grouped by accident, category, or clock" — a smell worth fixing. Communicational / sequential / functional means "grouped by shared data or shared purpose" — leave it, or move more things toward it.
The concrete signal that should make you look at a module's cohesion at all: the same parameter, or the same group of parameters, repeated across several function signatures in that module. If sandboxExists(name), createSandbox(name, env, mounts), copySandboxFile(name, ...), writeSandboxSettings(name, ...), and runSandbox(name, ...) all take name: string first, that's not five independent functions that happen to need a name — it's one implicit object (a sandbox) whose identity is being re-passed by hand at every call. The same tell applies to a factory function that closes over several pieces of state to hand back a bundle of related callbacks — the closed-over state is the clump, just captured instead of passed.
Quick check: delete one of the repeated parameters from every signature. If the remaining ones stop making sense on their own, it's a clump, not a coincidence.
Combine the functions into a class: capture the clump once (constructor or closure), let every method reference it as this.name instead of re-accepting it. Put the responsibility on the thing that already holds the data it needs — this moves the grouping from logical/temporal toward communicational or functional cohesion. A test-fixture factory with the same closed-over-state smell gets the same fix: turn it into a small class instead of a function returning a bundle of closures.
Don't force a grouping that doesn't actually exist yet. Two functions that happen to both take a name: string today aren't automatically a clump — check whether they reason about the same entity, not whether their signatures look alike. Textual similarity in parameter lists is not evidence of a shared concept, any more than two similar-looking code blocks are evidence of shared knowledge. If combining them into a class would need a constructor flag or an optional field that only some methods use, that's a sign the grouping is premature, not a fix to force through.
name but reason about different entities" — make the judgment checkable.utils/helpers module whose contents share no data, no purpose, nothing but a filename.initializeEverything), not because one needs another's result.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
32 skills in this plugin
/blackbox-test-casesGenerate exhaustive, non-negotiably rigorous black-box test case descriptions (Given/When/Then, not code) for a public API's external contract — never its implementation. Use for zero-tolerance test coverage, an extremely strict/exhaustive black-box test case sweep, or whenever "thorough" test-case generation isn't thorough enough. Produces an API handoff file, one case file per sub-agent — each is its own source of truth — and a master index file pointing at all of them. Every case carries a checkbox so a later implementing agent can track what's been turned into runnable tests. This skill never writes runnable tests itself./brand-palettePick a primary and accent color that fit a given project and fit each other, or — given an explicit primary — pick three accent candidates that each fit the primary and the project, then generate the full Tailwind v4 color-token system (raw OKLCH scales plus the semantic layer, light and dark) for all three candidates as copy-paste CSS and a visual HTML report written into the project. Use when the user wants brand colors chosen for a project, a Tailwind color system generated from a repo, or a secondary/accent color picked to pair with a primary they already have./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.npx claudepluginhub joachimwedin/agent-skills --plugin agent-skills