Chainlink for Pi#
Pi integration for Chainlink — a local issue tracker for AI coding sessions.
This folder contains two components:
| Component | Path | What it does |
|---|---|---|
| Skill | chainlink/ |
Teaches Pi how to use chainlink: commands, workflow, issue titles, sessions |
| Extension | chainlink-extension/ |
Enforces chainlink usage: injects context, gates tool calls, detects stubs |
You can use the skill alone (lightweight, instructions only) or add the extension for full behavioral parity with the Claude Code integration.
Skill — chainlink/#
A Pi skill following the Agent Skills standard. Loaded on demand when you ask Pi about tasks, issues, or sessions.
Install (project-local):
cp -r chainlink .pi/skills/chainlink
Install (global):
cp -r chainlink ~/.pi/agent/skills/chainlink
Use:
/skill:chainlink
Or just ask Pi about tasks — it will load the skill automatically when relevant.
Extension — chainlink-extension/#
A Pi extension (TypeScript) that ports the four Claude Code hooks:
| Claude Code hook | Pi event | Behaviour |
|---|---|---|
session-start.py |
session_start |
Injects previous handoff notes and open issues at startup |
prompt-guard.py |
before_agent_start |
Injects code quality rules and project tree into every agent run |
work-check.py |
tool_call |
Blocks write/edit/bash when no chainlink issue is active |
post-edit-check.py |
tool_execution_end |
Warns when stub patterns are detected after file edits |
Install:
cd chainlink-extension
npm install
cd ..
# Project-local
cp -r chainlink-extension .pi/extensions/chainlink-extension
# Or global
cp -r chainlink-extension ~/.pi/agent/extensions/chainlink-extension
The extension reads rules from .chainlink/rules/ (same directory structure used by Claude Code), so any rules you've already written work without changes.
Requirements#
- Pi installed
- Chainlink CLI installed (
chainlinkon PATH) - A project initialised with
chainlink init(creates.chainlink/) - Node.js 18+ (for the extension only)
How it works#
Chainlink stores issues in .chainlink/issues.db (SQLite). Both the skill and extension shell out to the chainlink CLI — no API keys or network access required.
The extension's before_agent_start handler reads language-specific rules from .chainlink/rules/*.md (e.g. rust.md, typescript.md) and appends them to Pi's system prompt, exactly as prompt-guard.py does for Claude Code. You can add project-specific rules to .chainlink/rules/project.md.