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

# Agent skill

> Connect Plain to AI coding agents like Claude Code, Codex, Amp, and OpenCode using the Plain Support Skill.

The [Plain Support Skill](https://github.com/team-plain/skills) gives AI tools direct access to your Plain workspace via the GraphQL API.

Once installed, your agent can read customers, threads, thread timelines, Help Center articles, and more.

The skill uses your Plain API key to authenticate, so the agent will only have access to what that API key permits.

<Frame>
  <img src="https://mintcdn.com/plain/esnLSCL6AbjPxXFS/public/images/agent-skill.png?fit=max&auto=format&n=esnLSCL6AbjPxXFS&q=85&s=aa6516881600abcc61b971eb0c49d2d4" alt="Agent skill in Plain" width="2400" height="1600" data-path="public/images/agent-skill.png" />
</Frame>

## Compatible agents

The Plain Support Skill follows the open [Agent Skills specification](https://skills.sh) and works with any compatible agent, including:

* [Claude Code](https://code.claude.com)

* [OpenAI Codex](https://openai.com/codex/)

* [Amp](https://ampcode.com)

* [OpenCode](https://opencode.ai)

* [Cursor](https://cursor.com)

* And [many more](https://skills.sh/docs/faq)

## Installation

Install the skill using the skills CLI:

```bash theme={null}
npx skills add team-plain/plain-support
```

The installer will ask which agent(s) you want to install to. You can also specify the agent directly:

```bash theme={null}
npx skills add team-plain/plain-support -a claude-code
npx skills add team-plain/plain-support -a codex
npx skills add team-plain/plain-support -a opencode
```

Alternatively, you can clone the repository manually:

```bash theme={null}
git clone git@github.com:team-plain/plain-support.git
```

## Prerequisites

### API key

In Plain, go to **Settings → Machine users & API keys** and create an API key. Then set it as an environment variable:

```bash theme={null}
export PLAIN_API_KEY="plainApiKey_..."
```

Add this to your shell profile (`.bashrc`, `.zshrc`, etc.) so it persists across sessions.

### Dependencies

The skill requires `curl` and `jq`. On most systems `curl` is already installed. For `jq`:

```bash theme={null}
# macOS
brew install jq

# Ubuntu/Debian
sudo apt-get install jq
```

## What you can do

| Resource         | Read                                        | Write                             |
| ---------------- | ------------------------------------------- | --------------------------------- |
| **Customers**    | List, get, search by name/email/external ID | None                              |
| **Threads**      | List, get, search, read full timeline       | Add internal notes                |
| **Help Center**  | List centers, articles, groups              | Create/update articles and groups |
| **Companies**    | List, get                                   | None                              |
| **Tenants**      | List, get                                   | None                              |
| **Labels**       | List                                        | None                              |
| **Tiers & SLAs** | List, get with SLA configs                  | None                              |
| **Workspace**    | Get info                                    | None                              |

## Use case examples

* **Debug a customer issue end to end:** Ask your agent to look up a customer, read their thread timeline, and summarize the conversation. Then use that context to investigate the bug in your codebase and put up a fix, all in one session.

* **Research customer history before a call:** "Show me everything about customer [john@acme.com](mailto:john@acme.com)". The agent will pull their profile, open threads, and recent conversations so you're fully briefed.

* **Add investigation notes:** After debugging an issue, tell the agent to add your findings as an internal note on the thread so your team has context.

* **Draft Help Center content:** Ask the agent to create a new Help Center article based on patterns it sees in support threads. It can write the HTML content and publish it directly to your Plain Help Center.

* **Ad hoc analysis:** "Which customers are in the Enterprise tier?" or "Show me all open threads with priority 0". Query your support data conversationally.

## Example prompts

* "What are the open support threads for customer [john@example.com](mailto:john@example.com)?"

* "Read the full conversation on thread th\_01ABC and summarize it"

* "Add a note to thread th\_01ABC with my investigation findings"

* "Create a Help Center article about how to reset passwords"

* "Which customers are in the Enterprise tier?"

* "List my open threads"
