dev-ai-integration

dev-ai-integration is a command for Claude Code from christopherlouet/claude-base. It costs 0 tokens per session (443 once invoked), scanned A, original, MIT.

A development aid for adding language models and other AI services to an application. It covers provider and model choice, common integration patterns, security, error handling, limits, caching, and monitoring.

In plain words
What is it for?
Use it to plan or implement model calls, streaming, tool use, or RAG, add retries and rate limits, protect inputs and credentials, cache repeated requests, and monitor latency, cost, tokens, and errors.
Why use it?
It helps address practical problems such as exposed API keys, repeated requests, service failures, uncontrolled usage, and missing production measurements.

Command for Claude Code

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.

agentmods
npx agentmods add commands/christopherlouet/claude-base/dev-ai-integration
Clone the repo
git clone --depth 1 https://github.com/christopherlouet/claude-base

Made for: Claude Code.

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 dev-ai-integration

README.md
[![agentmods](https://agentmods.dev/badge/commands/christopherlouet/claude-base/dev-ai-integration.svg)](https://agentmods.dev/commands/christopherlouet/claude-base/dev-ai-integration)
Your own site
<a href="https://agentmods.dev/commands/christopherlouet/claude-base/dev-ai-integration"><img src="https://agentmods.dev/badge/commands/christopherlouet/claude-base/dev-ai-integration.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 443 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.00443
Opus 5 $0.00000 $0.00221
Sonnet 5 $0.00000 $0.00089
Haiku 4.5 $0.00000 $0.00044

Measured 4d ago against content hash 9daf29bc718e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dev-ai-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 4d 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.

.claude/commands/dev/dev-ai-integration.md · 51 lines

What it actually says

Agent DEV-AI-INTEGRATION

Integration of language models (LLM) and AI APIs into applications.

Request context

$ARGUMENTS

Objective

Integrate LLM APIs (Anthropic, OpenAI, Google, Mistral, Cohere) into an application with security, performance, and monitoring best practices.

Workflow

  • Choose the provider and model based on the use case (cost, performance, features)
  • Implement the appropriate pattern: simple completion, streaming, tool use/function calling, RAG
  • Add error handling with retry and exponential backoff
  • Implement rate limiting (Bottleneck or equivalent)
  • Add caching (Redis or equivalent) for repeated requests
  • Secure: environment variables for API keys, input sanitization, user/system separation
  • Configure monitoring: latency (<5s), tokens/request, cost/day, error rate (<1%)

Expected output

Integration plan with chosen provider, architecture, files to create/modify, cost estimation, and risks with mitigations.

Agent Usage
/dev:dev-rag RAG systems
/dev:dev-api API endpoints
/ops:ops-monitoring Production monitoring

See also (vendor depth)

This command stays the neutral multi-provider layer (choosing among Anthropic/OpenAI/Google/Mistral/Cohere — a chooser no single vendor can own without bias). For Claude-specific integration depth (single-call vs tool-use loop vs managed agents, streaming, prompt caching, token counting, model migration, across 8 languages), pair it with the claude-api skill — Anthropic's own, already bundled in Claude Code. See docs/recipes/recommended-vendor-skills.md §"Anthropic — claude-api".


IMPORTANT: Always use environment variables for API keys.

IMPORTANT: Never log prompts containing user data.

YOU MUST implement rate limiting and retry logic.

NEVER expose API keys in source code.

Think hard about model choice and cost estimation.

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. 4d ago First seen · 51 lines · 0 tokens per session scan A 9daf29bc718e

Subscribe to this mod's changes

dev-ai-integration is a command published in the GitHub repository christopherlouet/claude-base (5 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 443 tokens. 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.