Skip to content

For the complete documentation index, see llms.txt.

Publish and install plugins

Publishing makes a reviewed version of your hub available to your team. Installation gives each agent the plugins that person needs. Acme publishes pig, docs, and dev; a technical writer installs pig and docs, while a developer can also install dev.

Instruction HubYour team authors and reviews shared source
Reviewed sourcethen
Publishing CIThe pig toolchain validates, builds, and publishes
Published pluginsthen
AI agentInstall or refresh plugins, then reload
Publishing and installation are separate steps. A released plugin reaches an agent when that host installs or refreshes it.

This page serves two readers. A publisher sets up CI once so the hub compiles and releases; an installer adds the published marketplace and installs plugins for their own agent.

To publish, you need:

  • A validated hub.
  • A GitHub or GitLab repository you can configure.
  • Permission for CI to write to that repository and push to its protected release branches.

The examples use acme/acme-instruction-hub and a source branch named main. Replace the organization, repository, and branch with yours.

To install, you need:

  • An agent that supports one of the build targets.
  • Read access to the published hub.

For a private hub, both CI and each person installing plugins need repository access. A successful CI build does not grant that access to your teammates.

Already installing from a hub someone else publishes? Skip ahead to Install the plugins.

Publishing runs in CI. Set up the workflow for your Git provider, then push it.

To hand publishing setup to a coding agent, copy this prompt. Set up PIG with a coding agent covers the whole setup.

Ask your agent: configure hub publishing
Configure publishing for our Instruction Hub. Follow
https://promptless.ai/docs/governance/get-started/publish-and-install-plugins.md
and phase 3 of https://promptless.ai/docs/governance/agent-setup-guide.md
Outcome: a successful publishing run, and a release/stable branch that holds
hub.release.json and the generated plugins.
Scope: CI configuration for the hub repository only.
Inputs (discover these before you ask me):
- Hub repository and source branch: [for example, acme/acme-instruction-hub, main]
- Git provider: [GitHub or GitLab]
Show me the diff and wait for my approval before you push. Tell me which
repository settings I need to change. Report the run result, the published
version, and anything still blocked.
  1. Create the two workflow files in your hub. The check workflow validates and compiles pull requests. The publish workflow runs after a merge to main and serializes releases.

    .github/workflows/instruction-hub-check.yml
    name: Check Instruction Hub
    on:
    pull_request:
    workflow_dispatch:
    permissions:
    contents: read
    jobs:
    instruction-hub:
    uses: Promptless/pig-toolchain/.github/workflows/pr-check.yml@main
    .github/workflows/instruction-hub-publish.yml
    name: Publish Instruction Hub
    on:
    push:
    branches: [main]
    workflow_dispatch:
    permissions:
    contents: write
    concurrency:
    group: instruction-hub-release
    cancel-in-progress: false
    jobs:
    instruction-hub:
    if: github.ref == 'refs/heads/main'
    uses: Promptless/pig-toolchain/.github/workflows/publish.yml@main
    with:
    source-branch: main
  2. Commit the workflow files and push them. Create an empty acme/acme-instruction-hub repository on GitHub first if you have not already.

    Terminal window
    git add .github/workflows
    git commit -m "Add instruction hub publishing"
    git remote add origin https://github.com/acme/acme-instruction-hub.git
    git push -u origin main

    If origin already exists, use that remote instead of adding it again.

  3. Inspect the run. In Actions, open Publish Instruction Hub and check its result. The workflow uses the repository’s automatic GITHUB_TOKEN; this example needs no separate GitHub token. Repository permissions and branch rules must allow the workflow to update both main and release/stable.

The workflows use the toolchain’s current main revision, which the CI logs record. If your organization reviews toolchain updates separately, pin both uses references to the same reviewed toolchain commit and update them together.

If your hub lives below the repository root, set the hub-root input in both jobs; the default is .. The publishing workflow also accepts release-branch if you use a different release branch. Keep the concurrency group and cancel-in-progress: false so two runs do not publish overlapping releases.

A successful first publication creates release/stable, publishes all three plugins, and updates the source branch’s marketplace pointers and version. Review those changes in your Git provider before asking the team to install.

For subsequent changes, the workflow compares the content with the previous release. Changed content normally advances the patch version; unchanged content does not need a new release. To choose a higher minor or major version deliberately, update the source configuration before merging:

