Agent skill

LLM Integration

by rohitg00 in rohitg00/awesome-claude-code-toolkit

LLM integration patterns including API usage, streaming, function calling, RAG pipelines, and cost optimization

Apache-2.0Auto-check passedAI & LLM Engineering

Install LLM Integration

skills CLI
$ npx skills add rohitg00/awesome-claude-code-toolkit --skill llm-integration -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rohitg00/awesome-claude-code-toolkit llm-integration --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rohitg00/awesome-claude-code-toolkit.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/llm-integration .claude/skills/llm-integration && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
llm-integration
GitHub stars
2.7k
Token cost
~1.5k tokens
SKILL.md length
149 words
Files
1
Skills in repo
37
Repo updated
First seen
Licence
Apache-2.0

At a glance

LLM integration patterns including API usage, streaming, function calling, RAG pipelines, and cost optimization

  • Tasks that involve Structured output and tool calling
  • SKILL.md covers API Client Pattern, Streaming Responses, Function Calling (Tool Use) and RAG Pipeline, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Tasks that involve Retrieval-augmented generation

What it does

LLM Integration is an agent skill from rohitg00/awesome-claude-code-toolkit. LLM integration patterns including API usage, streaming, function calling, RAG pipelines, and cost optimization

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Structured output and tool calling, Retrieval-augmented generation and Third-party API integration. The repository describes itself as: The most comprehensive toolkit for Claude Code -- 135 agents, 35 curated skills, 42 commands, 176+ plugins, 20 hooks, 15 rules, 7 templates, 14 MCP configs, 26 companion apps, 52… The licence is Apache-2.0.

When your agent uses it

  • Tasks that involve Structured output and tool calling
  • Tasks that involve Retrieval-augmented generation
  • Tasks that involve Third-party API integration

Example prompts

  • “/llm-integration”

What it can do on your machine

Read from SKILL.md and the folder at commit ebdf1d5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

LLM Integration loads about 1.5k tokens when it runs. Until then it costs about 32 tokens; SKILL.md has 149 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~32
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rohitg00/awesome-claude-code-toolkit at commit ebdf1d5, republished under its Apache-2.0 licence (© rohitg00). 149 words, ~1,539 tokens.

