Agent skill

seam-ripper

Ruthlessly analyze architectural seams—the interfaces, boundaries, and contracts between system components—to expose coupling problems, abstraction leaks, and design failures. Use when asked to review architecture, analyze coupling, find interface problems, improve module boundaries, audit dependencies, or redesign system structure. Produces uncompromising redesign proposals that prioritize correctness over backwards compatibility.

Stars 3
Forks 1

Install this agent skill to your Project

npx add-skill https://github.com/petekp/agent-skills/tree/main/skills/seam-ripper

SKILL.md

Seam Ripper

Systematically dissect a codebase's internal architecture to expose where it's wrong and propose what's right.

Principles

No sacred cows. Existing patterns are evidence of past decisions, not correct ones.

Seams reveal truth. How components connect exposes what the system actually is, not what documentation claims.

Backwards compatibility is not a constraint. The goal is correct architecture. Migration is a separate problem.

Complexity is guilt until proven innocent. Every abstraction, indirection, and interface must justify its existence.

Execution

Phase 1: Map the Terrain

Build a complete picture of the system's internal structure before judging it.

  1. Identify all modules/packages/namespaces - List every bounded unit of code
  2. Trace import/dependency graphs - What depends on what, and why
  3. Catalog public interfaces - Every exported function, class, type, constant
  4. Find the data contracts - Shared types, DTOs, schemas that cross boundaries
  5. Locate the integration points - Where modules actually talk to each other

Output a dependency map showing:

  • Module → Module edges with dependency reason
  • Circular dependencies (immediate red flags)
  • Fan-in/fan-out counts per module

Phase 2: Interrogate Each Seam

For every boundary identified, answer these questions:

Interface Clarity

  • Can you understand what this module does from its public interface alone?
  • Are there "util" or "helper" exports? (smell: no clear responsibility)
  • Does the interface expose implementation details?

Dependency Direction

  • Does this dependency make conceptual sense?
  • Is a "lower-level" module depending on a "higher-level" one?
  • Would inverting this dependency simplify both sides?

Coupling Assessment

  • How many other modules break if this interface changes?
  • Is the coupling through data, behavior, or both?
  • Could this be an event/message instead of a direct call?

Abstraction Integrity

  • Does this interface leak implementation details?
  • Are callers doing work that belongs inside the module?
  • Are there multiple ways to accomplish the same thing?

Contract Stability

  • How often has this interface changed historically?
  • Are there versioned interfaces or deprecation warnings? (smell: unstable contract)
  • Do tests mock this interface? (evidence of coupling pain)

Phase 3: Identify Patterns of Failure

Look for these systemic problems:

Pattern Symptoms What's Actually Wrong
God Module Everything imports it, huge public API Missing domain boundaries
Shotgun Surgery One change requires edits across many modules Responsibility scattered
Feature Envy Module A constantly reaches into Module B's data Wrong ownership of data/behavior
Inappropriate Intimacy Two modules share private details Should be one module or have explicit contract
Middle Man Module just delegates to another Unnecessary indirection
Parallel Hierarchies Adding X requires adding Y in another module Missing abstraction
Speculative Generality Interfaces for flexibility never used Premature abstraction
Dead Abstraction Interface with one implementation forever Abstraction without purpose

Phase 4: Propose the Redesign

For each significant problem, provide:

1. The Indictment State clearly what is wrong and why it matters. Be specific:

  • "Module X has 47 public exports and is imported by 23 other modules"
  • "The User type is defined in core but has fields only used by billing"

2. The Correct Architecture Describe what it should look like:

  • Clear module boundaries with stated responsibilities
  • Dependency direction that follows conceptual hierarchy
  • Interfaces that expose intent, not implementation

3. The Transformation Concrete steps to get from wrong to right:

  • What moves where
  • What gets split or merged
  • What interfaces change
  • What new abstractions emerge

4. The Evidence Explain why this is better:

  • Reduced coupling (quantify: N imports → M imports)
  • Clearer responsibilities
  • Easier to test, extend, or replace

