Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add humanerd-drew/opencode-drewgent --skill mpa-url-state-bridgegit clone --depth 1 https://github.com/humanerd-drew/opencode-drewgentWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/mpa-url-state-bridge)<a href="https://agentmods.dev/skills/humanerd-drew/opencode-drewgent/mpa-url-state-bridge"><img src="https://agentmods.dev/badge/skills/humanerd-drew/opencode-drewgent/mpa-url-state-bridge.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00062 | $0.01997 |
| Opus 5 | $0.00031 | $0.00999 |
| Sonnet 5 | $0.00012 | $0.00399 |
| Haiku 4.5 | $0.00006 | $0.00200 |
Grade A, and why
mpa-url-state-bridge scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 175 lines — stays where its author put it; the contents beside it link to each section on GitHub.
MPA URL State Bridge
왜 필요한가
MPA의 진짜 약점: 페이지 이동 = 모든 state 초기화.
- 모달 열려있다가
/input/로 가면 닫힘 - 사이드바 열려있다가
/dashboard/로 가면 닫힘 - 새로고침하면 모두 리셋
- URL 공유 시 같은 상태로 열리지 않음
SPA의 장점(연속성)을 URL에 매핑하면 이걸 다 해결함. 단, 시각/기능은 1픽셀도 바뀌면 안 됨.
대전제 (drew의 마이그레이션 원칙)
디자인과 기능은 건드리지 않는다. State만 URL에 동기화한다.
이게 깨지면 안 됨:
- 모달/사이드바의 동작, 위치, 애니메이션, 색상, z-index, focus 관리
- 외부 API 호출 흐름 (login, history load, payment verify 등)
- disabled/loading 상태 관리
- 키보드/ESC/click outside 닫기 등 인터랙션
URL 동기화는 순수하게 state 저장 위치만 옮기는 일.
핵심 패턴 (Svelte 5)
1. URL 헬퍼 (어디서든 import 가능)
type UrlKeys = 'menu' | 'history' | 'login' | 'legend' | 'historyTab' | 'historyQ' | 'focused'
function readUrlState(): Record<UrlKeys, string | null> {
if (typeof window === 'undefined') return {} as Record<UrlKeys, string | null>
const p = new URLSearchParams(window.location.search)
return {
menu: p.get('menu'),
history: p.get('history'),
login: p.get('login'),
// ... 모든 key
}
}
function setUrlState(key: UrlKeys, value: string | null, opts: { history?: 'push' | 'replace' } = {}) {
if (typeof window === 'undefined') return
const url = new URL(window.location.href)
if (value === null || value === '' || value === '0' || value === 'false') {
url.searchParams.delete(key)
} else {
url.searchParams.set(key, value)
}
const method = opts.history === 'push' ? 'pushState' : 'replaceState'
window.history[method](null, '', url.toString())
}
2. State는 $state로, 노출값은 $derived로
// ❌ 직접 변경 가능한 state (deprecated)
let menuOpen = $state(false)
function openMenu() { menuOpen = true }
// ✅ URL이 source of truth, 노출값만 derived
let urlState = $state(readUrlState())
window.addEventListener('popstate', () => { urlState = readUrlState() })
let menuOpen = $derived(urlState.menu === '1')
function openMenu() { setUrlState('menu', '1') }
function closeMenu() { setUrlState('menu', null) }
function toggleMenu() { setUrlState('menu', menuOpen ? null : '1') }
3. template은 $derived 변수 그대로 사용
What ships with it
2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 175 lines · 0 tokens per session scan A 5fe69dfcd433
mpa-url-state-bridge is a skill published in the GitHub repository humanerd-drew/opencode-drewgent (2 stars, last pushed 1mo ago), licensed MIT. It adds 62 tokens to every session and 1,997 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other skills, from other repositories
chakra-ui-builder
Build responsive, accessible UI components and layouts using Chakra UI v3, install or configure Chakra UI in new and existing projects, and design scalable themes using tokens, semantic tokens, recipes, and slot recipes. Use this skill whenever a user asks to build, create, or generate any UI component, page, form…
frontend-visual-qa
Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find…
prototype-web
A clickable, high-fidelity web product prototype with navigation, a hero section, feature cards, steps, social proof, and optional pricing. It is designed to resemble a finished landing page while remaining a prototype.
waitlist-page
A simple waitlist page for collecting email addresses from people interested in a new product or early-access release.
animation-principles
Apply animation principles — easing, staging, follow-through — to one specific UI motion. Use when tuning how an animation feels. For product-wide duration and easing tokens use motion-system (design-systems); for a full interaction spec use micro-interaction-spec.
refactoring-ui
Audit and fix visual hierarchy, spacing, color, and depth in web UIs. Use when the user mentions "my UI looks off" (or amateur/unprofessional), "fix the design", "Tailwind styling", "color palette", "visual hierarchy", "design system", "spacing scale", or "component styling". Also trigger when building consistent…