Builder Guide

Publish your harness
to anpm

Build your own AI agent harness and deploy it with a single command.

Terminal
$ anpm publish
Publishing my-harness@1.0.0...
✓ Validation passed
✓ Uploaded to registry
✓ Published! Anyone can now run: anpm install my-harness

This guide walks you through creating a harness and publishing it to the anpm registry.

0 Overview

anpm harnesses are AI agent packages installed into the .claude/ directory. They include skills, hooks, and config files. Anyone can install them with anpm install.

💡

Harnesses follow Anthropic's .claude standard. Managed agent deployment is also supported.

Full flow to publish:

  • 1Install anpm CLI and log in
  • 2Create harness directory structure
  • 3Write anpm.yaml manifest
  • 4Test locally
  • 5Publish with anpm publish

1 Prerequisites

Before you start, make sure you have:

  • anpm CLI installed (npm install -g anpm-io)
  • anpm account authenticated via anpm login
  • Slash commands connected via anpm init
  • Node.js 18+ (for dependency management)
Terminal
# Install anpm, log in, and connect slash commands
$ npm install -g anpm-io
$ anpm login
$ anpm init
✓ Connected /anpm-explore, /anpm-create, /anpm-status
# Create a new harness project
$ anpm create my-harness
✓ Created my-harness/ with template

2 Harness Structure

The default directory structure generated by anpm create. On install, files are placed inside the user's .claude/ directory.

my-harness/
anpm.yaml ← manifest (required)
skills/
main-skill.md ← skill definition
sub-skill.md
hooks/
pre-install.sh ← runs before install
rules/
coding-rules.md ← project rules
CLAUDE.md ← agent instructions
README.md ← usage docs

Required Files

FileDescription
anpm.yamlHarness metadata, dependencies, and publish config
skills/At least one skill file required
README.mdUsage documentation (shown on the anpm registry page)

3 Manifest File

anpm.yaml is the core config file for your harness. It defines the name, version, dependencies, and publish settings.

anpm.yaml
# Harness basic info
name: my-harness
version: 1.0.0
description: "A brief description of what this harness does"
# Category tags
tags:
- content
- automation
- design
# Skill entrypoints
skills:
- skills/main-skill.md
- skills/sub-skill.md
# Dependencies (other harnesses)
dependencies:
crawling: "^0.8.0"
# Publish settings
publish:
visibility: public
# public | private | internal
license: MIT

4 Test Locally

Before publishing, verify that your harness works correctly in a local environment.

Terminal
# Link harness to a local project
$ anpm link ./my-harness
Linked my-harness to current project
# Test in a live agent session
$ anpm run my-harness
Starting harness in dev mode...
# Check installed status
$ anpm status
✓ my-harness linked (local)
⚠️

Use anpm link to symlink your harness locally, then anpm run to test it in a live agent session before publishing.

5 Publish

Once your tests pass, deploy to the anpm registry with a single command.

Terminal
# Publish to the anpm registry
$ anpm publish
Publishing my-harness@1.0.0...
✓ Validation passed
✓ Uploaded to registry
✓ Published! Install with: anpm install my-harness
# Deploy as managed agent (optional)
$ anpm deploy --to anthropic
Deploying to managed agent...
✓ Live at agent.anpm.dev/my-harness

Version Updates

After making changes, bump the version and republish in one step:

Terminal
# Publish with automatic patch bump
$ anpm publish --patch
# 1.0.0 → 1.0.1
# Or use --minor / --major
$ anpm publish --minor
# 1.0.1 → 1.1.0

6 Visibility Options

Control who can install your harness via the visibility field in anpm.yaml.

VisibilityDescriptionUse Case
publicAnyone can installOpen-source agents
privateRequires an access code to installPaid or limited distribution
internalOrganization members onlyInternal team agents
🔒

Private harnesses require an access code at install time.
anpm install my-harness --code ABC123

7 Review Guidelines

Public harnesses go through automated review. Your harness must meet these criteria:

  • Valid manifest — all required fields in anpm.yaml are present
  • README included — with install instructions, usage, and examples
  • Skills work — verified via anpm run
  • Safe hooks — no malicious code or unauthorized data collection
  • Clear description — description matches actual functionality
  • License specified — open-source license or proprietary declaration
🚀

Reviews are automated and usually complete within minutes. If rejected, you'll receive specific feedback explaining what needs to be fixed.

Ready to publish?

Create your first harness and share it with the anpm community.

Start with anpm create →