### rolecraft setup examples Source: https://rolecraft-sh.github.io/rolecraft/reference.html Detect agents and optionally install skills. Use --yes to install without prompt. ```bash rolecraft setup # detect agents only rolecraft setup ./my-skill # detect + install rolecraft setup owner/repo --yes ``` -------------------------------- ### rolecraft setup usage examples Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html Shows the basic usage patterns for the `rolecraft setup` command: detecting agents only, installing to all agents, listing skills, and installing specific skills. ```bash rolecraft setup # detect agents only rolecraft setup # detect + install to all agents, MCP where supported rolecraft setup --list # list skills without installing rolecraft setup --skill # install specific skills ``` -------------------------------- ### Examples: preview and install completions Source: https://rolecraft-sh.github.io/rolecraft/commands/completions.html Preview the completion script, install it for the current bash session, and see what tab-completion looks like after install. ```bash # Preview the script rolecraft completions bash # Install for current session only (bash) source <(rolecraft completions bash) # After install, try typing: # rolecraft ins → rolecraft install # rolecraft install -- → lists all flags # rolecraft completions → bash zsh fish ``` -------------------------------- ### rolecraft setup output Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html Example output from running rolecraft setup, showing agent detection, skill installation, and MCP server installation. ```text 🔍 Detecting agents... Detected agents: 48 • opencode 1 skill(s) • cursor 3 skill(s) • claude-code 2 skill(s) • copilot 1 skill(s) • ... 📦 Installing skill from: ./dev-setup Found: dev-setup (dev-setup) ✅ Installed to 48 agents 🔧 MCP servers installed: filesystem, fetch ``` -------------------------------- ### Install command examples Source: https://rolecraft-sh.github.io/rolecraft/commands/install.html Shows various ways to use the rolecraft install command: from local folder, GitHub, npm, with agent flags, global, symlink, dry-run, and frozen-lockfile. ```bash # Install from local folder (default: project scope) rolecraft install ./my-skill # Install from GitHub rolecraft install sametcelikbicak/coverage-guard # Install from npm rolecraft install npm:some-skill-package rolecraft install npm:@org/skill-package@1.0.0 # Install for specific agents rolecraft install ./my-skill --claude --cursor # Global install rolecraft install ./my-skill --global # Symlink instead of copy rolecraft install ./my-skill --symlink # Preview only rolecraft install ./my-skill --dry-run # Fail if already installed rolecraft install ./my-skill --frozen-lockfile ``` -------------------------------- ### rolecraft mcp install examples Source: https://rolecraft-sh.github.io/rolecraft/commands/mcp.html Examples of installing MCP servers from various sources (npm, GitHub, uvx, pipx, Go, Deno, Cargo, local path) with options like --cursor, --claude, --all, --dry-run, and --name. ```bash # npm / npx rolecraft mcp install npm:@modelcontextprotocol/github --cursor --claude # npm with version pinning rolecraft mcp install npm:@modelcontextprotocol/github@1.2.3 --cursor # GitHub rolecraft mcp install gh:github/github-mcp-server --all # GitHub with branch/tag pinning rolecraft mcp install gh:github/github-mcp-server@main --all rolecraft mcp install gh:github/github-mcp-server@v1.0.0 --cursor # Python (uvx) rolecraft mcp install uvx:@anthropic/postgres-mcp --cursor # Python (pipx) rolecraft mcp install pipx:postgres-mcp --cursor # Go rolecraft mcp install go:github.com/org/mcp-server --all # Deno rolecraft mcp install deno:jsr:@org/mcp-server --all # Rust rolecraft mcp install cargo:my-mcp-server --cursor # Local path rolecraft mcp install ./local-server.js --cursor # Dry-run rolecraft mcp install npm:@anthropic/postgres-mcp --all --dry-run # Custom name rolecraft mcp install npm:@test/mcp --name my-server --cursor ``` -------------------------------- ### rolecraft install examples Source: https://rolecraft-sh.github.io/rolecraft/reference.html Install a skill from various source types: local directory, GitHub shorthand, Git URL, SSH URL, or npm package. ```bash rolecraft install ./path # local directory rolecraft install owner/repo # GitHub shorthand rolecraft install https://gitlab.com/org/project # Git URL rolecraft install git@github.com:owner/repo.git # SSH URL rolecraft install npm:package # npm package ``` -------------------------------- ### Node.js API install example Source: https://rolecraft-sh.github.io/rolecraft/commands/install.html Programmatic usage of the install function from the 'rolecraft' package, with an example that installs a skill globally. ```js import { install } from 'rolecraft' const result = await install('./my-skill', { global: true }) ``` -------------------------------- ### Multi-skill source examples Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html Shows how to list skills in a multi-skill source, install specific skills with `--skill`, and install all with `-y`. ```bash # Show skills in a multi-skill source without installing rolecraft setup ./my-multi-skill-repo --list # Install specific skills rolecraft setup ./my-multi-skill-repo --skill "skill-a,skill-b" # Install all with --yes rolecraft setup ./my-multi-skill-repo -y ``` -------------------------------- ### Setup from GitHub repository Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html Installs a skill from a public GitHub repository that contains a SKILL.md file. ```bash rolecraft setup sametcelikbicak/coverage-guard rolecraft setup your-org/team-conventions ``` -------------------------------- ### Setup from any git URL Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html Installs a skill from any git URL, including GitLab, Bitbucket, or SSH. ```bash rolecraft setup https://gitlab.com/org/project rolecraft setup git@github.com:org/repo.git ``` -------------------------------- ### rolecraft bundle usage examples Source: https://rolecraft-sh.github.io/rolecraft/commands/bundle.html Shows the three main usage forms: installing inline sources, installing from a bundle file, and creating a new bundle file. ```bash rolecraft bundle # install inline sources rolecraft bundle # install from a bundle file rolecraft bundle create [] # create a new bundle file ``` -------------------------------- ### rolecraft test --all example Source: https://rolecraft-sh.github.io/rolecraft/commands/test.html Example of testing all installed skills with `rolecraft test --all`, showing the summary of results. ```bash # Test all installed skills $ rolecraft test --all Testing all installed skills... ✅ react-rules 92/100 A ✅ testing-guide 88/100 B ❌ legacy-rules 34/100 D -> needs review ✅ my-skill 73/100 C 📋 Summary: 3/4 passed, 1 failed ``` -------------------------------- ### Install and apply team bundle Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html New team members run `rolecraft setup` and `rolecraft bundle ./team-defaults` to install the bundle. This is part of the team onboarding workflow. ```bash rolecraft setup rolecraft bundle ./team-defaults ``` -------------------------------- ### Setup from npm package Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html Installs a skill from an npm package that contains a SKILL.md file. ```bash rolecraft setup npm:@org/agent-rules ``` -------------------------------- ### One-command onboarding: npm install and rolecraft setup Source: https://rolecraft-sh.github.io/rolecraft/install.html Fastest way to go from zero to productive. Detects every AI agent on your machine, installs the skill to all of them, and configures any MCP servers it declares for the 9 agents that support MCP. ```bash npm install -g rolecraft rolecraft setup ./team-skill ``` -------------------------------- ### setup(source, options?) Source: https://rolecraft-sh.github.io/rolecraft/api.html Detects agents and optionally installs a skill to all detected agents, with options for dry-run, listing, and specific skill selection. ```APIDOC ## setup(source, options?) ### Description Detect agents and optionally install a skill to all detected agents. ### Method Function call ### Signature `setup(source, options?)` ### Parameters #### Source - **source** (string) - Required - The source to detect agents from. #### Options - **yes** (boolean) - Default: `false` - Install all skills without prompt. - **dryRun** (boolean) - Default: `false` - Preview only. - **list** (boolean) - Default: `false` - List available skills without installing. - **skill** (string|string[]) - Optional - Install specific skills by name. - **candidates** (boolean) - Default: `false` - Return the resolved skills without selecting or installing. ### Returns Returns `{ agents: [{ flag, label }], installed?: [{ name, slug, owner, files, results, mcpServers }] }`. With `list: true`, returns `{ agents, skills: [{ name, slug, owner, description, files }] }`. With `candidates: true`, returns `{ agents, candidates: [{ name, slug, description }] }` and writes nothing — read the list, then call again with `skill` to install a choice. ``` -------------------------------- ### rolecraft use examples Source: https://rolecraft-sh.github.io/rolecraft/reference.html Preview a skill without installing. Supports same source types as install. Pipe to a pager with '| head -50'. ```bash rolecraft use ./my-skill # show files rolecraft use owner/repo # from GitHub rolecraft use ./my-skill | head -50 # pipe to pager ``` -------------------------------- ### CI/CD setup with --yes and --dry-run Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html For automated environments, use `--yes` to skip prompts. The `--dry-run` flag previews the installation before actually installing. ```bash rolecraft setup your-org/ci-rules --yes --dry-run # preview first rolecraft setup your-org/ci-rules --yes # install ``` -------------------------------- ### Run rolecraft setup for team onboarding Source: https://rolecraft-sh.github.io/rolecraft/guides/use-cases.html New team members run this once to install rolecraft globally and set up the team conventions. The command detects all agents and installs everything. ```bash # New team member runs this once: npm install -g rolecraft rolecraft setup ./team-conventions ``` -------------------------------- ### Run rolecraft setup without installing Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html Runs rolecraft setup directly using npx, avoiding a global install. ```bash npx rolecraft setup owner/repo ``` -------------------------------- ### Node.js API usage Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html Example of using the `setup` function from the 'rolecraft' package programmatically with the `yes` option. ```js import { setup } from 'rolecraft' const result = await setup('./my-skill', { yes: true }) ``` -------------------------------- ### Team onboarding with bundle (bash) Source: https://rolecraft-sh.github.io/rolecraft/mcp.html Shows how to create a bundle once and install it for every developer. The bundle install command installs all skills and configures all MCP servers automatically. ```bash # Team lead creates a bundle once rolecraft bundle create team-onboarding # Every developer runs rolecraft bundle install team-onboarding.json # → All skills installed # → All MCP servers configured automatically # → Each agent's config written in the correct format ``` -------------------------------- ### Install and use rolecraft with three commands Source: https://rolecraft-sh.github.io/rolecraft/ Quick-start commands: install rolecraft globally via npm, search for a code-review skill, and install a skill from a GitHub shorthand. The install command accepts local paths, git URLs, or multi-skill repositories; --dry-run prints the plan without touching disk. ```bash npm install -g rolecraft rolecraft search code-review rolecraft install sametcelikbicak/coverage-guard --global ``` -------------------------------- ### rolecraft list examples Source: https://rolecraft-sh.github.io/rolecraft/reference.html List installed skills. Use --json for machine-readable output and --agent to filter by agent. ```bash rolecraft list # all installed skills rolecraft list --json # machine-readable JSON output rolecraft list --agent cursor # only skills installed to cursor (-a alias) ``` -------------------------------- ### Quick start: save, apply, and export a profile Source: https://rolecraft-sh.github.io/rolecraft/profile.html Save your current cursor and claude setup as a profile named 'frontend-dev', apply it later, and export it with relative paths for sharing. ```bash # Save your current cursor + claude setup as a profile rolecraft profile save frontend-dev --cursor --claude # Apply it later (or on another machine) rolecraft profile apply frontend-dev # Share with a teammate rolecraft profile export frontend-dev --file ./team-profile.json --relative ``` -------------------------------- ### install(source, options?) Source: https://rolecraft-sh.github.io/rolecraft/api.html Installs a skill with a security scan. Returns an object containing installation results and optional MCP results. ```APIDOC ## install(source, options?) ### Description Installs a skill with a security scan. ### Parameters #### Options - **global** (boolean) - Optional - Default: false - Install to `~/.agents/skills/` - **project** (boolean) - Optional - Default: true - Install to `./.agents/skills/` - **scope** (object) - Optional - Default: `{ project: true }` - Target scope object (`{ project, global, [agentFlag]: true, ... }`); overrides `global`/`project` - **yes** (boolean) - Optional - Default: false - Bypass security prompts - **dryRun** (boolean) - Optional - Default: false - Preview only - **symlink** (boolean) - Optional - Default: false - Symlink instead of copy - **frozenLockfile** (boolean) - Optional - Default: false - Fail if already installed - **noMcp** (boolean) - Optional - Default: false - Skip MCP server installation - **skill** (string|string[]) - Optional - Specific skill slug(s) ### Returns `{ results: [{ name, slug, owner, security, install }], mcpResults?: [...] }` ``` -------------------------------- ### rolecraft install usage syntax Source: https://rolecraft-sh.github.io/rolecraft/commands/install.html Shows the general command syntax for installing a skill. Use this as the base for all install commands. ```bash rolecraft install [flags] ``` -------------------------------- ### skills.json JSON object with skills key example Source: https://rolecraft-sh.github.io/rolecraft/commands/bundle.html A JSON object with a name and a skills array. The skills array lists the sources to install. ```json { "name": "frontend-essentials", "skills": ["owner/react-practices", "owner/ts-config"] } ``` -------------------------------- ### Install scope prompt: Where do you want to install this skill? Source: https://rolecraft-sh.github.io/rolecraft/install.html When running `rolecraft install ` without flags, it asks where to install. Project scope is the default. ```text Where do you want to install this skill? 1) Global (~/.agents/skills/) 2) Project (./.agents/skills/) [default] 3) Both ``` -------------------------------- ### Install skills to all agents with rolecraft install --all Source: https://rolecraft-sh.github.io/rolecraft/guides/use-cases.html Use `rolecraft install ./my-rules --all` to install a skill directory to every agent Rolecraft knows about. Re-run with `--all` after adding a new agent to fill in the gaps. ```bash rolecraft install ./my-rules --all ``` -------------------------------- ### Install personal skill with rolecraft install Source: https://rolecraft-sh.github.io/rolecraft/guides/use-cases.html Installs a personal skill from a GitHub repository, including all associated prompts, rules, and MCP servers. Use the --all flag to install everything. ```bash rolecraft install github.com/you/your-personal-skill --all ``` -------------------------------- ### Install to multiple agents with combined flags Source: https://rolecraft-sh.github.io/rolecraft/install.html Combine flags to install to multiple agents at once. Example installs to Claude, Cursor, and Devin. ```bash rolecraft install ./my-skill --claude --cursor --devin ``` -------------------------------- ### Install skills with security blocking and force flag Source: https://rolecraft-sh.github.io/rolecraft/guides/use-cases.html Use rolecraft install to install a skill. By default, a skill with a security score below 70 is blocked; use --yes to force installation. The example shows a blocked install and a forced install. ```bash rolecraft install unknown/repo # blocked by default rolecraft install ./trusted-skill --yes # force install ``` -------------------------------- ### rolecraft init usage examples Source: https://rolecraft-sh.github.io/rolecraft/commands/init.html Shows various ways to use the rolecraft init command, including default, custom name, namespace/skill, listing templates, and using templates. ```bash rolecraft init # create ./my-skill/SKILL.md (default: my-skill) rolecraft init my-custom-tool # create ./my-custom-tool/SKILL.md rolecraft init namespace/skill # create ./namespace-skill/SKILL.md rolecraft init --list # list available templates rolecraft init my-skill --template basic # scaffold from a template rolecraft init my-skill --template react # scaffold with React best practices ``` -------------------------------- ### rolecraft compose JSON dry-run example Source: https://rolecraft-sh.github.io/rolecraft/commands/compose.html Example of using the --json and --dry-run flags to get JSON output with stats without writing. ```bash $ rolecraft compose ./a.SKILL.md ./b.SKILL.md --json --dry-run ``` -------------------------------- ### rolecraft bundle create examples Source: https://rolecraft-sh.github.io/rolecraft/commands/bundle.html Creates a JSON bundle file. The first example creates my-collection.json. The second runs interactively, asking for name and path. ```bash rolecraft bundle create my-collection # creates my-collection.json rolecraft bundle create # interactive: asks for name and path ``` -------------------------------- ### rolecraft init examples Source: https://rolecraft-sh.github.io/rolecraft/reference.html Scaffold a new skill. The default name is 'my-skill' if not provided. Use --list to see templates and --template to select one. ```bash rolecraft init my-skill # creates ./my-skill/SKILL.md rolecraft init # creates ./my-skill/SKILL.md (default: my-skill) rolecraft init --list # list available templates rolecraft init my-skill --template basic # scaffold from a specific template ``` -------------------------------- ### Team onboarding workflow Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html Shows the workflow for team onboarding: first create a bundle, then new members run setup after cloning the repo. ```bash # First team member creates a bundle rolecraft bundle create team-defaults # New members run rolecraft setup ./team-defaults # after cloning the repo ``` -------------------------------- ### List available templates with rolecraft init --list Source: https://rolecraft-sh.github.io/rolecraft/commands/init.html Output of rolecraft init --list showing all available templates with descriptions. ```bash rolecraft init --list # Available templates: # basic General-purpose skill template for AI agent instructions # code-review Code review guidelines and best practices for AI agents # git-workflow Git workflow conventions and branch strategy for AI agents # testing Testing guidelines and best practices for AI agents # security Security guidelines and dangerous pattern detection for AI agents # react React best practices and component patterns for AI agents ``` -------------------------------- ### Detect agents only Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html Runs `rolecraft setup` without a source to detect installed agents and show how many skills each has. ```bash rolecraft setup ``` -------------------------------- ### Node.js API bundle example Source: https://rolecraft-sh.github.io/rolecraft/commands/bundle.html Programmatic usage of the bundle function from the 'rolecraft' package. Returns a result after installing the given skills. ```js import { bundle } from 'rolecraft' const result = await bundle(['./my-skill', 'owner/other-skill']) ``` -------------------------------- ### Non-interactive CI usage Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html Shows how to run `rolecraft setup` non-interactively with `-y` and optionally `--dry-run` to preview without installing. ```bash rolecraft setup ./my-skill -y rolecraft setup ./my-skill --dry-run -y # preview without installing ``` -------------------------------- ### Combine multiple agent flags in one Rolecraft command Source: https://rolecraft-sh.github.io/rolecraft/reference.html Use this bash command to install a skill for multiple agents at once by passing several agent-specific flags to the 'rolecraft install' command. The example targets cursor, claude, devin, and copilot agents. ```bash rolecraft install ./my-skill --cursor --claude --devin --copilot ``` -------------------------------- ### rolecraft update example Source: https://rolecraft-sh.github.io/rolecraft/reference.html Re-install a skill from its original source. ```bash rolecraft update my-skill ``` -------------------------------- ### rolecraft bundle inline sources examples Source: https://rolecraft-sh.github.io/rolecraft/commands/bundle.html Pass multiple sources as arguments. The second example uses --dry-run to preview only. ```bash rolecraft bundle owner/react-patterns owner/ts-practices ./css-layout rolecraft bundle owner/skill1 owner/skill2 --dry-run # preview only ``` -------------------------------- ### resolveSkills(source) Source: https://rolecraft-sh.github.io/rolecraft/api.html Resolves a source string and discovers all skills within it, including multi-skill repos. Used internally by install, use, and setup. ```APIDOC ## resolveSkills(source) ### Description Resolve a source string and discover all skills within it (including multi-skill repos). Used internally by `install`, `use`, and `setup`. ### Parameters #### Source - **source** (string) - Required - The source string to resolve. ### Returns Returns `[{ slug, name, description, owner, files, sourcePath, sourceType, content }]`. ``` -------------------------------- ### Generated bundle file example Source: https://rolecraft-sh.github.io/rolecraft/commands/bundle.html The JSON file generated by rolecraft bundle create. Edit the skills array and install with rolecraft bundle my-collection.json. ```json { "name": "my-collection", "skills": [ "owner/skill-name" ] } ``` -------------------------------- ### rolecraft test usage examples Source: https://rolecraft-sh.github.io/rolecraft/commands/test.html Basic usage of the `rolecraft test` command: test a single skill, test all installed skills, and output JSON for CI. ```bash rolecraft test # Test a single skill rolecraft test --all # Test all installed skills rolecraft test --all --json # JSON output for CI ``` -------------------------------- ### rolecraft bundle examples Source: https://rolecraft-sh.github.io/rolecraft/reference.html Bundle multiple skills from sources or a bundle file. Use 'create' to create a new bundle. ```bash rolecraft bundle owner/skill1 owner/skill2 ./local rolecraft bundle bundle.json rolecraft bundle bundle.txt rolecraft bundle create [name] ``` -------------------------------- ### Install from local path Source: https://rolecraft-sh.github.io/rolecraft/commands/install.html Installs a skill from a local directory containing SKILL.md. Accepts relative, home-relative, and absolute paths. ```bash rolecraft install ./my-skill rolecraft install ~/projects/my-skill rolecraft install /absolute/path/to/skill ``` -------------------------------- ### MCP servers declaration in SKILL.md Source: https://rolecraft-sh.github.io/rolecraft/commands/setup.html YAML example of declaring MCP servers in a skill's SKILL.md file, which `rolecraft setup` will configure for agents that support MCP. ```yaml mcp_servers: - name: filesystem source: npm:@modelcontextprotocol/server-filesystem ``` -------------------------------- ### Import profile examples Source: https://rolecraft-sh.github.io/rolecraft/commands/profile.html Examples of the 'rolecraft profile import' command for importing from a file or URL. ```bash rolecraft profile import ./profile.json rolecraft profile import https://example.com/profiles/dev-setup.json ``` -------------------------------- ### rolecraft list --agent filter examples Source: https://rolecraft-sh.github.io/rolecraft/commands/list.html Filters the output to show only skills installed to a specific agent. The `-a` is an alias for `--agent`. Agent names are matched case-insensitively. ```bash rolecraft list --agent cursor # only skills installed to cursor rolecraft list -a claude-code # alias ``` -------------------------------- ### Install from Git URL (GitLab, Bitbucket, SSH) Source: https://rolecraft-sh.github.io/rolecraft/install.html Any public git repository with SKILL.md can be installed via Git URL. ```bash rolecraft install https://gitlab.com/org/project rolecraft install https://bitbucket.org/org/project rolecraft install git@github.com:owner/repo.git ``` -------------------------------- ### Declare MCP servers in SKILL.md frontmatter Source: https://rolecraft-sh.github.io/rolecraft/guides/onboarding.html A SKILL.md file can declare MCP servers in its frontmatter. Running `rolecraft setup ./postgres-rules` installs both the skill and the MCP servers without separate tools or manual config. ```yaml --- name: postgres-rules mcp_servers: - name: postgres source: npm:@modelcontextprotocol/server-postgres args: [--database, mydb] - name: filesystem source: npm:@modelcontextprotocol/server-filesystem args: [/path/to/project] --- ``` -------------------------------- ### rolecraft ci example with comment Source: https://rolecraft-sh.github.io/rolecraft/commands/ci.html Example of running `rolecraft ci` in CI or after a git clone, with a comment explaining that it restores skills and MCP servers. ```bash # In CI or after git clone — restores skills + MCP servers rolecraft ci ``` -------------------------------- ### rolecraft install --skill flag usage examples Source: https://rolecraft-sh.github.io/rolecraft/commands/install.html Shows two ways to pass skill names to the --skill flag: comma-separated or repeated flag. Skill names are matched case-insensitively against the skill name or slug. ```bash # Comma-separated rolecraft install source --skill "skill-a,skill-b" ``` ```bash # Repeated flag rolecraft install source --skill skill-a --skill skill-b ```