CodingOpen SourceFreeActiveMachine-verified· intermediate · ~10 min setup

Pi: The Reusable Team Skill

Encode a multi-step task once as an Agent Skill your whole team installs.

by Shilpa Mitra· verified 12d ago· v1.0.0

Run this workflow

CI-verified, 4/4 fixtures passing.

Intended Use

Teams who want a repeated task (e.g. triage a failing test) encoded once as a SKILL.md and run the same way every time, then bundled into a Pi package everyone installs with one command.

Not for

  • One-off tasks that don't have repeatable steps
  • Anyone unwilling to bring their own model key/subscription

The Stack

Tested Against

pi@0.74node@20.x

Side effects & data flow

Network
your model provider, only in the non-CI run step, git host, only when installing a shared pack
Writes
<pi config dir>/skills/triage-failing-test/SKILL.md
Credentials
model API key/subscription, for the run step only

Data privacy

  • your model provider, only in the non-CI run step the test output and code the skill reads (retention: per that provider's API policy)

Prerequisites

  • Pi (MIT): `npm install -g --ignore-scripts @earendil-works/pi-coding-agent`
  • A model key/subscription (only needed to run the skill)
  • A git repo/package to share the skill (for `pi install git:…`)

Steps

  1. 1

    Scaffold the SKILL.md at Pi's skill-discovery path

    CI writes the skill to Pi's documented skills directory (`<config>/skills/<name>/SKILL.md`) with its required H1 heading, and confirms Pi's `install` subcommand exists (so the shared-package command is well-formed) — the deterministic half of 'encode once, share with one command.'

    export PI_CODING_AGENT_DIR="$PWD/.pi"
    pi --version >/dev/null || { echo "pi missing"; exit 1; }
    mkdir -p "$PI_CODING_AGENT_DIR/skills/triage-failing-test"
    cat > "$PI_CODING_AGENT_DIR/skills/triage-failing-test/SKILL.md" <<'EOF'
    # Triage Failing Test
    Use this skill when the user asks to triage a failing test.
    
    ## Steps
    1. Run the test suite and find the first failing test.
    2. Read that test and the code it exercises.
    3. Explain the likely root cause and propose the smallest fix.
    EOF
    test -s "$PI_CODING_AGENT_DIR/skills/triage-failing-test/SKILL.md" && echo "skill scaffolded: skills/triage-failing-test/SKILL.md"
    head -1 "$PI_CODING_AGENT_DIR/skills/triage-failing-test/SKILL.md" | grep -q "^# Triage Failing Test" && echo "skill has required H1 heading"
    pi install --help | grep -qi "Install a package" && echo "pi supports install subcommand (pi install git:github.com/org/pack)"
  2. 2

    Run and share it (the model step, not checked by CI)

    Invoke with `/skill:triage-failing-test`, or let Pi auto-load it when the task matches. Share by bundling skills/prompts into a package: `pi install git:github.com/your-org/your-pi-pack` then `pi list`. The agent executing the skill calls a model, so CI doesn't run it.

Eval, 4 fixtures

Last passed: verified 12d ago
  • skill-scaffoldedcontainstimeout 60s · max $0

    Expected: skill scaffolded: skills/triage-failing-test/SKILL.md

  • skill-headingcontainstimeout 60s · max $0

    Expected: skill has required H1 heading

  • pi-installcontainstimeout 60s · max $0

    Expected: pi supports install subcommand

  • clean-exitexit_codetimeout 60s · max $0

    Expected: 0

Results

Share a playbook your team installs with one command, from the WebAfterAI guide.

Liked this workflow?

Get new verified workflows in WebAfterAI, three issues a week (Tue, Thu, Sat).