# p3 controller

> Secure GitHub operations for agents using execution-bound dual one-time keys and zero-leakage credential brokering.

p3 controller is a subscription AI agent skill on Agensi by Виталий Коток, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $19/mo (subscription, cancel anytime)
- Creator: [Виталий Коток](https://www.agensi.io/creators/creator-1411)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-11-23
- Security: scan passed (2026-11-23); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/p3-controller
- Tags: security, git, github, zero-trust, credential-broker, autonomous-agents, devops

## About this skill

Securing autonomous agents is difficult when they need to interact with private repositories. Giving an agent a raw GitHub token invites credential leakage and persistent access risks if the environment is compromised.

This skill implements a zero-trust broker that manages ephemeral, execution-bound disk leases for git operations. It allows your agent to perform authenticated pulls and pushes without the raw Personal Access Token (PAT) ever appearing in chat history, environment variables, or the `.git/config` file. By using a dual one-time key (OTK) system, it ensures that credentials burn immediately upon use, preventing replay attacks or unauthorized secondary actions.

### What it does
- **Execution-Bound Leases** generates single-use credentials tied to specific git actions.
- **Dual-Key Management** maintains separate `pull_key` and `push_key` slots that burn independently.
- **In-Memory Authorization** injects credentials directly into the git process header to avoid disk persistence.
- **Cryptographic Verification** uses HMAC-SHA256 signatures and AES-256-GCM sealed vaults for key integrity.
- **Secure Key Disposal** performs `0x00` byte overwrites and unlinks lease files immediately after execution.

### How it works
1. **Check Status** by querying the local P3 broker to verify if the required key slot is in an `"armed"` state for the target repository.
2. **Execute Operation** by sending a POST request to the P3 Receiver Gate with the operation type, repository, and branch.
3. **Verify and Burn** as the gate validates the signature, runs the git command, and wipes the specific key slot from the lease file.
4. **Audit Result** by reviewing the structured summary to confirm the twin key status and ensure zero leakage in local logs.

### Frameworks & tools
Built for environments using GitHub, local P3 brokers, and agents running in sandboxes or cloud IDEs. It relies on standard `git` CLI binaries and local API endpoints (`127.0.0.1:3001`).

### Why this beats prompting it yourself
Standard prompting often results in agents writing tokens to `.bash_history` or leaving them in git configuration files. This skill enforces a hard security boundary at the execution level, ensuring that even if an agent's logic is subverted, the credentials disappear the moment they are used.

### Use cases
- **Automated PR Updates** where an agent pulls latest changes, modifies code, and pushes back without persistent token access.
- **Sandbox Deployments** allowing ephemeral environments to sync with private repos safely.
- **CI/CD Logic** enabling agents to commit fixes to protected branches using one-time authorized windows.

### Known limitations
Requires a local P3 broker service running at a reachable loopback address. Git operations are currently restricted to `--ff-only` for pulls to ensure execution predictability.

## Requires

- Git

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the p3 controller skill from Agensi" and describe your task.
3. Subscribe on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does the P3 Controller prevent my GitHub tokens from being leaked during agent operations?

Traditional agents often store GitHub tokens in environment variables or chat logs; this skill uses execution-bound dual one-time keys that burn immediately after use, ensuring no persistent credentials remain on disk or in memory.

### What are the system requirements for running the P3 Controller?

The skill is designed for any agent capable of making local API calls, provided a P3 broker service is running at your loopback address (127.0.0.1:3001) to handle the cryptographic signatures.

### Can I restrict the agent to only 'pull' actions without giving it 'push' authority?

Yes, the system utilizes a dual-key architecture that manages 'pull' and 'push' permissions independently, allowing you to arm only the specific action the agent needs for a given task.

### Are there any specific limitations on the types of git commands the controller can execute?

To ensure execution predictability and prevent merge conflicts from hanging the agent, the controller currently restricts git pulls to fast-forward only (--ff-only) logic.

### What exactly is included in the P3 Controller skill package?

You receive the complete P3 Controller skill definition, including the logic for secure key disposal, HMAC-SHA256 verification protocols, and the structured workflow for managing ephemeral disk leases.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
