- Home
- Skills
- Agents & Orchestration
- Shared AI context runtime
Works with the AI Agents you already use
Shared AI context runtime
context of all your ai tools in one place, no need to type prompt when you can just do ctx continue.
$10
Shared AI context runtime
Example session with this skill installed
Prepare a 4000-character context package from my current session. Prune the oldest events if needed to fit the budget. Save the report to context-report.md.
- Read your context and instructions
- Compiled the shared ai context
I have processed the session context and applied the pruning policy to meet your 4000-character budget. The instruction set and task blockers were preserved, while three obsolete events were removed to stay within limits.
Context Budget Report
| Metric | Value |
|---|---|
| Unit | Characters |
| Budget | 4,000 |
| Original Size | 5,120 |
| Final Size | 3,892 |
| Status | Budget Met |
| Method | Node.js Standalone Planner |
| Removed Pointers | /recentEvents/0, /recentEvents/1, /decisions/2 |
Optimized Payload
{
"identity": "coding-assistant-v1",
"instructions": "Maintain strict typing in all TypeScript files. Avoid external dependencies.",
"taskState": {
"status": "in-progress",
"blockers": ["Missing API documentation for /v2/auth"],
"nextAction": "Stub the auth service until docs are provided"
},
"gitState": {
"branch": "feat/auth-integration",
"staged": ["src/services/auth.ts"]
},
"recentEvents": [
{
"timestamp": "2023-10-27T10:15:00Z",
"event": "Modified auth interface to include retry logic"
}
],
"serialized": "{\"identity\":\"coding-assistant-v1\",\"instructions\":\"Maintain...\"}"
}
Next steps
- Review the
context-report.mdfor a full list of preserved decisions. - Use the
serializedstring as the system prompt for the next agent handoff. - If additional room is needed, authorize pruning of the
factsobject.
Connects securely to your tools. The creator never sees your data.
About this skill
Developers working with context-constrained coding agents often hit a wall when task complexity exceeds the model window. Silent truncation leads to hallucinations and lost task state. This skill provides a structured way to manage that budget without losing critical information.
What it does
- JSON Serialization converts source material into a structured, auditable JSON object.
- Size Budgeting measures context in characters, UTF-8 bytes, or heuristic token estimates.
- Lossy Pruning identifies and removes dispensable facts or events via JSON pointers.
- State Preservation locks instructions, task state, blockers, and Git identity against removal.
- Audit Reporting generates a full breakdown of removed pointers and overflow status.
- Format Optimization compares JSON and TOON representations when local decoders are available.
How it works
- Initialize Budget by defining the target window size and measurement unit.
- Build Input by mapping task state, Git status, and instructions to the context template.
- Identify Removals by flagging obsolete events or superseded decisions for pruning.
- Execute Planner via the bundled Node.js script to calculate exact serialized sizes.
- Verify Payload through a round-trip check to ensure structural integrity and budget compliance.
Frameworks & tools
Requires Node.js 20 or newer for the standalone planner script. Operates on local files and JSON structures without external network dependencies or package installs.
Why this beats prompting it yourself
Prompting an agent to "summarize for context" often loses subtle technical constraints or blockers. This skill uses a strict pruning policy and JSON pointers to ensure that only approved, low-value data is removed while core task state remains immutable.
Use cases
- Agent Handoffs to prepare a clean state package for a new coding session.
- Context Trimming when a long conversation hits the model's maximum limit.
- Audit Trails to track exactly what technical decisions were dropped during a task.
- Cross-model Migration by resizing context to fit smaller, faster sub-agents.
Known limitations
Heuristic token counts are estimates based on byte ratios and not a substitute for model-specific tokenizers. Script execution requires an environment with Node.js access.
Token counts use a 3.8 byte-to-token heuristic. Standalone planner requires Node.js 20. Does not scan for credentials or secrets automatically.
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 any payment.
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 6 days ago
Requires