Codex can use AgentGuard as a local skill/runtime template for command, file, and network review.
npm install -g @goplus/agentguard
agentguard init
agentguard scan ./skills/exampleTo write Codex templates in the current project:
agentguard init --agent codexThis creates .codex/skills/agentguard/SKILL.md and .codex/agentguard-hook.example.json.
Pipe a tool event to agentguard protect:
printf '{"tool_name":"Bash","tool_input":{"command":"rm -rf /"}}' \
| AGENTGUARD_AGENT_HOST=codex agentguard protect --jsonUse these mappings for Codex-style hooks or skills:
- shell commands →
shell - file reads →
file_read - file writes/patches →
file_write - browser/network fetches →
network - MCP tool calls →
mcp_tool
When Cloud is connected, Codex events are synced as redacted previews and can participate in Cloud approvals.