Universal Model Context Protocol + Agent Skills Spec

Deterministic web layout inspection and structural codebase intelligence for AI agents.

Stop feeding assistants uncomputed HTML and downscaled screenshots. Prism delivers exact CSS box models, WCAG audits, DOM-to-source mapping, and AST symbol tracing directly into agent context.

$ curl -fsSL https://raw.githubusercontent.com/whysooraj/prism/main/install.sh | bash
Install Options →
INTEGRATES WITH 70+ DEVELOPER AGENTS VIA MODEL CONTEXT PROTOCOL & OPEN AGENT SKILLS
13 MCP Tools
Deterministic Tools
70+ AI Frameworks
Supported Agents
86% Token Reduction
Context Optimization
stdio, SSE & REST
Protocol Support
Deterministic Inspection in Action

Mathematical Layout & Source Correlation

Inspect live web elements and correlate them directly to source code without token-heavy full-page dumps or fuzzy vision models.

SELECT TARGET:
find_ui_source ACTIVE
http://localhost:3000 (Active App Session)

Deterministic layout verification for LLMs

Calculates exact CSS bounding metrics, WCAG contrast ratios, and traces components directly into the codebase.

WCAG 2.1 AA/AAA
100% PASS
Bounding Box Drift
0.00 px
Tokens Extracted
48 Computed
COMPUTED BOX MODEL H1.HERO-TITLE
Bounding Box: 684.00 × 68.00 px
Padding: 0px 0px 8px 0px
Margin: 0px 0px 8px 0px
Computed Typography: 26px / 34px (Plus Jakarta Sans)
Color & Background: #F4F4F5 on #0C0D10
WCAG Contrast: 13.4:1 (AAA PASS)
FIND_UI_SOURCE CORRELATION CONFIDENCE 98%
File: src/components/Hero.tsx:42
Component: <HeroHeadline />
Git Commit: ea8d80f (clean working tree)
41 | <header className="hero-wrap">
42 | <h1 className="hero-title">Deterministic layout verification...</h1>
43 | </header>
The Context Vacuum

Why Raw HTML and Downscaled Screenshots Blind AI Models

Standard LLM toolkits provide agents with low-fidelity approximations that force models to hallucinate layout dimensions and read codebases through unindexed string search.

Web Inspection
Uncomputed HTML & Vision Screenshots
  • • Raw DOM text omits computed CSS cascade, box-model rects, and render coordinates.
  • • Screenshots compressed to 1024px blur micro-typography, subpixel padding, and borders.
  • • Vision models cannot mathematically measure WCAG contrast ratios or 8pt grid alignment.
Deterministic Headless Layout Extraction
  • • Extracts real computed values directly from Chromium layout engine.
  • • Generates 2D ASCII spatial radars and exact box models: padding, margin, bounds.
  • • Computes exact WCAG AAA color contrast ratios and flags layer occlusion collisions.
Codebase Navigation
Full-File Dumps & Naive Grep
  • • Dumping entire files burns thousands of context tokens and triggers attention drift.
  • • Text regex cannot trace AST relationships, inheritance, or route decorators.
  • • Agents cannot deduce which source file produced a rendered DOM element.
AST Symbol Indexing & Line-Sliced Retrieval
  • • Fast tree-sitter AST parser extracts function signatures, classes, and exported routes.
  • • get_file delivers line-sliced fragments with line numbers, eliminating context pollution.
  • • find_ui_source correlates rendered DOM tags and text directly to JSX/TSX source lines.
System Design

Tri-Core Intelligence Pipeline

Prism operates as a high-throughput bridge connecting external AI agents to deterministic web runtime and AST repository indexes.

01

MCP Transport Layer

stdio / SSE / REST

Exposes standard Model Context Protocol tools to agents like Antigravity, Claude Code, Cursor, and OpenClaw, with zero agent-side modifications.

02

Web Inspection Pipeline

Headless Chromium

Navigates target URLs, evaluates computed styles, runs WCAG audits, computes 2D spatial radars, and renders vector wireframe SVGs.

03

Correlation & Verification Engine

DOM <-> Source Matcher

Maps rendered selectors to code lines with find_ui_source, and computes differential layout regressions across state transitions with verify_change.

04

AST Repository Pipeline

In-Memory Tree-Sitter & Git

Indexes symbols, maps caller/callee graphs, calculates blast radius up to depth 3 with trace_impact, and provides line-sliced surgical code slices.

INTERACTIVE TRACER

trace_impact & trace_symbol AST Graph

