Skip to main content
skill CX Codex

distribution — Claude Code skill: plugin and marketplace content sources

distribution — a skill for Claude Code, Cursor, Codex, GitHub Copilot and OpenCode that manages where plugin and marketplace content comes from and how to fetch it.

MIT ★ 571 updated 2026-10-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add ai-driven-dev/framework --skill distribution -a claude-code
Open on GitHub

What distribution does

distribution runs on Claude Code, Cursor, Codex, GitHub Copilot and OpenCode. It is a leaf context inside the framework: it depends on kernel only and has no edges to tools, translate or framework. Its single responsibility is to answer where content comes from and how to load it.

Three layers live inside distribution. The domain/ layer holds marketplace models, catalog shape and parsers for foreign formats. The application/ layer contains use-cases for adding, listing, refreshing and resolving marketplace sources. The infrastructure/ layer provides concrete adapters: for filesystem, HTTP, Git and cache. Each adapter owns its own constants — API base URLs, cache TTLs, error-pattern regexes for third-party failures.

A critical boundary: distribution does nothing with fetched content and does not record what got installed on a project. That is framework's job. An architectural test blocks any new edge from distribution to tools, translate or framework; if a change seems to require one, the work belongs in the caller, not here.

What it helps with

  • add a new marketplace source or variant
  • write a catalog parser for a foreign format
  • build an adapter for fetching and caching content
  • manage trusted repositories and marketplace registrations
  • separate content-source logic from content-use logic

Example prompts for the agent

  • Add a parser for OpenAPI-shaped marketplace to domain/catalog-parsers/
  • Implement an HTTPS adapter with TTL cache in infrastructure/
  • Write a use-case for registering a new source in application/

How to install distribution

1Skills CLI (Vercel)

npx skills add ai-driven-dev/framework --skill distribution -a claude-code

2Manually: put the files in place

~/.claude/skills/distribution/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/distribution/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about distribution

How do I install distribution on Claude Code?

Run npx skills add ai-driven-dev/framework --skill distribution -a claude-code, then open ~/.claude/skills/distribution/SKILL.md.

What does distribution do?

It manages where plugin and marketplace content originates: registers sources, parses catalogs, caches and fetches via Git and HTTP. It does not process content after it arrives — that is the framework's job.

When should I not use distribution?

Do not use it for logic that works with fetched content — use tools or translate instead. To record what got installed on a project, use framework.

Source text

SKILL.md · MIT
---
name: distribution
description: >
  Owns where plugin and marketplace content comes from and how it is fetched, under
  src/contexts/distribution/ — marketplace registration, catalog parsing, and the ports/adapters
  that reach git and HTTP. Use when adding a new marketplace source kind, a catalog parser for a
  foreign format, or a fetch/cache/trust-store adapter. Do NOT use for what a tool does with
  fetched content — use `tools` or `translate`. Do NOT use for recording what got installed on a
  project — use `framework`.
---

# Distribution

`distribution` is a leaf: it depends on `kernel` only, and knows no tool and no manifest. It
answers exactly one question — where does content come from, and how is it fetched — for
whoever asks. `framework` is the only context that reaches it (`framework → distribution`); a
plugin's own content and how it gets translated are someone else's job once it has arrived here.

## What goes in

| Concept | Location |
|---|---|
| A marketplace registration (name, source, scope, staleness) | `domain/marketplace.ts`, `domain/marketplace-source-mode.ts` |
| A cached catalog fetch | `domain/ports/marketplace-cache.ts` |
| The plugin catalog shape | `domain/catalog.ts` (the Claude-shaped parser lives here too) |
| A reader for a non-Claude catalog shape | `domain/catalog-parsers/` |
| A port this context's callers hold | `domain/ports/` — registry, cache, trust-store, catalog-repository, fetcher, raw-catalog-fetcher |
| Add / list / refresh / register / resolve / fetch a marketplace source | `application/` |
| The concrete adapter behind one of the six ports | `infrastructure/` |

## How

