Documentation menu

Agent skills

Two Agent Skills ship with SaaS Pro Max. A skill is a folder of markdown that teaches a coding agent a workflow: when to reach for it, what order to do things in, and what never to do. They load themselves when what you ask matches the skill's description — you do not invoke them by name.

Skill Triggers on What it does
saaspromax-integrate "add analytics", "set up error tracking", "wire pageviews", "install the SDK", "connect this app to saaspro.dev", "are events arriving?" Detects the framework, gets an application and a key, pastes the right snippets, wires identify / track / errors / metrics / a flag gate, and verifies events arrive
saaspromax-analyze "how did we do this week", "where do people drop out", "what is breaking", "is anything alerting", "how did MRR move" Gathers with the narrowest tools that can answer, then writes a report with every number attributed to the tool it came from

Prerequisite

A skill needs a way to reach the platform. Either:

  1. The MCP server — every tool name in the skills is an MCP tool name:

    claude mcp add saaspro --env SPM_TOKEN=spm_pat_xxxxxxxx -- npx -y @saaspro/mcp
    
  2. A personal access token exported as SPM_TOKEN, used against the Management API directly. Every tool has a matching endpoint and the workflow is identical.

Create a token at Account → Personal access tokens or Organization → Access tokens, scoped to the job: read for reporting and triage, write to create funnels, flags and alert rules or to resolve an issue, admin only when the agent will mint an ingest key during an integration.

Install

Into one repository, so the whole team gets it:

mkdir -p .claude/skills
cp -R skills/saaspromax-integrate .claude/skills/
cp -R skills/saaspromax-analyze   .claude/skills/

Or into your own account, for every project:

mkdir -p ~/.claude/skills
cp -R skills/saaspromax-integrate ~/.claude/skills/
cp -R skills/saaspromax-analyze   ~/.claude/skills/

Restart the agent so it re-reads the directory. Other hosts that implement the Agent Skills format read the same folders — check where yours looks.

saaspromax-integrate

The workflow, in order: reach the platform → detect the framework → get an application → get a key → install and wire → verify → report.

It carries a reference file per framework — Next.js App Router, Vite + React, Express, Hono, plain HTML, and the signed connector — each adapted from docs/sdk/recipes, so the snippets match the published SDK APIs rather than an approximation of them.

What it wires, in priority order: pageviews, identify on sign-in, two or three track calls on the actions that matter, error capture, one metric on a hot path, one feature flag gate. One real metric beats ten speculative ones, and the same is true of events.

It ends by loading a page and calling list_events. It will not report success from a clean build.

saaspromax-analyze

Four recipes: the weekly report, funnel drop-off diagnosis, error triage, and alert rules with thresholds derived from the last 30 days rather than from intuition.

Its rules are what make the output trustworthy:

  • Every number comes from a tool result, and the answer names the tool inline.
  • "No data" and "zero" are different answers, and it says which.
  • It does not assert a cause — it says what would explain the number and which call would confirm it.
  • It says what it could not see: a module that is off, a permission missing, a connector not configured.
  • Before any write — resolving an issue, creating an alert rule — it says what it is about to do.

Writing your own

The format is a folder with SKILL.md and YAML frontmatter:

---
name: my-skill
description: What it does, and the phrases that should trigger it.
---

# My skill

…

description is the whole routing mechanism: it is what the agent matches against a request, so write the trigger phrases a person would actually use, not a summary. Put anything long — per-framework snippets, output templates — in references/ and link to it, so the agent loads it only when it needs it.