sofagent skill

sofagent audits changes made by an AI agent against rules and leaves a log and a snapshot for rollback.

  • 55 ★ on the repository
  • Last commit
  • MIT
Skill

Extended access

Why this level

  • Hooks block commits and write a log, so misconfiguration can get in the way.
  • The project is alpha and the default protection can be bypassed.
All reasons and checks

kongfangxun/sofagent

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add skills/sofagent

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Hooks block commits and write a log, so misconfiguration can get in the way.
  • The project is alpha and the default protection can be bypassed.

This is third-party code. Review the repository files before installing.

What it does

sofagent adds a governance layer for agents that change code and files. On entry it writes the business process into files, then checks every change against rules: 17 are on by default and 28 with explicit configuration. The check catches things like a committed `.env` file or an AWS-style key and blocks the commit with exit code 2. For Claude Code and Cursor it mounts a skill folder, a rules file and call interception, while Codex and Gemini CLI get `AGENTS.md` and a git hook. Audits are written to an HMAC chain you can verify offline, and changes roll back from snapshots. The first run needs no setup: `npx -y -p sofagent sofagent audit` in any git repository.

Who it is for. Teams that hand agents real repository work and want a log, a pre-commit check and a way to roll back.

Good fit when

  • Before merging agent edits, you check that no secrets landed in the commit.
  • You need a trail of who decided what, on what grounds and what changed.
  • The same rule set is attached to Claude Code, Cursor and Codex.
  • After a night of agent work, files must roll back to a snapshot.

Not a fit when

  • You need protection that cannot be bypassed, since by default the `--no-verify` flag skips the check.
  • You only want quick secret scanning with no log, where a simpler scanner is enough.
  • You need a stable interface, since the project is in alpha.

Example request

Run an audit of the latest changes in this repository, list the rule violations and suggest how to remove secrets from the commit.

Limitations

The 1.x line is alpha, the interface is not promised stable, and you should read the changelog before upgrading. By default the rules can be sidestepped: an agent can alter the configuration, and `--no-verify` skips the first two lines of defense. Enforcement is strongest on DeepSeek Harness and OpenClaw, while for Claude Code and Cursor the skill loads at the agent's discretion. For enterprises the authors advise CI and file permissions via `chmod 400 .sofagent/config.yml`, and multi-tenant write isolation is not ready. The documentation is in Chinese.

How to disable. Remove the audit git hooks, the `.sofagent/` folder and the skill links in `.claude/` and `.cursor/`. Uninstall the global package with `npm uninstall -g sofagent`.

FAQ

What does a one-off audit do?

It checks the latest changes against 17 rules in one process and installs no git hook. Run `sofagent audit --init` for permanent protection.

Where does data go?

Per the README, runtime data stays on the machine. Outbound paths, cloud sync, a model endpoint and a cloud VM, turn on only when you configure them.

Which platforms are supported?

Claude Code and Cursor get a standard mount, WorkBuddy, Codex, Gemini CLI and Hermes a thin one, OpenClaw a full one and DeepSeek Harness a deep one. A README table describes enforcement strength per platform.

Can the check be bypassed?

Yes. By default the `--no-verify` flag skips hooks. The authors recommend backing the check up with a CI run.

How do I mount it for Claude Code?

`bash install.sh --platform <name>` chooses the mount. The skill folder is symlinked and call interception is set for Bash, Write and Edit.

Discussion

No questions or reviews yet.

Skills
Official

A plugin that checks the commands, URLs and file writes an AI agent attempts and blocks the dangerous ones before they run

PluginExtended access326Repository stars

A static scanner for vulnerabilities in AI agent code and MCP configs with 66 rules mapped to OWASP Agentic Top 10

CLIExtended access245Repository stars
Official

Agentic SAST scanner: AI agents read your code, confirm findings through the call graph and scan a whole repository or a diff for pull request review

CLIBroad access461Repository stars

AgentShield audits the .claude folder for plaintext keys, broad permissions, dangerous hooks and risky MCP servers and grades the setup from A to F

CLIExtended access1.4KRepository stars

A local guard for coding agents: blocks secret writes and force pushes to main, warns about risky commands.

CLIExtended access156Repository stars

A command-line tool that finds secrets in local AI agent history and redacts them while keeping JSONL structure intact.

CLIExtended access88Repository stars

README in short

The README is in Chinese: what an FDE Harness is, mount tiers per platform, audit rules, one-off and full installs, limitations and version 1.8.0.

README badge

Report a problem