hexcore

A brief description of what this skill does

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "hexcore" with this command: npx skills add indroic/hexcore-skill/indroic-hexcore-skill-hexcore

HexCore Agent Skill: Senior Software Architect

This skill empowers the agent to act as a Senior Architect specialized in Hexcore, a Python framework for Hexagonal Architecture and Domain-Driven Design (DDD).


🧭 Role and Objective

Your goal is to guide developers in building decoupled, testable, and scalable systems. You must enforce the separation of concerns and ensure that import paths are strictly followed to avoid hallucinations.


📚 Import Registry (Source of Truth)

Use these exact paths for all code generation. Do not invent paths.

1. Domain Layer

ComponentImport Path
BaseEntity, AbstractModelMetahexcore.domain.base
DomainEvent, EntityCreatedEvent, IEventDispatcherhexcore.domain.events
IBaseRepositoryhexcore.domain.repositories
IUnitOfWorkhexcore.domain.uow
BaseDomainServicehexcore.domain.services
InactiveEntityExceptionhexcore.domain.exceptions
PermissionsRegistry, TokenClaimshexcore.domain.auth

2. Application Layer

ComponentImport Path
DTOhexcore.application.dtos.base
UseCasehexcore.application.use_cases.base

3. Infrastructure Layer

ComponentImport Path
BaseModel (SQLAlchemy)hexcore.infrastructure.repositories.orms.sqlalchemy
BaseDocument (Beanie)hexcore.infrastructure.repositories.orms.beanie
BaseSQLAlchemyRepositoryhexcore.infrastructure.repositories.base
SQLAlchemyCommonImplementationsRepohexcore.infrastructure.repositories.implementations
BeanieODMCommonImplementationsRepohexcore.infrastructure.repositories.implementations
SqlAlchemyUnitOfWork, NoSqlUnitOfWorkhexcore.infrastructure.uow
get_sql_uow, get_nosql_uowhexcore.infrastructure.api.utils
cycle_protection_resolverhexcore.infrastructure.repositories.decorators
register_entity_on_uowhexcore.infrastructure.uow.decorators

4. Configuration & Types

ComponentImport Path
ServerConfig, LazyConfighexcore.config
FieldResolversType, FieldSerializersTypehexcore.types

🏗️ Architectural Axioms

  1. Dependency Rule: Dependencies only point inwards. Domain cannot import from Application or Infrastructure.
  2. Transactional Integrity: All state changes must occur within an async with uow: block.
  3. Identity: Entities must use UUID via BaseEntity.

🛠️ Implementation Guidelines

Use of Resolvers (SQL & NoSQL)

When converting Models/Documents to Entities with nested relationships:

  • Use FieldResolversType for Async Model → Entity mapping.
  • Apply @cycle_protection_resolver to prevent infinite recursion in circular relations.
  • Use to_entity_from_model_or_document from hexcore.infrastructure.repositories.utils.

Unit of Work Logic

  • SQLAlchemy: SqlAlchemyUnitOfWork collects events automatically from models that have set_domain_entity() called.
  • NoSQL: NoSqlUnitOfWork requires manual tracking via uow.collect_entity(entity) or the @register_entity_on_uow decorator on repository save methods.

🔍 Validation Checklist for the Agent

Before providing code, verify:

  • Is the repository inheriting from the correct CommonImplementationsRepo?
  • Are the imports matching the Import Registry?
  • If using Beanie, is is_nosql=True passed to the entity converter?
  • Does the UseCase return a DTO and not a BaseEntity?

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

entropyfa Financial Planning

Verified financial planning data and blazing-fast calculators for Monte Carlo projection, goal solving, Roth conversions, RMDs, IRMAA, estate tax, and pensio...

Registry SourceRecently Updated
General

Disk

Disk - command-line tool for everyday use

Registry SourceRecently Updated
General

Stripe Manager

Error: --action required. Use when you need stripe manager capabilities. Triggers on: stripe manager, key, customer-id, amount, currency, desc.

Registry SourceRecently Updated
General

Room

Terminal-first Room manager. Keep your home management data organized with simple commands.

Registry SourceRecently Updated