Persimmon AI = the Anthropic Claude SDK funneled through one wrapper, prompts kept in one library, and RAG grounded on pgvector. This mother is a map; follow the child for the actual work.
Trigger
"Add AI to this feature" / "Call Claude for…"
"Write the prompt for…" / "Where do prompts live?"
Writing a prompt? → ai-prompt-library (no inline prompt strings).
Need grounded context? → ai-rag-retrieval (uses data-prisma-pgvector for the vector store).
Persimmon AI defaults — one-screen summary
One wrapper. All Claude traffic through src/lib/ai/claude.ts. Never import the SDK elsewhere.
One prompt home. All prompts in src/lib/ai/prompts.ts. No inline prompts in business logic.
Model routing: Sonnet for classification / per-item / volume; Opus only for genuine deep reasoning (composition, multi-doc synthesis).
Prompt caching (cache_control: { type: "ephemeral" }) on stable system/doctrine blocks meeting the per-model minimum (Sonnet 4.6 = 2,048 tokens; Opus 4.6 / Haiku 4.5 = 4,096). Below the threshold it silently no-ops.
Retries: 3 with exponential backoff (1s → 4s → 16s); SDK default of 2 is too low under 529 load.
Persist every AI output. Never regenerate if a result exists — expensive and non-deterministic.
Anti-patterns banned
Importing @anthropic-ai/sdk outside the wrapper
Inline prompt strings in components/actions
Opus where Sonnet suffices (cost)
Regenerating an existing AI result
Ungrounded generation when a RAG citation is required (see legal-brief-composer)
Relationship to other mothers
Mother
Connection
data
RAG vector store lives in pgvector via data-prisma-pgvector
domain-legal
Legal generation is RAG-grounded; uses ai-* under the hood
quality
Prompt hygiene/output checked by quality-review-prompt-output
1---2name: ai3description: AI — Index4---56# AI — Index78Persimmon AI = the Anthropic Claude SDK funneled through one wrapper, prompts kept in one library, and RAG grounded on pgvector. This mother is a map; follow the child for the actual work.910## Trigger1112- "Add AI to this feature" / "Call Claude for…"13- "Write the prompt for…" / "Where do prompts live?"14- "Retrieve context" / "RAG" / "embed and search"1516## The child skills1718| Skill | When to use | Owns |19|---|---|---|20| `ai-sdk-wrapper` | Any Claude call, or fixing retry/cost/caching | `src/lib/ai/claude.ts` — retries (3, exp backoff), prompt caching, model routing (`pickModel`), token accounting, streaming |21| `ai-prompt-library` | Writing/editing any prompt | `src/lib/ai/prompts.ts` — centralized prompt templates; no inline prompt strings in business logic |22| `ai-rag-retrieval` | Retrieval-augmented features | Chunking, embedding, pgvector retrieval, reranking, citation grounding |2324## How to route25261. **Calling Claude?** → `ai-sdk-wrapper` (always — never import `@anthropic-ai/sdk` directly elsewhere).272. **Writing a prompt?** → `ai-prompt-library` (no inline prompt strings).283. **Need grounded context?** → `ai-rag-retrieval` (uses `data-prisma-pgvector` for the vector store).2930## Persimmon AI defaults — one-screen summary3132- **One wrapper.** All Claude traffic through `src/lib/ai/claude.ts`. Never import the SDK elsewhere.33- **One prompt home.** All prompts in `src/lib/ai/prompts.ts`. No inline prompts in business logic.34- **Model routing**: Sonnet for classification / per-item / volume; Opus only for genuine deep reasoning (composition, multi-doc synthesis).35- **Prompt caching** (`cache_control: { type: "ephemeral" }`) on stable system/doctrine blocks meeting the per-model minimum (Sonnet 4.6 = 2,048 tokens; Opus 4.6 / Haiku 4.5 = 4,096). Below the threshold it silently no-ops.36- **Retries**: 3 with exponential backoff (1s → 4s → 16s); SDK default of 2 is too low under 529 load.37- **Persist every AI output.** Never regenerate if a result exists — expensive and non-deterministic.3839## Anti-patterns banned4041- Importing `@anthropic-ai/sdk` outside the wrapper42- Inline prompt strings in components/actions43- Opus where Sonnet suffices (cost)44- Regenerating an existing AI result45- Ungrounded generation when a RAG citation is required (see `legal-brief-composer`)4647## Relationship to other mothers4849| Mother | Connection |50|---|---|51| `data` | RAG vector store lives in pgvector via `data-prisma-pgvector` |52| `domain-legal` | Legal generation is RAG-grounded; uses `ai-*` under the hood |53| `quality` | Prompt hygiene/output checked by `quality-review-prompt-output` |
Run npx skillmds@latest add persimmon-automation-labs/ai in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
AI — Index It is listed under Coding & Dev Tools on SkillMD.
This skill has not completed SkillMD's automated safety review yet. Capability flags: reads secrets. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Persimmon-Automation-Labs (@persimmon-automation-labs) published this skill. Their other Agent Skills are listed on their SkillMD profile.