npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pi-fairy-tales-chains

v0.2.0

Published

Six durable skill chains for pi — release, feature-ship, onboard, bughunt, migrate, and research — multi-phase workflows that pass state through a file on disk so they survive across sessions, each leveraging pi-fairy-tales capabilities.

Readme

Fairy Tales — once upon a terminal

pi-fairy-tales-chains

Six durable skill chains for the pi coding agent — multi-phase workflows where each phase is its own skill and state flows between them through a file on disk, so a long job survives across sessions and context windows and resumes exactly where it stopped.

Each chain is built to leverage pi-fairy-tales capabilities — subagents, /ultraplan, the artifact tool, guard-rail hooks, memory, and the status line. Authored with pi-skill-system-creator and validated with its chain validator.

Why chains? pi-fairy-tales is powerful but mostly in-session — a /ultraplan run or a subagent fan-out is gone when the session ends. A chain writes state between phases, turning that horsepower into a multi-day, resumable pipeline with human review between steps.

Install

Requires pi-fairy-tales — the chains call its tools (agent, artifact, /ultraplan, fetch, hooks). Install both as top-level packages:

npm i -g @earendil-works/pi-coding-agent    # pi itself
pi install pi-fairy-tales                     # the capabilities the chains call (declared as a peer dependency)
pi install pi-fairy-tales-chains              # the chains

Both load independently in the same pi and compose at runtime. They are deliberately not bundled into one install: pi loads each package's tools once, and bundling a second copy of pi-fairy-tales would conflict with a standalone install of it. Two installs, zero conflicts.

Or from git:

pi install git:github.com/KcAnom/pi-fairy-tales
pi install git:github.com/KcAnom/pi-fairy-tales-chains

The chains

Each is a pipeline (human-in-the-loop): every phase reads the shared chain state, does its work, updates state, and hands off with Run /<chain>-<next>. You review between phases; the durable state means you can stop and resume days later.

Since 0.2.0, all six chains track state through the bundled chain tool: authoritative JSON at .pi/fairy-tales/chains/<chain>/state.json with a human-readable state.md projection, TTL'd cross-session locking, and automatic import of legacy .<chain>-state.md files (see docs/STATE-CONTRACT.md). Heavy phase work runs as quests (pi-fairy-tales ≥ 0.15) with idempotent dedupe keys, so a crashed phase resumes the same work instead of duplicating it.

| Chain | Phases | What it does | Fairy-tales muscle | |---|---|---|---| | release | changelog → bump → tag → publish → verify | Cut an npm/git release end to end | /commit conventions, ship skill, status line | | feature-ship | spec → build → review → ship | Take a feature request from spec to merged PR | plan agent + artifact, /ultraplan worktree, deep-review | | onboard | map → deepen → digest | Understand an unfamiliar repo over multiple sessions | parallel explore subagents, artifact HTML, memory | | bughunt | repro → diagnose → fix → verify | Reproduce, root-cause, fix, and confirm a bug | explore/review subagents, post-edit self-fix hook, checkpoints | | migrate | inventory → transform → verify | Large codebase migration that spans sessions | explore subagents, /ultraplan, per-site durable checkoff | | research | gather → synthesize → artifact | Research a topic and produce a polished report | SSRF-safe fetch, artifact HTML |

Using a chain

Start the first phase, then follow each handoff:

/release-changelog            # phase 1 — creates .release-state.md
# … review, then it tells you:
/release-bump                 # phase 2
/release-tag                  # phase 3
/release-publish              # phase 4
/release-verify               # phase 5 — "Chain complete!"

Interrupted? Just run the next phase whenever you come back — the durable state remembers where you were (/chains shows every run in the project). Each phase refuses to run if the previous one didn't complete, so you can't skip a step or act on a half-written state.

How a chain is built

Every phase skill follows the pi-skill-system-creator contract:

  • Clean YAML front matter so pi can discover the skill
  • State validation on entry — the chain tool verifies the run is active at exactly this phase and refuses out-of-order or missing-state runs (legacy chains parse frontmatter + chain_version instead)
  • Atomic state writes — the tool writes JSON + projection via temp file + rename, so an interrupted write never corrupts the state
  • Cross-session locking — a TTL'd lock (renewed on every write, auto-broken when stale, force-clearable with the tool's unlock action) catches two sessions running the same chain
  • An explicit handoff to the next phase (the last phase terminates with "Chain complete")

Validate any chain yourself:

python3 ~/.pi/agent/skills/skill-system-creator/validate-chain.py <chain-name>

License

MIT © KcAnom. Built for the pi coding agent; pairs with pi-fairy-tales and pi-skill-system-creator.