> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argentos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Publishing Packages

> Create and share your own skills, plugins, avatars, and templates.

## Overview

Publishing to the ArgentOS marketplace lets you share your extensions with the community. This guide covers creating a package, testing it locally, and publishing it.

## Package Structure

Every marketplace package follows this structure:

```
my-package/
  argent.plugin.json    # Package manifest
  README.md             # Documentation
  LICENSE               # License file
  tools/                # Tool definitions (optional)
    my-tool.json
  prompts/              # System prompt additions (optional)
    system.md
  handlers/             # Tool handler implementations (optional)
    my-tool.ts
  assets/               # Static assets like avatars (optional)
    avatar.model3.json
```

## Manifest

The `argent.plugin.json` manifest describes your package:

```json theme={null}
{
  "name": "@yourname/my-skill",
  "version": "1.0.0",
  "type": "skill",
  "description": "A useful skill for ArgentOS agents",
  "author": "Your Name",
  "license": "MIT",
  "homepage": "https://github.com/yourname/my-skill",
  "keywords": ["research", "web", "analysis"],
  "permissions": ["exec", "browser"],
  "tools": ["tools/my-tool.json"],
  "prompts": ["prompts/system.md"],
  "argentos": {
    "minVersion": "1.0.0"
  }
}
```

### Required Fields

| Field         | Description                                   |
| ------------- | --------------------------------------------- |
| `name`        | Unique package name (`@scope/name` format)    |
| `version`     | Semantic version                              |
| `type`        | Package type: skill, plugin, avatar, template |
| `description` | Short description                             |
| `author`      | Author name or organization                   |
| `license`     | SPDX license identifier                       |
| `permissions` | Tools/capabilities the package requires       |

## Development Workflow

<Steps>
  <Step title="Create the Package">
    ```bash theme={null}
    argent marketplace init my-skill
    cd my-skill
    ```

    This scaffolds a basic package structure.
  </Step>

  <Step title="Develop Locally">
    Install from a local directory to test:

    ```bash theme={null}
    argent marketplace install ./my-skill
    ```

    Test the skill by interacting with your agent.
  </Step>

  <Step title="Validate">
    ```bash theme={null}
    argent marketplace validate ./my-skill
    ```

    Checks the manifest, schema validity, and package structure.
  </Step>

  <Step title="Publish">
    ```bash theme={null}
    # Login to the marketplace
    argent marketplace login

    # Publish
    argent marketplace publish
    ```
  </Step>
</Steps>

## Best Practices

1. **Write a good README** -- Include examples and usage instructions
2. **Declare all permissions** -- Users need to know what your package accesses
3. **Use semantic versioning** -- Follow semver for version numbers
4. **Include a LICENSE** -- Required for marketplace listing
5. **Test thoroughly** -- Validate on a clean ArgentOS installation
6. **Keep it focused** -- One capability per package is better than a kitchen sink

## Updating Published Packages

```bash theme={null}
# Bump version
npm version patch  # or minor, major

# Publish the update
argent marketplace publish
```

Existing users will see the update when they run `argent marketplace update`.

## Unpublishing

```bash theme={null}
argent marketplace unpublish @yourname/my-skill@1.0.0
```

<Warning>
  Unpublishing removes the package from the marketplace. Users who already installed it keep their local copy, but new installations are not possible.
</Warning>
