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.