Packages Ports
Your approach to handling packages ports. Use this skill when working on files where packages ports comes into play.
Packaged view
This page reorganizes the original catalog entry around fit, installability, and workflow context first. The original raw source lives below.
Install command
npx @skill-hub/cli install leaderiop-hex-di-packages-ports
Repository
Skill path: .claude/skills/packages-ports
Your approach to handling packages ports. Use this skill when working on files where packages ports comes into play.
Open repositoryBest for
Primary workflow: Ship Full Stack.
Technical facets: Full Stack.
Target audience: everyone.
License: Unknown.
Original source
Catalog source: SkillHub Club.
Repository owner: leaderiop.
This is still a mirrored public skill entry. Review the repository before installing into production workflows.
What it helps with
- Install Packages Ports into Claude Code, Codex CLI, Gemini CLI, or OpenCode workflows
- Review https://github.com/leaderiop/hex-di before adding Packages Ports to shared team environments
- Use Packages Ports for development workflows
Works across
Favorites: 0.
Sub-skills: 0.
Aggregator: No.
Original source / Raw SKILL.md
--- name: Packages Ports description: Your approach to handling packages ports. Use this skill when working on files where packages ports comes into play. --- # Packages Ports This Skill provides Claude Code with specific guidance on how to adhere to coding standards as they relate to how it should handle packages ports. ## Instructions For details, refer to the information provided in this file: [packages ports](../../../agent-os/standards/packages/ports.md) --- ## Referenced Files > The following files are referenced in this skill and included for context. ### ../../../agent-os/standards/packages/ports.md ```markdown # @hex-di/ports Package Standards ## Purpose Define architectural boundaries through typed port tokens. This is the innermost package with zero dependencies. ## Core Responsibilities - Provide Port token creation utilities - Express dependency requirements at the type level - Enable inner layers to remain framework-agnostic ## Design Constraints ### Zero Runtime Behavior - No factory functions that create instances - No lifetime management - No container awareness - Pure type-level constructs with minimal runtime footprint ### No External Dependencies - This package has zero npm dependencies - Only TypeScript built-in types ## Port Token Design ### Identity - Each port has a unique string identifier - Identifier is used for debugging/error messages only - Type identity is the primary mechanism ### Type Safety - Port carries its service interface type - Ports are branded to prevent accidental substitution - Type-level dependency declaration (no runtime impact) ## API Surface - `createPort<T>(name)` - Create a port token for interface T - Optional: `Port.requires()` for type-level dependency declaration - Keep API minimal - add only what's necessary ## Success Criteria - Inner layers (domain, use cases) import only this package - Ports serve as stable contracts between layers - Architecture is clear from port definitions alone - Zero bundle size impact beyond port declarations ```