{"id":"a8e55be4-23e8-435f-aa95-1dfca5526eeb","shortId":"pxzJ94","kind":"skill","title":"ai-product","tagline":"Expert in shipping production-grade AI-powered features — LLM integration patterns, RAG architecture, prompt engineering that scales, AI UX that users trust, safety and guardrails, streaming, and cost optimization.","description":"# AI Product Development\n\nExpert in shipping production-grade AI-powered features — LLM integration patterns, RAG architecture, prompt engineering that scales, AI UX that users trust, safety and guardrails, streaming, and cost optimization. Treats prompts as code, validates all outputs, and never trusts an LLM blindly.\n\n**Use when**: building AI features into a product, integrating LLMs, designing RAG pipelines, implementing AI safety/guardrails, optimizing AI costs, building AI UX patterns, prompt engineering for production, handling hallucinations, streaming LLM responses, or evaluating AI output quality.\n\n---\n\n## When This Skill Is Activated\n\n1. Read this file fully before proceeding\n2. Understand what AI feature the user is building\n3. Apply the relevant patterns below (integration, RAG, UX, safety, cost)\n4. Always address: output validation, error handling, cost awareness, user trust\n\n---\n\n## Core Principle\n\nDemos are easy. Production is hard. Every pattern below exists because something broke in production.\n\n---\n\n## LLM Integration Patterns\n\n### Structured Output with Validation\n\nNever parse free-text LLM output with regex. Use structured output modes and validate with a schema.\n\n```typescript\nimport { z } from \"zod\";\nimport OpenAI from \"openai\";\n\n// 1. Define your schema\nconst ProductReviewSchema = z.object({\n  sentiment: z.enum([\"positive\", \"negative\", \"neutral\"]),\n  score: z.number().min(0).max(10),\n  summary: z.string().max(200),\n  keyTopics: z.array(z.string()).max(5),\n});\n\ntype ProductReview = z.infer<typeof ProductReviewSchema>;\n\n// 2. Call with structured output\nconst openai = new OpenAI();\n\nasync function analyzeReview(reviewText: string): Promise<ProductReview> {\n  const response = await openai.chat.completions.create({\n    model: \"gpt-4o-mini\",\n    response_format: { type: \"json_object\" },\n    messages: [\n      {\n        role: \"system\",\n        content: `Analyze the product review. Return JSON matching this schema:\n          { sentiment: \"positive\"|\"negative\"|\"neutral\", score: 0-10, summary: string, keyTopics: string[] }`,\n      },\n      { role: \"user\", content: reviewText },\n    ],\n  });\n\n  const raw = JSON.parse(response.choices[0].message.content!);\n\n  // 3. Always validate — the model can return anything\n  const result = ProductReviewSchema.parse(raw);\n  return result;\n}\n```\n\n### Streaming with Progress\n\nStream LLM responses to reduce perceived latency. Show users something is happening immediately.\n\n```typescript\nasync function streamResponse(prompt: string, onChunk: (text: string) => void) {\n  const stream = await openai.chat.completions.create({\n    model: \"gpt-4o-mini\",\n    messages: [{ role: \"user\", content: prompt }],\n    stream: true,\n  });\n\n  let fullText = \"\";\n  for await (const chunk of stream) {\n    const delta = chunk.choices[0]?.delta?.content || \"\";\n    fullText += delta;\n    onChunk(delta); // Update UI incrementally\n  }\n\n  return fullText;\n}\n\n// React example: streaming into state\nfunction useStreamingAI() {\n  const [text, setText] = useState(\"\");\n  const [isStreaming, setIsStreaming] = useState(false);\n\n  const generate = async (prompt: string) => {\n    setIsStreaming(true);\n    setText(\"\");\n    await streamResponse(prompt, (chunk) => {\n      setText((prev) => prev + chunk);\n    });\n    setIsStreaming(false);\n  };\n\n  return { text, isStreaming, generate };\n}\n```\n\n### Prompt Versioning and Testing\n\nTreat prompts as code. Version them. Test with regression suites.\n\n```typescript\n// prompts/v3-review-analyzer.ts\nexport const REVIEW_ANALYZER_PROMPT = {\n  version: \"3.0\",\n  system: `You are a product review analyst. Extract sentiment, score, summary, and topics.\n    Always return valid JSON. Never hallucinate topics not mentioned in the review.`,\n  temperature: 0.1, // Low temp for consistent structured output\n  maxTokens: 500,\n};\n\n// tests/prompts/review-analyzer.test.ts\ndescribe(\"Review Analyzer Prompt v3\", () => {\n  const testCases = [\n    {\n      input: \"This product is amazing! Great battery life and beautiful screen.\",\n      expected: { sentiment: \"positive\", minScore: 7 },\n    },\n    {\n      input: \"Terrible. Broke after 2 days. Worst purchase ever.\",\n      expected: { sentiment: \"negative\", maxScore: 3 },\n    },\n    {\n      input: \"It's okay. Does what it says but nothing special.\",\n      expected: { sentiment: \"neutral\", minScore: 4, maxScore: 6 },\n    },\n  ];\n\n  test.each(testCases)(\"correctly analyzes: $input\", async ({ input, expected }) => {\n    const result = await analyzeReview(input);\n    expect(result.sentiment).toBe(expected.sentiment);\n    if (expected.minScore) expect(result.score).toBeGreaterThanOrEqual(expected.minScore);\n    if (expected.maxScore) expect(result.score).toBeLessThanOrEqual(expected.maxScore);\n  });\n});\n```\n\n---\n\n## RAG Architecture\n\n### When to Use RAG\n\n| Approach | When | Example |\n|----------|------|---------|\n| Prompt only | Model already knows the answer | General knowledge questions |\n| RAG | Answer depends on your data | \"What's our refund policy?\" |\n| Fine-tuning | Model needs new behavior/style | Domain-specific tone or format |\n| RAG + Fine-tuning | Both custom data and custom behavior | Enterprise support bot |\n\n### RAG Pipeline\n\n```\nUser Query\n    ↓\nQuery Processing (rewrite, expand, decompose)\n    ↓\nEmbedding (text → vector)\n    ↓\nVector Search (find relevant chunks)\n    ↓\nRe-ranking (order by relevance)\n    ↓\nContext Assembly (fit within token budget)\n    ↓\nLLM Generation (with retrieved context)\n    ↓\nCitation Extraction + Validation\n    ↓\nResponse with Sources\n```\n\n### Implementation\n\n```typescript\nimport { OpenAI } from \"openai\";\n\nconst openai = new OpenAI();\n\n// 1. Chunk documents at ingest time\nfunction chunkDocument(text: string, maxChunkSize = 500, overlap = 50): string[] {\n  const sentences = text.split(/(?<=[.!?])\\s+/);\n  const chunks: string[] = [];\n  let current = \"\";\n\n  for (const sentence of sentences) {\n    if ((current + sentence).length > maxChunkSize && current) {\n      chunks.push(current.trim());\n      // Keep overlap for context continuity\n      const words = current.split(\" \");\n      current = words.slice(-overlap).join(\" \") + \" \" + sentence;\n    } else {\n      current += \" \" + sentence;\n    }\n  }\n  if (current.trim()) chunks.push(current.trim());\n  return chunks;\n}\n\n// 2. Embed and store\nasync function embedChunks(chunks: string[]) {\n  const response = await openai.embeddings.create({\n    model: \"text-embedding-3-small\",\n    input: chunks,\n  });\n  return response.data.map((d, i) => ({\n    text: chunks[i],\n    embedding: d.embedding,\n  }));\n}\n\n// 3. Retrieve relevant context\nasync function retrieve(query: string, topK = 5) {\n  const queryEmbedding = await openai.embeddings.create({\n    model: \"text-embedding-3-small\",\n    input: query,\n  });\n\n  // Search your vector DB (Pinecone, Weaviate, pgvector, etc.)\n  const results = await vectorDB.search({\n    vector: queryEmbedding.data[0].embedding,\n    topK,\n  });\n\n  return results.map((r) => r.metadata.text);\n}\n\n// 4. Generate with context\nasync function ragGenerate(query: string) {\n  const context = await retrieve(query);\n\n  const response = await openai.chat.completions.create({\n    model: \"gpt-4o-mini\",\n    messages: [\n      {\n        role: \"system\",\n        content: `Answer based ONLY on the provided context. If the context doesn't contain the answer, say \"I don't have enough information to answer that.\"\n        \nContext:\n${context.map((c, i) => `[${i + 1}] ${c}`).join(\"\\n\\n\")}`,\n      },\n      { role: \"user\", content: query },\n    ],\n  });\n\n  return response.choices[0].message.content;\n}\n```\n\n### RAG Quality Checklist\n\n- Chunk size tuned for your content type (code: larger, FAQ: smaller)\n- Overlap between chunks prevents losing context at boundaries\n- Query rewriting improves retrieval for vague user questions\n- Re-ranking (Cohere, cross-encoder) boosts relevance over pure vector similarity\n- Token budget management — don't exceed context window\n- Citation tracking — map output claims back to source chunks\n- Evaluation set — measure retrieval recall and answer quality regularly\n\n---\n\n## AI UX Patterns — Building Trust\n\n### Show Your Work\n\nUsers trust AI more when they can see why it produced an answer.\n\n| Pattern | Implementation | Trust Impact |\n|---------|---------------|--------------|\n| **Citations** | \"Based on [Source A] and [Source B]...\" | High |\n| **Confidence indicators** | Color-coded confidence bars | Medium |\n| **Editable output** | Let users modify AI-generated content | High |\n| **Explain reasoning** | Step-by-step breakdown | High |\n| **Show alternatives** | \"Here are 3 options...\" | Medium |\n| **Undo/regenerate** | One-click to try again | High |\n\n### Loading States for AI\n\n```typescript\n// Bad: Spinner for 10 seconds with no context\n<Spinner />\n\n// Good: Progressive disclosure\nfunction AILoadingState({ stage }: { stage: string }) {\n  return (\n    <div className=\"ai-loading\">\n      <div className=\"pulse-dot\" />\n      <span className=\"text-sm text-muted\">{stage}</span>\n    </div>\n  );\n}\n\n// Usage with stages\nconst stages = [\n  \"Understanding your question...\",\n  \"Searching relevant documents...\",\n  \"Generating response...\",\n];\n```\n\n### Error States\n\n```typescript\n// Always have AI-specific error handling\nfunction AIErrorBoundary({ error, onRetry }: { error: Error; onRetry: () => void }) {\n  const messages: Record<string, string> = {\n    RATE_LIMITED: \"Too many requests. Please wait a moment.\",\n    CONTEXT_TOO_LONG: \"Your input is too long. Try shortening it.\",\n    SAFETY_FILTERED: \"This request couldn't be processed. Try rephrasing.\",\n    API_ERROR: \"AI service is temporarily unavailable.\",\n  };\n\n  return (\n    <div className=\"ai-error\">\n      <p>{messages[error.message] || \"Something went wrong.\"}</p>\n      <button onClick={onRetry}>Try Again</button>\n    </div>\n  );\n}\n```\n\n---\n\n## Safety and Guardrails\n\n### Input Sanitization\n\n```typescript\nfunction sanitizeInput(userInput: string): string {\n  // 1. Length limit\n  if (userInput.length > 10_000) {\n    throw new Error(\"CONTEXT_TOO_LONG\");\n  }\n\n  // 2. Strip known injection patterns\n  const cleaned = userInput\n    .replace(/ignore (all |previous |above )?instructions/gi, \"[filtered]\")\n    .replace(/you are now/gi, \"[filtered]\")\n    .replace(/system:\\s/gi, \"[filtered]\");\n\n  return cleaned;\n}\n```\n\n### Output Validation\n\n```typescript\nasync function safeGenerate(prompt: string) {\n  const response = await generate(prompt);\n\n  // 1. Check for refusal (model declined to answer)\n  if (response.includes(\"I cannot\") || response.includes(\"I'm not able to\")) {\n    return { type: \"refused\", content: response };\n  }\n\n  // 2. Check for hallucinated URLs/emails\n  const urls = response.match(/https?:\\/\\/[^\\s]+/g) || [];\n  const validatedUrls = await Promise.all(urls.map(validateUrl));\n  if (validatedUrls.some((v) => !v)) {\n    return { type: \"contains_hallucinated_links\", content: stripInvalidUrls(response) };\n  }\n\n  // 3. Content policy check (use a classifier or moderation endpoint)\n  const moderation = await openai.moderations.create({ input: response });\n  if (moderation.results[0].flagged) {\n    return { type: \"flagged\", content: \"Response filtered for safety.\" };\n  }\n\n  return { type: \"ok\", content: response };\n}\n```\n\n### Guardrail Layers\n\n| Layer | What It Catches | Implementation |\n|-------|----------------|----------------|\n| Input validation | Injection, abuse, length | Regex + length checks |\n| System prompt | Role boundaries | Strong system instructions |\n| Output validation | Hallucinated links/data, PII leakage | Post-processing checks |\n| Moderation API | Harmful content | OpenAI moderation endpoint |\n| Human review queue | Edge cases | Flag low-confidence outputs |\n\n---\n\n## Cost Optimization\n\n### Token Budget Management\n\n```typescript\nfunction estimateTokens(text: string): number {\n  // Rough estimate: 1 token ≈ 4 characters for English\n  return Math.ceil(text.length / 4);\n}\n\nfunction fitWithinBudget(\n  systemPrompt: string,\n  context: string[],\n  userQuery: string,\n  maxTokens: number = 120_000 // model context window\n): string[] {\n  const reservedForOutput = 4_000;\n  const systemTokens = estimateTokens(systemPrompt);\n  const queryTokens = estimateTokens(userQuery);\n  let budget = maxTokens - reservedForOutput - systemTokens - queryTokens;\n\n  const fitted: string[] = [];\n  for (const chunk of context) {\n    const chunkTokens = estimateTokens(chunk);\n    if (chunkTokens <= budget) {\n      fitted.push(chunk);\n      budget -= chunkTokens;\n    } else {\n      break;\n    }\n  }\n  return fitted;\n}\n```\n\n### Cost Tracking Per Feature\n\n```typescript\nasync function trackAICost(feature: string, userId: string, apiCall: () => Promise<any>) {\n  const start = Date.now();\n  const result = await apiCall();\n  const duration = Date.now() - start;\n\n  await analytics.track(\"ai_usage\", {\n    feature,         // \"review-analyzer\", \"chat\", \"summarizer\"\n    userId,\n    model: result.model,\n    inputTokens: result.usage.prompt_tokens,\n    outputTokens: result.usage.completion_tokens,\n    cost: calculateCost(result.model, result.usage),\n    latency: duration,\n    cached: result.usage.prompt_tokens_details?.cached_tokens > 0,\n  });\n\n  return result;\n}\n```\n\n### Cost Reduction Playbook\n\n| Strategy | Savings | Trade-off |\n|----------|---------|-----------|\n| Route simple queries to cheaper models | 10–50x | Slight quality drop on edge cases |\n| Cache identical queries (Redis/KV) | 40–80% | Stale results for dynamic content |\n| Prompt caching (Anthropic/OpenAI) | Up to 90% on input tokens | Only for repeated system prompts |\n| Batch non-urgent requests | 50% (OpenAI Batch API) | 24-hour turnaround |\n| Truncate context to relevant chunks only | Variable | Requires good retrieval |\n| Use embeddings for classification instead of LLM | 95%+ | Only works for classify/match tasks |\n\n---\n\n## Resilience Patterns\n\n### Retry with Fallback\n\n```typescript\nasync function resilientGenerate(prompt: string) {\n  const providers = [\n    { name: \"openai\", fn: () => callOpenAI(prompt) },\n    { name: \"anthropic\", fn: () => callAnthropic(prompt) },\n    { name: \"cached\", fn: () => getCachedFallback(prompt) },\n  ];\n\n  for (const provider of providers) {\n    try {\n      return await withRetry(provider.fn, { maxRetries: 2, backoff: \"exponential\" });\n    } catch (error) {\n      console.error(`${provider.name} failed:`, error);\n      continue;\n    }\n  }\n\n  throw new Error(\"API_ERROR\");\n}\n\nasync function withRetry<T>(\n  fn: () => Promise<T>,\n  opts: { maxRetries: number; backoff: \"exponential\" }\n): Promise<T> {\n  let lastError: Error;\n  for (let i = 0; i <= opts.maxRetries; i++) {\n    try {\n      return await fn();\n    } catch (error) {\n      lastError = error as Error;\n      if (i < opts.maxRetries) {\n        await sleep(Math.pow(2, i) * 1000); // 1s, 2s, 4s\n      }\n    }\n  }\n  throw lastError!;\n}\n```\n\n### Async Processing for Heavy AI Tasks\n\n```typescript\n// Don't block request handlers with LLM calls\n\n// API: enqueue the job\napp.post(\"/api/analyze\", async (req, res) => {\n  const jobId = await queue.add(\"analyze\", {\n    userId: req.user.id,\n    input: req.body.input,\n  });\n  res.json({ jobId, status: \"processing\" });\n});\n\n// Worker: process async\nqueue.process(\"analyze\", async (job) => {\n  const result = await analyzeWithAI(job.data.input);\n  await db.results.create({ jobId: job.id, ...result });\n  await notify(job.data.userId, { jobId: job.id, status: \"complete\" });\n});\n\n// Client: poll or use websocket\napp.get(\"/api/analyze/:jobId\", async (req, res) => {\n  const result = await db.results.findUnique({ where: { jobId: req.params.jobId } });\n  res.json(result || { status: \"processing\" });\n});\n```\n\n---\n\n## Anti-Patterns\n\n### Demo-ware\n\n**Why it fails**: Demos deceive. \"Works on my laptop\" with hand-picked inputs. Production reveals every edge case — hallucinations, latency spikes, cost overruns, adversarial users.\n\n**Instead**: Test with adversarial inputs from day one. Build evaluation sets. Monitor output quality in production. Ship with guardrails, not just a happy path.\n\n### Context Window Stuffing\n\n**Why it fails**: Expensive (paying for irrelevant tokens), slow (larger prompts = higher latency), hits context limits, dilutes relevant signal with noise.\n\n**Instead**: Retrieve only the most relevant context. Use re-ranking. Calculate token budget before sending. Summarize long documents before injecting.\n\n### Unstructured Output Parsing\n\n**Why it fails**: Regex on free-text breaks randomly. Format changes between calls. Injection risks when users control part of the prompt.\n\n**Instead**: Use JSON mode / function calling. Validate with Zod or similar schema library. Always have a fallback for malformed output.\n\n---\n\n## Sharp Edges — Quick Reference\n\n| Issue | Severity | Solution |\n|-------|----------|----------|\n| Trusting LLM output without validation | Critical | Zod schema validation on every response |\n| User input directly in prompts | Critical | Sanitize input, separate system/user roles |\n| Context window stuffing | High | Token budget + retrieve only relevant chunks |\n| Blocking UI on LLM response | High | Stream responses, show progressive loading states |\n| No cost monitoring | High | Track per-request cost, set alerts, usage caps |\n| App breaks when LLM API fails | High | Retry + provider fallback + cached fallback |\n| Hallucinated facts in output | Critical | Ground with RAG, validate claims, show citations |\n| Synchronous LLM in request handler | High | Queue heavy tasks, process async, notify on completion |\n\n---\n\n## Related Skills\n\nWorks well with: `ai-wrapper-product`, `openai-api`, `openai-agents`, `api-design-principles`, `frontend-design`","tags":["product","coco","rkz91","agent-skills","agents-md","ai-agents","claude-code","codex","cursor","developer-tools","llm-tools","mcp"],"capabilities":["skill","source-rkz91","skill-ai-product","topic-agent-skills","topic-agents-md","topic-ai-agents","topic-claude-code","topic-codex","topic-cursor","topic-developer-tools","topic-llm-tools","topic-mcp","topic-pm-tools","topic-product-management","topic-productivity"],"categories":["coco"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/rkz91/coco/ai-product","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add rkz91/coco","source_repo":"https://github.com/rkz91/coco","install_from":"skills.sh"}},"qualityScore":"0.453","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 7 github stars · SKILL.md body (17,656 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:14:05.388Z","embedding":null,"createdAt":"2026-05-18T13:21:36.747Z","updatedAt":"2026-05-18T19:14:05.388Z","lastSeenAt":"2026-05-18T19:14:05.388Z","tsv":"'-10':291 '/api/analyze':1663,1710 '/g':1222 '/https':1220 '/ignore':1159 '/system':1171 '/you':1166 '0':228,290,304,373,798,873,1259,1459,1615 '0.1':472 '000':1143,1357,1365 '1':124,213,672,862,1137,1189,1336 '10':230,1027,1142,1476 '1000':1637 '120':1356 '1s':1638 '2':131,243,509,731,1150,1212,1583,1635 '200':234 '24':1518 '2s':1639 '3':140,306,518,748,761,780,1008,1241 '3.0':445 '4':151,534,805,1338,1345,1364 '40':1488 '4o':265,353,826 '4s':1640 '5':239,771 '50':685,1514 '500':480,683 '50x':1477 '6':536 '7':504 '80':1489 '90':1500 '95':1538 'abl':1205 'abus':1284 'activ':123 'address':153 'adversari':1756,1761 'agent':1990 'ai':2,11,23,35,45,57,85,96,99,102,116,134,944,954,992,1022,1061,1110,1430,1647,1982 'ai-gener':991 'ai-pow':10,44 'ai-product':1 'ai-specif':1060 'ai-wrapper-product':1981 'aierrorboundari':1066 'ailoadingst':1036 'alert':1935 'alreadi':578 'altern':1005 'alway':152,307,459,1058,1866 'amaz':493 'analyst':452 'analytics.track':1429 'analyz':276,442,484,540,1435,1671,1684 'analyzereview':254,548 'analyzewithai':1690 'answer':581,586,832,846,855,941,964,1196 'anthrop':1563 'anthropic/openai':1497 'anti':1727 'anti-pattern':1726 'anyth':313 'api':1108,1307,1517,1596,1658,1942,1987,1992 'api-design-principl':1991 'apical':1415,1423 'app':1938 'app.get':1709 'app.post':1662 'appli':141 'approach':572 'architectur':18,52,567 'assembl':646 'async':252,337,403,542,735,765,809,1179,1408,1550,1598,1643,1664,1682,1685,1712,1972 'await':260,348,365,409,547,742,774,794,816,821,1186,1225,1253,1422,1428,1579,1621,1632,1669,1689,1692,1697,1717 'awar':159 'b':976 'back':931 'backoff':1584,1606 'bad':1024 'bar':984 'base':833,970 'batch':1509,1516 'batteri':495 'beauti':498 'behavior':618 'behavior/style':602 'blind':81 'block':1652,1913 'boost':912 'bot':621 'boundari':896,1292 'break':1400,1838,1939 'breakdown':1002 'broke':176,507 'budget':650,919,1326,1375,1394,1397,1819,1908 'build':84,101,139,947,1766 'button':1121 'c':859,863 'cach':1453,1457,1484,1496,1568,1948 'calcul':1817 'calculatecost':1448 'call':244,1657,1843,1858 'callanthrop':1565 'callopenai':1560 'cannot':1200 'cap':1937 'case':1317,1483,1750 'catch':1279,1586,1623 'chang':1841 'charact':1339 'chat':1436 'cheaper':1474 'check':1190,1213,1244,1288,1305 'checklist':877 'chunk':367,412,416,638,673,692,730,738,751,757,878,891,934,1385,1391,1396,1525,1912 'chunk.choices':372 'chunkdocu':679 'chunks.push':707,727 'chunktoken':1389,1393,1398 'citat':656,926,969,1961 'claim':930,1959 'classif':1534 'classifi':1247 'classify/match':1542 'clean':1156,1175 'click':1014 'client':1704 'code':72,430,885,982 'coher':908 'color':981 'color-cod':980 'complet':1703,1975 'confid':978,983,1321 'consist':476 'console.error':1588 'const':217,248,258,300,314,346,366,370,392,396,401,440,487,545,668,687,691,697,714,740,772,792,814,819,1045,1073,1155,1184,1217,1223,1251,1362,1366,1370,1380,1384,1388,1417,1420,1424,1555,1573,1667,1687,1715 'contain':844,1235 'content':275,298,358,375,831,869,883,994,1210,1238,1242,1264,1272,1309,1494 'context':645,655,712,764,808,815,838,841,857,894,924,1031,1087,1147,1350,1359,1387,1522,1782,1799,1812,1903 'context.map':858 'continu':713,1592 'control':1848 'core':162 'correct':539 'cost':33,67,100,150,158,1323,1403,1447,1462,1754,1926,1933 'couldn':1102 'critic':1885,1897,1954 'cross':910 'cross-encod':909 'current':695,702,706,717,723 'current.split':716 'current.trim':708,726,728 'custom':614,617 'd':754 'd.embedding':760 'data':590,615 'date.now':1419,1426 'day':510,1764 'db':787 'db.results.create':1693 'db.results.findunique':1718 'deceiv':1736 'declin':1194 'decompos':630 'defin':214 'delta':371,374,377,379 'demo':164,1730,1735 'demo-war':1729 'depend':587 'describ':482 'design':92,1993,1997 'detail':1456 'develop':37 'dilut':1801 'direct':1894 'disclosur':1034 'document':674,1052,1824 'doesn':842 'domain':604 'domain-specif':603 'drop':1480 'durat':1425,1452 'dynam':1493 'easi':166 'edg':1316,1482,1749,1874 'edit':986 'els':722,1399 'emb':732 'embed':631,747,759,779,799,1532 'embedchunk':737 'encod':911 'endpoint':1250,1312 'engin':20,54,106 'english':1341 'enough':852 'enqueu':1659 'enterpris':619 'error':156,1055,1063,1067,1069,1070,1109,1146,1587,1591,1595,1597,1611,1624,1626,1628 'error.message':1117 'estim':1335 'estimatetoken':1330,1368,1372,1390 'etc':791 'evalu':115,935,1767 'ever':513 'everi':170,1748,1890 'exampl':386,574 'exceed':923 'exist':173 'expand':629 'expect':500,514,530,544,550,556,562 'expected.maxscore':561,565 'expected.minscore':555,559 'expected.sentiment':553 'expens':1788 'expert':4,38 'explain':996 'exponenti':1585,1607 'export':439 'extract':453,657 'fact':1951 'fail':1590,1734,1787,1832,1943 'fallback':1548,1869,1947,1949 'fals':400,418 'faq':887 'featur':13,47,86,135,1406,1411,1432 'file':127 'filter':1099,1164,1169,1173,1266 'find':636 'fine':597,611 'fine-tun':596,610 'fit':647,1381,1402 'fitted.push':1395 'fitwithinbudget':1347 'flag':1260,1263,1318 'fn':1559,1564,1569,1601,1622 'format':268,608,1840 'free':189,1836 'free-text':188,1835 'frontend':1996 'frontend-design':1995 'fulli':128 'fulltext':363,376,384 'function':253,338,390,678,736,766,810,1035,1065,1132,1180,1329,1346,1409,1551,1599,1857 'general':582 'generat':402,422,652,806,993,1053,1187 'getcachedfallback':1570 'good':1032,1529 'gpt':264,352,825 'gpt-4o-mini':263,351,824 'grade':9,43 'great':494 'ground':1955 'guardrail':30,64,1128,1274,1776 'hallucin':110,464,1215,1236,1298,1751,1950 'hand':1743 'hand-pick':1742 'handl':109,157,1064 'handler':1654,1966 'happen':334 'happi':1780 'hard':169 'harm':1308 'heavi':1646,1969 'high':977,995,1003,1018,1906,1918,1928,1944,1967 'higher':1796 'hit':1798 'hour':1519 'human':1313 'ident':1485 'immedi':335 'impact':968 'implement':95,662,966,1280 'import':205,209,664 'improv':899 'increment':382 'indic':979 'inform':853 'ingest':676 'inject':1153,1283,1826,1844 'input':489,505,519,541,543,549,750,782,1091,1129,1255,1281,1502,1674,1745,1762,1893,1899 'inputtoken':1441 'instead':1535,1758,1806,1853 'instruct':1295 'instructions/gi':1163 'integr':15,49,90,146,180 'irrelev':1791 'isstream':397,421 'issu':1877 'job':1661,1686 'job.data.input':1691 'job.data.userid':1699 'job.id':1695,1701 'jobid':1668,1677,1694,1700,1711,1720 'join':720,864 'json':270,281,462,1855 'json.parse':302 'keep':709 'keytop':235,294 'know':579 'knowledg':583 'known':1152 'laptop':1740 'larger':886,1794 'lasterror':1610,1625,1642 'latenc':329,1451,1752,1797 'layer':1275,1276 'leakag':1301 'length':704,1138,1285,1287 'let':362,694,988,1374,1609,1613 'librari':1865 'life':496 'limit':1079,1139,1800 'link':1237 'links/data':1299 'llm':14,48,80,112,179,191,324,651,1537,1656,1881,1916,1941,1963 'llms':91 'load':1019,1923 'long':1089,1094,1149,1823 'lose':893 'low':473,1320 'low-confid':1319 'm':1203 'malform':1871 'manag':920,1327 'mani':1081 'map':928 'match':282 'math.ceil':1343 'math.pow':1634 'max':229,233,238 'maxchunks':682,705 'maxretri':1582,1604 'maxscor':517,535 'maxtoken':479,1354,1376 'measur':937 'medium':985,1010 'mention':467 'messag':272,355,828,1074,1116 'message.content':305,874 'min':227 'mini':266,354,827 'minscor':503,533 'mode':198,1856 'model':262,310,350,577,599,744,776,823,1193,1358,1439,1475 'moder':1249,1252,1306,1311 'moderation.results':1258 'modifi':990 'moment':1086 'monitor':1769,1927 'n':865,866 'name':1557,1562,1567 'need':600 'negat':223,287,516 'neutral':224,288,532 'never':77,186,463 'new':250,601,670,1145,1594 'nois':1805 'non':1511 'non-urg':1510 'noth':528 'notifi':1698,1973 'now/gi':1168 'number':1333,1355,1605 'object':271 'ok':1271 'okay':522 'onchunk':342,378 'onclick':1122 'one':1013,1765 'one-click':1012 'onretri':1068,1071,1123 'openai':210,212,249,251,665,667,669,671,1310,1515,1558,1986,1989 'openai-ag':1988 'openai-api':1985 'openai.chat.completions.create':261,349,822 'openai.embeddings.create':743,775 'openai.moderations.create':1254 'opt':1603 'optim':34,68,98,1324 'option':1009 'opts.maxretries':1617,1631 'order':642 'output':75,117,154,183,192,197,247,478,929,987,1176,1296,1322,1770,1828,1872,1882,1953 'outputtoken':1444 'overlap':684,710,719,889 'overrun':1755 'pars':187,1829 'part':1849 'path':1781 'pattern':16,50,104,144,171,181,946,965,1154,1545,1728 'pay':1789 'per':1405,1931 'per-request':1930 'perceiv':328 'pgvector':790 'pick':1744 'pii':1300 'pinecon':788 'pipelin':94,623 'playbook':1464 'pleas':1083 'polici':595,1243 'poll':1705 'posit':222,286,502 'post':1303 'post-process':1302 'power':12,46 'prev':414,415 'prevent':892 'previous':1161 'principl':163,1994 'proceed':130 'process':627,1105,1304,1644,1679,1681,1725,1971 'produc':962 'product':3,8,36,42,89,108,167,178,278,450,491,1746,1773,1984 'production-grad':7,41 'productreview':241 'productreviewschema':218 'productreviewschema.parse':316 'progress':322,1033,1922 'promis':257,1416,1602,1608 'promise.all':1226 'prompt':19,53,70,105,340,359,404,411,423,428,443,485,575,1182,1188,1290,1495,1508,1553,1561,1566,1571,1795,1852,1896 'prompts/v3-review-analyzer.ts':438 'provid':837,1556,1574,1576,1946 'provider.fn':1581 'provider.name':1589 'purchas':512 'pure':915 'qualiti':118,876,942,1479,1771 'queri':625,626,768,783,812,818,870,897,1472,1486 'queryembed':773 'queryembedding.data':797 'querytoken':1371,1379 'question':584,904,1049 'queue':1315,1968 'queue.add':1670 'queue.process':1683 'quick':1875 'r':803 'r.metadata.text':804 'rag':17,51,93,147,566,571,585,609,622,875,1957 'raggener':811 'random':1839 'rank':641,907,1816 'rate':1078 'raw':301,317 're':640,906,1815 're-rank':639,905,1814 'react':385 'read':125 'reason':997 'recal':939 'record':1075 'redis/kv':1487 'reduc':327 'reduct':1463 'refer':1876 'refund':594 'refus':1192,1209 'regex':194,1286,1833 'regress':435 'regular':943 'relat':1976 'relev':143,637,644,763,913,1051,1524,1802,1811,1911 'repeat':1506 'rephras':1107 'replac':1158,1165,1170 'req':1665,1713 'req.body.input':1675 'req.params.jobid':1721 'req.user.id':1673 'request':1082,1101,1513,1653,1932,1965 'requir':1528 'res':1666,1714 'res.json':1676,1722 'reservedforoutput':1363,1377 'resili':1544 'resilientgener':1552 'respons':113,259,267,325,659,741,820,1054,1185,1211,1240,1256,1265,1273,1891,1917,1920 'response.choices':303,872 'response.data.map':753 'response.includes':1198,1201 'response.match':1219 'result':315,319,546,793,1421,1461,1491,1688,1696,1716,1723 'result.model':1440,1449 'result.score':557,563 'result.sentiment':551 'result.usage':1450 'result.usage.completion':1445 'result.usage.prompt':1442,1454 'results.map':802 'retri':1546,1945 'retriev':654,762,767,817,900,938,1530,1807,1909 'return':280,312,318,383,419,460,729,752,801,871,1040,1115,1174,1207,1233,1261,1269,1342,1401,1460,1578,1620 'reveal':1747 'review':279,441,451,470,483,1314,1434 'review-analyz':1433 'reviewtext':255,299 'rewrit':628,898 'risk':1845 'role':273,296,356,829,867,1291,1902 'rough':1334 'rout':1470 's/gi':1172 'safegener':1181 'safeti':28,62,149,1098,1126,1268 'safety/guardrails':97 'sanit':1130,1898 'sanitizeinput':1133 'save':1466 'say':526,847 'scale':22,56 'schema':203,216,284,1864,1887 'score':225,289,455 'screen':499 'search':635,784,1050 'second':1028 'see':959 'send':1821 'sentenc':688,698,700,703,721,724 'sentiment':220,285,454,501,515,531 'separ':1900 'servic':1111 'set':936,1768,1934 'setisstream':398,406,417 'settext':394,408,413 'sever':1878 'sharp':1873 'ship':6,40,1774 'shorten':1096 'show':330,949,1004,1921,1960 'signal':1803 'similar':917,1863 'simpl':1471 'size':879 'skill':121,1977 'skill-ai-product' 'sleep':1633 'slight':1478 'slow':1793 'small':749,781 'smaller':888 'solut':1879 'someth':175,332,1118 'sourc':661,933,972,975 'source-rkz91' 'special':529 'specif':605,1062 'spike':1753 'spinner':1025 'stage':1037,1038,1041,1044,1046 'stale':1490 'start':1418,1427 'state':389,1020,1056,1924 'status':1678,1702,1724 'step':999,1001 'step-by-step':998 'store':734 'strategi':1465 'stream':31,65,111,320,323,347,360,369,387,1919 'streamrespons':339,410 'string':256,293,295,341,344,405,681,686,693,739,769,813,1039,1076,1077,1135,1136,1183,1332,1349,1351,1353,1361,1382,1412,1414,1554 'strip':1151 'stripinvalidurl':1239 'strong':1293 'structur':182,196,246,477 'stuf':1784,1905 'suit':436 'summar':1437,1822 'summari':231,292,456 'support':620 'synchron':1962 'system':274,446,830,1289,1294,1507 'system/user':1901 'systemprompt':1348,1369 'systemtoken':1367,1378 'task':1543,1648,1970 'temp':474 'temperatur':471 'temporarili':1113 'terribl':506 'test':426,433,1759 'test.each':537 'testcas':488,538 'tests/prompts/review-analyzer.test.ts':481 'text':190,343,393,420,632,680,746,756,778,1331,1837 'text-embed':745,777 'text.length':1344 'text.split':689 'throw':1144,1593,1641 'time':677 'tobe':552 'tobegreaterthanorequ':558 'tobelessthanorequ':564 'token':649,918,1325,1337,1443,1446,1455,1458,1503,1792,1818,1907 'tone':606 'topic':458,465 'topic-agent-skills' 'topic-agents-md' 'topic-ai-agents' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-developer-tools' 'topic-llm-tools' 'topic-mcp' 'topic-pm-tools' 'topic-product-management' 'topic-productivity' 'topk':770,800 'track':927,1404,1929 'trackaicost':1410 'trade':1468 'trade-off':1467 'treat':69,427 'tri':1016,1095,1106,1124,1577,1619 'true':361,407 'truncat':1521 'trust':27,61,78,161,948,953,967,1880 'tune':598,612,880 'turnaround':1520 'type':240,269,884,1208,1234,1262,1270 'typescript':204,336,437,663,1023,1057,1131,1178,1328,1407,1549,1649 'ui':381,1914 'unavail':1114 'understand':132,1047 'undo/regenerate':1011 'unstructur':1827 'updat':380 'urgent':1512 'url':1218 'urls.map':1227 'urls/emails':1216 'usag':1042,1431,1936 'use':82,195,570,1245,1531,1707,1813,1854 'user':26,60,137,160,297,331,357,624,868,903,952,989,1757,1847,1892 'userid':1413,1438,1672 'userinput':1134,1157 'userinput.length':1141 'userqueri':1352,1373 'usest':395,399 'usestreamingai':391 'ux':24,58,103,148,945 'v':1231,1232 'v3':486 'vagu':902 'valid':73,155,185,200,308,461,658,1177,1282,1297,1859,1884,1888,1958 'validatedurl':1224 'validatedurls.some':1230 'validateurl':1228 'variabl':1527 'vector':633,634,786,796,916 'vectordb.search':795 'version':424,431,444 'void':345,1072 'wait':1084 'ware':1731 'weaviat':789 'websocket':1708 'well':1979 'went':1119 'window':925,1360,1783,1904 'within':648 'without':1883 'withretri':1580,1600 'word':715 'words.slice':718 'work':951,1540,1737,1978 'worker':1680 'worst':511 'wrapper':1983 'wrong':1120 'z':206 'z.array':236 'z.enum':221 'z.infer':242 'z.number':226 'z.object':219 'z.string':232,237 'zod':208,1861,1886","prices":[{"id":"9aeb3ca5-b419-4194-ba07-0a77f07827ff","listingId":"a8e55be4-23e8-435f-aa95-1dfca5526eeb","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"rkz91","category":"coco","install_from":"skills.sh"},"createdAt":"2026-05-18T13:21:36.747Z"}],"sources":[{"listingId":"a8e55be4-23e8-435f-aa95-1dfca5526eeb","source":"github","sourceId":"rkz91/coco/ai-product","sourceUrl":"https://github.com/rkz91/coco/tree/main/skills/ai-product","isPrimary":false,"firstSeenAt":"2026-05-18T13:21:36.747Z","lastSeenAt":"2026-05-18T19:14:05.388Z"}],"details":{"listingId":"a8e55be4-23e8-435f-aa95-1dfca5526eeb","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"rkz91","slug":"ai-product","github":{"repo":"rkz91/coco","stars":7,"topics":["agent-skills","agents-md","ai","ai-agents","claude-code","codex","cursor","developer-tools","llm-tools","mcp","pm-tools","product-management","productivity","prompt-engineering","workflow-automation"],"license":"mit","html_url":"https://github.com/rkz91/coco","pushed_at":"2026-04-26T01:51:27Z","description":"Open-source library of AI superpowers — 59 skills, 34 commands, 10 agents + 24 GSD subagents, 3 system bundles. An entire team, wherever your AI lives. Vendor-neutral across Claude Code, Cursor, Codex, and any AGENTS.md tool.","skill_md_sha":"119575fd2b01fd07fe143d07f6ca6c2eade43a4e","skill_md_path":"skills/ai-product/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/rkz91/coco/tree/main/skills/ai-product"},"layout":"multi","source":"github","category":"coco","frontmatter":{"name":"ai-product","description":"Expert in shipping production-grade AI-powered features — LLM integration patterns, RAG architecture, prompt engineering that scales, AI UX that users trust, safety and guardrails, streaming, and cost optimization."},"skills_sh_url":"https://skills.sh/rkz91/coco/ai-product"},"updatedAt":"2026-05-18T19:14:05.388Z"}}