skillsbase is a standalone Node.js CLI for bootstrapping and maintaining managed skills repositories.
It ships the CLI and templates only. The generated skills/ content belongs in the target repository, not in this package repository.
Requirements:
- Node.js
>= 22.12.0 - npm
>= 10.9.2
Install globally:
npm install --global @hagicode/skillsbaseThen run:
skillsbase --helpInitialize a managed repository:
skillsbase init --repo /path/to/target-repoSync managed skills from sources.yaml:
skillsbase sync --repo /path/to/target-repoAdd one skill and sync immediately:
skillsbase add documentation-writer --repo /path/to/target-repoRemove one skill and sync immediately:
skillsbase remove documentation-writer --repo /path/to/target-repoGenerate managed GitHub Actions assets:
skillsbase github_action --repo /path/to/target-repo --kind all| Command | Purpose | Example |
|---|---|---|
init |
Create the managed repository baseline. | skillsbase init --repo ./my-skills-repo |
sync |
Reconcile managed skills from sources.yaml. |
skillsbase sync --repo ./my-skills-repo |
sync --check |
Validate drift without writing files. | skillsbase sync --check --repo ./my-skills-repo |
add <skill-name> |
Add a skill to a source block, then run sync. | skillsbase add documentation-writer --repo ./my-skills-repo |
remove <skill-name> |
Remove a skill from a source block, then run sync. | skillsbase remove documentation-writer --repo ./my-skills-repo |
github_action |
Generate managed GitHub Actions workflow or action files. | skillsbase github_action --repo ./my-skills-repo --kind workflow |
Global options:
--repo <path>: target repository path, defaults to the current directory--help,-h: show help--version,-v: show version
skillsbase manages files in the target repository, including:
sources.yaml: the single source of truth for source roots, naming rules, include lists, and defaultsskills/<name>/SKILL.md: managed skill output converted from installed source contentskills/<name>/.skill-source.json: source, conversion, target-path, and install metadatadocs/maintainer-workflow.md: maintainer guidance generated from the bundled templates.github/workflows/skills-sync.yml: reusable workflow for validation and sync checks.github/actions/skillsbase-sync/action.yml: reusable composite action
- The target repository defaults to the current working directory.
initdefaults the source roots to:- first-party:
$HOME/.agents/skills - system:
$HOME/.codex/skills/.system
- first-party:
addwrites to the first declared source block unless--source <key>is provided.removedeletes from the only matching source block automatically; if multiple source blocks include the same skill, pass--source <key>.add,remove, andsyncaccept--allow-missing-sourcesto keep path-resolution behavior consistent in CI or repo-external execution.github_actiondefaults to--kind workflow.- When the CLI does not have enough context to write safely, it fails with diagnostics instead of prompting interactively.
Common commands for working on this package:
npm run build
npm run cli -- --help
npm test
npm run smoke
npm run pack:checkThe published entry point is bin/skillsbase.mjs. In development, npm run cli -- <args> runs the TypeScript entry directly.
The GitHub Actions workflow supports two npm authentication modes:
- Preferred: npm trusted publishing via GitHub Actions OIDC
- Fallback:
NPM_TOKENrepository secret mapped toNODE_AUTH_TOKEN
Before relying on trusted publishing, make sure the npm package settings for @hagicode/skillsbase trust the HagiCode-org/skillsbase repository.
The npm docs currently require Node.js >= 22.14.0 and npm >= 11.5.1 for trusted publishing.