README.md
August 15, 2026 · View on GitHub
rolecraft-action
Install, verify, and manage rolecraft AI agent skills — directly in your GitHub Actions CI/CD pipelines.
Usage
Minimal setup for a project that uses rolecraft:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: ci --yes
This installs rolecraft from npm and runs rolecraft ci --yes — which resolves your lockfile and installs all pinned skills.
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
command | ❌ | — | RoleCraft command to run (e.g. ci --yes, verify, doctor). Multi-word commands and quoted arguments are supported (e.g. install "my skill" --project). Ignored when script is provided. |
script | ❌ | — | Shell script to run with rolecraft pre-installed. Alternative to command — use for dynamic/multi-step workflows. |
version | ❌ | latest | RoleCraft version to install (latest, 1.6.0, 2.0.0, etc.) |
Security: Do not pass untrusted data (PR titles, body, labels) to
commandorscriptinputs. Both execute arbitrary code.
Examples
Verify skill integrity
Fail the build if any installed skill has been tampered with or has hash mismatches:
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: verify
Pin a specific rolecraft version
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: ci --yes
version: 2.0.0
Dry-run install a skill from GitHub
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: install user/repo --dry-run
Run a custom validation script
Use script for dynamic workflows — rolecraft is pre-installed and available:
- uses: rolecraft-sh/rolecraft-action@v1
env:
SKILLS: "code-review,tdd,security"
with:
script: |
IFS=',' read -ra SKILL_LIST <<< "$SKILLS"
for skill in "${SKILL_LIST[@]}"; do
rolecraft install "my-org/my-skills" --skill "$skill" --dry-run --yes
done
Run system health check
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: doctor
Install skills and run CI in one workflow
name: Deploy
on: [push]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: install my-org/my-skill --yes
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: ci --yes
- run: npm run build
Check for outdated skills
- uses: rolecraft-sh/rolecraft-action@v1
with:
command: check
All commands
Any rolecraft CLI command works. Here are the most useful ones for CI:
| Command | Purpose |
|---|---|
ci --yes | Install all skills from lockfile (deterministic install) |
verify | Check that installed skills match their content hashes |
check | Check for available updates to installed skills |
doctor | Run system health check |
install <source> --yes | Install a skill inline |
install <source> --dry-run | Preview what would be installed |
See the rolecraft CLI reference for the full list of commands.
Development
# Test locally (requires rolecraft installed)
node index.js
Related
- rolecraft — the CLI that powers this action
- rolecraft Registry — central skill marketplace
License
MIT