huggingface

Safeagents — Development skill for Claude Code

Development community

Safely run your agents using any coding harness.

How to install Safeagents

This entry records only its repository, not the path inside it, so there is no exact command to give. Open huggingface/safeagents and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Safeagents does

Safely run your agents using any coding harness.

Alternatives in Development

  • Flowix — Notes for you, Memory for your agents 374 ★
  • Harness Remote — Native-session control plane for Codex, Claude Code, OpenCode, OMP and PI 356 ★
  • Netclode — Self hosted cloud coding agent with k3s + kata containers + cloud hypervisor microVMs + tailscale + any harnes 249 ★

README

[![safeagents demo](assets/safeagents.gif)](assets/safeagents.mp4)

A lightweight local proxy between your agent and its model server. It checks every tool call the model makes before the harness sees it, and swaps the calls it blocks for a text notice, so the harness runs nothing. It works with any harness that lets you set a base URL (Claude Code, Pi, Hermes, OpenCode, ...), over OpenAI Chat Completions or Anthropic Messages, streaming or not.

Quickstart

On macOS, Linux or WSL:

curl -LsSf https://raw.githubusercontent.com/huggingface/safeagents/main/scripts/install.sh | sh

On Windows (PowerShell):

irm https://raw.githubusercontent.com/huggingface/safeagents/main/scripts/install.ps1 | iex

The script installs [uv](https://docs.astral.sh/uv/) if it's missing, installs safeagents as a uv tool and puts it on your `PATH`. Open a new terminal afterwards. To install a specific tag or commit, set `SAFEAGENTS_VERSION` first. Running the script again updates safeagents.

Start a proxy in the background, then point your agent at it:

$ safeagents start https://api.anthropic.com --log-only
1  http://127.0.0.1:8787 -> https://api.anthropic.com  (log: ~/.safeagents/run/1.log)

$ ANTHROPIC_BASE_URL=http://127.0.0.1:8787 claude

Manage the running proxies:

$ safeagents ls
1   pid 82837   http://127.0.0.1:8787 -> https://api.anthropic.com  started 2026-10-29 22:26:58  --log-only
$ safeagents stop 1
stopped 1  http://127.0.0.1:8787 -> https://api.anthropic.com

`--log-only` only reports what it would block, which is a good way to start. Drop it to block for real. All commands and options are in [docs/commands.md](docs/commands.md), and setup guides for 13 coding agents in [docs/](docs/README.md).

How it works

Each tool call goes through three stages:

  1. Request-only checks. A call is blocked if it uses a tool the request never declared, or if its arguments contain a host (URL or bare IP) that appears nowhere in the conversation. Th