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 agentmods add skills/tanstack/ai/debug-loggingnpx skills add TanStack/ai --skill debug-logginggit clone --depth 1 https://github.com/TanStack/aiWhat 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 | $0.00104 | $0.02016 |
| Opus 5 | $0.00052 | $0.01008 |
| Sonnet 5 | $0.00021 | $0.00403 |
| Haiku 4.5 | $0.00010 | $0.00202 |
Grade A, and why
ai-core/debug-logging 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 yesterday.
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 — 264 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Debug Logging
Dependency note: This skill builds on ai-core. Read it first for critical rules.
Use this skill when you need to turn debug logging on or off, narrow what's
printed, or pipe logs into a custom logger (pino, winston, etc.). The same
debug option works on every activity — chat(), summarize(),
generateImage(), generateSpeech(), generateTranscription(),
generateVideo().
Turn it on
import { chat } from '@tanstack/ai'
import { openaiText } from '@tanstack/ai-openai'
const stream = chat({
adapter: openaiText('gpt-5.2'),
messages,
debug: true, // all categories on, prints to console
})
Each log line is prefixed with an emoji and [tanstack-ai:<category>]:
📤 [tanstack-ai:request] 📤 activity=chat provider=openai model=gpt-5.2 messages=1 tools=0 stream=true
🔁 [tanstack-ai:agentLoop] 🔁 run started
📥 [tanstack-ai:provider] 📥 provider=openai type=response.output_text.delta
📨 [tanstack-ai:output] 📨 type=TEXT_MESSAGE_CONTENT
Turn it off
chat({
adapter: openaiText('gpt-5.2'),
messages,
debug: false, // silence everything, including errors
})
Omitting debug is not the same as debug: false. When omitted, the
errors category is still on (errors are cheap and important). Use
debug: false or debug: { errors: false } for true silence.
DebugOption — the accepted shapes
type DebugOption = boolean | DebugConfig
interface DebugConfig {
// Per-category flags. Any flag omitted from a DebugConfig defaults to true.
request?: boolean
provider?: boolean
output?: boolean
middleware?: boolean
tools?: boolean
agentLoop?: boolean
config?: boolean
errors?: boolean
// Optional custom logger. Defaults to ConsoleLogger.
logger?: Logger
}
Resolution rules for the debug?: DebugOption field on every activity:
debug value |
Effect |
|---|---|
omitted (undefined) |
Only errors is active; default ConsoleLogger. |
true |
All categories on; default ConsoleLogger. |
false |
All categories off (including errors); default ConsoleLogger. |
DebugConfig object |
Each unspecified flag defaults to true; logger replaces ConsoleLogger. |
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.
- yesterday First seen · 264 lines · 104 tokens per session scan A fe2fdf233e27
ai-core/debug-logging is a skill published in the GitHub repository TanStack/ai (3,045 stars, last pushed 2d ago), licensed MIT. It adds 104 tokens to every session and 2,016 once invoked, about $0.0005 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-30.
Other skills, from other repositories
create-design-system
Skill to use if user asks you to create a design system or UI kit.
image-generation
Generate images and iteratively edit saved image artifacts.
artifact-diagramming
Diagramming know-how for Artifacts - when a picture earns its place, how to draw one that shows the real mechanism, and the inline-SVG mechanics that keep it legible in both themes.
maps-geography
Accurate maps from real geo data — use for any map, or whenever geography would make a good graphic for a deliverable.
nano-banana-pro
Generate or edit images via Gemini 3 Pro Image (Nano Banana Pro). Use when the user asks to create an image, generate a picture, produce AI-generated artwork, edit a photo, compose multiple images, or upscale an image to higher resolution. Supports text-to-image generation, single-image editing, and multi-image…
interactive-prototype
Working app with real interactions.