Works with the AI Agents you already use

    Context Budget Orchestrator — Long-Horizon AI Engine

    by Sushikim

    1

    Zero-dependency Python AI orchestrator skill for multi-hour engineering projects. Enforces 68% context-budget gates, typed graph memory, AST parallel subagent waves, 30-CWE/OpenAPI security audits, ground-truth git verification, and interactive checkbox setup across 8+ AI CLIs.

    $5

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Context Budget Orchestrator — Long-Horizon AI Engine

    Context Budget Orchestrator — Long-Horizon AI Engine

    Example session with this skill installed

    Refactor our FastAPI billing & auth services across 12 files without hitting context rot, delegate unit tests to a subagent safely, run a security audit with SARIF export, and verify every commit against git before handing off.

    • Read your context and instructions
    • Compiled the context budget orchestrator
    • Generated the document

    Orchestration Summary

    Completed Batch 1 (auth + billing refactor, security audit, and ground-truth git verification) while holding active context at

    52.4% (104,800 / 200,000 tokens — GREEN) under the 68% ceiling.

    1. Feature Selection & Dependency Plan (configure + auto-plan)

    Enabled 8/8 modules (full preset) and discovered 3 topological batches across 12 Python files:

    WaveTasksScoped FilesLease LockStatus
    Wave 1T1-auth-core, T2-billing-schemasrc/auth/tokens.py, src/billing/models.pyAcquired (TTL 1800s)Verified & Shipped
    Wave 2T3-billing-servicesrc/billing/service.pyAcquiredVerified & Shipped
    Wave 3T4-test-suite (delegated verifier)tests/test_billing.pyDisjoint lockQueued for Batch 2

    2. Compressed Test Execution & Security Audit (exec-task + audit)

    • exec-task --task-id T3-billing-service --cmd "pytest -q":

    18 passed in 1.4s (raw log compressed by

    86%, receipt saved to .agent_state/context_graph.json).

    • audit --action scan --path src --formats json,sarif,html: Found

    2 findings (1 High CWE-89 parameterized query fix applied; 1 Medium CWE-798 hardcoded test token redacted), exported .agent_state/reports/audit.sarif and audit.html.

    3. Ground-Truth Verification (verify)

    • verify --action shipped --claim T3-billing-service: SHIPPED (exit 0, verified in git commit a4f91c2).
    • verify --action commit-audit --strict: 0 hollow tests / 0 unbacked claims (exit 0).
    • verify-handoff: AST syntax clean, 0 conflict markers, .agent_state/WORKLOG.md + Mermaid DAG saved.

    Next Steps

    Open a fresh session and type

    resume worklog to continue directly at Wave 3 (T4-test-suite) from the pruned 2,800-token subgraph without re-reading the repository.

    audit.html

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Context Budget Orchestrator (v3.4 Universal)

    A zero-dependency, zero-bloat AI Orchestrator Skill (Python 3.9+ stdlib only, optional tiktoken) designed for complex software engineering and research projects lasting minutes to hours across Claude Code, Gemini CLI, OpenAI Codex CLI, GitHub Copilot CLI, OpenCode, OpenClaw, DeepSeek Harness, and xAI Grok CLI.

    Key Capabilities

    1. Automatic Interactive Feature Selector (configure) — Launches a zero-dependency terminal checkbox TUI (↑/↓, Space, Enter) or structured chat multi-select schema on first run with 4 built-in presets (minimal, standard, security, full).
    2. Proactive 68% Context-Budget Gates (inspect-session, gate-check, verify-handoff) — Reads exact provider JSONL token usage, flags edit-thrash loops & tool bloat, enforces a 68% safe ceiling, and verifies AST syntax/tests before any session handoff.
    3. AST Auto-Planning & File-Disjoint Parallel Waves (auto-plan, plan-schedule) — Parses local Python/JS/TS import graphs into topological batches, auto-splits oversized tasks, and schedules safe parallel waves.
    4. Typed Context Graph & Subgraph-Pruned Cold Resume (memory, record-decision, query-graph, resume-context) — Stores research findings, ADRs, execution receipts, and dead ends in .agent_state/context_graph.json and restores only the relevant upstream subgraph within a strict --token-budget cap.
    5. Specialist Subagent Delegation & Atomic File Leases (delegate, lease) — Generates role-scoped briefs (researcher, architect, implementer, reviewer, verifier) with TTL file locks and ready-to-run dispatch commands for 8+ harnesses.
    6. Auto-Compressed Execution Logs (exec-task, compress-output) — Runs builds and test suites while compressing noisy logs by 70–95% so stack traces never rot the context window.
    7. Metadata-Only Companion Skill Router (discover-skills) — Scans YAML frontmatter across installed CLI skill directories without loading unused skill bodies.
    8. Built-In Defensive Security & Code Audit Engine (audit) — 30 CWE static rules, custom JSON rules, OpenAPI contract audit, SHA-256 deduplication, baseline diffing (--retest-new), compliance mapping (OWASP Top 10 / PCI-DSS v4 / SOC 2 / ISO 27001), 7-Question Triage Gate, secret redaction, and 6 export formats (json, sarif, html, junit, csv, md).
    9. Ground-Truth Verification & Referee Kernel (verify) — Adjudicates agent "done" claims against real git ancestry (shipped), catches hollow assert True tests (commit-audit), detects spin loops (liveness), arbitrates file/dependency locks (arbitrate), and manages human escalations (escalate).
    • Install: 1-command macOS/Linux (install.sh) and Windows PowerShell (install.ps1) with --doctor diagnostics & 10 passing test suites.

    Requires Python 3. TUI features need a live terminal TTY. Context budget gates are based on token estimates and active model limits.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 9 days ago

    Software
    Python 3.9+
    Optional
    tiktoken (exact BPE tokenizer)Git (for ground-truth commit verification)

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables

    File Scopes

    .agent_state/**
    Listed9 days ago

    What's inside

    Frequently Asked Questions

    The skill prevents model hallucinations and logic drift by enforcing a 68% token 'gate.' When reached, it automatically prunes low-priority data and persists the current architectural state into a graph-based memory, ensuring the agent never operates in a saturated context window.

    Yes, it is a zero-dependency Python implementation designed to work across major CLI-based agents including Claude Code, Gemini CLI, OpenAI Codex, and GitHub Copilot CLI. It functions as an orchestration layer regardless of the underlying LLM provider.

    The package includes the core `budget_engine.py` script, the interactive feature picker for workspace initialization, the graph-based memory module, and a suite of automated verification tools for 'claim-vs-diff' auditing.

    Setup is straightforward: ensure you have a Python 3 environment, run the interactive feature picker to map your local import graphs (Python/JS/TS), and configure your memory persistence settings. No complex external databases are required.

    The Dependency Planning module analyzes your local import graphs to create a Directed Acyclic Graph (DAG) of tasks. This ensures that the agent works on architectural foundations first and uses file-lease locking to prevent subagents from editing the same file at once.

    The 'Atomic Handoff' feature saves the complete session state, including ADRs and worklogs, into an epoch-tracked file. You can then use the `resume-context` command in a fresh session to immediately reload the pruned subgraph and continue exactly where the agent left off.

    New in Agents & Orchestration

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Agents & Orchestration.