DOCS · Install (CLI)

Teach Your Agent to Use SaferSkills

Install the saferskills skill so your AI agent runs SaferSkills itself — scanning and scoring any capability before it installs or trusts it, across all eight agents.

The SaferSkills skill is a small, installable capability that teaches your agent to use SaferSkills on its own. Once it is installed, the agent knows what SaferSkills is and reaches for it at the right moment: before it installs, adds, or trusts any capability — a skill, MCP server, hook, plugin, or rule — it runs npx saferskills to scan and score that capability first, and tells you the verdict. You install it once with npx saferskills install saferskills, and it lands in your agent’s native skill format. It works across all eight supported agents.

What is the SaferSkills skill?

Most of these docs teach you to use SaferSkills. This skill teaches your agent — it is the agent-readable counterpart to the human docs. It is one capability you install, distinct from two things it is easy to confuse it with:

The skill body carries three things: a short, scope-honest explanation of what SaferSkills is and why it exists, an opinionated scan-before-you-trust workflow, and the exact npx saferskills commands to run.

How do I install it?

Run one command — no global install needed, because npx fetches the prebuilt binary:

npx saferskills install saferskills

Like any install, the CLI detects your agents, discloses which ones it will write to, and asks before it writes. Because the SaferSkills skill is itself a scanned catalog item, the CLI shows its own trust score and badge before installing — SaferSkills’ own helper passes through SaferSkills. To inspect it without installing, run npx saferskills info saferskills.

What does it teach the agent to do?

The skill encodes a workflow, not just syntax. When your agent is about to install, add, or recommend a capability, it:

  1. Finds itnpx saferskills search <query> to browse the catalog, or npx saferskills info <name> (alias check) to resolve one item.
  2. Scans itnpx saferskills capability <path-or-url> to scan a single artifact, or npx saferskills capability with no argument to audit everything already installed.
  3. Reads the verdict — the agent surfaces the aggregate score and band, and warns or declines below the trust threshold (default 90, set via SAFERSKILLS_MIN_SCORE). A low score is a prompt to read the report, not an automatic block.
  4. Installs only afternpx saferskills install <name>, which re-checks the score gate before writing.
  5. Keeps it honest over timenpx saferskills list shows the local inventory with live scores; npx saferskills update re-verifies them.

For a behavioral assessment of the whole running agent, the skill points to the agent scan (the separate saferskills-agent-scan flow) — it links to it, it does not duplicate it.

How does it work on each agent?

The skill is authored once and installed in each agent’s native format — a SKILL.md where the agent supports the Agent Skills standard (Claude Code and OpenClaw load it directly), and the agent’s own rules or instructions file everywhere else. Pick your agent below; the choice syncs across every agent-tabbed block on the site, and each tab shows the install path the CLI writes to.

Install path: ~/.claude/skills/ · config: ~/.claude/settings.json. After the score gate passes, the CLI writes the capability to this path; run npx saferskills list to confirm it landed.

On agents that load instructions on a description match (such as Claude Code and Cursor), the skill stays out of context until it is relevant. On agents that load their instruction file once per session (such as Codex), it is a lightweight always-on pointer that hands off to the CLI on demand — either way, the agent ends up running the same npx saferskills commands.

What about agents that can’t run a shell?

If your agent has no shell or exec tool, the skill falls back to the SaferSkills HTTP API (https://saferskills.ai/api/v1/…): submit a capability for scanning, poll for the result, and read the score — the same verdict the CLI prints, over plain HTTP. The CLI path stays the default; the API fallback exists so a sandboxed or hosted agent can still scan before it trusts.

Where do I go next?