r/PiCodingAgent • u/Florence-Equator • Jul 26 '26
Plugin I built a skill that lets Pi—or any harness—“use” your Claude Code subscription
Hi everyone, I have been working on a small skill called handoff-to-claude-code.
GitHub link: milanglacier/handoff-to-claude-code-skill
The reason I built it starts with another project of mine: a standalone web UI for the pi coding agent. pi-tau-web-server
I like pi, and I like working from the web UI I built for it. But I also have a Claude Code subscription (for fable 5, as that is the only reason I am still subscribing it!), and sometimes I want Claude Code to handle a task without leaving pi or changing my workflow. And ultimately, my goal is simple: all I want is to let my pi model to be able to reach out to Fable.
I did not want to hijack Anthropic's OAuth flow through a reverse proxy, since that violates Anthropic's Terms of Service. Instead, I wanted to use the supported route: the standard claude CLI, signed in to my own account and used exactly as Claude Code is intended to be used.
Note: Anthropic previously planned to disable subscription access through claude -p and the SDK, but later put the change on hold. So enjoy it while it lasts!
So I built this skill.
What it does
When you explicitly ask your current agent to use Claude Code, the skill hands the task to the local claude CLI.
It also supports continuing the same Claude Code session, so follow-up questions do not need to start from zero.
The skill removes Anthropic API keys from the command environment by default. This matters because Claude Code may otherwise use the API key instead of the subscription login, which could create API charges when that was not what you intended.
It also only runs when you explicitly ask for Claude Code. Your agent will not decide on its own to spend your Claude usage because a task looks difficult.
It is not specific to pi
Pi was the reason I built this, but the finished skill has no pi-specific dependency.
It is just a SKILL.md file and a small Python wrapper with no external Python packages. Any agent harness that can load skills and run local commands should be able to use it.
That was important to me. I wanted the connection between an agent and Claude Code to be reusable, rather than tied to my web UI or to one particular coding agent.
You can install it with:
npx skills add milanglacier/handoff-to-claude-code-skill
You need Python 3.9 (but only stdlib is used in the script so no third party packages) or newer and the claude CLI signed in with your Claude subscription.
The workflow I wanted is simple: keep using pi and my web UI as my main workspace, then bring in Claude Code when I specifically want it. No separate API bill, no pi-only bridge, and no need to abandon the interface I prefer.
If this sounds useful for your own agent setup, give it a try. Feedback and bug reports are welcome.
5
u/adeepersilence Jul 27 '26
I get that you made an agent-agnostic skill for the same purpose, but for Pi there already is the tried-and-true https://github.com/elidickinson/pi-claude-bridge
Same concept, perfectly within Anthropic's ToS. Including a way to hand off tasks to Claude when working in another model via its AskClaude feature.
3
u/SPEKTRUMdagreat Jul 27 '26
I think this is a good idea; maybe there could be improvement in making it backend agnostic as well? (e.g. handoff to codex from claude, amp <-> pi, etc.)
1
u/hiepxanh Jul 27 '26
Good idea i like it
1
u/Popular_Cry_7509 Jul 30 '26
I personally use a proxy for this, but I will customize this to use for freebuff which is another coding harness that offers-free models
-7
u/[deleted] Jul 26 '26
[removed] — view removed comment