- This context is a leaf by construction: it must never gain an edge to `tools`, `translate`, or
  `framework` — `tests/architecture/context-graph.arch.test.ts` enforces the chain
  (`framework → distribution`, plus everything to `kernel`) and fails the build the moment a new
  edge appears. If a change seems to need one, the orchestration belongs to the caller
  (`framework`), not here — see `BASELINE` in `tests/architecture/helpers.ts` for the one
  documented exception, `distribution->framework`, and the comment there that explains it
  (`marketplace add --overwrite` removing before adding), which is framework work that has not
  yet been moved out.
- A port here follows the port/adapter rule in `.claude/rules/00-architecture/`: interface only, ≤5
  methods, no `null` in the return type unless "not found" is genuinely a normal domain state
  (documented per-port, not assumed).
- An adapter owns every technical constant for its integration (API base URLs, cache TTLs,
  error-pattern regexes for classifying a third-party failure) — none of that belongs in a port,
  a use-case, or a domain model. `try/catch` inside an adapter exists only to translate a raw
  error into a typed one from `kernel/errors.ts`.
- A new foreign catalog shape gets its own parser in `domain/catalog-parsers/`, producing the
  same `PluginCatalog`/`PluginCatalogEntry` shape the Claude parser produces — callers above this
  context never branch on which format a catalog came from.
- Follow the use-case rule in `.claude/rules/00-architecture/` for the application layer's shape.

## Public surface

Nothing outside `contexts/distribution/` may import a module this context has not declared
public — `tests/architecture/context-boundary.arch.test.ts` holds the list
(`PUBLIC_MODULES.distribution`). Measured at extraction, ten modules were reached from outside
and not one was an adapter: the adapters are wired by the composition root
(`runtime/wiring/distribution.ts`) alone, and stay internal for that reason. A module that
exposes its own plumbing to a caller outside the composition root is not a leaf context anymore
— keep new adapters unreachable from outside.

## How it's tested

- `tests/contexts/distribution/` mirrors `src/contexts/distribution/` — domain models and
  application use-cases are unit-tier; adapters against a real temp filesystem or a mocked
  network boundary are integration-tier. See the `test` skill for tier conventions.
- A new catalog parser needs a fixture of the real foreign format and a test asserting the parsed
  `PluginCatalog` matches what the Claude-shaped parser would produce for an equivalent catalog.

© ai-driven-dev · MIT · ai-driven-dev/framework

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set80

The whole set →
04-audit 04-audit is a Claude Code skill that audits a codebase across seven quality pillars and produces a ranked report without changing code. CX Codex +1 ★ 571repo stars 01-bootstrap 01-bootstrap guides early SaaS architecture decisions and records them in aidd_docs/INSTALL.md. Use it while defining a new project’s stack and design. CX Codex +1 ★ 571repo stars checker checker — a subagent that judges finished work against a checklist, runs validation, and verifies the code serves the actual need. Reports findings with evidence, never edits. CX Codex +1 ★ 571repo stars 04-fact-check 04-fact-check verifies factual statements against authoritative sources and rewrites prose with citations, hedging claims that lack proof. Not meant for judging code. CX Codex +1 ★ 571repo stars translate Turns the framework's canonical source into native content for each tool: target-aware transforms, the plugin content translator, and the build strategies behind aidd translate and aidd sync. CX Codex +1 ★ 571repo stars tools Defines AI assistant and IDE profiles, build contracts, and capability interfaces under src/contexts/tools/ in the framework. CX Codex +1 ★ 571repo stars framework framework — a skill for Claude Code, Cursor, and other platforms that tracks every installed file and coordinates project setup, recovery, diagnostics, and cleanup through a single manifest. CX Codex +1 ★ 571repo stars 00-async-dev 00-async-dev is a Claude Code skill that takes a task through the async-dev pipeline: repo setup, running a ready issue, and clearing review comments on a PR. CX Codex +1 ★ 571repo stars

Project sponsors

Companies that keep this analytics open