breach-encapsulation-naming

breach-encapsulation-naming is a skill for Claude Code, Codex from amadeus-dlc/amadeus. It costs 82 tokens per session (406 once invoked), scanned A, original, Apache-2.0.

A design guide for domain models, which are the parts of an application that represent business rules and concepts. It recommends clearly naming unavoidable access to an object's internal data as an encapsulation breach, instead of treating it as an ordinary getter.

In plain words
What is it for?
Use it when reviewing or designing accessors for domain entities and aggregates, deciding whether to expose state, and documenting why persistence, serialization, debugging, testing, or framework integration requires that access.
Why use it?
Ordinary getters can let other code make decisions that belong inside the domain object. This guide helps distinguish behavior-focused methods from access needed only for storage, serialization, tests, or framework code.

Skill for Claude CodeCodex

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

Good fit Use it when reviewing or designing accessors for domain entities and aggregates, deciding whether to expose state, and documenting why persistence, serialization, debugging, testing, or framework integration requires that access.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/amadeus-dlc/amadeus/breach-encapsulation-naming
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 amadeus-dlc/amadeus --skill breach-encapsulation-naming
Clone the repo
git clone --depth 1 https://github.com/amadeus-dlc/amadeus

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 breach-encapsulation-naming

README.md
[![agentmods](https://agentmods.dev/badge/skills/amadeus-dlc/amadeus/breach-encapsulation-naming/github.svg)](https://agentmods.dev/skills/amadeus-dlc/amadeus/breach-encapsulation-naming)
Your own site
<a href="https://agentmods.dev/skills/amadeus-dlc/amadeus/breach-encapsulation-naming"><img src="https://agentmods.dev/badge/skills/amadeus-dlc/amadeus/breach-encapsulation-naming/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 breach-encapsulation-naming

Your own site · 80×15
<a href="https://agentmods.dev/skills/amadeus-dlc/amadeus/breach-encapsulation-naming"><img src="https://agentmods.dev/badge/skills/amadeus-dlc/amadeus/breach-encapsulation-naming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 406 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.00082 $0.00406
Opus 5 $0.00041 $0.00203
Sonnet 5 $0.00016 $0.00081
Haiku 4.5 $0.00008 $0.00041

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

Security

Grade A, and why

breach-encapsulation-naming 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 10d 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.

amadeus/spaces/default/knowledge/amadeus-shared/software-design/breach-encapsulation-naming/SKILL.md · 44 lines

What it actually says

Breach Encapsulation Naming

Make unavoidable state exposure loud. Domain objects should express behavior first; when an accessor is required for persistence, serialization, debugging, or tests, name it as an explicit encapsulation breach.

Workflow

  1. Classify every requested accessor by consumer: domain behavior, persistence, serialization, tests, framework glue, or presentation.

  2. Replace domain-behavior access with Tell Don't Ask methods on the object that owns the data.

  3. For unavoidable exposure, use breachEncapsulationOfX() or the idiomatic local equivalent such as breach_encapsulation_of_x.

  4. Keep exposed values immutable or defensively copied.

  5. Add a review note explaining why the breach is tolerated and which callers may use it.

Review Checks

  • Ordinary getters on entities and aggregates need justification.

  • Accessors used by domain logic are design smells; move the decision to the model.

  • Framework-required access should be isolated in adapters, serializers, mappers, or repository glue.

  • Tests may use breach accessors, but assertions should still prefer observable behavior when possible.

References

Read references/patterns.md for language-specific naming and migration examples.

Detailed Reference

For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.

Output

Return the accessor classification, recommended names, any Tell Don't Ask replacements, and the smallest migration path.

Files

What ships with it

2 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. 10d ago First seen · 44 lines · 82 tokens per session scan A d85519d169d9

Subscribe to this mod's changes

breach-encapsulation-naming is a skill published in the GitHub repository amadeus-dlc/amadeus (8 stars, last pushed 19d ago), licensed Apache-2.0. It adds 82 tokens to every session and 406 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.