Maintaining Consistent Abstractions
Class interfaces present one cohesive abstraction - don't mix domain logic with serialization, persistence, or unrelated concerns
Install
npx skills add obra/clank --skill Maintaining Consistent Abstractionsgit clone --depth 1 https://github.com/obra/clank.git /tmp/clank
mkdir -p ~/.claude/skills
cp -r /tmp/clank/skills/architecture/maintaining-consistent-abstractions ~/.claude/skills/Maintaining-Consistent-AbstractionsPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Maintaining Consistent Abstractions ## Overview A class interface should present ONE cohesive abstraction. All methods should work toward a consistent purpose at a consistent level. **Core principle:** Each class implements one Abstract Data Type (ADT). If you can't identify what ADT the class implements, it has poor abstraction. **Goal:** Anyone using the class should see a clear, consistent set of related operations, not a miscellaneous grab-bag. ## When to Use **Apply when designing any class:** - New class design - Reviewing existing classes - Refactoring - API design **Warning signs of poor abstraction:** - Class groups unrelated functions - Methods at different abstraction levels (high-level + low-level mixed) - Domain object with serialization methods (to_json, to_xml) - Business logic mixed with persistence (SQL in domain class) - Temporal cohesion (things done at same time, not related by purpose) - Can't clearly state what abstraction the class represents - Class description has "and" connecting unrelated purposes ## Abstraction Anti-Patterns from Baseline Testing ### Anti-Pattern 1: Domain + Serialization Mixed **Baseline violation:**
Details
- Skill name
Maintaining Consistent Abstractions- Repository
- obra/clank
- Path
skills/architecture/maintaining-consistent-abstractions/SKILL.md- Repo updated
- 9 October 2025
FAQ
What does the Maintaining Consistent Abstractions skill do?
Class interfaces present one cohesive abstraction - don't mix domain logic with serialization, persistence, or unrelated concerns
How do I install the Maintaining Consistent Abstractions skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add obra/clank --skill Maintaining Consistent Abstractions. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Maintaining Consistent Abstractions popular?
It lives in obra/clank, which has 43 GitHub stars and 26 forks.
Related skills
Gardening Skills Wiki
43obra/clank
Maintain skills wiki health - check links, naming, cross-references, and coverage
Remembering Conversations
43obra/clank
Search previous Claude Code conversations for facts, patterns, decisions, and context using semantic or text search
Brainstorming Ideas Into Designs
43obra/clank
Interactive idea refinement using Socratic method to develop fully-formed designs
Naming Variables
43obra/clank
Choose names that fully and accurately describe what the variable represents
Localizing Variables
43obra/clank
Declare variables in smallest possible scope, initialize close to first use, minimize span and live time
Pair Mode
62ElliotJLT/Claude-Skill-Potions
When activated, Claude becomes a pair programming partner rather than a code-generation tool. Explains reasoning, teaches patterns, asks questions that build understanding, and adjusts depth based on the person's goals. Balances getting work done with building lasting knowledge. Activate with "let's pair on this" or by setting a learning focus at session start.
Browse the most popular Claude skills, all software development skills, or write your own with the skills generator.