AI agent integration
fore ships an agent skill so AI coding tools — today, Claude Code — can drive the foreai platform on your behalf. Because the CLI's command tree mirrors the whole backend, an agent that knows how to run fore can create test cases, kick off runs, inspect results, and more, all through natural-language requests.
Install the skill
fore skill install --user
This copies the skill into Claude Code's config directory and offers to wire in a safety hook (see Guardrails below).
--userinstalls to~/.claude/skills/forecli/so the skill is available in every project.- Without
--user, it installs to the current project's./.claude/skills/forecli/— the conventional scope for tool-specific instructions. -p PATHinstalls to an explicit directory.
Non-interactive flags are available for scripting: --with-hook / --no-hook decide the guardrails hook without prompting, and -y / --yes accepts all defaults.
To remove it:
fore skill uninstall --user
This deletes the skill files and unwires the guardrails hook from the matching settings.json.
How the agent uses it
Once installed, the skill teaches the agent the same workflow a human follows:
- Discover before acting — run
fore <group> --helpto confirm a command and its flags exist rather than guessing. - Call endpoints — map path parameters to positional arguments and query/body fields to
--flags, using--json-filefor complex bodies. - Read results from stdout — JSON on stdout, errors on stderr.
You can then just ask, in plain language: "list the test suites in the Acme org" or "create a checkout-flow test case in suite X and run it", and the agent translates that into the right fore commands.
Resolving IDs to names
Most foreai resources are addressed by UUID, which is opaque to humans. The skill instructs the agent to always pair a UUID with its human-readable name when talking to you — for example "checkout flow" (4b1f0c3e-…) — so you can confirm which resource is about to be touched. The agent resolves names from the response payload or a sibling get-* endpoint before reporting back or confirming a change.
Guardrails
Letting an agent run a CLI that can mutate platform state calls for safety rails. The skill provides two layers:
-
Confirmation rules. Read-only commands (
--help,get-*,whoami,refresh,login,logout) are safe to run freely. Any mutating command —post-*,put-*,patch-*,delete-*, or anything using--json-body/--json-file— requires the agent to show you the exact command and get an explicit go-ahead first. A blanket "yes" earlier in the session does not authorize new mutations. -
The mutation-guard hook. During install you can opt into a
PreToolUsehook that forces Claude Code to pause and confirm everyforemutation — even under--dangerously-skip-permissions. It's registered in thesettings.jsonnext to where the skill is installed (~/.claude/settings.jsonfor--userinstalls), so it applies wherever that config is active. Treat its prompt as the canonical confirmation gate; don't work around it.
The skill also instructs the agent to never print live tokens (e.g. via --show-token) into chat logs or files, and to never hand-edit credentials.json — auth changes go through fore login.