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

# Build with an AI coding agent

> Install the Plivo Voice XML skill so Claude Code, Cursor or Codex write the XML your answer URL returns: IVRs, call routing, recording, conferences, and the errors that break a call.

Plivo publishes a skill for AI coding agents such as Claude Code, Cursor and Codex. Install it once, and your agent knows how to write and fix the XML your answer URL returns: which element does what, what may nest inside what, which URL receives which parameters, and why a call failed with 8011 or 8012. A skill is a set of instructions your agent loads on its own when the task matches, so you keep working the way you already do.

## Install

```bash theme={null}
npx skills add https://www.plivo.com/docs --skill plivo-voice-xml
```

That installs into every coding agent it finds. To pick one:

<CodeGroup>
  ```bash Claude Code theme={null}
  npx skills add https://www.plivo.com/docs --skill plivo-voice-xml --agent claude-code
  ```

  ```bash Cursor theme={null}
  npx skills add https://www.plivo.com/docs --skill plivo-voice-xml --agent cursor
  ```

  ```bash Codex theme={null}
  npx skills add https://www.plivo.com/docs --skill plivo-voice-xml --agent codex
  ```
</CodeGroup>

Skills install at project scope by default, which puts them in your repository so teammates and cloud agents get the same setup. Add `--global` to install once for every project.

| Agent       | Where the skill lands                                                 |
| ----------- | --------------------------------------------------------------------- |
| Claude Code | `.claude/skills/` in the project, `~/.claude/skills/` with `--global` |
| Cursor      | `.agents/skills/` in the project, `~/.cursor/skills/` with `--global` |
| Codex       | `.agents/skills/` in the project, `~/.codex/skills/` with `--global`  |

Any tool that follows the [Agent Skills](https://agentskills.io) standard reads the same file.

### Read it before you install

The skill is a plain Markdown file. Open it yourself, or give the URL to your agent.

<Card title="plivo-voice-xml" icon="file-code" href="https://www.plivo.com/docs/.well-known/agent-skills/plivo-voice-xml/skill.md">
  The full skill file, published from this documentation site.
</Card>

Every Plivo skill is listed in the [skills index](https://www.plivo.com/docs/.well-known/agent-skills/index.json), with a SHA-256 digest so your agent can verify what it downloaded.

## What is in the skill

| Section                   | What it holds                                                                                                         |
| ------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| The answer URL contract   | What Plivo sends you, what it expects back, and what happens when you return the wrong thing                          |
| Every element             | All sixteen elements with their attributes, defaults and allowed values                                               |
| Nesting and ordering      | What may sit inside what, and the ordering rules that silently change behaviour                                       |
| Callbacks and action URLs | Which URL receives which parameters, `action` compared with `callbackUrl`, signature validation, timeouts and retries |
| Failure codes             | 8011, 8012, 8013, 8014 and the 7011 family, each with the shape that causes it and the fix                            |
| Patterns                  | Worked flows: keypad menus, call forwarding, screening, voicemail, conferences, and the XML around a voice bot        |
| Templates                 | Ready XML documents to copy and edit                                                                                  |

## What the agent does with it

1. **Asks what the call should do** before writing anything, because the same flow written two ways behaves differently.
2. **Writes valid XML the first time,** with the right attributes and the ordering rules applied, instead of XML that parses but misbehaves.
3. **Explains what each URL will receive,** so your handler reads the right parameters and validates the signature.
4. **Diagnoses a failed call from its code.** It maps 8011 or 8012 to the shape that causes it and names the fix, rather than guessing at your XML.

## What it will not do

* It does not cover WebSocket voice bots. For `<Stream>`, use [the Audio Streaming skill](/docs/voice-agents/audio-streaming/integration-guides/ai-coding-agent).
* It does not cover AI platforms connected over SIP. For LiveKit, ElevenLabs, Retell or Vapi, use [the SIP trunking skill](/docs/voice-agents/sip-trunking/integration-guides/ai-coding-agent).
* It does not cover SMS, WhatsApp or the browser SDK.
* It does not invent elements or attributes. Where the documentation does not answer a question, it says so instead of guessing.
* It cannot see your account or your server. It works on the XML and tells you what to check.

## Verify it is working

In the project where you installed it, ask your agent:

> My IVR plays the greeting but the keypad menu never fires. Here is my XML.

You should get a check of the element ordering and the `action` URL before anything else, with the specific rule that applies, not general XML advice. If you get generic advice with no reference to Plivo elements, the skill did not load.

## Keeping it current

The published skill tracks this documentation. Your local copy does not update itself:

```bash theme={null}
npx skills update plivo-voice-xml
```

<Warning>
  An installed skill runs with your agent's permissions. Read the file before installing it, and treat a skill from a source you do not trust the way you would treat a shell script.
</Warning>

## Related

<CardGroup cols={2}>
  <Card title="XML overview" href="/docs/voice/xml/overview">
    The same material for a human reader
  </Card>

  <Card title="Audio Streaming skill" href="/docs/voice-agents/audio-streaming/integration-guides/ai-coding-agent">
    For WebSocket voice bots
  </Card>

  <Card title="SIP trunking skill" href="/docs/voice-agents/sip-trunking/integration-guides/ai-coding-agent">
    For LiveKit, ElevenLabs, Retell and Vapi
  </Card>

  <Card title="Plivo CLI" href="https://github.com/plivo/plivo-cli">
    Make calls and debug them from the terminal
  </Card>
</CardGroup>
