executor-capability-gate

Validates CLI installation, authentication, network, and rate limits before invoking Codex or Gemini.

6|2|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/Jerrylalala/compound-engineering --skill executor-capability-gate-jerrylalala
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: executor-capability-gate
Source: https://github.com/Jerrylalala/compound-engineering/tree/main/plugins/compound-engineering/skills-custom/executor-capability-gate
Command: npx skills add https://github.com/Jerrylalala/compound-engineering --skill executor-capability-gate-jerrylalala

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Calling external AI models like Codex or Gemini without pre-flight checks wastes time on failed invocations caused by missing CLIs, expired logins, network outages, or rate limits. This Skill runs five checks before every external model call so failures are caught upfront. ## Core Features & Use Cases - Five Pre-Flight Checks: Verifies CLI installation, login credentials (e.g., ~/.codex/auth.json), network connectivity via curl, local rate-limit timestamps, and task suitability for external execution. - Structured Gate Output: Produces a pass/fail report per check and decides whether to dispatch to Codex/Gemini or fall back to Claude execution. - Result Caching: Caches gate results for 5 minutes per session to avoid redundant checks, with cross-platform stat handling for Linux and macOS. - Use Case: When running a code review with the [C] parameter to delegate to Codex, the gate detects that Codex was called only 30 seconds ago and the task touches authentication code, so it automatically falls back to Claude instead of failing mid-review. ## Quick Start Before dispatching any task to Codex or Gemini, run the executor capability gate checks and tell me whether the external call is allowed or should fall back to Claude.

Frequently Asked Questions about executor-capability-gate

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check if Codex CLI is ready before calling it?▼

Run five checks: verify the codex binary exists with command -v, confirm ~/.codex/auth.json exists for login state, test network reachability with curl to api.openai.com, check the local rate-limit timestamp, and assess task suitability. All five must pass before dispatching.

How to avoid rate limit errors when calling Codex repeatedly?▼

Record each successful call by writing the current timestamp to ~/.codex/.last_call, then compare elapsed time before the next invocation. Calls within 60 seconds of the previous one are flagged as rate-limited and deferred.

Does the gate work on both macOS and Linux?▼

Yes, the cache age check uses stat -c %Y on Linux with a fallback to stat -f %m on macOS. This cross-platform pattern ensures the 5-minute gate result cache works on both operating systems.

When should tasks not be delegated to Codex?▼

High-risk changes involving authentication, payments, or migrations should not go to Codex, and visual or UI tasks are also unsuitable. Codex fits mechanical patches, formatting, renames, and pure analysis or research tasks.

Why does the rate limit check always pass on first run?▼

If ~/.codex/.last_call does not exist, the elapsed time computes as extremely large, so the check passes. After the first successful Codex call, the timestamp file must be written or rate limiting will never trigger.