Download SKILL.mdSave it as .claude/skills/llm-integration/SKILL.md (or your agent's skills folder).
name
llm-integration
description
LLM integration patterns including API usage, streaming, function calling, RAG pipelines, and cost optimization

LLM Integration

API Client Pattern

typescript
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic();

async function generateResponse(
  systemPrompt: string,
  userMessage: string,
  options?: { maxTokens?: number; temperature?: number }
): Promise<string> {
  const response = await client.messages.create({
    model: "claude-sonnet-4-20250514",
    max_tokens: options?.maxTokens ?? 1024,
    temperature: options?.temperature ?? 0,
    system: systemPrompt,
    messages: [{ role: "user", content: userMessage }],
  });

  const textBlock = response.content.find(block => block.type === "text");
  return textBlock?.text ?? "";
}

Streaming Responses

typescript
async function streamResponse(
  messages: Array<{ role: "user" | "assistant"; content: string }>,
  onChunk: (text: string) => void
): Promise<string> {
  const stream = client.messages.stream({
    model: "claude-sonnet-4-20250514",
    max_tokens: 4096,
    messages,
  });

  let fullText = "";

  for await (const event of stream) {
    if (event.type === "content_block_delta" && event.delta.type === "text_delta") {
      onChunk(event.delta.text);
      fullText += event.delta.text;
    }
  }

  return fullText;
}

const response = await streamResponse(
  [{ role: "user", content: "Explain async/await in TypeScript" }],
  (chunk) => process.stdout.write(chunk)
);

Function Calling (Tool Use)

typescript
const tools: Anthropic.Tool[] = [
  {
    name: "search_database",
    description: "Search the product database by name, category, or price range",
    input_schema: {
      type: "object" as const,
      properties: {
        query: { type: "string", description: "Search query" },
        category: { type: "string", description: "Product category filter" },
        max_price: { type: "number", description: "Maximum price" },
      },
      required: ["query"],
    },
  },
];

async function agentLoop(userMessage: string): Promise<string> {
  const messages: Anthropic.MessageParam[] = [
    { role: "user", content: userMessage },
  ];

  while (true) {
    const response = await client.messages.create({
      model: "claude-sonnet-4-20250514",
      max_tokens: 4096,
      tools,
      messages,
    });

    if (response.stop_reason === "end_turn") {
      const text = response.content.find(b => b.type === "text");
      return text?.text ?? "";
    }

    const toolUse = response.content.find(b => b.type === "tool_use");
    if (!toolUse || toolUse.type !== "tool_use") break;

    const result = await executeToolCall(toolUse.name, toolUse.input);

    messages.push({ role: "assistant", content: response.content });
    messages.push({
      role: "user",
      content: [{ type: "tool_result", tool_use_id: toolUse.id, content: result }],
    });
  }

  return "";
}

RAG Pipeline

typescript
import { embed } from "./embeddings";

interface Chunk {
  id: string;
  text: string;
  metadata: Record<string, string>;
  embedding: number[];
}

async function retrieveAndGenerate(query: string): Promise<string> {
  const queryEmbedding = await embed(query);

  const relevantChunks = await vectorDb.search({
    vector: queryEmbedding,
    topK: 5,
    filter: { source: "documentation" },
  });

  const context = relevantChunks
    .map((chunk, i) => `[${i + 1}] ${chunk.text}`)
    .join("\n\n");

  const response = await client.messages.create({
    model: "claude-sonnet-4-20250514",
    max_tokens: 2048,
    system: `Answer questions using the provided context. Cite sources with [n] notation. If the context doesn't contain the answer, say so.`,
    messages: [
      {
        role: "user",
        content: `Context:\n${context}\n\nQuestion: ${query}`,
      },
    ],
  });

  return response.content[0].type === "text" ? response.content[0].text : "";
}

Document Chunking

typescript
function chunkDocument(
  text: string,
  options: { chunkSize: number; overlap: number }
): string[] {
  const { chunkSize, overlap } = options;
  const chunks: string[] = [];
  const sentences = text.split(/(?<=[.!?])\s+/);
  let current = "";

  for (const sentence of sentences) {
    if (current.length + sentence.length > chunkSize && current.length > 0) {
      chunks.push(current.trim());
      const words = current.split(" ");
      const overlapWords = words.slice(-Math.floor(overlap / 5));
      current = overlapWords.join(" ") + " " + sentence;
    } else {
      current += (current ? " " : "") + sentence;
    }
  }

  if (current.trim()) chunks.push(current.trim());
  return chunks;
}

Cost Optimization

typescript
function selectModel(task: TaskType): string {
  switch (task) {
    case "classification":
    case "extraction":
      return "claude-haiku-4-20250514";
    case "analysis":
    case "coding":
      return "claude-sonnet-4-20250514";
    case "complex-reasoning":
      return "claude-opus-4-5-20251101";
    default:
      return "claude-sonnet-4-20250514";
  }
}

Use the smallest model that achieves acceptable quality. Cache embeddings and responses where possible. Batch requests when latency is not critical.

Anti-Patterns

  • Sending entire documents when only relevant chunks are needed
  • Not implementing retry logic with exponential backoff for API calls
  • Ignoring token usage tracking (leads to unexpected costs)
  • Using the most expensive model for simple classification tasks
  • Not validating or sanitizing LLM output before using it in code
  • Building RAG without evaluating retrieval quality first

Checklist

  • API calls wrapped with retry logic and error handling
  • Streaming used for user-facing responses
  • Function calling schemas include clear descriptions
  • RAG chunks sized appropriately (500-1000 tokens) with overlap
  • Model selection based on task complexity
  • Token usage tracked and monitored for cost control
  • LLM output validated before downstream use
  • Embeddings cached to avoid redundant API calls

© rohitg00, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in skills/llm-integration of rohitg00/awesome-claude-code-toolkit.

Open the folder on GitHubat commit ebdf1d5

Compare with similar skills

LLM Integration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

LLM Integration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
LLM Integration this skillrohitg00/awesome-claude-code-toolkit2.7k—~1.5kAutomated safety check: PassApache-2.0
Convex Agentswaynesutton/builder-skills404—~2.2kAutomated safety check: PassApache-2.0
Openrouterdavidondrej/skills4.1k—~1.3kAutomated safety check: PassMIT
Building Agent Systemstelagod/code-abyss243—~691Automated safety check: PassMIT
MLtelagod/code-abyss2431 repos~566Automated safety check: PassMIT
AI Productaiskillstore/marketplace4304 repos~4.9kAutomated safety check: PassNone

Similar skills

  • Convex Agents

    waynesutton/builder-skills

    Builds AI agents on the Convex agent component: threads, messages, tools that call queries and mutations, streaming, RAG with vector search, and workflows for multi step jobs.

    404 GitHub stars~2.2k tokensUpdated 10 days ago
    AI & LLM EngineeringAuto-check passed
  • Openrouter

    davidondrej/skills

    Design, build, debug, and optimize OpenRouter API integrations.

    4.1k GitHub stars~1.3k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Building Agent Systems

    telagod/code-abyss

    AI agent and LLM system engineering reference covering single-agent dev (ReAct, tool calling, plan-execute), multi-agent coordination (swarm, role decomposition, file locking), LLM security (prompt…

    243 GitHub stars~691 tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed
  • ML

    telagod/code-abyss

    Machine learning and LLM engineering judgment, distilled from a stronger model - invoke when DECIDING whether/how to use ML or an LLM for a task (prompt vs RAG vs fine-tune vs classical); working…

    243 GitHub starsUsed in 1 repo~566 tokens
    AI & LLM EngineeringAuto-check passed
  • AI Product

    aiskillstore/marketplace

    Every product will be AI-powered. An agent skill from aiskillstore/marketplace.

    430 GitHub starsUsed in 4 repos~4.9k tokens
    AI & LLM EngineeringAuto-check passed
  • Mistral Core Workflow B

    jeremylongshore/tons-of-skills-marketplace

    Build Mistral embeddings, retrieval, and function-calling loops with tenant isolation and application-owned execution.

    2.8k GitHub stars~889 tokensUpdated today
    AI & LLM EngineeringAuto-check passed

More from rohitg00/awesome-claude-code-toolkit

All 37 skills in this repo
  • Accessibility Wcag

    rohitg00/awesome-claude-code-toolkit

    Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • API Design Patterns

    rohitg00/awesome-claude-code-toolkit

    REST API design with resource naming, pagination, versioning, and OpenAPI spec generation

    2.7k GitHub stars~1.2k tokensUpdated 4 mo ago
    Auto-check passed
  • Authentication Patterns

    rohitg00/awesome-claude-code-toolkit

    Authentication and authorization patterns including OAuth2, JWT, RBAC, session management, and PKCE flows

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • AWS Cloud Patterns

    rohitg00/awesome-claude-code-toolkit

    AWS cloud patterns for Lambda, ECS, S3, DynamoDB, and Infrastructure as Code with CDK/Terraform

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • CI CD Pipelines

    rohitg00/awesome-claude-code-toolkit

    CI/CD pipeline patterns for GitHub Actions, GitLab CI, testing strategies, and deployment automation

    2.7k GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Continuous Learning

    rohitg00/awesome-claude-code-toolkit

    Auto-extract patterns from coding sessions, track corrections, and build reusable knowledge with confidence scoring

    2.7k GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed

Questions about LLM Integration

What does LLM Integration do?

LLM integration patterns including API usage, streaming, function calling, RAG pipelines, and cost optimization. LLM Integration is an agent skill from rohitg00/awesome-claude-code-toolkit.

When should I use LLM Integration?

LLM Integration fits situations like: tasks that involve Structured output and tool calling; tasks that involve Retrieval-augmented generation; tasks that involve Third-party API integration.

How do I install LLM Integration in Claude Code?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill llm-integration -a claude-code`. Or copy the skill folder (skills/llm-integration in rohitg00/awesome-claude-code-toolkit) into .claude/skills/llm-integration in your project. Claude Code loads it when a task matches its description.

How do I install LLM Integration in Codex?

Run `npx skills add rohitg00/awesome-claude-code-toolkit --skill llm-integration -a codex`. Or copy the skill folder (skills/llm-integration in rohitg00/awesome-claude-code-toolkit) into .agents/skills/llm-integration in your project. Codex loads it when a task matches its description.

Can I use LLM Integration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rohitg00/awesome-claude-code-toolkit --skill llm-integration -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/llm-integration, .gemini/skills/llm-integration, .github/skills/llm-integration and .opencode/skills/llm-integration in your project.

What does LLM Integration need to run?

SKILL.md names no scripts, command-line tools or credentials: LLM Integration is instructions for the agent only.

Does LLM Integration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is LLM Integration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does LLM Integration use?

LLM Integration is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does LLM Integration use?

About 1.5k tokens (SKILL.md is roughly 6.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to LLM Integration?

Skills that share tags, products or a category with LLM Integration: Convex Agents (waynesutton/builder-skills, 404 stars), Openrouter (davidondrej/skills, 4.1k stars), Building Agent Systems (telagod/code-abyss, 243 stars) and ML (telagod/code-abyss, 243 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains LLM Integration?

rohitg00 (a GitHub user) maintains it in rohitg00/awesome-claude-code-toolkit, which has 2,685 GitHub stars. The repository holds 37 skills in this directory. The repository was last updated on May 12, 2026.

Source: rohitg00/awesome-claude-code-toolkit on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.