CLASS
AuthSession
src/auth/session.ts
RISK: MEDIUM
Risk Score: 52/100
Direct session handler touched by 4 routes. Changing token verification impacts active cookie rotation and WebSocket auth gateways.
CALLERS:
loginHandler()
apiAuthMiddleware()
wsHandshake()
CALLEES / DEPS:
jwtVerify()
redisStore.get()
rotateRefreshToken()
AFFECTED ROUTES: /api/auth/login, /api/auth/refresh, /ws/stream
Deterministic API

13 Model Context Protocol Tools

Categorized tools exposed via JSON-RPC stdio, Server-Sent Events, and REST.

Web Inspection & Layout
inspect_website
url, viewport?, includeWireframeSvg?, includeA11y?, allowLocalhost?
Extracts full layout tree, computed box models, design tokens, WCAG contrast audits, and vector wireframe SVGs.
inspect_page
url?, compact?, viewport?
Inspects the active session app with token-efficient output options for iterative agent loops.
capture_screenshots
url, allowLocalhost?
Captures synchronized dual viewports: Desktop (1440x900) and Mobile (390x844).
Source Correlation & Verification
find_ui_source
projectPath, selector?, tag?, textSnippet?, currentRoute?
Correlates rendered DOM nodes directly to JSX/TSX components and exact line numbers.
verify_change
before, after, beforeUrl?, afterUrl?
Compares layout states before and after code edits, validating resolved bugs and flagging layout regressions.
get_context
selector?, textSnippet?, tag?, urlOrRoute?, inspectionResult?
Unified token-efficient payload combining element bounding box, layout defects, source candidates, and blast radius.
connect_project
repoPath, appUrl?, branch?
Binds a local repository path to a running application URL to maintain an active inspection session.
Codebase & AST Intelligence
index_repository
urlOrPath, branch?, authToken?
Performs ephemeral repository acquisition, parses AST symbols, builds file trees, and extracts routes.
search_codebase
query, kind?, limit?
Executes structural AST searches for functions, classes, interfaces, and API endpoints.
get_file
filePath, startLine?, endLine?
Surgically retrieves precise file line ranges (e.g. lines 40-75) without polluting context with full files.
trace_symbol
symbolName
Traces definitions, direct importers, re-exports, callers, callees, and route handlers for a target symbol.
trace_impact
target, repoIdentifier?
Calculates direct and transitive blast radius, affected HTTP endpoints, and assign risk levels (LOW/MEDIUM/HIGH).
explain_architecture
none
Summarizes tech stack, package dependencies, main entry points, and structural directory taxonomy.
Compatibility Matrix

Native Support for 70+ AI Agents

Standardized on the open Model Context Protocol and Agent Skills specification. Configured automatically with the universal installer.

AGENT / FRAMEWORK ORGANIZATION INTEGRATION CONFIGURED LOCATION
Google DeepMind Antigravity agy Native MCP + Agent Skill ~/.gemini/config/mcp_config.json
Anthropic Claude Code & Desktop claude MCP + Agent Skill ~/.claude.json
OpenAI Codex CLI & ChatGPT codex MCP + Universal Skill ~/.codex/mcp.json
Anysphere Cursor cursor MCP + Agent Skill ~/.config/Cursor/User/mcp.json
OpenClaw openclaw Native MCP + Skill ~/.openclaw/mcp.json
Nous Research Hermes hermes MCP + Skill ~/.hermes/mcp.json
Roo Code & Cline cline Universal Skill + MCP ~/.config/Code/User/mcp.json
Codeium Windsurf windsurf Native MCP ~/.codeium/windsurf/mcp_config.json
All-Hands AI OpenHands openhands Universal Skill ~/.openhands/skills/prism/
Universal Agent Skills replit / zed / warp / devin Universal Skill Specification ~/.agents/skills/prism/
Also configures OpenHands, Continue, Amp, Replit, Zed, Warp, Loaf, Kimi, and all agentskills.io compatible runners.
Everywhere Access

ChatGPT Custom Actions on Mobile & Web

Use Prism from iOS, Android, or chatgpt.com using OpenAPI 3.0 Custom Actions.

Native OpenAPI 3.1 Contract

Run Prism over HTTP to expose interactive visual inspection to ChatGPT on iOS, Android, and web without installing local packages on your phone:

$ npm run start:http # starts HTTP on port 3000 with /ui inspector
Import schema URL: http://localhost:3000/openapi.json
STANDALONE WEB UI

Interactive Visual Playground

Navigate to /ui in your browser to inspect dual viewports, test box model dimensions, and preview vector wireframe SVGs interactively.

Read Setup Guide →
Zero Configuration Setup

Get Started in 10 Seconds

One command sets up native MCP server configs and universal Agent Skills.

Interactive Scope Prompt
$ curl -fsSL https://raw.githubusercontent.com/whysooraj/prism/main/install.sh | bash
Automatically detects installed agents, creates MCP entries, and installs universal Agent Skills without manual JSON editing.