AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified Apache-2.0 Self-run

Component Boundary Identifier

skill-arabelatso-skills-4-se-component-boundary-identifier · by ArabelaTso

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…

No reviews yet
0 installs
20 views
0.0% view→install

Install

$ agentstack add skill-arabelatso-skills-4-se-component-boundary-identifier

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-arabelatso-skills-4-se-component-boundary-identifier)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Component Boundary Identifier? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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:

python scripts/analyze_boundaries.py 

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

Impact: Breaks encapsulation, reduces maintainability

Priority: Fix when refactoring

Low

  • Suboptimal package structure
  • Inconsistent naming
  • Missing documentation

Impact: Reduces code clarity

Priority: Fix opportunistically

Detection Patterns

Upward Dependency

Pattern:

# domain/services.py
from api.serializers import UserSerializer  # VIOLATION

Detection: Lower layer imports from higher layer

Fix: Move serialization to API layer

Circular Dependency

Pattern:

# module_a.py
from module_b import ClassB

# module_b.py
from module_a import ClassA  # VIOLATION

Detection: A imports B, B imports A

Fix: Extract shared interface, use dependency injection

Layer Skipping

Pattern:

# api/routes.py
from infrastructure.repositories import UserRepository  # VIOLATION

Detection: API directly uses infrastructure (skips service layer)

Fix: Use service layer as intermediary

Concrete Dependency

Pattern:

# domain/services.py
from infrastructure.email import SMTPEmailSender  # VIOLATION

class NotificationService:
    def __init__(self):
        self.sender = SMTPEmailSender()

Detection: Domain depends on concrete infrastructure class

Fix: Depend on interface, inject implementation

Best Practices

Boundary Definition

  • Use clear package/module names
  • Follow architectural patterns consistently
  • Document boundary purposes
  • Establish dependency rules

Dependency Management

  • Depend on interfaces, not implementations
  • Use dependency injection
  • Follow dependency inversion principle
  • Avoid static coupling

Violation Prevention

  • Code reviews focusing on imports
  • Automated dependency analysis in CI/CD
  • Architecture decision records
  • Team training on patterns

Refactoring Strategy

  • Fix critical violations first
  • Introduce interfaces gradually
  • Extract shared code carefully
  • Test after each change

Example Usage Patterns

User: "Identify the component boundaries in this codebase" → Analyze structure, identify boundaries, report findings

User: "Check if there are any boundary violations" → Analyze dependencies, detect violations, report with severity

User: "Is my domain layer properly isolated?" → Check domain dependencies, verify no infrastructure/API imports

User: "Find circular dependencies in the project" → Analyze import graph, identify cycles, report

User: "Does this follow clean architecture?" → Identify layers, check dependency directions, report violations

User: "Why is this module hard to test?" → Analyze dependencies, identify concrete couplings, suggest fixes

Automated Analysis

Use the provided script for Python projects:

python scripts/analyze_boundaries.py /path/to/project

Output:

  • Identified boundaries
  • Boundary violations with severity
  • Circular dependencies
  • Recommendations

Limitations:

  • Python only (for automated analysis)
  • Requires valid Python syntax
  • May miss dynamic imports
  • Heuristic-based layer detection

For Java or manual analysis, follow the workflow using reference patterns.

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.