# setting-up-a-custom-rest-source

setting-up-a-custom-rest-source — a skill for Claude Code and Codex that links arbitrary REST APIs to the PostHog data warehouse using a JSON manifest. Activates when importing custom endpoints without native connectors.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 199 installs · ★ 101 repo stars
- Author: PostHog
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/setting-up-a-custom-rest-source/SKILL.md
- Updated: 2026-11-16
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/setting-up-a-custom-rest-source

## What it does

This skill authors a `RESTAPIConfig` manifest for PostHog custom data warehouse sources without requiring bespoke backend scripts. It first runs `external-data-sources-wizard` to confirm that PostHog lacks an out-of-the-box connector for the targeted API. When no native connector exists, the skill builds the configuration covering auth modes, pagination strategies, JSONPath record extraction, and incremental update cursors.

The workflow validates credentials and resource schemas with `external-data-sources-db-schema`, then samples live rows via `external-data-sources-preview-resource` to confirm field mappings. Authentication secrets are never placed inside `manifest_json`: keys such as `auth_token` or `auth_api_key` are submitted in isolated payload fields and redacted by the platform.

Custom sources operate under beta limits: each manifest can specify at most 50 resources, with a ceiling of 5 custom sources per project. Drafting manifests automatically with `external-data-sources-draft-custom-manifest` requires the PostHog AI builder enabled for the organization.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill setting-up-a-custom-rest-source -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/setting-up-a-custom-rest-source/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/setting-up-a-custom-rest-source/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill setting-up-a-custom-rest-source -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/setting-up-a-custom-rest-source/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill setting-up-a-custom-rest-source -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/setting-up-a-custom-rest-source/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install PostHog/ai-plugin skills/setting-up-a-custom-rest-source
```

2. **Manually: put the files in place**
- File: `.github/skills/setting-up-a-custom-rest-source/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill setting-up-a-custom-rest-source -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/PostHog/ai-plugin --path skills/setting-up-a-custom-rest-source
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/setting-up-a-custom-rest-source/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add PostHog/ai-plugin --skill setting-up-a-custom-rest-source -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/PostHog/ai-plugin/tree/HEAD/skills/setting-up-a-custom-rest-source/SKILL.md

## When to use it
- Ingest unsupported REST APIs into PostHog tables without Python glue code
- Generate valid RESTAPIConfig JSON structures from API documentation
- Test pagination and cursor paths against live records prior to source creation
- Configure incremental extraction cursors for custom API tables

## Example prompts
- Import our internal billing API into PostHog data warehouse using its docs
- Draft a custom REST source manifest for this third-party endpoint
- Validate this RESTAPIConfig manifest and sample live rows before creating the source

## Similar
- [setting-up-a-data-warehouse-source](https://affpapa.org/en/nevibecode/skills/setting-up-a-data-warehouse-source.md) — skill · 405 installs
- [suggesting-data-imports](https://affpapa.org/en/nevibecode/skills/suggesting-data-imports.md) — skill · 401 installs
- [tooluniverse-custom-tool](https://affpapa.org/en/nevibecode/skills/tooluniverse-custom-tool.md) — skill · 294 installs
- [retail-etl-pipeline-medallion](https://affpapa.org/en/nevibecode/skills/retail-etl-pipeline-medallion.md) — skill · 1800 installs
- [platform-custom-setting-generate](https://affpapa.org/en/nevibecode/skills/platform-custom-setting-generate.md) — skill · 1400 installs
- [deploying-custom-domain-rest-api](https://affpapa.org/en/nevibecode/skills/deploying-custom-domain-rest-api.md) — skill · 5800 installs

From the same set: [posthog/ai-plugin](https://affpapa.org/en/nevibecode/by/posthog/ai-plugin.md) — 82 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
