llm-integration

llm-integration is a skill for Claude Code, Codex from LuuOW/meridian-mcp. It costs 29 tokens per session (2,001 once invoked), scanned A, original, MIT.

A guide to connecting software to Claude and OpenAI language models through their APIs, including prompts, streamed responses, tool use, and choosing between models.

In plain words
What is it for?
Building completions, system prompts, streaming output, tool-enabled workflows, token tracking, and routing tasks between Claude and OpenAI models.
Why use it?
It gives developers patterns for adding language-model features while managing context, token usage, cost, and asynchronous responses.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Building completions, system prompts, streaming output, tool-enabled workflows, token tracking, and routing tasks between Claude and OpenAI models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/luuow/meridian-mcp/llm-integration
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add LuuOW/meridian-mcp --skill llm-integration
Clone the repo
git clone --depth 1 https://github.com/LuuOW/meridian-mcp

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for llm-integration

README.md
[![agentmods](https://agentmods.dev/badge/skills/luuow/meridian-mcp/llm-integration/github.svg)](https://agentmods.dev/skills/luuow/meridian-mcp/llm-integration)
Your own site
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/llm-integration"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/llm-integration/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for llm-integration

Your own site · 80×15
<a href="https://agentmods.dev/skills/luuow/meridian-mcp/llm-integration"><img src="https://agentmods.dev/badge/skills/luuow/meridian-mcp/llm-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,001 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.02001
Opus 5.5 $0.00012 $0.00800
Sonnet 5.5 $0.00006 $0.00400
Haiku 4.5 $0.00003 $0.00200

Measured 1mo ago against content hash 1f4ad61ec9ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

llm-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/llm-integration/SKILL.md · 239 lines

How it starts

The opening of the file, as written. The whole thing — 239 lines — stays where its author put it; the contents beside it link to each section on GitHub.

llm-integration

Practical patterns for integrating Claude (Anthropic) and OpenAI into production pipelines — prompting, streaming, tool use, cost tracking, and multi-model routing.

1) Anthropic client (Python)

import anthropic

client = anthropic.Anthropic(api_key=os.getenv("ANTHROPIC_API_KEY"))

# Simple completion
message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=2048,
    messages=[{"role": "user", "content": prompt}],
)
text = message.content[0].text

# With system prompt
message = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    system="You are a precise SEO article writer. Output only valid markdown.",
    messages=[{"role": "user", "content": f"Write about: {topic}"}],
)

2) OpenAI client (Python)

from openai import AsyncOpenAI

client = AsyncOpenAI(api_key=os.getenv("OPENAI_API_KEY"))

response = await client.chat.completions.create(
    model="gpt-4o",
    messages=[
        {"role": "system", "content": system_prompt},
        {"role": "user",   "content": user_prompt},
    ],
    max_tokens=2048,
    temperature=0.3,
)
text = response.choices[0].message.content
tokens_used = response.usage.total_tokens

3) Streaming responses

# Anthropic stream
with client.messages.stream(
    model="claude-sonnet-4-6",
    max_tokens=4096,
    messages=[{"role": "user", "content": prompt}],
) as stream:
    for chunk in stream.text_stream:
        print(chunk, end="", flush=True)
    message = stream.get_final_message()

# OpenAI stream
stream = await client.chat.completions.create(model="gpt-4o", messages=msgs, stream=True)
async for chunk in stream:
    delta = chunk.choices[0].delta.content or ""
    print(delta, end="", flush=True)

4) Tool use / function calling (Claude)

tools = [{
    "name": "search_web",
    "description": "Search the web and return top results",
    "input_schema": {
        "type": "object",
        "properties": {
            "query": {"type": "string", "description": "Search query"},
        },
        "required": ["query"],
    },
}]

response = client.messages.create(
    model="claude-sonnet-4-6",
    max_tokens=1024,
    tools=tools,
    messages=[{"role": "user", "content": "What are the latest keto trends?"}],
)

# Handle tool call
if response.stop_reason == "tool_use":
    tool_use = next(b for b in response.content if b.type == "tool_use")
    tool_result = await search_web(tool_use.input["query"])

    # Continue conversation with result
    response = client.messages.create(
        model="claude-sonnet-4-6",
        max_tokens=2048,
        tools=tools,
        messages=[
            {"role": "user", "content": "What are the latest keto trends?"},
            {"role": "assistant", "content": response.content},
            {"role": "user", "content": [{"type": "tool_result", "tool_use_id": tool_use.id, "content": str(tool_result)}]},
        ],
    )

Read the full file on GitHub · 239 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 1mo ago First seen · 239 lines · 29 tokens per session scan A 1f4ad61ec9ac

Subscribe to this mod's changes

llm-integration is a skill published in the GitHub repository LuuOW/meridian-mcp (0 stars, last pushed 12d ago), licensed MIT. It adds 29 tokens to every session and 2,001 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

openrouter

OpenRouter unified AI API - Access 200+ LLMs through single interface with intelligent routing, streaming, cost optimization, and model fallbacks.

bobmatnyc/claude-mpm-skills · 32 tokens

ASCII Art

Generate ASCII art using pyfiglet (571 fonts), cowsay, boxes, toilet, image-to-ascii, remote APIs (asciified, ascii.co.uk), and LLM fallback. No API keys required.

agentic-in/elephant-agent · 47 tokens

browserwing-executor

Control browser automation through HTTP API. Supports page navigation, element interaction (click, type, select), data extraction, accessibility snapshot analysis, screenshot, JavaScript execution, and batch operations.

MemTensor/MemOS · 42 tokens

liter-llm-running-the-proxy

Use when running the liter-llm api OpenAI-compatible gateway — virtual keys, per-key rate limits, budgets, cost tracking, and model routing. Covers the TOML config and the 22 REST endpoints.

xberg-io/liter-llm · 45 tokens

grpc-expert

Expert-level gRPC, Protocol Buffers, microservices communication, and streaming. Use when the user mentions Protocol Buffers, microservices, RPC, or streaming, or when the task involves gRPC Fundamentals, Communication Patterns, or Production Features.

personamanagmentlayer/pcl · 53 tokens

ai-skills

Use when building LLM applications, RAG knowledge bases, AI agents, terminal coding agents, multi-model orchestration, plugin-based agent harnesses, or file translation. Index of 14 skills: Dify, LangChain, LlamaIndex, Ollama, Transformers, Hermes Agent, OpenClaw, OpenCode, Pi, DocuTranslate, DeepSeek Harness and more.

znlgis/opengis-skills · 81 tokens