Install the skill
skills install copies the staplehire skill into the agent skill roots it finds in your current project. It looks for .agents/, .claude/, and .cursor/ and installs into their skills/ directories.
primary— the first agent root found; the skill files are copied here.extras— additional roots; by default these are symlinked toprimary(use--copyto copy instead).created— set to a path (for example.agents/skills) when no agent root existed and the CLI created.agents/skillsfor you.
Options
Skills install into the project directory you run the command from (
.agents/skills/staplehire, etc.), not a global home directory. Run it inside the repo your agent works in.The agent protocol
The CLI auto-detects non-TTY environments and emits JSON — no--json flag needed (though -q forces clean JSON-only output). Agents should follow these rules:
1
Discover, don't guess
Run
staplehire commands for the machine-readable command tree that matches the installed version. Don’t hardcode flag shapes.2
Check the environment first
3
Supply every required flag
The CLI never prompts when stdin is not a TTY. Missing a required flag fails with exit code
8.4
Poll async jobs before reading results
5
Branch on exit codes, not message strings
Read
error.code from stderr JSON and the process exit code — never grep error.message.Authentication for agents
Agents and CI must not usestaplehire login (it opens a browser). Set STAPLEHIRE_KEY in the environment, or pass --api-key for a single command.
Output contract for agents
- Success → JSON on stdout, exit
0. - Failure →
{ "error": { … } }on stderr, non-zero exit code. - Use
-qto suppress human status lines so stdout is pure JSON. - Read responses may include a
urlsobject with dashboard deep links.
Supported agents
FAQ
Can agents run Staplehire without browser login?
Can agents run Staplehire without browser login?
Yes — set
STAPLEHIRE_KEY in the environment, or pass --api-key for one command. Never use login in unattended runs.What should an agent run first?
What should an agent run first?
staplehire doctor -q to confirm version, key source, API URL, and a live API validation, then staplehire commands to discover the command tree.Where does the skill get installed?
Where does the skill get installed?
Into the agent roots in your current project —
.agents/skills/staplehire, .claude/skills/staplehire, and/or .cursor/skills/staplehire. If none exist, the CLI creates .agents/skills.Should I use `--copy` or symlinks?
Should I use `--copy` or symlinks?
Symlinks (the default) keep one source of truth. Use
--copy when your environment can’t follow symlinks (some sandboxes and CI runners).