Progressive Skill Disclosure & Context Compaction Engine for Autonomous AI Coding Agents
Preloading hundreds of enterprise tool schemas dilutes model attention and inflates token costs. SkillPrism indexes skills out-of-context and injects only what the model needs, right when it needs it.
When autonomous coding agents (Claude Code, Cursor, Windsurf, Antigravity) connect to enterprise MCP servers or large API catalogs:
- ~24,500 Tokens Wasted: Full JSON schemas for hundreds of endpoints are dumped into the system prompt on turn 1.
- Model Hallucinations: When models face 100+ tools, tool selection accuracy drops dramatically ("Lost in the Middle").
- Token Cost Explosion: Every reasoning turn repeatedly transmits schemas the agent never touches.
SkillPrism moves the entire tool catalog outside the LLM context:
- Zero-State (~199 tokens): The agent prompt starts with only two meta-tools:
search_skillsandload_skill. - Sub-Millisecond BM25 Hybrid Search (< 0.1 ms): The agent queries for capabilities by natural intent (e.g. "query Postgres database").
- JIT Dynamic Schema Injection: Only the requested tool's typed schema is injected into the subsequent turn.
- Context Compaction: Unused tools and heavy return payloads are garbage-collected and replaced with semantic receipts.
# Run CLI directly via npx
npx @ritualdev-lab/skillprism search "postgres database query"
# Or install locally
pnpm add @ritualdev-lab/skillprismimport { SkillIndex } from "@ritualdev-lab/skillprism";
const index = new SkillIndex();
// Register tool schemas into out-of-context index
index.register({
id: "postgres_query",
name: "PostgreSQL Query Exec",
summary: "Executes parameterized read queries against production PostgreSQL clusters",
description: "Performs read-only SQL queries with built-in connection pooling and PII redaction.",
category: "database",
tags: ["sql", "postgres", "db", "query"],
permissions: ["db:read"],
parameters: [
{ name: "sql", type: "string", description: "The SQL statement", required: true },
{ name: "params", type: "array", description: "Query bind variables" }
]
});
// Import tools directly from standard MCP servers (tools/list)
index.importFromMcp(mcpToolsList);
// Search for matching skills with zero prompt bloat
const matches = index.search("fetch user records from postgres", 3);
console.log(matches[0].disclosureSnippet);Connect SkillPrism as a transparent MCP server to eliminate tool prompt bloat in your favorite AI coding agent:
Add SkillPrism to your Claude Code workspace:
claude mcp add skillprism -- npx -y @ritualdev-lab/skillprism proxy --stdioOr configure directly in claude.json:
{
"mcpServers": {
"skillprism": {
"command": "npx",
"args": ["-y", "@ritualdev-lab/skillprism", "proxy", "--stdio"]
}
}
}Add to your Cursor global or workspace MCP configuration:
{
"mcpServers": {
"skillprism": {
"command": "npx",
"args": ["-y", "@ritualdev-lab/skillprism", "proxy", "--stdio"]
}
}
}{
"mcpServers": {
"skillprism": {
"command": "npx",
"args": ["-y", "@ritualdev-lab/skillprism", "proxy", "--stdio"]
}
}
}# Search out-of-context index by natural intent
npx @ritualdev-lab/skillprism search "upload file to s3"
# Ingest and convert OpenAPI 3.0/3.1 specs
npx @ritualdev-lab/skillprism import ./api-spec.json
# Fetch and index tools from a running MCP server
npx @ritualdev-lab/skillprism add http://localhost:3000/mcp
# Run verifiable BPE token benchmark
npx @ritualdev-lab/skillprism benchmark
# Sync verified community tools from DevShelf directory
npx @ritualdev-lab/skillprism sync
# Start transparent MCP stdio or HTTP proxy
npx @ritualdev-lab/skillprism proxy --stdio
npx @ritualdev-lab/skillprism proxy --port 8080β‘ SkillPrism Token Optimization & Latency Benchmark
π¦ Catalog Size: 100 Enterprise Tools
π΄ Unoptimized Preload Zero-State: ~11,989 tokens
π’ SkillPrism JIT Zero-State: ~326 tokens (3 meta-tools)
π Upfront Token Savings: 97.3%
β±οΈ Average Search Latency: < 0.3 ms
πΎ Payload Compaction Savings: 91.0%
- Website & Live Demo: skillprism.ritualdev.in
- Donations: Support independent open-source AI tooling research via donation.rolenest.in.
- Enterprise & Turnkey: Need custom private MCP servers or enterprise skill gateways? Visit mcp.ritualdev.in or contact
contact@ritualdev.in. - Developer Inquiries & Support: Reach out directly to
developer@ritualdev.inorsupport@ritualdev.in.
SkillPrism is initiated and maintained by the team at RitualDev Lab and expanded by the open-source AI community.
![]() Divyanshu Jethi π Founder & Lead |
![]() Sakshi Sharma π¨ Core Maintainer & Product |
![]() RitualDev βοΈ Core Maintainer & Infra |
![]() Divyanshu-hub-dotcom π οΈ Core Member |
![]() Ayush π‘οΈ Core Maintainer & Triage |
Huge thanks to all our open-source Contributors! We warmly welcome issues, feedback, and pull requests.
Apache-2.0 Β© 2026 RitualDev Lab.




