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 agentmods add skills/aretw0/agents-lab/create-pi-web-extensionnpx skills add aretw0/agents-lab --skill create-pi-web-extensiongit clone --depth 1 https://github.com/aretw0/agents-labWrote 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/aretw0/agents-lab/create-pi-web-extension)<a href="https://agentmods.dev/skills/aretw0/agents-lab/create-pi-web-extension"><img src="https://agentmods.dev/badge/skills/aretw0/agents-lab/create-pi-web-extension.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.00039 | $0.00708 |
| Opus 5 | $0.00019 | $0.00354 |
| Sonnet 5 | $0.00008 | $0.00142 |
| Haiku 4.5 | $0.00004 | $0.00071 |
Grade A, and why
create-pi-web-extension 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 6d 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 — 82 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Criando Extensões Web para Pi (sem acoplamento frágil)
Use este skill quando o usuário quiser:
- expor estado da sessão em HTTP
- criar UI web para acompanhar trabalho do agente
- enviar ações da web para o pi de forma controlada
Princípios
- URL determinística por modo (
local | lan | public) - Sem depender de domínio externo para UI essencial
- Health endpoint explícito (
/api/health) - Estado por contrato (
/api/state) - Ações autenticadas (
POST /api/promptcom token) - Sem acoplar ao caso colony — colony é apenas um produtor de sinais
Referência first-party no lab
- Extensão:
packages/pi-stack/extensions/web-session-gateway.ts - Guia:
docs/guides/web-session-gateway.md - E2E harness:
packages/pi-stack/test/smoke/web-session-gateway-e2e-harness.test.ts
Processo recomendado
1) Definir contrato primeiro
Antes de codar, declarar:
- modos suportados (
local|lan|public) - endpoints (
health,state,action) - esquema mínimo de resposta (campos estáveis)
- requisito de autenticação (token/header/query)
2) Implementar mínimo vertical
- comando
/session-web start|status|open|stop - tool
session_web_status - backend HTTP mínimo
- UI web mínima (pode ser polling)
3) Testes obrigatórios
- Smoke: funções puras de resolução de host/url/config
- E2E (pi-test-harness):
- sobe servidor local
- valida
health200 - valida
statesem token = 401 - valida atualização de estado com sinal fake
- valida integração com outra extensão por capability (não por suposição)
4) Só então evoluir UI
Evoluir para SSE/WebSocket, histórico rico, comandos avançados etc.
Checklist de qualidade
- Funciona sem internet
- Não exige domínio externo para UI básica
- Não usa heurística opaca de IP sem override
- Tem fallback claro para
localhost - Tem teste para comportamento de erro (401/404/payload inválido)
- Tem teste de integração com fluxo real (harness)
Anti-padrões
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.
- 6d ago First seen · 82 lines · 39 tokens per session scan A 4b5cd86c05e3
create-pi-web-extension is a skill published in the GitHub repository aretw0/agents-lab (11 stars, last pushed 2mo ago), licensed MIT. It adds 39 tokens to every session and 708 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
figma-to-react-workflow
Orchestrates end-to-end Figma-to-React conversion pipeline with enforced TDD, automated pixel-diff visual QA, E2E testing, and app-type awareness (web apps, Chrome extensions, PWAs). Keywords: Figma to React, design tokens, autonomous component generation, Figma conversion, Tailwind config, component library, TDD…
react-testing-workflows
Testing strategy and execution for React applications. Covers Vitest configuration, React Testing Library patterns, custom hook testing, Playwright E2E, Storybook stories and play functions, and coverage reporting. Keywords: test, vitest, testing library, playwright, storybook, coverage, unit test, integration test…
visual-regression-tester
Use when the user asks to detect, review, prevent, or update visual regressions in a web, desktop, or mobile interface. Capture comparable rendered states, control viewport and data variance, inspect image differences, and distinguish intended design changes from rendering defects.
test-browser
Run browser tests on pages affected by current PR or branch.
test-xcode
Build and test iOS apps on simulator using XcodeBuildMCP.
test-ui
ASK mechanics: Claude Code → AskUserQuestion (one single-select tier, one multi-select checks). Other harnesses → numbered menu; wait. Headless (agent finishing UI work) → --chosen-by headless, standing default tier 2 --screens changed; the report records recommended, not confirmed. The reference is a CLI input, never…