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 smicolon/ai-kit --skill ai-patternsgit clone --depth 1 https://github.com/smicolon/ai-kitWrote 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/smicolon/ai-kit/ai-patterns)<a href="https://agentmods.dev/skills/smicolon/ai-kit/ai-patterns"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/ai-patterns/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/smicolon/ai-kit/ai-patterns"><img src="https://agentmods.dev/badge/skills/smicolon/ai-kit/ai-patterns.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00041 | $0.02054 |
| Opus 5 | $0.00020 | $0.01027 |
| Sonnet 5 | $0.00008 | $0.00411 |
| Haiku 4.5 | $0.00004 | $0.00205 |
Grade A, and why
TanStack AI Patterns (Alpha) 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 5d 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 — 371 lines — stays where its author put it; the contents beside it link to each section on GitHub.
TanStack AI Patterns (Alpha)
Alpha Library: TanStack AI is in alpha. APIs may change between versions.
TanStack AI provides a unified SDK for integrating AI capabilities into React applications.
Core Concepts
- Providers: Backend AI providers (OpenAI, Anthropic, etc.)
- Streams: Real-time streaming responses
- Chat: Conversational interfaces
- Completion: Text completion
- Hooks: React hooks for AI interactions
Basic Setup
// lib/ai.ts
import { createAI } from '@tanstack/ai'
export const ai = createAI({
provider: 'openai',
apiKey: import.meta.env.VITE_OPENAI_API_KEY,
// Or use server-side proxy
baseUrl: '/api/ai',
})
Chat Interface
import { useChat } from '@tanstack/ai-react'
import { ai } from '@/lib/ai'
function ChatInterface() {
const {
messages,
input,
setInput,
sendMessage,
isLoading,
error,
} = useChat({
ai,
model: 'gpt-4',
systemPrompt: 'You are a helpful assistant.',
})
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault()
if (input.trim()) {
sendMessage(input)
setInput('')
}
}
return (
<div className="chat-container">
<div className="messages">
{messages.map((message) => (
<div
key={message.id}
className={`message ${message.role}`}
>
{message.content}
</div>
))}
{isLoading && <div className="loading">Thinking...</div>}
</div>
<form onSubmit={handleSubmit}>
<input
value={input}
onChange={(e) => setInput(e.target.value)}
placeholder="Type a message..."
disabled={isLoading}
/>
<button type="submit" disabled={isLoading || !input.trim()}>
Send
</button>
</form>
{error && <div className="error">{error.message}</div>}
</div>
)
}
Streaming Responses
import { useCompletion } from '@tanstack/ai-react'
import { ai } from '@/lib/ai'
function StreamingCompletion() {
const {
completion,
complete,
isLoading,
stop,
} = useCompletion({
ai,
model: 'gpt-4',
})
const handleGenerate = () => {
complete('Write a short story about a robot learning to paint.')
}
return (
<div>
<button onClick={handleGenerate} disabled={isLoading}>
Generate Story
</button>
{isLoading && (
<button onClick={stop}>Stop</button>
)}
<div className="completion">
{completion}
{isLoading && <span className="cursor">|</span>}
</div>
</div>
)
}
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.
- 5d ago First seen · 371 lines · 41 tokens per session scan A 5276db3b875d
TanStack AI Patterns (Alpha) is a skill published in the GitHub repository smicolon/ai-kit (6 stars, last pushed 5d ago), licensed MIT. It adds 41 tokens to every session and 2,054 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
deepseek-helper
A guide for using the DeepSeek API, a service that lets programs send requests to DeepSeek language models. It covers model choice, example requests, prompt improvements, cost estimates, and common API errors.
opik-optimizer
Optimize LLM prompts, tools, and agents in Opik using standardized optimizer workflows (prompt optimization, tool optimization, and parameter tuning), dataset/metric wiring, and result interpretation.
proxy-local-ai-subscriptions
A guide for exposing your local Codex, ChatGPT Codex, or Claude Code subscription through a protected local OpenAI-compatible endpoint, then connecting it to NextClaw as a custom provider.
building-agent-systems
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 injection, jailbreak defense, output filtering), RAG architecture (chunking, hybrid retrieval, rerank), and prompt…
ml
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 with training/eval data or labels; building or reviewing evals for models and LLM features; designing RAG, structured…
joule-strategy
You are a Joule and SAP AI strategy expert. Joule is SAP's generative AI copilot embedded across SAP applications. Your job is to help organizations plan, govern, and execute Joule adoption in a way that accelerates value without creating compliance risk, shadow AI behavior, or unrealistic expectations about what…