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.
npx skills add medy-gribkov/arcana --skill llm-integrationgit clone --depth 1 https://github.com/medy-gribkov/arcanaWrote 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.
[](https://agentmods.dev/skills/medy-gribkov/arcana/llm-integration)<a href="https://agentmods.dev/skills/medy-gribkov/arcana/llm-integration"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/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.
<a href="https://agentmods.dev/skills/medy-gribkov/arcana/llm-integration"><img src="https://agentmods.dev/badge/skills/medy-gribkov/arcana/llm-integration.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00028 | $0.01511 |
| Opus 5 | $0.00014 | $0.00756 |
| Sonnet 5 | $0.00006 | $0.00302 |
| Haiku 4.5 | $0.00003 | $0.00151 |
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 10d 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.
How it starts
The opening of the file, as written. The whole thing — 241 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LLM Integration Skill
Integrate Large Language Models (OpenAI, Anthropic) into applications with proper streaming, structured outputs, tool calling, prompt engineering, token management, and error handling.
API Configuration and Client Setup
BAD: Hardcoded credentials, no validation
const openai = new OpenAI({
apiKey: "sk-proj-abc123" // Hardcoded key
});
const anthropic = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY // No validation
});
GOOD: Environment validation, typed configuration
import OpenAI from 'openai';
import Anthropic from '@anthropic-ai/sdk';
interface LLMConfig {
openaiKey?: string;
anthropicKey?: string;
maxRetries: number;
timeout: number;
}
function validateConfig(config: LLMConfig): void {
if (!config.openaiKey && !config.anthropicKey) {
throw new Error('At least one API key (OPENAI_API_KEY or ANTHROPIC_API_KEY) required');
}
if (config.timeout < 1000) {
throw new Error('Timeout must be at least 1000ms');
}
}
const config: LLMConfig = {
openaiKey: process.env.OPENAI_API_KEY,
anthropicKey: process.env.ANTHROPIC_API_KEY,
maxRetries: 3,
timeout: 60000
};
validateConfig(config);
const openai = config.openaiKey ? new OpenAI({
apiKey: config.openaiKey,
maxRetries: config.maxRetries,
timeout: config.timeout
}) : null;
const anthropic = config.anthropicKey ? new Anthropic({
apiKey: config.anthropicKey,
maxRetries: config.maxRetries,
timeout: config.timeout
}) : null;
Streaming Responses
BAD: No streaming, blocks UI, no error handling
async function chat(prompt: string) {
const response = await openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: prompt }]
});
return response.choices[0].message.content;
}
GOOD: Streaming with error handling and token tracking
async function* streamChat(
prompt: string,
onToken?: (token: string) => void
): AsyncGenerator<string, void, unknown> {
try {
const stream = await openai.chat.completions.create({
model: 'gpt-4',
messages: [{ role: 'user', content: prompt }],
stream: true,
stream_options: { include_usage: true }
});
let totalTokens = 0;
for await (const chunk of stream) {
const delta = chunk.choices[0]?.delta?.content;
if (delta) {
onToken?.(delta);
yield delta;
}
if (chunk.usage) {
totalTokens = chunk.usage.total_tokens;
}
}
console.log(`Total tokens used: ${totalTokens}`);
} catch (error) {
if (error instanceof OpenAI.APIError) {
throw new Error(`OpenAI API error (${error.status}): ${error.message}`);
}
throw error;
}
}
// Usage
for await (const token of streamChat('Explain streaming', console.log)) {
process.stdout.write(token);
}
What ships with it
1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 10d ago First seen · 241 lines · 28 tokens per session scan A 81bbe84a4389
llm-integration is a skill published in the GitHub repository medy-gribkov/arcana (1 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 28 tokens to every session and 1,511 once invoked, about $0.0001 per session on Opus 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.
Other skills, from other repositories
minimax
MiniMax M-series production wiring patterns for the OpenAI-compatible API at api.minimax.io. TRIGGERS - MiniMax, MiniMax-M2.7, Hailuo.
ai-orchestration-vercel-ai-sdk
Vercel AI SDK patterns - providers, text generation, streaming, structured output, tool calling, chat UI hooks, embeddings, and RAG.
openai-assistants-builder
Création d'assistants IA hébergés avec l'API OpenAI Assistants v2. File search avec vector stores, code interpreter, function calling, threads persistants et streaming. Se déclenche avec "OpenAI Assistants", "assistant API", "file search", "code interpreter", "thread", "run", "assistant OpenAI", "GPT assistant"…
mcp-server-builder
Création de serveurs MCP (Model Context Protocol) pour exposer des outils, ressources et prompts aux LLMs. Se déclenche avec "MCP", "Model Context Protocol", "MCP server", "MCP tool", "MCP resource", "serveur MCP", "connecter Claude à", "exposer une API à Claude", "claude desktop config". Also triggers on "build an…
arxiv
Search and download arXiv papers (no API key needed).
data-pipeline-pro
Activates DataPipeline-Pro for data engineering and ETL/ELT pipeline design. Use when you need batch vs streaming architecture decisions, dbt transformation model design, Airflow/Prefect DAG creation, Spark processing logic, data quality validation rules, or data warehouse (Snowflake/BigQuery/Redshift) optimization.