Sandbox
@rolecraft-sh/rolecraft

Security-scanned skill manager for AI agents

RoleCraft is a CLI for installing and managing skills and MCP servers across many AI agents. It checks each install for prompt injection, command injection, obfuscated code, and credential harvesting before letting it proceed.

77 starsโ€ข25 forksโ€ขJavaScriptโ€ขUpdated 9d ago
Who it's for

Builders who want to install reusable agent skills and MCP servers with a security scan.

What it delivers

You can add skills across agents without manually copying files or skipping safety checks.

What it does

Security scan on install

Scans each install for prompt injection, command injection, obfuscated code, and credential harvesting, then scores it before proceeding.

Skills and MCP server management

Installs, lists, removes, searches, and tests skills, and can install MCP servers with the same CLI.

Multi-agent setup

Detects agents and installs a skill across supported agents in one command.

Zero-dependency CLI

Runs on Node.js built-ins only, with no runtime dependencies or package install surprises.

Profile and CI support

Supports saved profiles, `--dry-run`, `--yes`, and lockfile-based re-install flows for repeatable setup.

How to get it

  1. 1<70 โ†’ DANGER, blocked unless --yes
    rolecraft install ./my-skill              # auto-scanned
    rolecraft install ./my-skill --yes        # force install even if DANGER
  2. 2โ†’ Full API Reference
    git clone https://github.com/rolecraft-sh/rolecraft.git && cd rolecraft
    npm install                # sets up the pre-commit hook automatically
    npm link                   # rolecraft CLI runs from local checkout
    npm run lint               # syntax + Biome checks
    npm test                   # 1012+ tests, 0 fails expected

README

RoleCraft

RoleCraft

The Security-First Skill Manager for AI Agents
Every install runs a security scan ยท Skills & MCP Servers across 87 Agents (27 Verified)
Zero-dependency CLI ยท No signup ยท Offline-first

Awesome npm npm downloads Tests CodeQL Dependabot GitHub Action Stars Changelog Contributing MIT Docs Node Node.js API Security scoring Code of Conduct Support

Quick Start ยท Features ยท Commands ยท API ยท Security ยท Contribute

RoleCraft demo

โšก Zero dependencies ยท ๐Ÿ“ฆ 396.0 kB ยท ๐Ÿค– 27 verified agents ยท ๐Ÿ”Œ Skills + MCP ยท ๐Ÿ”’ Security scoring ยท ๐Ÿ“ Skill testing ยท ๐Ÿ”ง Init templates ยท ๐ŸŒ Offline-first


Quick Start

# Try without installing
npx rolecraft --help

# Install globally (npm, pnpm, yarn, bun)
npm install -g rolecraft

# Install a skill (local, GitHub, GitLab, SSH, npm)
rolecraft install ./my-skill --cursor

# Install a skill WITH its MCP servers
rolecraft install ./postgres-rules --cursor

# Detect all agents and install a skill to every one
rolecraft setup user/repo

Requirements: Node.js >= 20

Why zero dependencies? Every dependency is a supply-chain risk. rolecraft uses only Node.js built-ins (fs, path, crypto, https) โ€” no node_modules surprises.

Full install guide โ†’ ยท Getting Started โ†’


Features

  • Zero dependencies โ€” 396.0 kB, only Node.js built-ins
  • Any source โ€” local folder, GitHub/GitLab/SSH URL, npm package
  • 87 agents โ€” opencode, claude-code, cursor, copilot, aider, oh-my-pi, and more
  • No registry required โ€” works fully without a marketplace; community-driven registry optional
  • Security scoring โ€” static analysis on every install: prompt injection, command injection, obfuscated code, credential harvesting. Scores 0โ€“100
  • CI-ready โ€” lockfile-based re-install (rolecraft ci), --yes flag, --dry-run
  • MCP + Skills โ€” install skills and their MCP servers in a single command
  • Shell completions โ€” bash, zsh, fish auto-completion
  • Profile system โ€” save, apply, and share multi-agent configurations

Full feature list โ†’ ยท Comparison vs skills (Vercel) โ†’


Security

Every install is automatically scanned with static analysis that detects prompt injection, command injection, obfuscated code, and credential harvesting. Scores 0โ€“100:

  • 90+ โ†’ SAFE, install proceeds
  • 70โ€“89 โ†’ REVIEW, prompts for confirmation
  • <70 โ†’ DANGER, blocked unless --yes
rolecraft install ./my-skill              # auto-scanned
rolecraft install ./my-skill --yes        # force install even if DANGER

โ†’ Full security documentation


Commands

CommandDescription
rolecraft install <source>Install a skill (local, GitHub, npm, SSH)
rolecraft listShow all installed skills
rolecraft setup [<source>]Detect agents, optionally install to all
rolecraft search <query>Search GitHub for skills (TUI with --interactive)
rolecraft remove <slug>Uninstall a skill
rolecraft mcp install <source>Install an MCP server
rolecraft doctorRun system health check
rolecraft test <skill-path>Test a skill quality with built-in assertions

โ†’ Full CLI Reference ยท All commands โ†’


Node.js API

rolecraft exposes a programmatic API for your own scripts and tools:

import { install, list, search, doctor } from 'rolecraft'

const result = await install('./my-skill', { global: true })
const skills = await list()
const results = await search('code-review')
const health = await doctor()

All API functions return plain objects (no side-effects).

โ†’ Full API Reference


Development

git clone https://github.com/rolecraft-sh/rolecraft.git && cd rolecraft
npm install                # sets up the pre-commit hook automatically
npm link                   # rolecraft CLI runs from local checkout
npm run lint               # syntax + Biome checks
npm test                   # 1012+ tests, 0 fails expected

A pre-commit hook runs lint automatically on every commit. Zero-runtime-dependency policy is preserved โ€” Biome and VitePress are devDependencies only.

โ†’ Contributing guide


Support


Contributing

Contributions are welcome! See CONTRIBUTING.md for guidelines.

Contributors

โญ If rolecraft makes your AI agent workflow easier, consider starring the repo.
It helps others discover the project and shows that the community finds it useful.


License

MIT

Files in the repo

Repository payloadโ€ข29 top-level entries
  • .github
  • assets
  • benchmark
  • bin
  • docs
  • e2e
  • hooks
  • scripts
  • src
  • .biomeignore
  • .editorconfig
  • .gitignore
  • .npmignore
  • .nvmrc
  • AGENTS.md
  • apps.json
  • biome.json
  • CHANGELOG.md
  • CODE_OF_CONDUCT.md
  • CONTRIBUTING.md
  • LICENSE
  • MANIFEST-MATRIX.md
  • package-lock.json
  • package.json
  • README.md
  • RELEASE.md
  • SECURITY.md
  • SKILL.md
  • SUPPORT.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

๐Ÿชจ why use many token when few token do trick โ€” Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k