IA/skills/create-use-case/SKILL.md
Create or modify an application Use Case following DDD + Hexagonal architecture. Ensures strict separation between domain, application and infrastructure.
npx skillsauth add esplotter/esplotter create-use-caseInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Crear un Caso de Uso que:
Un caso de uso debe definir:
Nunca:
El caso de uso:
No:
<module>/
└── application/
└── use-cases/
└── CreateOrder.ts
export class CreateOrder {
constructor(
private readonly orderRepository: OrderRepository,
private readonly paymentGateway: PaymentGateway,
) {}
async run(request: CreateOrderRequest): Promise<CreateOrderResponse> {
const order = Order.create(request.customerId, request.items);
await this.orderRepository.save(order);
await this.paymentGateway.charge(order.total());
return {
orderId: order.id,
totalAmount: order.total(),
};
}
}
describe('CreateOrder', () => {
it('should create an order and charge payment', async () => {
const orderRepository = new OrderRepositoryMock();
const paymentGateway = new PaymentGatewayMock();
const createOrder = new CreateOrder(orderRepository, paymentGateway);
const response = await createOrder.run({
customerId: '123',
items: [{ productId: 'p1', quantity: 2 }],
});
expect(response.orderId).toBeDefined();
expect(paymentMock.charge).toHaveBeenCalled();
});
});
✔ Sin base de datos ✔ Sin servidor ✔ Sin framework
Antes de considerar el caso de uso válido, verificar:
devops
Applies consistent renderer UI/UX implementation patterns using a Vercel-inspired white theme, strong accessibility defaults, and repository component conventions.
development
Use this first for any task that changes behavior or tests. This is a test strategy and routing skill, it selects the right test-suite skill(s), defines when to escalate coverage (for example e2e/compiled parity), and enforces regression rules.
tools
Guides how to design, implement, and validate high-value unit tests for renderer pure logic (stores, selectors, mappers, and utility flows) with strict no-DOM boundaries and deterministic contract assertions.
testing
Guides how to design, implement, and validate high-value unit tests for preload bridge contracts, renderer-facing exposures, and IPC delegation behavior with clear boundaries and deterministic collaborator doubles.