Skip to content

For the complete documentation index, see llms.txt.

Set up your Instruction Hub

You scaffold and manage an Instruction Hub with the pig toolchain. This guide walks you through creating one, configuring its manifest, and importing your existing skills and MCP configs. For the toolchain’s package identity and full command surface, see The pig CLI reference.

  1. Create and enter an empty Git repository for your hub.

  2. Run pig init to write hub.yaml, the required pig package, and the asset and generated-output directories.

    Terminal window
    pig init --org "YourOrg" \
    --plugin-id your-instruction-hub \
    --plugin-name "Your Instruction Hub"
  3. Commit the scaffold so your hub starts from a clean, versioned baseline.

pig init sets plugin_version to 0.1.0 unless you pass --plugin-version. See The pig CLI reference for every flag.

hub.yaml is your hub’s root manifest. Its schema forbids unknown keys, so a typo or an unsupported key fails validation rather than being ignored.

KeyRequiredDescription
orgYesYour organization name.
plugin_idYesA kebab-case identifier for the hub’s plugins.
plugin_nameYesA human-readable display name.
plugin_versionYesThe hub’s plugin version, in SemVer form.
stable_packagesYesThe packages to compile. At least one, all unique, and the list must include pig.
targetsNoThe compile targets: any of claude, codex, gemini, and cursor. Defaults to all four.

After you scaffold and start authoring, a hub looks like this:

hub.yaml # root manifest
hub.repo-context.json # inventory of context files (AGENTS.md, CLAUDE.md, GEMINI.md)
packages/<id>.yaml # one file per package
assets/
skills/<id>/SKILL.md # skill assets (with optional references/, scripts/, asset.yaml)
commands/<id>.md # command assets
mcps/<id>.json # MCP configs
# pig init also scaffolds assets/rules, assets/agents, and assets/hooks
.github/workflows/ # hand-authored thin caller workflows for PR checks and publishing
dist/<target>/<package>/ # toolchain-generated, committed plugin packages
.claude-plugin/marketplace.json # toolchain-generated marketplace manifests (Claude, Codex, Cursor)

Only dist/ and the marketplace manifests are toolchain-generated. You author the manifest, packages, assets, and the thin .github/workflows/ caller workflows.

If you already have skills and MCP configs, pig scan brings them into the hub instead of recreating them by hand:

Terminal window
pig scan --source /path/to/existing/repo

pig scan imports skills from .agents/skills and MCP configs, inventories your AGENTS.md, CLAUDE.md, and GEMINI.md context files into hub.repo-context.json, and adds references for the imported assets to the pig package. Review the result, then move the imported assets into the packages that should own them.

Before you publish, check that the hub is well formed:

  • pig validate checks the configuration, packages, asset support modes, references, and MCP configs, and confirms there are no symlinks or literal secrets.
  • pig verify runs the same validation and then fully compiles the hub in a temporary directory, so you see a real build without changing your working tree.
Terminal window
pig validate
pig verify

Once both pass, you are ready to publish and install plugins. For the full command surface, see The pig CLI reference.