SegOps AIDocs

Install with Claude Code (2 minutes)

The fastest way to add SegOps to an app is to let an AI coding agent do it. The **SegOps skills** wire the right SDK into your stack — install the package, set up the keys/env, drop in the provider or server client, and emit a test event — so you go from nothing to your first event in minutes.

1. What you need first#

  • A SegOps workspace and an API key from Settings → API Keys:
    • a public key (pk_…) for browser/mobile apps (safe to ship), and/or
    • a secret key (sk_…) for server-side code (never ship this to a client).
  • Your API base URL. Point it at your SegOps stack — http://localhost:8000 for local dev, or your deployment URL. (The hosted api.segops.ai endpoint is rolling out; until then, use your own stack URL — the skills never hardcode an endpoint.)

2. Install the skills#

The skills ship as a Claude Code plugin (segops) in the public github.com/segops/skills catalog. Add the marketplace and install it:

/plugin marketplace add segops/skills
/plugin install segops@segops

That's it — the skills are now available (namespaced as /segops:<name>), and Claude invokes the right one automatically when your request matches.

Just want one skill? Each skill is a plain SKILL.md directory, so you can copy a single one instead:

bash
git clone https://github.com/segops/skills.git
cp -r skills/plugins/segops/skills/integrate-nextjs ~/.claude/skills/

It's then available as /integrate-nextjs.

3. Paste one prompt#

Paste the prompt for your stack (or call the skill directly, e.g. /segops:integrate-nextjs):

Your stackPrompt
Next.js"Use the integrate-nextjs skill to add SegOps to my app."
React (Vite/CRA)"Use the integrate-react skill to add SegOps."
Node.js (server)"Use the integrate-node skill to add SegOps tracking."
iOS (Swift)"Use the integrate-ios skill to add SegOps."
Android (Kotlin)"Use the integrate-android skill to add SegOps."
Shopify"Use the shopify-install skill to connect my store."

The skill will ask for your API URL and key, make the changes, and finish by sending a segops_smoke_test event. Confirm it in SegOps → Event Sandbox.

4. Do more from a prompt#

Beyond integration, skills cover common workflows (these use a server-side sk_ key via the Admin SDK):

GoalPrompt
Build an audience"Use create-segment to build a segment of users who spent over €500 but haven't ordered in 30 days."
Track a new event"Use track-event to add a checkout_completed event."
Generate a landing page"Use generate-landing-page for 'best running shoes for flat feet'."
Audit AI visibility"Use audit-ai-visibility to check how we show up for 'best CRM for startups'."
One-off admin script"Use admin-script to import products.csv."

Prefer to wire it by hand?#

Every skill is a thin layer over the published SDKs — you can do the same steps manually:

Troubleshooting#

SymptomFix
Browser warns about an sk_ keyUse the public key (pk_…) in client code; keep secret keys server-side.
Test event never appearsCheck the API URL is reachable from where the code runs and the stack is up.
Session mint returns 401/403The public key is wrong/disabled, or the app's origin isn't allow-listed on the key.
Events show anonymousWire the signing endpoint and call the SDK's setUser / userProvider after login.