Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    occe context optimizer

    1

    Optimize agent context and save up to 90% on tokens using AST skeletons, symbol slicing, and terminal noise filtering.

    $12

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    occe context optimizer

    occe context optimizer

    Example session with this skill installed

    The auth.py file is huge. Use the skeleton to find the login logic, then show me just the JWT validation function. Check our current token usage too.

    • Read your context and instructions
    • Compiled the occe context optimizer

    I have analyzed the structure of src/services/auth.py and extracted the specific logic for JWT validation. I also checked the token_ledger to ensure we are within optimal operating limits.

    Context Optimization Summary

    ToolResult
    code_skeletonMapped 1,240 lines to 42 lines of signatures
    symbol_sliceExtracted validate_jwt_token (L88-L115)
    token_ledgerGreen Zone (12,450 tokens used)

    Extracted Symbol: validate_jwt_token

    import jwt
    from datetime import datetime, timezone
    from src.config import settings
    
    def validate_jwt_token(token: str) -> dict:
        """
        Validates the provided JWT against the RS256 public key.
        [L88-L115]
        """
        try:
            payload = jwt.decode(
                token, 
                settings.PUBLIC_KEY, 
                algorithms=["RS256"]
            )
            return payload if payload["exp"] > datetime.now(timezone.utc).timestamp() else None
        except jwt.PyJWTError:
            return None
    

    Next steps

    1. Modify the validate_jwt_token function to support the new audience (aud) claim.
    2. Run test_compress on tests/test_auth.py to verify the fix.
    3. Monitor token_ledger if we proceed to refactor the entire AuthService class.

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

    About this skill

    Context bloat kills agent performance. When your session hits 40k tokens, models stop following instructions, hallucinate edits, and cost a fortune in API credits. This skill integrates the OpenCode Context Optimizer (OCCE) MCP server to keep your prompts lean and your agents sharp.

    What it does

    • AST Skeleton Extraction: Pulls high-level class and method signatures with line anchors instead of reading full source files.
    • Terminal Noise Filtering: Strips ANSI codes, progress bars, and spinners from shell output to save hundreds of lines of terminal junk.
    • Symbol Slicing: Loads only the specific function or class needed for an edit, along with relevant imports.
    • Test Failure Compression: Reduces verbose test backtraces into single-line summaries of file, line, and assertion error.
    • Attention Zone Monitoring: Tracks token consumption and signals when to compact context to prevent model decay.

    How it works

    1. Structural Analysis: The agent uses code_skeleton to map a large file without consuming the whole content.
    2. Precision Loading: It invokes symbol_slice to pull the exact logic required for a task based on the skeleton's line ranges.
    3. Clean Execution: Shell commands are routed through smart_exec to keep the session history free of package manager noise.
    4. Failure Isolation: Test suites are run via test_compress to focus the agent only on what actually broke.

    Frameworks & tools

    Built for any environment supporting the Model Context Protocol (MCP) including Claude Code, Cursor, Roo Code (Cline), and OpenCode CLI. Supports Pytest, Cargo, Go Test, Jest, Vitest, and standard package managers.

    Why this beats prompting it yourself

    Prompting an agent to "be concise" doesn't stop the IDE from automatically dumping a 2,000-line file into the context window. This skill provides the actual AST-aware tools and execution filters necessary to mechanically limit token intake before it reaches the model.

    Use cases

    • Debugging large-scale monorepos where file reads quickly exceed rate limits.
    • Running npm install or cargo build without flooding the prompt with progress bars.
    • Surgical refactoring of specific methods within 1000+ line legacy files.
    • Maintaining long-running sessions without hitting the "sliding window" context loss.

    Known limitations

    Requires the OCCE MCP server to be installed and configured in your agent environment. Performance is optimized for files over 100 lines; smaller files may be read directly.

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Requires OCCE MCP server installation. Optimized for files > 100 lines. Supported test runners limited to Pytest, Cargo, Go, and Jest/Vitest.

    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 10 days ago

    Software
    PythonOpencode Context MCP

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Listed10 days ago

    What's inside

    Frequently Asked Questions

    This skill uses Abstract Syntax Tree (AST) skeletons and symbol slicing to load only high-level structures or specific logic blocks, preventing models from being overwhelmed by massive source files while maintaining accurate line references for edits.

    It is designed for any environment supporting the Model Context Protocol (MCP), including Claude Code, Cursor, Roo Code (Cline), and OpenCode CLI, and supports major testing frameworks like Pytest, Jest, and Cargo.

    Unlike a text prompt, which is a soft instruction, this skill provides the mechanical tools needed to filter terminal noise and slice code structures at the system level before the data is ever sent to the LLM.

    You will receive the optimized MCP configuration settings and the specific tool definitions required to link your agent to the OCCE server for structural analysis and noise filtering.

    Yes, you must have the OpenCode Context Optimizer (OCCE) MCP server installed in your environment; this skill acts as the specialized bridge and toolset that allows your agent to utilize that server effectively.

    The 'test_compress' feature automatically strips away verbose stack traces and environment data, providing the agent with a high-density summary of the file, line number, and specific assertion that failed.

    New in LLM Ops