Terminal window
pig set-version --hub . --version 0.2.0
pig verify --hub .

Commit the version change along with the instructions. All plugins in the hub share that version. Do not manually edit generated version fields.

Keep authored instructions, hub.yaml, and plugins/*.yaml on main. The publishing workflow compiles every plugin in stable_plugins for each configured target and maintains a separate release/stable branch containing the generated output.

OutputPurpose
dist/<target>/<plugin-id>/An installable Claude, Codex, Cursor plugin, or Gemini extension
Target marketplace manifestsA catalog of the available plugins for Claude, Codex, and Cursor
hub.release.jsonVersion and content identity of the compiled release
hub.stable.jsonInformation about the published stable release

On the source branch, marketplace entries point to the generated plugins on release/stable. Add the source repository to an agent’s marketplace, so it can follow those pointers. Gemini uses extension directories instead of a marketplace.

You can inspect a local build with pig build. For routine review, use pig verify: it compiles in a temporary directory without changing generated files in your checkout. Neither command publishes a release.

Choose the instructions for your agent, then install for the one agent you use. Installing pig does not enable trace collection by itself: the default hub configuration has trace_ingestion.enabled: false.

The commands below use the GitHub example URL https://github.com/acme/acme-instruction-hub.git. For a GitLab-hosted hub, substitute your full GitLab repository URL ending in .git.

To have a coding agent install the plugins and check a skill, copy this prompt. The agent tells you which install steps you must run yourself.

Ask your agent: install hub plugins
Install our Instruction Hub plugins in my agent and confirm that a skill
works. Follow the section for my agent in
https://promptless.ai/docs/governance/get-started/publish-and-install-plugins.md
and phase 4 of https://promptless.ai/docs/governance/agent-setup-guide.md
Inputs (discover these before you ask me):
- Hub repository URL: [for example, https://github.com/acme/acme-instruction-hub.git]
- Marketplace ID: [read it from hub.yaml if you can]
- My agent: [Claude Code, Codex, Cursor, or Gemini CLI]
- Plugins to install: [pig plus, for example, docs]
For in-app or dashboard steps, give me the exact steps and wait for me.
Report the installed plugins and versions and the skill check result.
  1. Add the source repository. Inside Claude Code, add the marketplace. These are Claude Code slash commands, not terminal commands.

    /plugin marketplace add https://github.com/acme/acme-instruction-hub.git
  2. Install the plugins. Install pig and docs; developers can also run /plugin install dev@acme-instruction-hub.

    /plugin install pig@acme-instruction-hub
    /plugin install docs@acme-instruction-hub

    Use /plugin to review installed plugins and their scope. Choose user scope for personal use across projects, or the appropriate project scope for a repository.

  3. Reload and verify. Run /reload-plugins or restart Claude Code, then try /docs:review-docs on a documentation change. See Claude Code’s plugin installation guide.

Publication and host installation are separate steps. Do not assume that every agent refreshes every installed plugin whenever it starts.

Claude and Codex receive an update-instruction-hub skill in pig, even when trace ingestion is disabled. Ask the agent to use that skill to update the Acme Instruction Hub. It updates the marketplace and installed plugins and reloads them where the host supports it. Check the installed version afterward. In Claude Code, you can also manage updates through /plugin; in Codex, a marketplace refresh by itself does not prove installed plugins were updated.

For Cursor, configure marketplace refresh with your team administrator, then verify the version on a developer’s host. For Gemini, update the release checkout and run gemini extensions update docs for each installed extension before restarting the CLI.

SymptomWhat to check
CI validates but cannot publishWorkflow write permissions, protected branch rules, and the GitLab job token push setting
Publication stops after a newer commitUpdate from the latest source and rerun; another source or release change made the run stale
Marketplace is visible but installation failsThe user’s Git credentials must read the repository and its release/stable branch
A plugin or skill is missingWith hub access, check stable_plugins, the plugin’s includes, target support, and the installed version. Without it, ask your hub’s publisher to confirm the plugin is in the release and supported for your agent
Updated instructions are not usedRefresh installed plugins and reload the agent; check for older local copies of the same skill

Once an installed skill works in a real task, your hub is ready for team use. To learn from agent sessions, continue to Enroll your hosts after your analyzer is available.