Skip to main content
ClaudeWave
Skill85 estrellas del repoactualizado 3mo ago

component-boundary-identifier

Identifies boundaries between modules or components in software systems through static code analysis and dependency detection. Use when Claude needs to analyze software architecture, identify module boundaries, detect boundary violations, find circular dependencies, or assess component coupling. Supports Python (packages and imports) and Java (packages and dependencies). Trigger when users ask to "identify boundaries", "find component boundaries", "detect boundary violations", "analyze module structure", "check architecture", or "find circular dependencies".

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/ArabelaTso/Skills-4-SE /tmp/component-boundary-identifier && cp -r /tmp/component-boundary-identifier/skills/component-boundary-identifier ~/.claude/skills/component-boundary-identifier
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Component Boundary Identifier

Identify and analyze boundaries between software components to ensure proper architectural separation.

## Quick Start

When a user requests boundary analysis:

1. **Understand the goal**: Identify boundaries, detect violations, or both
2. **Analyze structure**: Examine package/module organization and dependencies
3. **Identify boundaries**: Determine component boundaries based on structure
4. **Detect violations**: Find improper cross-boundary dependencies
5. **Report findings**: Present boundaries and violations with severity levels

## What This Skill Does

### Boundary Identification
Identify component boundaries based on:
- Package/module structure
- Namespace organization
- Architectural patterns (layered, hexagonal, clean)
- Naming conventions
- Dependency clusters

### Violation Detection
Detect boundary violations including:
- Upward dependencies (lower layers depending on higher layers)
- Circular dependencies between components
- Layer skipping (bypassing intermediate layers)
- Domain depending on infrastructure
- Accessing private/internal implementations
- Concrete type dependencies across boundaries

## Analysis Methods

### Static Code Analysis

Analyze code structure without execution.

**Python:**
- Parse import statements
- Analyze package structure
- Identify dependency directions
- Detect circular imports

**Java:**
- Parse import statements
- Analyze package hierarchy
- Check access modifiers
- Identify dependency directions

**Script:** Use `scripts/analyze_boundaries.py` for automated Python analysis

### Manual Code Review

Review code for boundary patterns.

**Process:**
1. Identify top-level packages/modules
2. Map dependencies between components
3. Check against architectural rules
4. Find violations

**See:** [boundary-indicators.md](references/boundary-indicators.md) for patterns

## Architectural Patterns

### Layered Architecture

**Layers (top to bottom):**
1. Presentation/API
2. Application/Service
3. Domain/Business
4. Infrastructure/Data

**Rules:**
- Dependencies flow downward only
- No layer skipping
- No upward dependencies

**Violations:**
- Domain imports from API
- Infrastructure imports from Domain
- API directly uses Infrastructure (skips Service)

### Hexagonal Architecture

**Boundaries:**
- **Core**: Domain logic (center)
- **Ports**: Interfaces for external interaction
- **Adapters**: Implementations (outside)

**Rules:**
- Core has no dependencies on adapters
- Adapters depend on ports
- All external access through ports

**Violations:**
- Core imports adapter implementations
- Core depends on frameworks
- Direct adapter-to-adapter dependencies

### Clean Architecture

**Boundaries (inside to outside):**
1. Entities (domain models)
2. Use Cases (business rules)
3. Interface Adapters
4. Frameworks & Drivers

**Dependency Rule:**
- Dependencies point inward only
- Inner layers independent of outer layers

**Violations:**
- Inner layer imports outer layer
- Domain depends on UI/API
- Use cases depend on frameworks

## Language-Specific Guidance

### Python

**Boundary indicators:**
- Top-level packages (`domain/`, `infrastructure/`, `api/`)
- `__init__.py` with controlled exports
- Protocol/ABC definitions

**Common violations:**
- Domain imports from `infrastructure`
- Circular imports between modules
- Importing private members (`_name`)
- Direct implementation dependencies

**See:** [boundary-indicators.md](references/boundary-indicators.md) for details

### Java

**Boundary indicators:**
- Package hierarchy (`com.example.domain`, `com.example.infrastructure`)
- Access modifiers (public, package-private, private)
- Interface definitions

**Common violations:**
- Domain imports infrastructure packages
- Accessing package-private from different package
- Static coupling across boundaries
- Framework annotations in domain

**See:** [boundary-indicators.md](references/boundary-indicators.md) for details

## Workflow

### 1. Understand the Request

**Questions to clarify:**
- Identify boundaries or detect violations?
- Specific architectural pattern in use?
- Focus on specific components?
- Known problem areas?

