Skip to content

arkylab/aspm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

aspm - AI Skill Package Manager

A Git-based package manager designed for AI-assisted development, similar to npm but supporting skills, agents, commands, hooks, and any AI resource types.

Features

  • πŸ“¦ Two Project Modes: Publish project (aspub.yaml) and consumer project (aspkg.yaml)
  • πŸ”— Distributed Dependency Management: Reference packages directly via Git URL, no central registry needed
  • 🏷️ Flexible Version Control: Support for Git tag/branch/commit
  • πŸ“₯ Simplified Version Rules: Auto-selects the maximum version satisfying all dependencies
  • πŸ”§ Universal Design: Not limited to skills, supports any AI resource type
  • πŸ”Œ Multi-Format Support: Install both aspm packages and Claude Code plugin repositories

Installation

Quick Install

Linux / macOS:

curl -fsSL https://raw.githubusercontent.com/arkylab/aspm/main/scripts/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/arkylab/aspm/main/scripts/install.ps1 | iex

Build from Source

git clone https://github.com/arkylab/aspm.git
cd aspm
cargo build --release

The compiled binary will be at target/release/aspm (or aspm.exe on Windows).

Quick Start

Creating a Consumer Project (If you are a skill consumer)

# Initialize a consumer project
aspm init --consumer

# This creates aspkg.yaml

Configure aspkg.yaml

# Installation target directory
install_to: 
  - .claude    # Install to Claude Code plugin directory

dependencies:
  superpowers:
    git: "https://github.com/obra/superpowers.git"
    branch: "main"

Install Dependencies

aspm install
# After running `aspm install`, all dependencies are ready. If you are using Claude Code, you can now restart Claude code to load the new skills. Sometimes, you may need to restart it twice.

βœ… That's all you need to do as a skill consumer

Creating a Publish Project (If you are a skill provider)

Publish projects allow you to share your AI resources with others.

Supported Repository Formats:

Format Description Recommended
aspm Format Repository with aspub.yaml at root βœ… Yes
Claude Plugin Format Repository with skills/, agents/, etc. directories at root ⚠️ No
Single Skill Format Repository with only SKILL.md at root ⚠️ No

aspm recommends the aspm Format because it provides:

  • βœ… Explicit control over what gets published
  • βœ… Support for transitive dependencies
  • βœ… Automatic dependency resolution
# Initialize a publish project
aspm init my-skill-pack
# This creates aspub.yaml (publish configuration).
# aspub.yaml and aspkg.yaml can coexist in the same project - one for publishing your own resources, one for consuming dependencies.

Configure aspub.yaml

name: my-skill-pack
version: 1.0.0
description: "A pack of useful AI resources"
author: "Your Name"
license: MIT

# Install target for this package's own dependencies (optional)
install_to:
  - .claude

# Dependencies (optional)
dependencies:
  core-utils:
    git: "https://github.com/user/utils.git"
    tag: "v1.0.0"

# Resources to publish (paths relative to aspub.yaml location)
publish:
  skills:
    - skills/brainstorming/
    - skills/writing-plans.md
  commands:
    - commands/code-review.md

Create Your Skills

The directory structure is fully customizable via aspub.yaml:

# aspub.yaml
name: my-skill-pack
version: 1.0.0

# Publish specific resources with optional regex patterns
# Paths are relative to aspub.yaml location
publish:
  skills:
    - skills/brainstorming/      # match directory (trailing /)
    - skills/writing-plans.md      # match file
    - "skills/^test-.*/"         # regex: match directories starting with test-
  commands:
    - commands/code-review.md       # match file

Corresponding directory structure:

my-skill-pack/
β”œβ”€β”€ aspub.yaml
β”œβ”€β”€ skills/
β”‚   β”œβ”€β”€ brainstorming/
β”‚   β”‚   └── SKILL.md
β”‚   β”œβ”€β”€ writing-plans.md
β”‚   └── test-helpers/           # matched by "^skills/test-.*/"
└── commands/
    └── code-review.md             # file (no trailing /)

Publish Path Rules:

Pattern Behavior
skills/brainstorming Match skills/brainstorming file only
skills/brainstorming/ Match skills/brainstorming/ directory only (trailing /)
skills/^test-.*/ Regex - match directories under skills/ starting with test-
commands/^.*\.md$ Regex - match all .md files

Regex is auto-detected when path contains metacharacters: ^ $ . * + ? [ ] ( ) { } | \

Supported Repository Formats

aspm supports three repository formats:

1. aspm Format (Recommended)

Repositories with aspub.yaml at root. This is the recommended format because:

  • βœ… Explicit control over what gets published
  • βœ… Support for selective publishing (only specified resources)
  • βœ… Transitive dependency support

2. Claude Code Plugin Format

Repositories without aspub.yaml but with resource directories at root:

superpowers/
β”œβ”€β”€ .claude-plugin/
β”‚   └── marketplace.json
β”œβ”€β”€ skills/
β”‚   └── brainstorming/
β”‚       └── SKILL.md
β”œβ”€β”€ agents/
β”œβ”€β”€ commands/
β”œβ”€β”€ hooks/
└── rules/

Installing Claude Code Plugins

# aspkg.yaml
dependencies:
  superpowers:
    git: "https://github.com/obra/superpowers.git"
    branch: "main"

3. Single Skill Format

Repositories with only a SKILL.md file at root (no standard directories). aspm auto-wraps it in a skills/ directory structure during installation.

Install Modes

aspm supports two installation modes:

