/d3nexus:setup-shared-contractsfrom d3nexus
Sets up and verifies shared contract topologies, canonical templates (api_contract, architecture_and_flow, gaps_and_rfcs), relative symlinks, and governance rules across Hub and Satellite repositories.
Ships in d3nexus. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The setup-shared-contracts skill establishes and verifies standardized contract directories (shared-contracts/) across multi-repository topologies.
In distributed ecosystems linking a central control plane (Hub) with worker nodes or client applications (Satellites), contracts must maintain strict Single Source of Truth (SSOT) boundaries, Git mode 120000 relative symlinks, and non-breaking schema guarantees.
lyrics-sync, nexus-auth) within an existing Hub repository.Shared contracts follow a Star Topology centered on a single Hub:
flowchart TD
HUB["Hub Repository (e.g. D3Nexus)<br/>Physical shared-contracts/ (SSOT)"]
SAT1["Worker Satellite (e.g. lyrics-sync)<br/>shared-contracts (relative symlink)"]
SAT2["Client Satellite (e.g. nexus)<br/>shared-contracts (relative symlink)"]
HUB -->|Relative Symlink (mode 120000)| SAT1
HUB -->|Relative Symlink (mode 120000)| SAT2
Every domain directory (shared-contracts/<domain>/) must contain exactly three canonical files:
api_contract.md: Wire-level contracts (REST / SSE / IPC), authentication headers (X-Worker-Token), telemetry heartbeats, and payload schemas.architecture_and_flow.md: Component interaction topology, 7 canonical pipeline lifecycle steps, state machine transitions, cancellation fencing (< 50ms), and scratch cleanup.gaps_and_rfcs.md: Asynchronous change ledger and proposal templates for non-breaking schema evolution.To designate the current repository as the Hub authority:
shared-contracts/.python3 skills/setup-shared-contracts/resources/scripts/setup_contracts.py init-hub --domain <domain_name>
shared-contracts/.shared-contracts/README.md with Star Topology layout and Outbound Symlink Mappings table.shared-contracts/<domain_name>/ populated with the 3 canonical contract files..agents/rules/contract_rules.md establishing SSOT governance.To link a satellite repository to an existing Hub domain:
python3 skills/setup-shared-contracts/resources/scripts/setup_contracts.py link-satellite \
--hub <path_to_hub> \
--domain <domain_name>
shared-contracts/<domain_name>/.shared-contracts/ in the satellite is an existing non-empty physical directory without --force.os.path.relpath.shared-contracts -> <relative_target>..agents/rules/contract_rules.md in the satellite enforcing Git read-only restrictions.@.agents/rules/contract_rules.md to AGENTS.md if present.To verify that shared contracts are correctly configured and uncorrupted:
python3 skills/setup-shared-contracts/resources/scripts/setup_contracts.py verify
The engine auto-detects repository mode:
README.md, domain subdirectories, 3 canonical files, and Hub rules.To enforce contract diff gating across Git working trees, repositories define path mappings in .agents/contract_map.json:
resources/templates/contract_map.json.tmpl:
cp skills/setup-shared-contracts/resources/templates/contract_map.json.tmpl .agents/contract_map.json
.agents/contract_map.json manually per repository:
paths (e.g. "src/models/lyrics/**", "lib/features/player/**") mapping source code files to the appropriate domain (lyrics-sync, nexus). Never guess globs automatically — engineers know their module boundaries and file placements.exclude (e.g. tests/**, *.md) to prevent false-positive contract diff triggers.waivers empty by default; path-scoped waivers are introduced only alongside specific branch edits requiring a temporary gap exception.The CLI engine setup_contracts.py supports the following syntax:
# Initialize Hub repository
python3 setup_contracts.py init-hub [--repo-root <path>] [--domain <name>] [--force]
# Link Satellite repository
python3 setup_contracts.py link-satellite --hub <path> --domain <name> [--satellite-root <path>] [--force]
# Verify repository configuration
python3 setup_contracts.py verify [--repo-root <path>]
shared-contracts/ in Files Allowed for git commits.resources/scripts/setup_contracts.py (opens in a new tab)resources/scripts/test_setup_contracts.py (opens in a new tab)resources/templates/api_contract.md.tmpl (opens in a new tab)resources/templates/architecture_and_flow.md.tmpl (opens in a new tab)resources/templates/contract_map.json.tmpl (opens in a new tab)resources/templates/gaps_and_rfcs.md.tmpl (opens in a new tab)resources/templates/hub_readme.md.tmpl (opens in a new tab)resources/templates/hub_rule.md.tmpl (opens in a new tab)resources/templates/satellite_rule.md.tmpl (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub danhdue/ai-agent-tools --plugin d3nexus72 skills in this plugin
/android-api-integrationGenerates a standardized Network Module, API Interface, Remote Data Source, Repository, UseCase, Models, and ViewModel updates for Android using the Hybrid Network Architecture and MVI Pattern./android-quality-checkRead-only Android quality assurance provider implementing the common quality contract. Executes project-configured Gradle, Spotless, Detekt, and Konsist capabilities from .agents/quality/android-quality.json, enforces BCV and architecture policies, and outputs structured results bound to repository SHA./android-ui-auditAudits Jetpack Compose and Android UI code for recomposition stability, state hoisting, Material3 design system adherence, and modifier best practices.Other plugins' skills for the same job