Works with the AI Agents you already use
occe context optimizer
Optimize agent context and save up to 90% on tokens using AST skeletons, symbol slicing, and terminal noise filtering.
$12
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
| Tool | Result |
|---|---|
code_skeleton | Mapped 1,240 lines to 42 lines of signatures |
symbol_slice | Extracted validate_jwt_token (L88-L115) |
token_ledger | Green 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
- Modify the
validate_jwt_tokenfunction to support the new audience (aud) claim. - Run
test_compressontests/test_auth.pyto verify the fix. - Monitor
token_ledgerif we proceed to refactor the entireAuthServiceclass.
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
- Structural Analysis: The agent uses
code_skeletonto map a large file without consuming the whole content. - Precision Loading: It invokes
symbol_sliceto pull the exact logic required for a task based on the skeleton's line ranges. - Clean Execution: Shell commands are routed through
smart_execto keep the session history free of package manager noise. - Failure Isolation: Test suites are run via
test_compressto 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 installorcargo buildwithout 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
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
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 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