goal-griller
Turn vague ideas into verifiable Codex goals. Use when the user mentions goal mode, /goal, create_goal, autonomous work, or asks…
Agent playbook for building multi-provider applications with @earendil-works/pi-durable and @earendil-works/pi-ai where every job pins its provider connection (connectionId, provider, modelId, authMethod) before initialization and executes strictly on that pinned connection.
Claude Code
$ npx -y skills add hoangnb24/skills --skill pi-durable-multi-provider --agent claude-code
Codex
$ npx skills add hoangnb24/skills --skill pi-durable-multi-provider -a codex -y
Cursor
$ npx skills add hoangnb24/skills --skill pi-durable-multi-provider -a cursor -y
Gemini CLI
$ npx skills add hoangnb24/skills --skill pi-durable-multi-provider -a gemini-cli -y
GitHub Copilot
$ npx skills add hoangnb24/skills --skill pi-durable-multi-provider -a github-copilot -y
OpenCode
$ npx skills add hoangnb24/skills --skill pi-durable-multi-provider -a opencode -y
Windsurf
$ npx skills add hoangnb24/skills --skill pi-durable-multi-provider -a windsurf -y
name: pi-durable-multi-provider description: "Agent playbook for building multi-provider applications with @earendil-works/pi-durable and @earendil-works/pi-ai where every job pins its provider connection (connectionId, provider, modelId, authMethod) before initialization and executes strictly on that pinned connection."
Use this playbook when implementing or refactoring a system that runs `@earendil-works/pi-durable` agents over `@earendil-works/pi-ai` with multiple provider connections (multiple providers or multiple accounts per provider).
Every change you write MUST preserve these five invariants. Never weaken them for convenience:
1. **Explicit Selection Pinning Before Job Initialization (`DispatchedCallUsesPinnedSelection`)**:
2. **Immutable Selection Chain (`SelectionChainIntact`)**:
3. **Per-Connection Credential Isolation**:
4. **Persisted Task Phase Binding (`CallRequiresActivePiDurableTask`)**:
5. **Pre-Handoff Credential Fence & Secret Redaction (`HandoffCredentialFenceHolds`)**:
---
Define these shapes first (`pstack-principle-foundational-thinking`) and keep shared mutable state separated by file ownership (`pstack-principle-separate-before-serializing-shared-state`).
<runtime-root>/
├── providers/
│ ├── settings.json # Connections list + UI default seed (`selected`)
│ └── <connectionId>/
│ ├── credentials.json # Mode 0600, owned exclusively by connectionId store
│ └── catalog.json # Optional per-connection model snapshot
├── jobs/
│ └── <jobId>.json # Job record with pinned job.selection, grant, run
└── attempts/
└── <jobId>/<attemptId>/
├── agent.sqlite # Dedicated pi-durable SQLite database for this attempt
└── requests/<requestKey>.json # Durable request ledger (intent -> input -> saved/unknown)import { createHash } from 'node:crypto';
export const sha256 = (bytes) => createHash('sha256').update(bytes).digest('hex');
export const inputHash = (job) =>
sha256(Buffer.from(JSON.stringify({
payload: job.payload,
references: job.references ?? [],
base: job.base ?? null,
})));
export const agentInputHash = (job) =>
sha256(Buffer.from(JSON.stringify({
input: inputHash(job),
selection: job.selection, // { connectionId, provider, modelId, authMethod }
feedback: job.revisionFeedback ?? null,
...(job.assignment ? { assignment: job.assignment } : {}),
...(job.continuationOf ? { continuationOf: job.continuationOf } : {}),
})));---
Execute these units in order. Do not advance to the next unit until the current unit's verification check passes.
**Files to create/modify**: `host/provider-settings.js`
**Implementation requirements**: 1. Initialize the installed catalog via `createModels({ authContext })` from `@earendil-works/pi-ai/models` and register the allowed provider factories (`openrouterProvider`, `googleProvider`, `openaiProvider`, `openaiCodexProvider`). 2. For each connection in `providers/settings.json`, create a per-connection credential store over `providers/<connectionId>/credentials.json` (directory mode `0700`, file mode `0600`). 3. Implement synchronous `dispatchCredential()` on the credential store:
Khuym is a focused Codex plugin containing five independent meta-skills and one tool-automation skill. It improves how an agent understands, researches, sequences, lands, and visualizes work without imposing a repository workflow.
Turn vague ideas into verifiable Codex goals. Use when the user mentions goal mode, /goal, create_goal, autonomous work, or asks…
Upgrade raw prompts into execution-ready instructions. Use when asked to improve a prompt, add context, tool, verification, or…
Build dependency-aware plans from goals, incidents, backlogs, or priorities. Use when priority conflicts with execution order and…
Organize an existing Git tree into logical commits and push them. Use when asked to commit everything, smart commit, group…
Create, inspect, edit, persist, and verify tldraw canvases through the tldraw Desktop local Canvas API without mouse-driven…
Research unfamiliar implementation work before coding. Use when work is ambiguous, version-sensitive, or risky and requires repo…
Behavioral guidelines to reduce common LLM coding mistakes. Use when writing, reviewing, or refactoring code to avoid…
Converts books and documents (PDF, EPUB, DOCX, HTML, Markdown, plain text, RTF, MOBI/AZW with Calibre) into structured agent…
Set up the owner profile so a personal agent knows who it works for (first-run setup, \"get to know me\"), or distill colleague,…