create-pi-web-extension

create-pi-web-extension is a skill for Claude Code, Codex from aretw0/agents-lab. It costs 39 tokens per session (708 once invoked), scanned A, original, MIT.

A guide for building web extensions for pi, including a browser interface that can show an agent session and accept controlled actions.

In plain words
What is it for?
Use it to add local, LAN, or public web monitoring and authenticated prompts to pi-based tools.
Why use it?
It defines stable URLs, health and state endpoints, and authentication rules so the web interface remains predictable and safer to use.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/aretw0/agents-lab/create-pi-web-extension
Any agent
npx skills add aretw0/agents-lab --skill create-pi-web-extension
Clone the repo
git clone --depth 1 https://github.com/aretw0/agents-lab

Made for: Claude Code, Codex.

Wrote 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.

agentmods badge for create-pi-web-extension

README.md
[![agentmods](https://agentmods.dev/badge/skills/aretw0/agents-lab/create-pi-web-extension.svg)](https://agentmods.dev/skills/aretw0/agents-lab/create-pi-web-extension)
Your own site
<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>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 708 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 6d ago against content hash 4b5cd86c05e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

packages/pi-skills/skills/create-pi-web-extension/SKILL.md · 82 lines

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

  1. URL determinística por modo (local | lan | public)
  2. Sem depender de domínio externo para UI essencial
  3. Health endpoint explícito (/api/health)
  4. Estado por contrato (/api/state)
  5. Ações autenticadas (POST /api/prompt com token)
  6. 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 health 200
    • valida state sem 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

Read the full file on GitHub · 82 lines

Changes

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.

  1. 6d ago First seen · 82 lines · 39 tokens per session scan A 4b5cd86c05e3

Subscribe to this mod's changes

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.

Related

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…

PMDevSolutions/Aurelius · 85 tokens

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…

PMDevSolutions/Aurelius · 76 tokens

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.

lfyxhappy/lfcode · 57 tokens

test-browser

Run browser tests on pages affected by current PR or branch.

gvkhosla/compound-engineering-pi · 14 tokens

test-xcode

Build and test iOS apps on simulator using XcodeBuildMCP.

gvkhosla/compound-engineering-pi · 18 tokens

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…

Wan-ZL/zelin-ai-assistant · 262 tokens