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/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<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="Reviewed on agentmods" width="80" 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.5 | $0.00025 | $0.00799 |
| Sonnet 5.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 3mo 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.
- 3mo 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 (3 stars, last pushed 4mo ago), licensed MIT. It adds 62 tokens to every session and 1,997 once invoked, about $0.0002 per session on Opus 5.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.
mpa-url-state-bridge compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| mpa-url-state-bridgehumanerd-drew/opencode-drewgent | Skill | 3 | 4mo ago | MIT | A | 62 | Claude Code, Codex |
| anti-slop-designsickn33/agentic-awesome-skills | Skill | 51k | today | MIT | A | 34 | Claude Code |
| chakra-ui-builderchakra-ui/chakra-ui | Skill | 41k | yesterday | MIT | A | 214 | Claude Code, Codex |
| visual-ralphYeachan-Heo/oh-my-codex | Skill | 34k | 2d ago | MIT | A | 52 | Codex |
| prototype-webnexu-io/html-anything | Skill | 17k | 5d ago | Apache-2.0 | A | 24 | Claude Code, Codex |
| open-design-setupcompozy/compozy | Skill | 2.9k | today | MIT | A | 67 | Claude Code, Codex |
| edit-sitemicrosoft/power-platform-skills | Skill | 1.2k | today | MIT | A | 104 | Claude Code |