> ## Documentation Index
> Fetch the complete documentation index at: https://docs.waniwani.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent Skills

> Install the Waniwani SDK skill for Claude Code, Cursor, and other AI agents.

The Waniwani SDK is available as an [agent skill](https://agentskills.io) for Claude Code, Cursor, GitHub Copilot, and 20+ other AI coding agents. Once installed, your agent knows how to integrate the SDK without you having to explain the API.

> [card] [Waniwani SDK](#waniwani-sdk)
>
> Tracking, flows, widgets, knowledge base, and chat components.

> [card] [Instrument tracking](#instrument-tracking)
>
> Auto-insert funnel events across your flows.

> [card] [Audit tracking](#audit-tracking)
>
> Verify events are valid and find missing funnel events.

> [card] [OpenAI Submission](#openai-app-submission)
>
> Generate Tool Justification and Test Cases for the ChatGPT Plugin Store.

## Waniwani SDK

### Install

```bash npx theme={null}
npx skills add Waniwani-AI/sdk -s waniwani-sdk
```

```bash bunx theme={null}
bunx skills add Waniwani-AI/sdk -s waniwani-sdk
```

The skill is installed into your project's `.claude/skills/` directory (or equivalent for other agents).

### What's included

The skill teaches your agent how to:

* **Set up the SDK** -- install, configure env vars, create a client singleton
* **Track events** -- `withWaniwani` auto-tracking, custom events, sessions
* **Build flows** -- multi-step conversational state machines with interrupts, validation, conditional edges
* **Create tools with widgets** -- register a tool and its widget resource on the MCP server, and track from inside the widget with `useWaniwani`
* **Add a knowledge base** -- ingest markdown, search with embeddings, build FAQ tools
* **Embed chat** -- React component and script-tag embed with theming

### Usage

After installing, just describe what you want in natural language. Your agent will use the skill automatically:

* *"Add Waniwani tracking to my MCP server"*
* *"Create a multi-step onboarding flow"*
* *"Add a knowledge base FAQ tool"*
* *"Embed a chat widget on my landing page"*

## Instrument tracking

Applies the [placement rules](https://docs.waniwani.ai/sdk/tracking/instrumentation.md) to your codebase: inventories your flows, maps every node to the event taxonomy, and inserts guarded tracking calls with metadata read from your flow state.

```bash npx theme={null}
npx skills add Waniwani-AI/sdk -s instrument-tracking
```

```bash bunx theme={null}
bunx skills add Waniwani-AI/sdk -s instrument-tracking
```

Then ask your agent:

* *"Instrument tracking across my flows"*
* *"Track qualified leads in my demo flow"*

## Audit tracking

The read-only counterpart to instrument-tracking. It fetches the latest [event definitions](https://docs.waniwani.ai/sdk/tracking/events.md) from these docs, inventories every tracking call across your server, flows, widgets, and chat embed, verifies that only events from the defined taxonomy are sent, and reports missing funnel events with a suggested payload for each. Run it before instrumenting, or as a periodic health check.

```bash npx theme={null}
npx skills add Waniwani-AI/sdk -s audit-tracking
```

```bash bunx theme={null}
bunx skills add Waniwani-AI/sdk -s audit-tracking
```

Then ask your agent:

* *"Audit the tracking in this MCP"*
* *"Are we sending any events that aren't defined?"*
* *"Which funnel events are we missing?"*

It reports violations (undefined or manually sent auto-events), risks (unguarded calls, wrong import entry), a per-flow coverage map, and the missing events. It never edits code; pair it with instrument-tracking to apply the fixes.

## OpenAI App Submission

When submitting your MCP server to the ChatGPT Plugin Store, you need to provide Tool Justification and Test Cases documents. The Waniwani dashboard handles this for you: go to your project's submission page and use the built-in Codex assistant to generate a `chatgpt-app-submission.json` file, then upload it to auto-fill the form.

The generated file includes:

1. **Tool Justification** -- annotations (Read Only, Open World, Destructive) with justifications for every tool
2. **Test Cases** -- positive and negative test scenarios for OpenAI reviewers

## Learn more

* [skills.sh](https://skills.sh) -- Browse and discover agent skills
* [agentskills.io](https://agentskills.io) -- The open Agent Skills specification


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.