CLItrail Docs

Set up with your agent

The clitrail-setup skill teaches a coding agent where the CLItrail tag goes in your framework, where the hook goes for each install path and which destinations fit the tags already on your site. It writes a setup guide first and asks before it edits anything.

#What the skill does

  1. Runs a read-only detector over your website repository (and your CLI’s, if you point it there): the framework, the layout or head file, any Content-Security-Policy, cookie-consent managers, the analytics tags already present, the pages that show install commands, and your install paths.
  2. Writes CLITRAIL_SETUP.md with the exact changes: the tag in your framework’s idiom, consent and CSP edits, the hook call for each install path, the destinations to add and how to verify it end to end.
  3. Asks you before it edits files, then makes the changes you approve.

#Claude Code

In the dashboard, Setup → Make my agent do it shows both commands and a prompt with your website’s details filled in. To install the skill for your user, into ${CLAUDE_CONFIG_DIR:-~/.claude}/skills/clitrail-setup:

curl -fsSL https://YOUR_SERVICE/skills/clitrail-setup/install.sh | sh

Or only for the project in the current folder, into ./.claude/skills/clitrail-setup:

curl -fsSL https://YOUR_SERVICE/skills/clitrail-setup/install.sh | sh -s -- --project

The installer downloads every file of the skill into a temporary folder and checks its size and its SHA-256, both written into the installer, with sha256sum, shasum or openssl, whichever exists (without any of them it says the hashes cannot be checked). Only then does it move the files into place and print what it installed. It never runs anything it downloaded; if a download fails or a file does not match, it stops with an error and installs nothing. The file list and hashes are also published at /skills/clitrail-setup/manifest.json.

Then give Claude Code the prompt from the dashboard. It looks like this, with your values:

Use the clitrail-setup skill to add CLItrail to this project. Service: https://YOUR_SERVICE. Website ID: YOUR_WEBSITE_ID. Website: https://acme.dev. Additional domains: https://docs.acme.dev. Destinations: none yet. Install paths (one hook each): Install script (ip_4c1f0a9e3b7d2c6e8f10, Shell script). Write CLITRAIL_SETUP.md with the exact changes, then ask me before editing files.

#Other agents

Any agent that can read URLs can follow the same skill. The dashboard’s Other agents tab gives a prompt that starts like this, followed by the same values:

Read https://YOUR_SERVICE/skills/clitrail-setup/SKILL.md and the reference files it links (same base URL: https://YOUR_SERVICE/skills/clitrail-setup/), then add CLItrail to this project.

#What the agent will and won’t touch

  • Will: your layout or head file, your CSP and consent code, your installer script, package scripts or CLI entry point, and CLITRAIL_SETUP.md, after you approve.
  • Won’t: change your install command or add tracking parameters to your links, run your installer, sign in to CLItrail for you, or create destinations.

#Privacy

No secrets are included in the prompt, and your agent never needs API secrets or access tokens: those stay in Destinations, where you paste them yourself. The service address and website ID in the prompt are public; they are written into the tag on your website anyway.