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

# Claude Code Agents

> AI agents that automate PlayCamp SDK integration in your game server

PlayCamp provides [Claude Code](https://claude.ai/code) agents that automate SDK integration. Instead of manually writing API calls, you can describe what you need in natural language — the agent will install the SDK, implement APIs, configure webhooks, and verify your setup.

## Supported Categories

One all-in-one agent per language. Each agent covers the full integration lifecycle — setup, mandatory + extended APIs, webhooks, raw-HTTP migration, code audit, and build verification.

| Category     | Agent                  | Description                                            |
| ------------ | ---------------------- | ------------------------------------------------------ |
| **Node SDK** | `@agent-playcamp-node` | Integration with `@playcamp/node-sdk`                  |
| **Go SDK**   | `@agent-playcamp-go`   | Integration with `github.com/playcamp/playcamp-go-sdk` |
| **API**      | `@agent-playcamp-api`  | Direct HTTP API guide for Python, Java, C#, PHP, etc.  |

## Quick Start

<Steps>
  <Step title="Install agents">
    Run the installer in your game server project:

    ```bash theme={null}
    cd your-game-server
    bash <(curl -fsSL https://raw.githubusercontent.com/PlayCamp/playcamp-sdk-agents/main/scripts/install.sh)
    ```
  </Step>

  <Step title="Launch Claude Code">
    ```bash theme={null}
    claude
    ```
  </Step>

  <Step title="Ask">
    ```
    Integrate PlayCamp SDK with sponsor, coupon, and payment APIs
    ```

    The agent automatically sets up the SDK, implements the required APIs, and configures error handling.
  </Step>
</Steps>

## Install Options

```bash theme={null}
# Install to current project (default)
bash <(curl -fsSL https://raw.githubusercontent.com/PlayCamp/playcamp-sdk-agents/main/scripts/install.sh)

# Install globally (~/.claude/agents/)
bash <(curl -fsSL ...install.sh) --global

# Install specific category only
bash <(curl -fsSL ...install.sh) --platform=node
bash <(curl -fsSL ...install.sh) --platform=go
bash <(curl -fsSL ...install.sh) --platform=api

# Uninstall (removes agents + routing rules from CLAUDE.md)
bash <(curl -fsSL ...install.sh) --uninstall
```

## Agents

Each agent is a single, comprehensive agent that handles every role for its language. Just describe what you need — the agent selects the right mode.

| Mode          | What it does                                                                                                   |
| ------------- | -------------------------------------------------------------------------------------------------------------- |
| **Integrate** | SDK install, client init, mandatory + extended APIs (sponsors, coupons, payments, playtime, WebView OTT, bulk) |
| **Webhooks**  | Endpoint setup, signature verification, batch event handling (7 event types)                                   |
| **Migrate**   | Convert raw HTTP (fetch/axios, `net/http`) to SDK methods                                                      |
| **Audit**     | Read-only code review for correctness, security, and best practices                                            |
| **Verify**    | Build/compile, dependency, and environment-config checks                                                       |

### `@agent-playcamp-node` — Node SDK

Covers `@playcamp/node-sdk`: setup & client init, mandatory APIs (sponsor/coupon/payment), playtime sessions, bulk payments, WebView OTT, webhook reception & signature verification, raw HTTP → SDK migration, code audit, and TypeScript build/config verification.

### `@agent-playcamp-go` — Go SDK

Same coverage for `github.com/playcamp/playcamp-go-sdk`, with Go idioms — `errors.As()`, `context.Context`, pointer helpers, `webhookutil.Verify()` signature verification, and `go build`/`go vet` verification.

### `@agent-playcamp-api` — Direct HTTP API

For non-SDK languages (Python, Java, C#, PHP, Ruby, curl): endpoint docs, Bearer auth, request/response examples, webhook verification, and error handling.

## Usage Examples

### Node.js

```
Set up PlayCamp SDK in my Express server with payment, coupon, and sponsor endpoints
```

```
Add PlayCamp webhook handling with signature verification to my server
```

```
Record sponsored players' playtime sessions with PlayCamp
```

```
Review my PlayCamp integration for security issues, then verify the build
```

### Go

```
Set up PlayCamp Go SDK in my server with sponsor, coupon, and payment APIs
```

```
Add PlayCamp webhook verification to my Go server using webhookutil
```

### Direct API Integration (non-SDK)

```
Show me how to integrate PlayCamp payment API in Python
```

```
Set up PlayCamp sponsor and coupon APIs in my Java server
```

### Migration

```
Migrate my raw fetch() calls to PlayCamp SDK methods
```

```
Migrate my net/http PlayCamp calls to the Go SDK
```

### Explicit Agent Invocation

You can also call the agent directly by name:

```
Use @agent-playcamp-node to integrate PlayCamp SDK with server key configuration
```

```
Use @agent-playcamp-go to set up webhook endpoints and verify the build
```

## Recommended Workflow

A full integration runs through one agent, switching modes as you ask:

```mermaid theme={null}
flowchart LR
  A[Integrate] --> B[Webhooks]
  B --> C[Audit]
  C --> D[Verify]
```

1. **Integrate** — install SDK, initialize clients, implement mandatory + extended APIs
2. **Webhooks** — configure webhook endpoints and signature verification
3. **Audit** — review the full integration for correctness and security (read-only)
4. **Verify** — validate build, config, and environment setup

<Tabs>
  <Tab title="Node.js">
    Use `@agent-playcamp-node` for every step. For a migration, start with *"Migrate my raw fetch/axios calls to the PlayCamp SDK"*, then ask it to audit and verify.
  </Tab>

  <Tab title="Go">
    Use `@agent-playcamp-go` for every step. For a migration, start with *"Migrate my raw net/http calls to the PlayCamp Go SDK"*, then ask it to audit and verify with `go build`/`go vet`.
  </Tab>
</Tabs>

The same agent handles each step — no hand-off between separate agents required.

## How It Works

The installer adds the agent file to `.claude/agents/` and appends routing rules to your project's `CLAUDE.md`. When you ask Claude Code about PlayCamp integration, the routing rules automatically delegate to the correct language agent.

```
User: "Add PlayCamp payment processing"
  → Claude reads CLAUDE.md routing rules
    → Delegates to @agent-playcamp-node (or -go / -api)
      → Agent implements payment API with SDK
```

<Info>
  Agents have full access to read, write, and edit files in your project. They can install npm/Go packages, create modules, and modify your server code. In Audit and Verify modes the agent only reads and reports — it does not modify code.
</Info>