Output Format

markdown
# Seam Analysis: [System/Area Name]

## Dependency Map
[Visual or textual representation of module dependencies]

## Critical Findings

### Finding 1: [Problem Name]
**Location:** [modules/files involved]
**Severity:** Critical | High | Medium
**Pattern:** [which failure pattern]

**Evidence:**
[Specific code/structure references]

**Indictment:**
[Clear statement of what's wrong]

**Redesign:**
[Proposed correct architecture]

**Transformation:**
1. [Step]
2. [Step]
...

### Finding 2: ...

## Recommended Architecture

[Overall vision for how the system should be structured]

## Transformation Sequence

[Ordered list of changes, grouped by logical phases]

Red Lines

Refuse to:

  • Propose "incremental improvements" that preserve broken architecture
  • Accept "but it works" as justification for poor design
  • Recommend adapters/facades that hide problems instead of fixing them
  • Preserve interfaces just because they're widely used

Always:

  • Name the actual problem, not a symptom
  • Propose the correct design, not a compromise
  • Quantify coupling and complexity where possible
  • Explain the conceptual model that makes the redesign correct

Expand your agent's capabilities with these related and highly-rated skills.

petekp/agent-skills

multi-model-meta-analysis

Synthesize outputs from multiple AI models into a comprehensive, verified assessment. Use when: (1) User pastes feedback/analysis from multiple LLMs (Claude, GPT, Gemini, etc.) about code or a project, (2) User wants to consolidate model outputs into a single reliable document, (3) User needs conflicting model claims resolved against actual source code. This skill verifies model claims against the codebase, resolves contradictions with evidence, and produces a more reliable assessment than any single model.

3 1
Explore
petekp/agent-skills

capture-learning

Analyze recent conversation context and capture learnings to project knowledge files (for project-specific insights) or skills/commands/subagents (for cross-project patterns). Use when the user asks to "capture this learning", "update the docs with this", "remember this for next time", "document this issue", "add this to CLAUDE.md", "save this knowledge", or "update project knowledge". Also triggers after resolving build/setup issues, discovering non-obvious patterns, or completing debugging sessions with valuable insights.

3 1
Explore
petekp/agent-skills

optimize-agent-docs

Build a retrieval-optimized knowledge layer over agent documentation in dotfiles (.claude, .codex, .cursor, .aider). Use when asked to "optimize docs", "improve agent knowledge", "make docs more efficient", or when documentation has accumulated and retrieval feels inefficient. Generates a manifest mapping task-contexts to knowledge chunks, optimizes information density, and creates compiled artifacts for efficient agent consumption.

3 1
Explore
petekp/agent-skills

agent-changelog

Compile an agent-optimized changelog by cross-referencing git history with plans and documentation. Use when asked to "update changelog", "compile history", "document project evolution", or proactively after major milestones, architectural changes, or when stale/deprecated information is detected that could confuse coding agents.

3 1
Explore
petekp/agent-skills

literate-guide

Create a narrative guide to a codebase or feature in the style of Knuth's Literate Programming — code and prose interwoven as a single essay, ordered for human understanding rather than compiler needs. Use when the user asks to 'explain this codebase as a story', 'write a literate guide', 'create a narrative walkthrough', 'tell the story of this code', 'Knuth-style documentation', 'weave a guide for this feature', or when they want deep, readable documentation that treats the program as literature. Also trigger when someone wants a document that a thoughtful reader could follow from start to finish and come away understanding both WHAT the code does and WHY every design choice was made.

3 1
Explore
petekp/agent-skills

autonomous-agent-readiness

Assess a codebase's readiness for autonomous agent development and provide tailored recommendations. Use when asked to evaluate how well a project supports unattended agent execution, assess development practices for agent autonomy, audit infrastructure for agent reliability, or improve a codebase for autonomous agent workflows. Triggers on requests like "assess this project for agent readiness", "how autonomous-ready is this codebase", "evaluate agent infrastructure", or "improve development practices for agents".

3 1
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results