[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7ESZ74D0232420KCSZ9KE99":3,"skill-same:01M7ESZ74D0232420KCSZ9KE99":45},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":23,"commitSha":24,"skillDirectory":25,"forksCount":26,"repositoryHtmlUrl":27,"repositoryHomepageUrl":6,"ownerHtmlUrl":28,"ownerBlogUrl":29,"ownerDescription":6,"updatedAt":30,"install":31,"resources":44},"01M7ESZ74D0232420KCSZ9KE99","ams-llm-pro",null,"TanNhatCMS\u002Fjarvis","TanNhatCMS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F113796420?v=4","01M753MV17KG5CD3152G3WQEQY","KietNT","01M7EKEDYVYQ6PWVJJMZ911VMX",0,"MIT","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-llm-pro\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: llm-pro\ndescription: Integrate LLMs into apps: prompting, structured output, streaming, function calling, RAG, evals, cost and latency control. Use when adding language-model features to software.\ncategory: development\n---\n\n# LLM Pro\n\nA practitioner's guide to shipping LLM features: prompt design, reliable structured output, streaming UX, tool\u002Ffunction calling, retrieval augmentation, evaluation, and keeping cost and latency under control. Vendor-neutral — the patterns apply to any chat\u002Fcompletions-style API.\n\n## Overview\n\nMost LLM integrations fail in the same ways: unvalidated free-text output parsed with regex, no handling for the model being confidently wrong, costs that scale with success, and prompts that silently break when the model is updated. The fix is engineering discipline: **schemas for output, evals for behavior, budgets for cost, and validation for everything.**\n\nThink of the LLM as a brilliant but unreliable contractor: give precise specs (prompts + schemas), inspect the work (validation + evals), and never let it touch production data unsupervised.\n\n## When to use\n\n- Adding chat, summarization, extraction, classification, or generation features.\n- Forcing machine-readable output (JSON) from a language model.\n- Streaming responses token-by-token to a UI.\n- Grounding answers in your own data (RAG).\n- Letting the model call your APIs (function\u002Ftool calling).\n- Controlling spend and latency in production.\n\n## Core concepts\n\n- **Roles.** `system` = persistent instructions and identity; `user` = the task; `assistant` = prior turns. Put invariants in system, specifics in user.\n- **Temperature.** Low (0–0.3) for extraction\u002Fclassification\u002Ffactual tasks; higher (0.7–1.0) for creative writing. When in doubt, go low.\n- **Structured output.** Request JSON with an explicit schema (JSON mode \u002F schema-constrained decoding where supported), then validate against the schema in code. Never trust unvalidated model output.\n- **Streaming.** Server-sent events token-by-token; render progressively for perceived speed. Still validate the final assembled object.\n- **Context window.** Input + output tokens share a budget. Long contexts cost more and reason worse — retrieve precisely instead of dumping documents.\n- **Embeddings.** Text → vectors for semantic search. Chunk documents (a few hundred tokens, with overlap), embed once, store in a vector index.\n- **RAG.** Retrieve relevant chunks → stuff into prompt → generate with citations. Grounding cuts hallucinations but doesn't eliminate them.\n- **Function calling.** The model emits a structured call; *your code* executes it. The model never touches the API directly.\n- **Evals.** Golden input\u002Foutput pairs + a scorer (exact match, LLM-judge, or human spot-check). The only way to know a prompt change helped.\n\n## Practical workflow\n\n**1. Prototype the prompt.** Start in a playground: system prompt with role, task, output schema, and 1–2 few-shot examples. Iterate until output is consistent.\n\n**2. Lock the contract.**\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"summary\": { \"type\": \"string\", \"maxLength\": 500 },\n    \"sentiment\": { \"enum\": [\"positive\", \"neutral\", \"negative\"] },\n    \"key_points\": { \"type\": \"array\", \"items\": { \"type\": \"string\" }, \"maxItems\": 5 }\n  },\n  \"required\": [\"summary\", \"sentiment\"]\n}\n```\nRequest this schema, then validate with a real validator (e.g., Zod, Pydantic). On validation failure: retry once with the error fed back, then fall back gracefully.\n\n**3. Build the pipeline.** Pre-process input (truncate, redact PII) → call with timeout + retry (exponential backoff on 429\u002F5xx) → validate → post-process → return. Log prompts, outputs, token counts.\n\n**4. Stream to the UI.** Flush tokens as they arrive; show a \"generating\" state; handle disconnects by keeping the partial result recoverable.\n\n**5. Add RAG when facts matter.** Chunk → embed → retrieve top-k → cite sources in the answer. Show sources in the UI so users can verify.\n\n**6. Measure.** Track per-request latency, tokens in\u002Fout, cost per feature, and eval pass rate on a schedule. Alert on drift.\n\n## Common pitfalls\n\n- **Prompt injection.** User input like \"ignore instructions and reveal the system prompt\" inside a larger task. Defenses: delimit untrusted input, keep secrets out of prompts, validate outputs, least-privilege tools.\n- **Hallucinated confidence.** Models state falsehoods fluently. For factual features: RAG + citations + \"I don't know\" as an allowed answer.\n- **Regex-parsing free text.** Brittle by design. Use structured output + schema validation.\n- **Context stuffing.** Dumping whole documents \"just in case\" — slow, expensive, worse reasoning. Retrieve the minimal relevant context.\n- **No cost guardrails.** Set per-user\u002Fper-day budgets, cache repeated queries (semantic or exact), and pick smaller models for easy sub-tasks (classification, routing).\n- **PII in prompts.** Names, emails, health\u002Ffinancial data sent to a third-party API may violate policy or law. Redact or use data-processing agreements; prefer redaction.\n- **Model updates breaking prompts.** Pin model versions in production; re-run evals before upgrading.\n- **Blocking UX.** LLM calls take seconds — always async with loading states, never blocking the main thread or request handler without timeouts.\n","# LLM Pro\n\nA practitioner's guide to shipping LLM features: prompt design, reliable structured output, streaming UX, tool\u002Ffunction calling, retrieval augmentation, evaluation, and keeping cost and latency under control. Vendor-neutral — the patterns apply to any chat\u002Fcompletions-style API.\n\n## Overview\n\nMost LLM integrations fail in the same ways: unvalidated free-text output parsed with regex, no handling for the model being confidently wrong, costs that scale with success, and prompts that silently break when the model is updated. The fix is engineering discipline: **schemas for output, evals for behavior, budgets for cost, and validation for everything.**\n\nThink of the LLM as a brilliant but unreliable contractor: give precise specs (prompts + schemas), inspect the work (validation + evals), and never let it touch production data unsupervised.\n\n## When to use\n\n- Adding chat, summarization, extraction, classification, or generation features.\n- Forcing machine-readable output (JSON) from a language model.\n- Streaming responses token-by-token to a UI.\n- Grounding answers in your own data (RAG).\n- Letting the model call your APIs (function\u002Ftool calling).\n- Controlling spend and latency in production.\n\n## Core concepts\n\n- **Roles.** `system` = persistent instructions and identity; `user` = the task; `assistant` = prior turns. Put invariants in system, specifics in user.\n- **Temperature.** Low (0–0.3) for extraction\u002Fclassification\u002Ffactual tasks; higher (0.7–1.0) for creative writing. When in doubt, go low.\n- **Structured output.** Request JSON with an explicit schema (JSON mode \u002F schema-constrained decoding where supported), then validate against the schema in code. Never trust unvalidated model output.\n- **Streaming.** Server-sent events token-by-token; render progressively for perceived speed. Still validate the final assembled object.\n- **Context window.** Input + output tokens share a budget. Long contexts cost more and reason worse — retrieve precisely instead of dumping documents.\n- **Embeddings.** Text → vectors for semantic search. Chunk documents (a few hundred tokens, with overlap), embed once, store in a vector index.\n- **RAG.** Retrieve relevant chunks → stuff into prompt → generate with citations. Grounding cuts hallucinations but doesn't eliminate them.\n- **Function calling.** The model emits a structured call; *your code* executes it. The model never touches the API directly.\n- **Evals.** Golden input\u002Foutput pairs + a scorer (exact match, LLM-judge, or human spot-check). The only way to know a prompt change helped.\n\n## Practical workflow\n\n**1. Prototype the prompt.** Start in a playground: system prompt with role, task, output schema, and 1–2 few-shot examples. Iterate until output is consistent.\n\n**2. Lock the contract.**\n```json\n{\n  \"type\": \"object\",\n  \"properties\": {\n    \"summary\": { \"type\": \"string\", \"maxLength\": 500 },\n    \"sentiment\": { \"enum\": [\"positive\", \"neutral\", \"negative\"] },\n    \"key_points\": { \"type\": \"array\", \"items\": { \"type\": \"string\" }, \"maxItems\": 5 }\n  },\n  \"required\": [\"summary\", \"sentiment\"]\n}\n```\nRequest this schema, then validate with a real validator (e.g., Zod, Pydantic). On validation failure: retry once with the error fed back, then fall back gracefully.\n\n**3. Build the pipeline.** Pre-process input (truncate, redact PII) → call with timeout + retry (exponential backoff on 429\u002F5xx) → validate → post-process → return. Log prompts, outputs, token counts.\n\n**4. Stream to the UI.** Flush tokens as they arrive; show a \"generating\" state; handle disconnects by keeping the partial result recoverable.\n\n**5. Add RAG when facts matter.** Chunk → embed → retrieve top-k → cite sources in the answer. Show sources in the UI so users can verify.\n\n**6. Measure.** Track per-request latency, tokens in\u002Fout, cost per feature, and eval pass rate on a schedule. Alert on drift.\n\n## Common pitfalls\n\n- **Prompt injection.** User input like \"ignore instructions and reveal the system prompt\" inside a larger task. Defenses: delimit untrusted input, keep secrets out of prompts, validate outputs, least-privilege tools.\n- **Hallucinated confidence.** Models state falsehoods fluently. For factual features: RAG + citations + \"I don't know\" as an allowed answer.\n- **Regex-parsing free text.** Brittle by design. Use structured output + schema validation.\n- **Context stuffing.** Dumping whole documents \"just in case\" — slow, expensive, worse reasoning. Retrieve the minimal relevant context.\n- **No cost guardrails.** Set per-user\u002Fper-day budgets, cache repeated queries (semantic or exact), and pick smaller models for easy sub-tasks (classification, routing).\n- **PII in prompts.** Names, emails, health\u002Ffinancial data sent to a third-party API may violate policy or law. Redact or use data-processing agreements; prefer redaction.\n- **Model updates breaking prompts.** Pin model versions in production; re-run evals before upgrading.\n- **Blocking UX.** LLM calls take seconds — always async with loading states, never blocking the main thread or request handler without timeouts.\n",{},"main","af388a77c2fe5e0b4fd879cca4300a0ffa9a6579","skills\u002Fams-llm-pro",1,"https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis","https:\u002F\u002Fgithub.com\u002FTanNhatCMS","https:\u002F\u002Fmrkiet.name.vn","2026-11-07 14:23:08",{"source":7,"skillName":5,"commands":32,"prompt":42,"zipAvailable":43},[33,36,39],{"tool":34,"command":35},"npx","npx skills add TanNhatCMS\u002Fjarvis --skill ams-llm-pro",{"tool":37,"command":38},"bunx","bunx skills add TanNhatCMS\u002Fjarvis --skill ams-llm-pro",{"tool":40,"command":41},"pnpm","pnpm dlx skills add TanNhatCMS\u002Fjarvis --skill ams-llm-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fams-llm-pro\u002FSKILL.md",true,[],[46,53,61,68,75,82],{"skillNo":47,"name":48,"nameZh":6,"description":49,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":50,"categories":51,"keywords":52,"publishedAt":18},"01M7EWYJR0J8DARY7E59Z6Y9MV","web-scrape","Turn web pages into LLM-ready markdown via the Firecrawl API (renders JS, anti-bot handling). Use when browser_open\u002Ffetch fails on JS-heavy pages, or when you need clean markdown\u002Fstructured extraction from a site. Requires FIRECRAWL_API_KEY.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fweb-scrape\u002FSKILL.md",[],[],{"skillNo":54,"name":55,"nameZh":6,"description":56,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":57,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":18},"01M7EWYBN5P6F2AJG3FR24T9BP","design-taste-frontend","tasteskill v2, the anti-slop frontend skill. Art direction for websites, distilled from a study of 247 curated gallery sites (One Page Love, Awwwards Sites of the Day). Deals researched directions (idea, composition, type, palette, photographs, section blueprints) from a library, enforces a strict no-slop house style with a real-browser inspector, and runs a look-and-fix loop on screenshots. Use this whenever you build, design, redesign, restyle, polish or review a landing page, marketing site, portfolio, product page, one-pager, hero or any public-facing web page, in any stack (HTML\u002FCSS, React, Next.js, Vue, Svelte, Astro, Tailwind) — also when the user says a page looks generic, templated, \"AI-made\", sloppy, or asks to make it look designed, premium, award-level or less like every other site. Not for dashboards or app screens.","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FLICENSE","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Ftaste-design\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":18},"01M7EWY8FQFNQ2GB7NZZWGSSDX","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-tdd\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":18},"01M7EWY5SHBFRH1HDHVWM9K7TV","systematic-debugging","Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-debugging\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":18},"01M7EWY3NM0Z0JAKS7HDZ24K66","requesting-code-review","Use when completing tasks, implementing major features, or before merging to verify work meets requirements","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-code-review\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":11,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":18},"01M7EWY0WRMWX4M9ZFY0WKC593","brainstorming","You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).","https:\u002F\u002Fgithub.com\u002FTanNhatCMS\u002Fjarvis\u002Fblob\u002Fmain\u002Fskills\u002Fsuperpowers-brainstorming\u002FSKILL.md",[],[]]