aim-shared-domain

Enforce dependency and boundary rules for AIM's shared Go packages.

4|Updated May 17, 2026
One-click install
npx skills add https://github.com/hellopoisonx/aim --skill aim-shared-domain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aim-shared-domain
Source: https://github.com/hellopoisonx/aim/tree/main/skills/aim-shared-domain
Command: npx skills add https://github.com/hellopoisonx/aim --skill aim-shared-domain

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

It prevents AIM’s process-internal shared Go packages from drifting into service-level coupling, so developers can reuse cross-cutting types and helpers safely without creating reverse dependencies.

Core Features & Use Cases

  • Defines shared package scope: documents how app/shared is meant to be used by app/auth, app/core, app/gateway, app/logic, and client modules, while explicitly forbidding reverse dependencies from business services.
  • Captures cross-cutting capability boundaries: enumerates the key shared domains like errorx, rpc, nacos, jwt, events, attachment, s3signer, and tracing, and the rules for how they should interact (e.g., tracing propagation in Kafka payloads).
  • Improves consistency of infrastructure integration: sets expectations for gRPC/Nacos resolver scheme usage, Kafka span/trace injection patterns, and unified error handling across module boundaries.

Use case: when implementing attachment upload/parse or Kafka-driven event flows across multiple services, you can follow these shared-package rules to keep event DTOs, schema/validation, and tracing utilities consistent and correctly wired.

Quick Start

Ask the AI to summarize the allowed and forbidden dependencies for app/shared and extract the exact rules you must follow when adding a new shared package like app/shared/cache.

Frequently Asked Questions about aim-shared-domain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I enforce Go package boundaries for shared modules in a multi-service project?

To enforce shared Go package boundaries, you define allowed and forbidden dependencies for your shared modules, ensuring business services like auth and gateway can reuse cross-cutting types without creating reverse dependencies that cause service-level coupling.

What is the correct way to propagate tracing context in Kafka events using Go?

Propagating tracing context in Kafka events requires injecting span and trace data directly into event payloads using shared tracing utilities. This ensures distributed tracing continuity across module boundaries when processing Kafka-driven event flows.

How do I integrate a Nacos gRPC resolver into Go modules without breaking package isolation?

Integrating a Nacos gRPC resolver requires using the specified gRPC/Nacos resolver scheme within the shared package scope. You must follow package isolation constraints to keep the resolver integration consistent across client modules without introducing reverse dependencies.

Can I add a new shared package like cache to app/shared without violating dependency rules?

Adding a new shared package to app/shared requires extracting and adhering to specific modification checks for dependency rules. You must verify that the new package maintains package isolation constraints and does not introduce reverse dependencies from business services.

How do I handle unified error conversion across Go module boundaries?

Unified error conversion across Go module boundaries is handled by using shared errorx domains within the shared package scope. This ensures consistent error handling and schema validation when flows cross between auth, core, gateway, and logic modules.

When should I not use a shared package approach for cross-cutting concerns in Go?

You should not use a shared package approach when the functionality introduces reverse dependencies from business services into shared modules. If the logic cannot adhere to package isolation constraints and tracing propagation contracts, it belongs in the service module instead.