# ai-wrapper-product

Guides you through building a product around an AI API: prompts, token accounting, usage limits and output validation.

- skill · `type=skill` · Claude Code · 120 installs
- Author: davila7
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/business-marketing/ai-wrapper-product
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/skills/ai-wrapper-product

## What it does

The skill gives Claude the role of an AI product architect. It walks the typical wrapper stack: validate the input, fill a prompt template with context, call the API, parse and check the response, then hand back something a user can read. Ready-made JavaScript examples use `@anthropic-ai/sdk`, and a model table maps cost, speed and quality to the job at hand.

Money gets its own section. You log `input_tokens` and `output_tokens` per call, compute cost from per-million rates, and cut a user off at a monthly ceiling. Quality control is covered too: a strict JSON shape in the system prompt, parsing with a fallback path, retries on failure, and a second model when the first one misbehaves.

The anti-patterns list is where the skill earns its place. A thin wrapper with no domain logic has no pricing power, and costs you never tracked show up once traffic grows. If your plan is to forward the request and return the raw text, the skill calls that a dead end. It pairs with `llm-architect`, `micro-saas-launcher`, `frontend` and `backend`.

## Install

### Claude Code (native platform)

1. **claude-code-templates**
```bash
npx claude-code-templates@latest --skill business-marketing/ai-wrapper-product
```

2. **Skills CLI (Vercel)**
```bash
npx skills add davila7/claude-code-templates --skill ai-wrapper-product -a claude-code
```

3. **Manually: put the files in place**
- File: `~/.claude/skills/ai-wrapper-product/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ai-wrapper-product/

### Codex

**Manually: put the files in place**
- File: `.agents/skills/ai-wrapper-product/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

**Manually: put the files in place**
- File: `.cursor/skills/ai-wrapper-product/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install davila7/claude-code-templates ai-wrapper-product
```

2. **Manually: put the files in place**
- File: `.github/skills/ai-wrapper-product/SKILL.md`

### Gemini CLI

**Platform CLI**
```bash
gemini skills install https://github.com/davila7/claude-code-templates --path cli-tool/components/skills/business-marketing/ai-wrapper-product
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ai-wrapper-product/SKILL.md` — The legacy .windsurf/skills/ path still works

### 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/davila7/claude-code-templates/tree/HEAD/cli-tool/components/skills/business-marketing/ai-wrapper-product

## When to use it
- design the wrapper stack from user input to final response
- compute per-call cost from token usage before margins disappear
- enforce a monthly spend limit per user
- force structured JSON output and parse it with a fallback
- pick a model that fits the task's budget and latency

## Example prompts
- Help me design an AI wrapper product for generating emails on the Anthropic API
- Add token tracking and a monthly cost limit per user
- The model sometimes returns invalid JSON — add validation with a fallback

## Similar
- [gtm-technical-product-pricing](https://affpapa.org/en/nevibecode/skills/gtm-technical-product-pricing.md) — skill · 1700 installs
- [ai-product](https://affpapa.org/en/nevibecode/skills/sickn33-ai-product.md) — skill · 960 installs
- [product-proof-saas](https://affpapa.org/en/nevibecode/skills/product-proof-saas.md) — skill · 1400 installs
- [pp-openrouter](https://affpapa.org/en/nevibecode/skills/pp-openrouter.md) — skill · 322 installs
- [migrate-static-to-wrapper](https://affpapa.org/en/nevibecode/skills/migrate-static-to-wrapper.md) — skill · 3300 installs
- [cost-management](https://affpapa.org/en/nevibecode/skills/cost-management.md) — skill · 4200 installs

From the same set: [davila7/claude-code-templates](https://affpapa.org/en/nevibecode/by/davila7/claude-code-templates.md) — 224 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
