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.

Good fit Use it to add local, LAN, or public web monitoring and authenticated prompts to pi-based tools.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/aretw0/agents-lab/create-pi-web-extension
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.

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/github.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/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.

agentmods 80×15 button for create-pi-web-extension

Your own site · 80×15
<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="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.5 $0.00016 $0.00283
Sonnet 5.5 $0.00008 $0.00142
Haiku 4.5 $0.00004 $0.00071

Measured 1mo ago against content hash 4b5cd86c05e3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 4mo ago), licensed MIT. It adds 39 tokens to every session and 708 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-08-30.

Related

Other skills, from other repositories

tdd-workflow

Use this skill when writing new features, fixing bugs, or refactoring code. Enforces test-driven development with 80%+ coverage including unit, integration, and E2E tests.

affaan-m/ECC · 43 tokens

e2e-testing

Playwright E2E testing patterns, Page Object Model, configuration, CI/CD integration, artifact management, and flaky test strategies. Use when writing Playwright tests, structuring page objects, or fixing flaky E2E runs in CI.

affaan-m/ECC · 53 tokens

e2e-testing

Guide for running end-to-end tests of the Qwen Code CLI, including headless mode, MCP server testing, and API traffic inspection. Use this skill whenever you need to verify CLI behavior with real model calls, reproduce user-reported bugs end-to-end, test MCP tool integrations, or inspect raw API request/response…

QwenLM/qwen-code · 94 tokens

terminal-capture

Automates terminal UI screenshot testing for CLI commands. Applies when reviewing PRs that affect CLI output, testing slash commands (/about, /context, /auth, /export), generating visual documentation, or when 'terminal screenshot', 'CLI test', 'visual test', or 'terminal-capture' is mentioned.

QwenLM/qwen-code · 66 tokens

agent-reproduce-align

Use after a Codex or Claude Code feature has been implemented in Qwen Code to run the selected reference agent and Qwen Code under the same scenario, capture HTTP and terminal traces, compare request bodies, tool/function schemas, outputs, and iterate until the reproduced behavior is close enough.

QwenLM/qwen-code · 62 tokens

reproduce-bug

Reproduce a reported bug in googleapis/mcp-toolbox and decide whether it is real, delivering an evidence-backed verdict: confirmed, already fixed, misconfiguration, client-side, works as intended, not reproducible, or blocked. Use whenever a maintainer asks you to reproduce, verify, confirm, or investigate a bug…

googleapis/mcp-toolbox · 130 tokens