agent2: Skill for Claude Code

.agents/skills/debugging-agents/SKILL.md

debugging-agents is a skill for Claude Code, Codex from Artesiana/agent2. It costs 45 tokens per session (883 once invoked), scanned A, original, MIT.

A troubleshooting guide for Agent2 agents, covering configuration, imports, Docker containers, authentication, knowledge search, and response formats. Agent2 agents are software agents that can run as services and answer API requests.

In plain words
What is it for?
Checking container health and logs, diagnosing API-key and token problems, fixing import or configuration issues, and investigating schema or knowledge-search failures.
Why use it?
It provides a systematic way to identify why an agent returns errors, fake data, empty searches, invalid responses, or fails to start.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is Artesiana/agent2's own configuration. It tells Claude Code and Codex how to work on agent2 itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agent2 configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Artesiana/agent2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Artesiana/agent2/main/.agents/skills/debugging-agents/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Artesiana/agent2

Made for: Claude Code, Codex.

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 debugging-agents

README.md
[![agentmods](https://agentmods.dev/badge/skills/artesiana/agent2/debugging-agents/github.svg)](https://agentmods.dev/skills/artesiana/agent2/debugging-agents)
Your own site
<a href="https://agentmods.dev/skills/artesiana/agent2/debugging-agents"><img src="https://agentmods.dev/badge/skills/artesiana/agent2/debugging-agents/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.

agentmods 80×15 button for debugging-agents

Your own site · 80×15
<a href="https://agentmods.dev/skills/artesiana/agent2/debugging-agents"><img src="https://agentmods.dev/badge/skills/artesiana/agent2/debugging-agents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 883 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00045 $0.00883
Opus 5.5 $0.00018 $0.00353
Sonnet 5.5 $0.00009 $0.00177
Haiku 4.5 $0.00005 $0.00088

Measured 2mo ago against content hash c0e1524779ed, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

debugging-agents scanned grade A with 1 finding 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 2mo 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.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://localhost:<port>/health
.agents/skills/debugging-agents/SKILL.md · 88 lines

How it starts

The opening of the file, as written. The whole thing — 88 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Debugging Agents

Overview

Systematic diagnosis for Agent2 agent problems. Most issues are config, imports, or missing infrastructure — not code bugs.

When to Activate

  • Agent returns 500 errors or problem+json responses
  • Agent returns mock data when you expect real LLM output
  • Agent Docker container won't start or isn't healthy
  • Agent doesn't find knowledge collections
  • Agent output doesn't match expected schema
  • Tests pass but Docker agent fails

Diagnostic Flowchart

Agent not working?
  ├─ Returns mock data? → Check OPENROUTER_API_KEY (is it set? valid?)
  ├─ 500 error? → Check logs: docker compose logs <agent-name>
  ├─ Container unhealthy? → Check Dockerfile (config copy? PYTHONPATH?)
  ├─ 401/403? → Check API_BEARER_TOKEN matches between client and .env
  ├─ Knowledge search empty? → Is R2R running? (--profile full) Were docs ingested?
  ├─ Schema validation error? → Agent output doesn't match output_type. Check prompt.
  └─ Import error? → Check agent module structure (__init__.py, agent.py naming)

Quick Diagnosis Commands

# 1. Is the container running and healthy?
docker compose ps <agent-name>

# 2. What do the logs say?
docker compose logs <agent-name> --tail=50

# 3. Can you hit the health endpoint?
curl http://localhost:<port>/health

# 4. Does mock mode work? (tests framework without LLM)
curl -X POST http://localhost:<port>/tasks?mode=sync \
  -H "Authorization: Bearer dev-token-change-me" \
  -H "Content-Type: application/json" \
  -d '{"input":{"text":"test"}}'

# 5. Are tests passing?
uv run pytest tests/ -v --tb=short

# 6. Is the Docker Compose config valid?
docker compose config --quiet

Common Issues

Symptom Cause Fix
_mock_reason: provider_auth_failed OPENROUTER_API_KEY is invalid Get a fresh key from openrouter.ai/keys
Mock data returned, no error OPENROUTER_API_KEY is empty Set it in .env
Could not import agent module Import path wrong in Docker Check Dockerfile: COPY agents/<name>/ ./agent/ and PYTHONPATH=/app
config.yaml not found Config not copied in Dockerfile Add mkdir -p agents/<name> && cp agent/config.yaml agents/<name>/config.yaml
toolsets=None error Passing None instead of empty list Use toolsets=[] not toolsets=None
Knowledge search returns nothing R2R not running or docs not ingested docker compose --profile full up -d then python -m shared.ingest --all
ProblemError 422 Input shape wrong input must be a JSON object: {"input": {"text": "..."}}
Container exits immediately Python import error Run locally first: uv run python -c "from agents.<name>.agent import agent"
Schema validation retry loop Agent output doesn't fit Pydantic model Simplify schema, add clearer prompt instructions, check Field constraints

Read the full file on GitHub · 88 lines

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. 2mo ago First seen · 88 lines · 45 tokens per session scan A c0e1524779ed

Subscribe to this mod's changes

debugging-agents is a skill published in the GitHub repository Artesiana/agent2 (37 stars, last pushed 6mo ago), licensed MIT. It adds 45 tokens to every session and 883 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

debugging-agents compared with skills from other repositories

debugging-agents next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
debugging-agentsArtesiana/agent2Skill376mo agoMITA45Claude Code, Codex
代码调试jianchen08/Agent-os-openSkill729d agoApache-2.0A82Claude Code, Codex
dspy-debugging-observabilityOmidZamani/dspy-skillsSkill1244mo agoMITA35Claude Code
change-impact-analysissarveshtalele/mcp-skills-registrySkill31mo agoMITA92Claude Code, Codex
Godot 编码jianchen08/Agent-os-openSkill729d agoApache-2.0A62Claude Code, Codex
systematic-debuggingNousResearch/hermes-agentSkill261ktodayMITA16Claude Code, Codex
sglang-diffusion-benchmark-profilesgl-project/sglangSkill39ktodayApache-2.0A26Claude Code, Codex