> ## 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

<Info>
  Skills ship inside the [Plivo CLI](https://github.com/plivo/plivo-cli), so install it first:

  ```bash theme={null}
  brew install plivo/tap/plivo
  plivo login
  ```
</Info>

```bash theme={null}
plivo skill install voice-xml
```

The skill ships inside the CLI binary, so this writes it out with no network call and no other tooling.

It lands in Claude Code's skills directory by default. For another agent, name the directory:

<CodeGroup>
  ```bash Claude Code theme={null}
  plivo skill install voice-xml
  ```

  ```bash Cursor theme={null}
  plivo skill install voice-xml --dir ~/.cursor/skills/plivo-voice-xml
  ```

  ```bash Codex theme={null}
  plivo skill install voice-xml --dir ~/.codex/skills/plivo-voice-xml
  ```
</CodeGroup>

To see every skill in your binary and whether it is installed:

```bash theme={null}
plivo skill list
```

```
SELECTOR          INSTALLS TO             STATE          WHAT IT IS
cli               plivo-cli               installed      the CLI reference
audio-streaming   plivo-audio-streaming   not installed  connect a WebSocket voice bot to calls with <Stream>
sip-trunking      plivo-sip-trunking      not installed  connect an AI voice platform over SIP trunking
voice-xml         plivo-voice-xml         installed      write and fix Plivo Voice XML
```

`plivo skill install all` writes every one of them.

### Read it before you install

The skill is a plain Markdown file. Print it and read it before it goes anywhere near your agent:

```bash theme={null}
plivo skill install voice-xml --print | less
```

`--dry-run` shows where a file would be written without writing it.

## 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 skill ships with the CLI, so it moves when the CLI does. Upgrade the binary, then reinstall:

```bash theme={null}
plivo upgrade
plivo skill install voice-xml
```

`plivo skill list` marks a skill `installed (differs from bundled)` when your copy no longer matches the one in the binary, which is how you spot a stale or locally edited skill.

<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>
