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.
curl -O https://raw.githubusercontent.com/Artesiana/agent2/main/.agents/skills/debugging-agents/SKILL.mdgit clone --depth 1 https://github.com/Artesiana/agent2Wrote 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/artesiana/agent2/debugging-agents)<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.
<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>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.00045 | $0.00883 |
| Opus 5.5 | $0.00018 | $0.00353 |
| Sonnet 5.5 | $0.00009 | $0.00177 |
| Haiku 4.5 | $0.00005 | $0.00088 |
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 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 |
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.
- 2mo ago First seen · 88 lines · 45 tokens per session scan A c0e1524779ed
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.
debugging-agents compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| debugging-agentsArtesiana/agent2 | Skill | 37 | 6mo ago | MIT | A | 45 | Claude Code, Codex |
| 代码调试jianchen08/Agent-os-open | Skill | 7 | 29d ago | Apache-2.0 | A | 82 | Claude Code, Codex |
| dspy-debugging-observabilityOmidZamani/dspy-skills | Skill | 124 | 4mo ago | MIT | A | 35 | Claude Code |
| change-impact-analysissarveshtalele/mcp-skills-registry | Skill | 3 | 1mo ago | MIT | A | 92 | Claude Code, Codex |
| Godot 编码jianchen08/Agent-os-open | Skill | 7 | 29d ago | Apache-2.0 | A | 62 | Claude Code, Codex |
| systematic-debuggingNousResearch/hermes-agent | Skill | 261k | today | MIT | A | 16 | Claude Code, Codex |
| sglang-diffusion-benchmark-profilesgl-project/sglang | Skill | 39k | today | Apache-2.0 | A | 26 | Claude Code, Codex |