README.md

August 15, 2026 · View on GitHub

RoleCraft

rolecraft-action

Test Marketplace Powered by rolecraft MIT

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

InputRequiredDefaultDescription
commandRoleCraft 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.
scriptShell script to run with rolecraft pre-installed. Alternative to command — use for dynamic/multi-step workflows.
versionlatestRoleCraft version to install (latest, 1.6.0, 2.0.0, etc.)

Security: Do not pass untrusted data (PR titles, body, labels) to command or script inputs. 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:

CommandPurpose
ci --yesInstall all skills from lockfile (deterministic install)
verifyCheck that installed skills match their content hashes
checkCheck for available updates to installed skills
doctorRun system health check
install <source> --yesInstall a skill inline
install <source> --dry-runPreview what would be installed

See the rolecraft CLI reference for the full list of commands.

Development

# Test locally (requires rolecraft installed)
node index.js

License

MIT