federation
Federated registry protocol for multi-source plugin resolution with policy enforcement, lockfile management, and conflict detection across local, team, org, and public registries.
What this skill does
# Federated Registry Protocol
## Overview
The Federated Registry Protocol enables plugin resolution across multiple registries with configurable priority, security policies, conflict detection, and deterministic lockfiles. It transforms plugin management from a single-source package manager into an enterprise-grade multi-source orchestration system.
## Architecture
```
+-----------------+
| RegistryClient | Fetches and caches registry indexes
+--------+--------+
|
+--------v--------+
| RegistryResolver| Resolves plugins across registries
+--------+--------+
|
+--------v--------+
| PolicyEngine | Evaluates allow/deny/require rules
+--------+--------+
|
+--------v--------+
| LockfileManager | Deterministic version pinning
+-----------------+
```
## Components
### RegistryClient
Loads configuration from `.claude/registries.json` and fetches plugin indexes from multiple sources. Supports local filesystem directories and remote HTTP(S) URLs.
**Key behaviors:**
- Caches registry data with configurable TTL (default: 1 hour)
- Graceful degradation when registries are unavailable
- Token and OIDC authentication support
- Local directory scanning builds indexes from plugin manifests
### RegistryResolver
Resolves plugin names across all configured registries in priority order (highest first).
**Conflict detection:**
- Same plugin name in multiple registries is detected via SHA-256 content hash comparison
- Resolution strategies: `highest-priority` (default), `error`, `prompt`
- All conflicts are recorded for audit trail
### PolicyEngine
Evaluates security rules from `.claude/policies/plugins.yaml` using short-circuit matching (first match wins).
**Rule types:**
- `allow` — Permits the plugin
- `deny` — Blocks the plugin with a reason
- `require` — Warns when mandatory plugins are missing
**Unless clause:** Exempts matching plugins when ALL conditions are met (trust score threshold, signature verification).
### LockfileManager
Produces `plugin-lock.json` for reproducible plugin environments.
**Capabilities:**
- Generate lockfile from current resolved state
- Detect drift between lockfile and installed plugins
- Produce human-readable diffs for PR reviews
- Install from lockfile for deterministic environments
## Workflow
### Setting Up Federation
1. Configure registries with priorities:
```
/mp:registry add local ./plugins --priority 100
/mp:registry add team https://plugins.team.dev/index.json --priority 75
/mp:registry add public https://marketplace.claude.dev/registry.json --priority 0
```
2. Define security policy in `.claude/policies/plugins.yaml`
3. Sync registry caches:
```
/mp:registry sync
```
### Installing Plugins
1. Resolve plugin across registries (highest priority first)
2. Check policy engine for allow/deny decision
3. Install from the resolved source
4. Update the lockfile:
```
/mp:lock generate
```
### CI/CD Integration
1. Commit `plugin-lock.json` to version control
2. In CI: `mp:lock check` to verify no drift
3. In deployment: `mp:lock install` for reproducible environment
4. In PRs: `mp:lock diff` to review plugin changes
### Policy Enforcement
1. Define rules in `.claude/policies/plugins.yaml`
2. Audit installed plugins: `/mp:policy enforce`
3. Check individual plugins: `/mp:policy check <name>`
## Configuration Files
| File | Purpose |
|------|---------|
| `.claude/registries.json` | Registry sources and federation settings |
| `.claude/policies/plugins.yaml` | Security policy rules |
| `plugin-lock.json` | Deterministic version lock |
| `config/registries.default.json` | Default registry configuration |
| `config/policies.default.yaml` | Default security policy |
## Commands
| Command | Description |
|---------|-------------|
| `/mp:registry add` | Add a registry source |
| `/mp:registry remove` | Remove a registry |
| `/mp:registry list` | Show configured registries |
| `/mp:registry sync` | Refresh all caches |
| `/mp:policy check` | Check a plugin against policy |
| `/mp:policy list` | Show policy rules |
| `/mp:policy enforce` | Audit installed plugins |
| `/mp:lock generate` | Create lockfile from current state |
| `/mp:lock check` | Verify plugins match lockfile |
| `/mp:lock diff` | Show changes since last lock |
| `/mp:lock install` | Install from lockfile |
## Source Code
- Types: `src/federation/types.ts`
- Engine: `src/federation/registry.ts`
- Config: `config/registries.default.json`
- Policy: `config/policies.default.yaml`
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.