pi-dev-workflow

pi-dev-workflow is a skill for Claude Code, Codex from aretw0/agents-lab. It costs 55 tokens per session (1,934 once invoked), scanned A, original, MIT.

A development guide for pi extensions and packages in a monorepo, a repository containing multiple related packages.

In plain words
What is it for?
Use it when switching between local and npm versions, reloading extensions, or testing packages in an isolated setup.
Why use it?
It prevents pi from loading the published package instead of the local code and addresses dependency hoisting and packaging problems.

Skill for Claude CodeCodex

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

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is "../packages/meu-pacote",.

Good fit Use it when switching between local and npm versions, reloading extensions, or testing packages in an isolated setup.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/aretw0/agents-lab
agentmods
npx agentmods add skills/aretw0/agents-lab/pi-dev-workflow

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 pi-dev-workflow

README.md
[![agentmods](https://agentmods.dev/badge/skills/aretw0/agents-lab/pi-dev-workflow/github.svg)](https://agentmods.dev/skills/aretw0/agents-lab/pi-dev-workflow)
Your own site
<a href="https://agentmods.dev/skills/aretw0/agents-lab/pi-dev-workflow"><img src="https://agentmods.dev/badge/skills/aretw0/agents-lab/pi-dev-workflow/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 pi-dev-workflow

Your own site · 80×15
<a href="https://agentmods.dev/skills/aretw0/agents-lab/pi-dev-workflow"><img src="https://agentmods.dev/badge/skills/aretw0/agents-lab/pi-dev-workflow.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 55 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,934 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.00055 $0.01934
Opus 5.5 $0.00022 $0.00774
Sonnet 5.5 $0.00011 $0.00387
Haiku 4.5 $0.00006 $0.00193

Measured 1mo ago against content hash ad1c633ad6a3, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

pi-dev-workflow 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/pi-dev-workflow/SKILL.md · 194 lines

How it starts

The opening of the file, as written. The whole thing — 194 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Workflow de Desenvolvimento Pi

Desenvolver extensões, skills ou temas para o pi exige alternar entre código local (para iterar rápido) e pacotes publicados (para validar a experiência do usuário final). Esta skill documenta os padrões que funcionam.

Paridade guide-skill

Guide canônico: docs/guides/testing-isolation.md Guide complementar: docs/guides/control-plane-operating-doctrine.md Paridade mínima: PI_CODING_AGENT_DIR isolado; settings canônico vs derivado; paths portáveis; reload obrigatório; não mutar pacote upstream do pi Última revisão de paridade: 2026-04-30

O Problema

Quando você desenvolve um pacote pi dentro de um monorepo, surgem 3 conflitos comuns:

  1. O pi carrega a versão publicada em vez do código local que você está editando
  2. npm workspaces faz hoisting — deps vão para root/node_modules/ e paths relativos quebram
  3. bundledDependencies não funciona com workspaces — o tarball sai vazio

Solução: Source Switching

O padrão adotado pelo oh-pi e pelo agents-lab:

  1. Cada pacote é independente — publicado no npm com seu próprio package.json
  2. Um script alterna entre paths locais e npm:@scope/name no settings.json do pi
  3. Sem bundledDependencies — meta-pacotes são installers que rodam pi install para cada dependência

Configuração Mínima (pacote único)

Para um pacote simples, basta usar pi install com path local:

# Desenvolvimento — carrega do disco
pi install /caminho/absoluto/para/meu-pacote

# Produção — volta para npm
pi remove /caminho/absoluto/para/meu-pacote
pi install npm:@meu-scope/meu-pacote

Configuração Monorepo (múltiplos pacotes)

Crie um script que reescreve o settings.json do pi:

#!/usr/bin/env node
// scripts/pi-source-switch.mjs
import { existsSync, readFileSync, readdirSync, writeFileSync, mkdirSync } from "node:fs";
import { homedir } from "node:os";
import path from "node:path";
import { fileURLToPath } from "node:url";

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const REPO_ROOT = path.resolve(__dirname, "..");

// Descobrir pacotes pi no workspace
const PACKAGES = new Map();
for (const entry of readdirSync(path.join(REPO_ROOT, "packages"), { withFileTypes: true })) {
  if (!entry.isDirectory()) continue;
  const pkgPath = path.join(REPO_ROOT, "packages", entry.name, "package.json");
  if (!existsSync(pkgPath)) continue;
  const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
  if (pkg.keywords?.includes("pi-package")) {
    PACKAGES.set(pkg.name, path.join(REPO_ROOT, "packages", entry.name));
  }
}

const mode = process.argv[2]; // "local" ou "published"
const settingsPath = path.join(homedir(), ".pi", "agent", "settings.json");
const settings = existsSync(settingsPath)
  ? JSON.parse(readFileSync(settingsPath, "utf8")) : {};

const newPackages = [];
for (const [name, dir] of PACKAGES) {
  newPackages.push(mode === "local" ? path.resolve(dir) : `npm:${name}`);
}
settings.packages = newPackages;

mkdirSync(path.dirname(settingsPath), { recursive: true });
writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n");
console.log(`✅ Switched to ${mode} mode. Restart pi to reload.`);

Read the full file on GitHub · 194 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 · 194 lines · 55 tokens per session scan A ad1c633ad6a3

Subscribe to this mod's changes

pi-dev-workflow is a skill published in the GitHub repository aretw0/agents-lab (11 stars, last pushed 3mo ago), licensed MIT. It adds 55 tokens to every session and 1,934 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

bun-1-4

Read before a js eval cell that installs a package, spawns a server or PTY, or starts a long run, and before any bun -e, script, server, CLI, test, bundle, or package-management work: this session's eval js kernel runs Bun 1.4+ (this skill is present only when it does). Bun 1.4 ships builtins that replace 15+ npm deps…

code-yeongyu/senpi · 173 tokens

pi

Use when needing a minimal, extensible terminal AI coding agent harness in TypeScript with plugin architecture. Pi: minimalist terminal AI coding agent emphasizing simplicity and composability.

znlgis/opengis-skills · 35 tokens

autovault-skill

Understand AutoVault-managed skills and how to install or update them. Use when a skill is visible via symlink, when authoring or editing SKILL.md, or before touching /.autovault/skills. Vault writes must go through autovault add-local or MCP proposeskill/updateskill so AutoVault re-signs; never hand-edit vaulted…

autoworks-ai/autovault · 84 tokens

rust-patterns

Idiomatic Rust patterns, ownership, error handling, traits, concurrency, and best practices for building safe, performant applications.

affaan-m/ECC · 28 tokens

rust-testing

Rust testing patterns including unit tests, integration tests, async testing, property-based testing, mocking, and coverage. Follows TDD methodology.

affaan-m/ECC · 31 tokens

fastapi-patterns

FastAPI patterns for async APIs, dependency injection, Pydantic request and response models, OpenAPI docs, tests, security, and production readiness.

affaan-m/ECC · 35 tokens