Documentation
Complete command reference for AI Skills Manager
Built on Best Practices
AI Skills Manager implements the Agent Skills specification. Each command follows the documented structure and best practices from Anthropic, providing a solid foundation for your Agent skills.
asm scaffold
Create a new Claude Code skill with the required directory structure and SKILL.md template.
Syntax
asm scaffold <name> [options]
Options
Examples
Create a basic skill
asm scaffold code-reviewer
Create with description and custom tools
asm scaffold test-helper --description "Helps write unit tests" --allowed-tools "Read,Write,Bash"
Create a personal skill
asm scaffold my-workflow --scope personal
Create with spec fields
asm scaffold my-tool --license MIT --compatibility "claude-code>=2.1"
Create with custom metadata
asm scaffold my-tool --metadata category=testing --metadata priority=high
Interactive scaffold mode
asm scaffold my-skill --interactive
Minimal production template
asm scaffold deploy-helper --template with-hooks --minimal
asm validate
Validate a skill against the Agent Skills specification, checking structure, frontmatter, and required fields.
Syntax
asm validate <path> [options]
Options
Validation Checks
- SKILL.md file exists
- Valid YAML frontmatter structure
- Required fields present (name, description)
- Only allowed properties in frontmatter
- Name format validation
- Description format validation
- Frontmatter schema v2 field validation (context, agent, hooks, license, compatibility, metadata, etc.)
- Advanced allowed-tools pattern validation (Task(AgentName), mcp__server__*, Bash(git:*))
- YAML-style list format support for allowed-tools
Examples
Validate a project skill
asm validate .claude/skills/my-skill
JSON output for CI/CD
asm validate .claude/skills/my-skill --output json
Exit Codes
asm package
Create a distributable .skill package file (ZIP archive) for sharing skills.
Syntax
asm package <path> [options]
Options
Examples
Package a skill
asm package .claude/skills/my-skill
Package to a specific directory
asm package .claude/skills/my-skill --output ./dist
Exit Codes
asm install
Install a skill from a .skill package file with automatic validation and rollback on failure.
Syntax
asm install <file> [options]
Options
Examples
Install to project scope
asm install my-skill.skill --scope project
Install to personal skills
asm install my-skill.skill --scope personal
Preview installation
asm install my-skill.skill --dry-run
Exit Codes
asm update
Update an existing skill to a newer version with automatic backups and atomic updates.
Syntax
asm update <name> <file> [options]
Options
Examples
Update a skill
asm update my-skill ./my-skill-v2.skill
Force update with backup preservation
asm update my-skill ./new-version.skill --force --keep-backup
Exit Codes
~/.asm/backups/ with timestamp naming. On update failure, automatic rollback restores the previous version.
asm uninstall
Remove installed skills with security checks and confirmation prompts.
Syntax
asm uninstall <name...> [options]
Options
Examples
Uninstall a skill
asm uninstall my-skill --scope project
Bulk uninstall multiple skills
asm uninstall skill-one skill-two skill-three --scope personal
Preview uninstall
asm uninstall my-skill --dry-run
Exit Codes
asm list
List all installed skills across project and personal scopes.
Syntax
asm list [options]
Options
Examples
List all skills
asm list
List only personal skills
asm list --scope personal
JSON output for scripting
asm list --output json
List skills recursively in a monorepo
asm list --recursive
Limit discovery depth
asm list --recursive --depth 2
Recursive JSON output with metadata
asm list --recursive --output json
--recursive, a warning is shown if max depth is reached and subdirectories remain unscanned. JSON output includes depthLimitReached metadata.
Exit Codes
Programmatic API
Use AI Skills Manager as a Node.js module for building GUIs, integrations, and custom tooling. All CLI commands are available as typed functions.
Installation
npm install ai-skills-manager
Import
import { scaffold, validate, createPackage, install, update, uninstall, list } from 'ai-skills-manager';
Available Functions
Key Features
- Full TypeScript support with complete type definitions for all options and results
- Typed error handling with
ValidationError,FileSystemError,PackageError,SecurityError, andCancellationError - AbortSignal support for cancelling long-running operations
- Dry-run mode available on all write operations
- Thin CLI wrapper - the CLI uses this API internally
Example Usage
Validate a skill programmatically
const result = await validate('.claude/skills/my-skill');
if (result.valid) {
console.log('Skill is valid!');
} else {
console.log('Issues:', result.issues);
}
Install with cancellation support
const controller = new AbortController();
const result = await install({
packagePath: 'my-skill.skill',
scope: 'project',
signal: controller.signal
});
validate() function never throws for validation failures—check result.valid instead. All other functions throw typed errors that can be caught with instanceof checks.
Debug Mode
Enable verbose logging for troubleshooting by setting the ASM_DEBUG environment variable.
Usage
ASM_DEBUG=1 asm <command>
Example
Debug an installation
ASM_DEBUG=1 asm install my-skill.skill --scope project