Codex CLI Integration
Rafter provides two skills for Codex CLI that add security scanning and local agent protection.Skills Architecture
Backend Skill (rafter)
API-based security scanning
- Trigger remote SAST/SCA scans
- Retrieve scan results
- Check usage quota
- Read-only operations
Agent Security (rafter-agent-security)
Local security operations
- Secret detection in files
- Command risk assessment
- Skill auditing
- Audit logging
Setup
1. Install Rafter CLI
2. Initialize Agent Security
~/.codex and installs skills to ~/.agents/skills/rafter/.
If Codex CLI isn’t detected automatically, force it:
3. Restart Codex CLI
Restart Codex CLI to load the newly installed skills.Skill Location
After initialization:Usage
Backend Scanning
Trigger a security scan of your repository:rafter scan alias:
Backend scanning requires a Rafter API key. Set it via
export RAFTER_API_KEY="your-key" or pass --api-key.Agent Security
These commands work locally without an API key:Skill Auditing
Before installing any third-party skill, audit it:Configuration
Risk Levels
| Level | Behavior |
|---|---|
| Minimal | Basic guidance, most commands allowed |
| Moderate | Approval for high-risk commands, secrets always blocked (default) |
| Aggressive | Approval for most operations, maximum security |
View Configuration
Monitoring
View Agent Activity
Troubleshooting
Skills not loading in Codex CLI
Skills not loading in Codex CLI
- Verify skills are installed:
ls ~/.agents/skills/rafter/ - Re-run:
rafter agent init --codex - Restart Codex CLI
Codex CLI not detected during init
Codex CLI not detected during init
Force detection with:
rafter agent init --codex