Plain Mode (Default)

Copies resources to <target>/<type>/<pkg>/:

.agents/
β”œβ”€β”€ skills/
β”‚   └── my-pack/
β”‚       └── my-skill/
└── commands/

Note: Supported directories: skills, agents, commands, hooks, rules

Claude Mode

Copies entire repo to <target>/-plugins/<pkg>/ and updates settings.local.json:

.claude/
β”œβ”€β”€ -plugins/
β”‚   └── my-pack/
β”‚       β”œβ”€β”€ .claude-plugin/
β”‚       β”‚   └── marketplace.json
β”‚       └── skills/
└── settings.local.json

Note: If the source repository lacks .claude-plugin/marketplace.json, aspm auto-generates it with the package name as marketplace name (suffixed with -dev).

Mode Configuration

# Multiple targets with auto mode: .claude path β†’ Claude mode, others β†’ Plain mode
install_to:
  - .claude
  - .agents
# Or
# Explicit mode configuration
# install_to:
#   - path: .claude
#     mode: claude
#   - path: .agents
#     mode: plain

dependencies:
  superpowers:
    git: "https://github.com/obra/superpowers.git"
    branch: "main"

Installation Directory Structure

All packages are installed with namespace isolation to prevent conflicts. Example with install_to: [.claude, .agents]:

.claude/                          # Claude mode (auto-detected)
β”œβ”€β”€ -plugins/
β”‚   └── superpowers/              # Package name
β”‚       β”œβ”€β”€ commands/
β”‚       β”œβ”€β”€ skills/
β”‚       β”‚   β”œβ”€β”€ brainstorming/
β”‚       β”‚   β”‚   └── SKILL.md
β”‚       β”‚   └── writing-plans/
β”‚       β”‚       └── SKILL.md
β”‚       └── .claude-plugin/
β”‚           └── marketplace.json
└── settings.local.json           # Updated with plugin paths

.agents/                          # Plain mode (auto-detected)
β”œβ”€β”€ skills/
β”‚   └── superpowers/              # Package name as subdirectory
β”‚       β”œβ”€β”€ brainstorming/
β”‚       β”‚   └── SKILL.md
β”‚       └── writing-plans/
β”‚           └── SKILL.md
└── commands/
    └── superpowers/

CLI Commands

# Initialization
aspm init <name>              # Create a publish project
aspm init --consumer          # Create a consumer project

# Dependency Management
aspm install                                                # Install all dependencies
aspm install --to <dir>       # Install to specific directory
aspm install --extra <file>   # Merge extra config
aspm install --aspkg <file>   # Use custom aspkg.yaml path
aspm install --extra local.yaml --to .cursor --aspkg ./config/aspkg.yaml  # Combined options
aspm add <name> --git <url>                        # Add dependency (auto-detect default branch)
aspm add <name> --git <url> [--branch | --tag | --commit] <ref>  # Add with specific branch or tag or commit
aspm add <name> --git <url> --aspkg <file>          # Add to specific aspkg.yaml
aspm add <name> --git <url> --aspub                 # Add to aspub.yaml
aspm add <name> --git <url> --overwrite             # Overwrite existing dependency
aspm remove <name>            # Remove dependency
aspm remove <name> --aspkg <file>  # Remove from specific aspkg.yaml
aspm remove <name> --aspub         # Remove from aspub.yaml

# Cache Management
aspm cache clean              # Clear all cached repositories
aspm cache dir                # Show cache directory
aspm cache list               # List cached repositories

Configuration Files

Publish Project (aspub.yaml)

name: my-skill-pack
version: 1.0.0
description: "A pack of useful AI resources"
author: "Your Name"
license: MIT

# Install target for this package's own dependencies
# Required if you have dependencies defined below
install_to:
  - .claude

# Resources to publish (paths relative to aspub.yaml location)
# Supports regex patterns (auto-detected by metacharacters)
publish:
  skills:
    - skills/brainstorming/      # match directory (trailing /)
    - skills/writing-plans.md      # match file
    - "skills/^test-.*/"         # regex: match directories starting with test-
  commands:
    - commands/code-review.md       # match file

# Dependencies (optional)
dependencies:
  core-utils:
    git: "https://github.com/user/utils.git"
    tag: "v1.0.0"

Consumer Project (aspkg.yaml)

# Global install targets (used if dependency has no own install_to)
install_to:
  - .claude

dependencies:
  my-skill-pack:
    git: "https://github.com/user/pack.git"
    tag: "v1.0.0"
    # Optional: override global install_to for this dependency
    install_to:
      - .cursor

Extra Config File

Use --extra to merge additional dependencies (extra file overrides aspkg.yaml):

# extra.yaml
install_to:
  - .cursor

dependencies:
  my-skill-pack:
    git: "https://github.com/user/pack.git"
    branch: develop
    install_to:
      - .cursor
aspm install --extra extra.yaml

Version Rules

aspm uses simplified version rules:

  • Auto-selects the maximum version satisfying all dependencies
  • Tags/branches matching version format (e.g., v1.0.0) participate in version comparison
dependencies:
  skill-a:
    git: "https://..."
    tag: "v1.2.0"      # Exact tag
  
  skill-b:
    git: "https://..."
    branch: "develop"  # Specific branch
  
  skill-c:
    git: "https://..."
    commit: "a1b2c3d4" # Exact commit

License

MIT

About

A Git-based package manager designed for AI-assisted development, similar to npm but supporting skills, agents, commands, hooks, and any AI resource types.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors