separation-of-concerns

separation-of-concerns is a skill for Claude Code from JordanCoin/codingskills. It costs 72 tokens per session (1,173 once invoked), scanned A, original, MIT.

A software design principle that gives each module, layer, or component one clear responsibility. For example, data access, business rules, display, and authentication are kept separate.

In plain words
What is it for?
Use it when a function or controller does too many jobs, or when deciding where database access, business logic, presentation, logging, and authentication should live.
Why use it?
It limits the spread of changes and makes code easier to test, debug, and modify safely.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the coding-skills plugin — 9 skills shipped together

Good fit Use it when a function or controller does too many jobs, or when deciding where database access, business logic, presentation, logging, and authentication should live.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/jordancoin/codingskills/separation-of-concerns
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 JordanCoin/codingskills --skill separation-of-concerns
Clone the repo
git clone --depth 1 https://github.com/JordanCoin/codingskills

Made for: Claude Code.

Or install coding-skills, the plugin that ships this one along with the rest of its 9 skills.

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 separation-of-concerns

README.md
[![agentmods](https://agentmods.dev/badge/skills/jordancoin/codingskills/separation-of-concerns/github.svg)](https://agentmods.dev/skills/jordancoin/codingskills/separation-of-concerns)
Your own site
<a href="https://agentmods.dev/skills/jordancoin/codingskills/separation-of-concerns"><img src="https://agentmods.dev/badge/skills/jordancoin/codingskills/separation-of-concerns/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 separation-of-concerns

Your own site · 80×15
<a href="https://agentmods.dev/skills/jordancoin/codingskills/separation-of-concerns"><img src="https://agentmods.dev/badge/skills/jordancoin/codingskills/separation-of-concerns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 72 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,173 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.00072 $0.01173
Opus 5 $0.00036 $0.00587
Sonnet 5 $0.00014 $0.00235
Haiku 4.5 $0.00007 $0.00117

Measured 11d ago against content hash 403f92d77728, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

separation-of-concerns 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 11d 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/separation-of-concerns/SKILL.md · 94 lines

How it starts

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

SoC — Separation of Concerns

Before Applying

If .agents/stack-context.md exists, read it first. Apply this principle using idiomatic patterns for the detected stack. For framework-specific details, use context7 MCP or web search — don't guess.

Principle

Each module, layer, or component in a system should address a single concern. A concern is a distinct aspect of functionality — data access, business rules, presentation, authentication, error handling, logging.

Why This Matters in Production

When concerns are entangled, changes become dangerous. Modifying the database schema shouldn't break the UI. Changing the logging format shouldn't affect business logic. Adding authentication shouldn't require rewriting every handler.

Separated concerns mean:

  • Isolated failures. A bug in rendering doesn't corrupt data. A database timeout doesn't crash the UI.
  • Independent testing. Business rules can be tested without a database. UI can be tested without a backend.
  • Parallel development. Different team members can work on different layers without merge conflicts.
  • Targeted debugging. When something breaks, the problem is localized to one layer, not spread across the whole stack.

Rules

  1. Separate policy from mechanism. Business rules (what to do) should be independent of infrastructure (how to do it). A pricing function shouldn't know whether it's called from an HTTP handler or a background job.
  2. Separate data access from business logic. Queries and mutations go in a data layer. Business rules go in a domain layer. Handlers/controllers wire them together.
  3. Separate input parsing from processing. Validate and parse inputs at the boundary. Internal functions should receive well-typed, validated data — not raw strings from the wire.
  4. Separate orchestration from computation. A function that coordinates multiple steps should not also contain the implementation of those steps. Keep coordinators thin.
  5. Separate cross-cutting concerns with dedicated mechanisms. Authentication, logging, rate limiting, and error handling should be handled by middleware, decorators, or interceptors — not sprinkled into every handler.

Read the full file on GitHub · 94 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. 11d ago First seen · 94 lines · 72 tokens per session scan A 403f92d77728

Subscribe to this mod's changes

separation-of-concerns is a skill published in the GitHub repository JordanCoin/codingskills (7 stars, last pushed 6mo ago), licensed MIT. It adds 72 tokens to every session and 1,173 once invoked, about $0.0004 per session on Opus 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-08-31.

Related

Other skills, from other repositories

ring:adopting-lib-commons-huma-wrapper

Adopting the lib-commons/v5 shared Huma (OAS 3.1) OpenAPI wrapper + RFC 9457 problem model (commons/net/http/{openapi,problem}) in a Lerian Go service: wire openapi.New/ServeSpec + problem.Install (central >=500 scrub) on BOTH runtime and spec-gen paths, the per-rail problem.MapError flex seam, and rename-only spec…

LerianStudio/ring · 142 tokens

ring:applying-licenses

Applying or switching a repository's license (Apache 2.0, Elastic License v2, or Proprietary): rewrites the LICENSE file, updates Go/TS source headers, sets SPDX identifiers, and validates consistency after user confirmation. Use when asked to set, apply, or switch a license, or when scaffolding a service with no…

LerianStudio/ring · 94 tokens

ring:auditing-dependency-security

Auditing a dependency for supply-chain risk before install (pip/npm/go/cargo): checks typosquatting, maintainer/age risk, vulnerability DBs (OSV, GHSA, Socket), and lockfile hash pinning, then emits a risk score and approve/conditional/escalate/block decision. Use when adding or updating a dependency, reviewing a…

LerianStudio/ring · 102 tokens

php-best-practices

PHP 8.x modern patterns, PSR standards, and SOLID principles. Use when reviewing PHP code, checking type safety, auditing code quality, or ensuring PHP best practices. Triggers on "review PHP", "check PHP code", "audit PHP", or "PHP best practices".

AsyrafHussin/agent-skills · 64 tokens

laravel-audit-architecture

Audit a Laravel application's architecture: boundaries, responsibility, coupling, duplication, and maintainability. Use when auditing architecture.

MrPunyapal/laravel-auditor · 30 tokens

laravel-audit-conventions

Audit a Laravel application for framework conventions: anti-patterns, version-appropriate APIs, and misuse of framework features. Use when auditing Laravel conventions.

MrPunyapal/laravel-auditor · 36 tokens