Using Devpit with AI agents
AI agents such as Claude Code can run devpit in a terminal, like you do.
That lets an agent check which account a tool uses in a folder, and explain why, before it pushes, deploys or commits.
Devpit has a small skill for Claude Code that teaches it how to do this safely.
Add the skill
Section titled “Add the skill”There are three ways. Each one asks first, and the default answer is No. After an update, the What’s new card also offers the skill when it is missing or older; it opens the Settings screen and installs nothing by itself.
-
The installer. On a fresh install, when Claude Code is on the PC, it asks
Let AI agents (Claude Code) use Devpit? [y/N]. Onlyyoryesadds the skill. Pass-NoAgentand it never asks. An update never adds the skill; it only refreshes a skill Devpit wrote before. -
Settings. Open Settings, then AI agent skill in the AI agents group. The screen shows what the skill lets Claude Code do, what it never does and where it goes, with Install, Update or Remove.
-
The command line:
Terminal window devpit agent installIt lists each place it will write and asks
Write the skill?first.
If Claude Code is not on the PC, nothing is written.
Devpit looks for claude on PATH, a .claude folder in your user folder, or a Claude Code account in Devpit. It never runs claude to find out.
What it writes, and where
Section titled “What it writes, and where”One file, SKILL.md, in a devpit folder:
%USERPROFILE%\.claude\skills\devpit\SKILL.md, for Claude Code’s default account, andskills\devpit\SKILL.mdin each Claude Code account Devpit manages, unless that account already gets the skill through a shared skills link.
The file carries a marker line that says Devpit wrote it, and a skill version.
devpit agent install updates Devpit’s own older skill.
It never overwrites a devpit skill that someone else wrote, or one from a newer Devpit.
Running it again changes nothing.
It also prints a short section to paste into AGENTS.md, for other agents that read that file.
Devpit never writes into your repositories.
To see where the skill is and whether it is current:
devpit agent statusdevpit agent status --jsonWhat the skill tells an agent
Section titled “What the skill tells an agent”- Read first.
devpit accounts --json,devpit <tool> --json,devpit <tool> list --jsonanddevpit accounts verify --jsonchange nothing. - When you ask why something happened, run
devpit accounts verify --jsonanddevpit <tool> --jsonfirst. Each problem comes with a fix and, when a page explains it, adocslink. Then open the one matching page from llms.txt. Offline, usedevpit <command> --help. - Ask before any change. Tell you exactly what would change, and only after you agree run the command with
--yes. Never switch on its own. - Undo with
devpit undo --yes, again only when you ask. - Never read account folders or login files (such as
.credentials.json,.claude.json,hosts.ymlor anything under.devpit\accounts), never print, copy or pass on a token, and never pass--yesbefore you agreed to that exact change.
What it cannot do
Section titled “What it cannot do”Devpit itself never changes anything for an agent without --yes.
With no terminal to answer in, a command that would change something changes nothing and exits with code 3.
The skill is instructions, not a lock: Devpit cannot tell who typed --yes.
If an agent changed an account anyway, see My AI agent changed an account without asking.
For agents and scripts
Section titled “For agents and scripts”| What | Where |
|---|---|
| Machine-readable output | --json on every read command. The shape is in each command’s --help and on the command line reference. |
| Docs link per problem | docs in the --json output, and a Docs: line under the fix in the normal output |
| Exit codes | 0 done, 1 failed, 2 wrong usage, 3 needs --yes (nothing changed), 4 verify found a mismatch |
| Every docs page, listed | https://devpit.zubyr.dev/llms.txt |
| One page as Markdown | Add .md to its URL, for example https://devpit.zubyr.dev/docs/troubleshooting/accounts-wrong-account-used.md. The docs home is https://devpit.zubyr.dev/docs/index.md. |
| The whole docs in one file | https://devpit.zubyr.dev/llms-full.txt (large; one page is usually enough) |
Remove it
Section titled “Remove it”devpit agent removeIt lists the files it will remove and asks first.
It removes only SKILL.md files that carry Devpit’s marker and were written in place, never one reached through a shared link, and the devpit folder when it is then empty.
Skills from anyone else stay.
You can also remove it in Settings, AI agent skill, Remove.
devpit accounts cleanup removes it together with everything else Devpit added for accounts, and uninstalling with the installer removes it too.
Common questions
Can an AI agent change my accounts through Devpit on its own?
Not without --yes. An agent runs devpit with no terminal to answer in, so a command that would change something changes nothing and exits with code 3 unless --yes is on the command line. The skill tells the agent to ask you first and pass --yes only after you agree.
Does the skill let an agent read my logins?
No. Devpit's commands never print a token, and the skill tells the agent never to read account folders, login files or tokens.
Is the skill installed by default?
No. The installer asks only when Claude Code is on the PC, and the default answer is No. You can also add it later in Settings or with devpit agent install.
