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 softspark/ai-toolkit --skill json-mode-patternsgit clone --depth 1 https://github.com/softspark/ai-toolkitWrote 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/softspark/ai-toolkit/json-mode-patterns)<a href="https://agentmods.dev/skills/softspark/ai-toolkit/json-mode-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/json-mode-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/softspark/ai-toolkit/json-mode-patterns"><img src="https://agentmods.dev/badge/skills/softspark/ai-toolkit/json-mode-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.00042 | $0.01054 |
| Opus 5.5 | $0.00017 | $0.00422 |
| Sonnet 5.5 | $0.00008 | $0.00211 |
| Haiku 4.5 | $0.00004 | $0.00105 |
Grade A, and why
json-mode-patterns 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.
How it starts
The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.
JSON Mode Patterns
Use native JSON outputs through output_config.format for a structured response.
Use strict: true on a tool when its arguments need constrained decoding.
Forcing a tool call alone does not guarantee schema compliance.
Native JSON response
This example uses the current Messages API shape. The caller supplies the approved
model and output budget. Numeric limits are checked locally because raw structured
output schemas do not support minimum and maximum.
import json
import math
ANALYSIS_SCHEMA = {
"type": "object",
"properties": {
"sentiment": {"type": "string", "enum": ["positive", "neutral", "negative"]},
"confidence": {"type": "number"},
"themes": {"type": "array", "items": {"type": "string"}},
},
"required": ["sentiment", "confidence", "themes"],
"additionalProperties": False,
}
def validate_analysis(result):
if not isinstance(result, dict) or set(result) != set(ANALYSIS_SCHEMA["required"]):
raise ValueError("Unexpected analysis fields")
sentiment = result["sentiment"]
if not isinstance(sentiment, str) or sentiment.casefold() not in {"positive", "neutral", "negative"}:
raise ValueError("Unknown sentiment")
confidence = result["confidence"]
if (type(confidence) not in (int, float)
or not 0 <= confidence <= 1 or not math.isfinite(confidence)):
raise ValueError("Confidence must be finite and between zero and one")
themes = result["themes"]
if not isinstance(themes, list) or not 1 <= len(themes) <= 10 or not all(isinstance(t, str) for t in themes):
raise ValueError("Expected one to ten theme strings")
return {**result, "sentiment": sentiment.casefold()}
def analyze(client, model, text, max_tokens):
response = client.messages.create(
model=model,
max_tokens=max_tokens,
messages=[{"role": "user", "content": text}],
output_config={"format": {"type": "json_schema", "schema": ANALYSIS_SCHEMA}},
)
if response.stop_reason != "end_turn":
raise ValueError(f"Analysis incomplete: {response.stop_reason}")
blocks = [block.text for block in response.content if block.type == "text"]
if len(blocks) != 1:
raise ValueError("Expected one structured response")
return validate_analysis(json.loads(blocks[0]))
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.
- 1mo ago Changed · -16 lines · +3 tokens per session 388395b094f0
- 1mo ago First seen · 125 lines · 39 tokens per session scan A c2551f80f367
json-mode-patterns is a skill published in the GitHub repository softspark/ai-toolkit (180 stars, last pushed 9d ago), licensed Apache-2.0. It adds 42 tokens to every session and 1,054 once invoked, about $0.0002 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-09-03.
Other skills, from other repositories
roo-fix-volatile-msg
Ladder-aware Roo Code Anthropic caching — verify the rolling read/write ladder on the wire, then close the real gaps (Vertex 4-block budget, MiniMax path).
model-strategy
Rollenbasierte Multi-Modell-Strategie. Modellkatalog liegt in einer lokalen Konfigurationsdatei statt im Skill-Text -- Rollen (Denker/Entscheider, Dauer-Worker, Entwurfsgenerator, Reviewer/Abnahme, Eskalation), Reasoning-Effort als eigene Achse, Abnahmepflicht für Entwurfsmodelle, Anbieterwechsel für unabhängige…
creator-prompt-engineer
Convert creative-department outputs (script, vision, cinematography, characters, sets, storyboards, shots) into producible, consistent AI image/video prompts — with tool-specific optimization, locked anchors, negative prompts, and safe alternatives. Default image tool priority for storyboard/character sheets is GPT…
ai-agent-builder
Conception et implémentation d'agents IA autonomes avec outils, mémoire et orchestration. Se déclenche avec "agent IA", "AI agent", "autonomous agent", "tool use", "function calling", "agent framework", "LangChain agent", "CrewAI", "AutoGen", "agent loop", "ReAct". Also triggers on "build an AI agent", "agent with…
ai-workflow-orchestrator
Orchestration de workflows IA complexes avec chaînes et pipelines. Se déclenche avec "workflow IA", "LangChain", "LangGraph", "pipeline IA", "chaîne de prompts", "orchestration LLM", "AI pipeline", "multi-step AI". Also triggers on "chain LLM calls", "orchestrate AI steps".
prompt-engineer
Use this skill when the user explicitly asks to create, write, improve, or optimize a prompt for use with an AI. Trigger on phrases like "write me a prompt", "improve this prompt", "create a system prompt", "how do I ask ChatGPT/Claude to...", or "quero um prompt para...". Do NOT trigger for direct task requests where…