rajivmehtaflex/power-utility/pi-orchestrated-remote-workflows
Claude Code and agent skill by rajivmehtaflex/power-utility
- community
Checking that the SKILL.md file is still in the repository.
Use for Pi extensions coordinating resumable remote phases.
Install
npx vskill@latest install rajivmehtaflex/power-utility/pi-orchestrated-remote-workflowsSKILL.md
The same SKILL.md was published earlier as rajivmehtaflex/power-utility/pi-orchestrated-remote-workflows.
Pi-Orchestrated Remote Workflows
Use this skill when a Pi extension is the control plane for a multi-phase workflow involving remote GPUs, teacher/model endpoints, disposable machines, generated artifacts, training jobs, deployment, or a live phase dashboard.
Core architecture
Keep the Pi extension as the control plane, not a monolithic implementation:
src/index.ts should register tools and delegate to focused modules. Deterministic workers, model clients, remote job adapters, and renderers must be independently testable.
Phase state and resume contract
Persist a versioned ledger with at least:
At repository level also store workflow name, remote URL, branch, target dialect, mode, and update time. Use atomic writes (temp file -> rename) and reject corrupted ledgers.
On a new disposable worker:
- Clone/pull the remote repository with fast-forward-only semantics.
- Read and validate the phase ledger.
- Verify artifact hashes from the manifest.
- Poll any saved remote job IDs.
- Convert stale
workingrecords tointerruptedinstead of silently rerunning. - Skip
donephases. - Resume a batch phase from
inputCursor/lastCheckpoint, deduplicating deterministic IDs.
Never claim a phase is durable until its ledger/manifest and artifacts have been pushed.
Mandatory checkpoint lifecycle
Use four checkpoint classes:
- Before launch: persist
workingand phase attempt; commit/push. - After remote launch: persist remote job ID and initial cursor; commit/push.
- After each durable batch: atomically write output, hash it, update cursor/checkpoint; commit/push.
- After gate: persist
done, artifact hashes, cost, commit/revision, and next action; commit/push.
If a push fails, leave the phase failed or unsynchronized and report the error. Do not claim success based only on local files.
Dry-run first
Implement explicit dry-run and live modes. Dry-run must inject fake:
- teacher/model client
- verifier
- remote job executor
- Git/Hugging Face sync
The dry run should exercise one simple prompt through the whole phase graph and prove:
Mark simulated jobs/artifacts with simulation: true; never present a simulated trained model as a live result. Use dry-run thresholds separate from production gates.
Remote model/job adapters
Define provider-neutral interfaces and inject them into orchestration code:
Use the configured OpenAI-compatible llama.cpp endpoint for teacher inference when that is the selected transport. Do not silently fall back to a local provider during tests or remote phases. Mock fetch in client tests; never call Ollama or another live model in local verification unless explicitly requested.
Store request IDs, model, decoding settings, retry attempt, job ID, GPU seconds, estimated/actual cost, remote artifact paths, and next action in the ledger.
Artifact and repository policy
For a single Hugging Face Git repository containing workflow code, data, state, reports, and model revisions:
- ordinary Git: TypeScript/Python code, JSON/JSONL, reports, ledger, manifests
- Git LFS/HF revisions: safetensors, adapters, tokenizer binaries, other large weights
- never commit API keys,
.env, Modal/HF credentials, caches, build output, or arbitrary model-supplied paths
Use an allowlisted path policy and hash every durable artifact. Record HF revision/tag and commit ID for model releases.
Pi phase dashboard
Read a real sibling Pi dashboard/table implementation before using UI APIs. Keep the dashboard a pure ledger renderer; it must not own phase business logic. Stable columns should include:
Show pending, working, and done; distinguish failed, blocked, and interrupted. Provide a headless text fallback. Verify interactive behavior in a live Pi TTY, not only with -p.
TDD workflow
For every new orchestrator slice:
- Write a focused failing test.
- Run the focused test and confirm the expected failure.
- Implement the smallest behavior.
- Run the focused test and then the existing suite.
- Add failure/recovery tests before refactoring.
Use fake adapters for remote/model/Git operations. Test lost jobs, push rejection, corrupted state, stale working phases, duplicate batches, cost overruns, and forbidden paths.
Verification gates
Before a live phase:
npm testhas real tests and passes.npm run buildpasses.- dry-run completes without side effects.
- remote URL/branch/auth are verified.
- Git LFS is available and patterns are configured.
- phase prerequisites and artifact hashes pass.
- user explicitly authorizes the live teacher/GPU/push operation.
A phase gate must report PASS/FAIL, actual versus estimated cost, artifacts, commit/revision, and next action.
Supporting reference
See references/phase-orchestrator-checkpoints.md for the reusable ledger example, checkpoint timeline, and GPU-loss recovery matrix.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprofile/software-development/pi-orchestrated-remote-workflows/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rajivmehtaflex/power-utility/pi-orchestrated-remote-workflows)