### 2. Analyze Project Structure

**For automated analysis:**
```bash
python scripts/analyze_boundaries.py <project_directory>
```

**For manual analysis:**
1. List top-level packages/modules
2. Identify architectural layers
3. Note naming conventions
4. Understand intended architecture

### 3. Identify Boundaries

**Look for:**
- Package/module groupings
- Architectural layer separation
- Domain vs infrastructure separation
- API vs business logic separation

**Document:**
- Boundary names and purposes
- Components within each boundary
- Intended dependency directions

### 4. Detect Violations

**Check for:**
- Upward dependencies
- Circular dependencies
- Layer skipping
- Concrete type dependencies
- Private/internal access

**See:** [violation-patterns.md](references/violation-patterns.md) for patterns

### 5. Report Findings

**Structure:**
```
IDENTIFIED BOUNDARIES
- boundary1/ (N modules)
- boundary2/ (M modules)

BOUNDARY VIOLATIONS
[CRITICAL] module_a depends on higher layer module_b
[HIGH] Circular dependency: module_c -> module_d -> module_c
[MEDIUM] module_e accesses private implementation

RECOMMENDATIONS
- Fix critical violations first
- Introduce interfaces for concrete dependencies
- Refactor circular dependencies
```

## Violation Severity Levels

### Critical
- Domain depends on infrastructure
- Upward dependencies in layered architecture
- Circular dependencies between major components

**Impact:** Breaks architectural principles, prevents proper separation

**Priority:** Fix immediately

### High
- Layer skipping
- Concrete type dependencies across boundaries
- Framework coupling in domain

**Impact:** Reduces flexibility, complicates testing

**Priority:** Fix soon

### Medium
- Accessing private/internal members
- Static coupling across boundaries
- Missing interfaces at boundaries
abstract-domain-explorerSkill

Applies abstract interpretation using different abstract domains (intervals, octagons, polyhedra, sign, congruence) to statically analyze program variables and infer invariants, value ranges, and relationships. Use when analyzing program properties, inferring loop invariants, detecting potential errors, or understanding variable relationships through static analysis.

abstract-invariant-generatorSkill

Uses abstract interpretation to automatically infer loop invariants, function preconditions, and postconditions for formal verification. Generates invariants that capture program behavior and support correctness proofs in Dafny, Isabelle, Coq, and other verification systems. Use when adding formal specifications to code, generating verification conditions, inferring contracts for functions, or discovering loop invariants for proofs.

abstract-state-analyzerSkill

Performs abstract interpretation over source code to infer possible program states, variable ranges, and data properties without executing the program. Reports potential runtime errors including out-of-bounds accesses, null dereferences, type inconsistencies, division by zero, and integer overflows. Use when analyzing code for potential runtime errors, performing static analysis, checking safety properties, or verifying program behavior without execution.

abstract-trace-summarizerSkill

Performs abstract interpretation to produce summarized execution traces and high-level program behavior representations. Highlights key control flow paths, variable relationships, loop invariants, function summaries, and potential runtime states using abstract domains (intervals, signs, nullness, etc.). Use when analyzing program behavior, understanding execution paths, computing loop invariants, tracking variable ranges, detecting potential runtime errors, or generating program summaries without concrete execution.

acsl-annotation-assistantSkill

Create ACSL (ANSI/ISO C Specification Language) formal annotations for C/C++ programs. Use this skill when working with formal verification, adding function contracts (requires/ensures), loop invariants, assertions, memory safety annotations, or any ACSL specifications. Supports Frama-C verification and generates comprehensive formal specifications for C/C++ code.

agent-browserSkill

CLI-based browser automation with persistent page state using ref-based element interaction. Use when users ask to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

ambiguity-detectorSkill

Detects and analyzes ambiguous language in software requirements and user stories. Use when reviewing requirements documents, user stories, specifications, or any software requirement text to identify vague quantifiers, unclear scope, undefined terms, missing edge cases, subjective language, and incomplete specifications. Provides detailed analysis with clarifying questions and suggested improvements.

api-design-assistantSkill

Design and review APIs with suggestions for endpoints, parameters, return types, and best practices. Use when designing new APIs from requirements, reviewing existing API designs, generating API documentation, or getting implementation guidance. Supports REST APIs with focus on endpoint structure, request/response schemas, authentication, pagination, filtering, versioning, and OpenAPI specifications. Triggers when users ask to design, review, document, or improve APIs.