# aport-guardrails

This plugin checks Claude Code tool calls against an OAP policy before execution. It is useful for stopping commands and file actions that break the rules.

- plugin · `type=plugin` · Claude Code · ★ 30
- Author: aporthq
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/aporthq/aport-agent-guardrails
- Updated: 2026-10-03
- HTML: https://affpapa.org/en/nevibecode/plugins/aport-guardrails

## What it does

aport-guardrails places a `PreToolUse` hook in front of Claude Code tool execution. Each action is checked against an Open Agent Passport policy, so unauthorized commands, risky file operations, and other policy violations can be blocked before they run. Evaluation is local by default, with no network calls, and works offline.

Setup writes the Claude Code hook and its configuration. You can use a hosted passport or a local JSON passport; the hosted path creates a passport and a narrow setup key, then sends decisions to APort. The local path keeps evaluation offline. When creating a local passport for Claude Code, set `Spawn sub-agents and tasks?` to `Y`, or Agent and Task calls will be denied.

## Install

### Claude Code (native platform)

**Plugin marketplace**
In the agent chat (not a shell):
```text
/plugin marketplace add anthropics/claude-plugins-community
```
In the agent chat (not a shell):
```text
/plugin install aport-guardrails@claude-community
```

## When to use it
- block commands outside the agent policy
- stop risky file operations before execution
- check tool calls before they run
- record allow and deny decisions
- configure a local passport for offline checks

## Example prompts
- Check this action against the policy before running it, and block it if the policy rejects it.
- Create the configuration file, then run the command only after the hook approves the action.
- Run the Claude Code task and deny Agent or Task calls that the policy does not permit.

## Similar
- [ai-coding-agent-guardrails](https://affpapa.org/en/nevibecode/skills/ai-coding-agent-guardrails.md) — skill · 340 installs
- [wa-guardrails](https://affpapa.org/en/nevibecode/skills/wa-guardrails.md) — skill · 357 installs
- [akf](https://affpapa.org/en/nevibecode/mcp/akf.md) — MCP server · ★ 20
- [git-guardrails-claude-code](https://affpapa.org/en/nevibecode/skills/git-guardrails-claude-code.md) — skill · 499069 installs
- [referral-abuse-guardrails](https://affpapa.org/en/nevibecode/skills/referral-abuse-guardrails.md) — skill · 13100 installs
- [configuring-guardrails](https://affpapa.org/en/nevibecode/skills/configuring-guardrails.md) — skill · 2900 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
