debug
Diagnose koda issues — checks provider config, API connectivity, settings, and environment.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Diagnose koda issues — checks provider config, API connectivity, settings, and environment.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Scaffold a new sub-agent JSON file (.koda/agents/<name>.json) with the correct schema, tool scoping, and trust mode.
Scaffold a new bundled skill (.koda/skills/<name>/SKILL.md) with correct frontmatter, tool scoping, and a clear when_to_use trigger.
Review auto-memory entries and propose promotions, cleanups, and deduplication across all memory layers.
Review changed code for reuse, quality, and efficiency — then fix any issues found.
Senior code review — finds bugs, anti-patterns, and improvements
Security vulnerability scan — finds vulnerabilities before attackers do
| name | debug |
| description | Diagnose koda issues — checks provider config, API connectivity, settings, and environment. |
| tags | ["debug","diagnostics","troubleshooting","config"] |
| when_to_use | Use when koda is misbehaving — wrong provider, API errors, tools not working, unexpected behaviour. Describe the issue and this skill will guide a systematic diagnosis. |
| argument_hint | ["issue description","e.g. \"API calls are failing with 401\""] |
| allowed_tools | ["Read","Grep","Glob","List","Bash"] |
| user_invocable | true |
Help the user diagnose an issue they're encountering with koda. Work through the checklist below, run each command, and report findings. Do not skip steps — a step that passes is still useful information.
The user's issue: {{args}}
If no issue was described, read the config, logs, and environment and summarise anything that looks wrong.
Koda writes a per-process log to ~/.config/koda/logs/. A latest symlink always points to the current session's file:
# Tail the current session log
tail -50 ~/.config/koda/logs/latest 2>/dev/null || echo "(no log file found)"
# List recent log files
ls -lt ~/.config/koda/logs/ | head -10
Search for errors and warnings:
grep -E "ERROR|WARN" ~/.config/koda/logs/latest 2>/dev/null | tail -20
Check which provider is configured and whether its key is present:
# Show relevant env vars (mask actual key values)
env | grep -E "KODA|OPENAI|ANTHROPIC|GEMINI|GROQ|MISTRAL|DEEPSEEK|FIREWORKS|TOGETHER|API_KEY|API_BASE" | sed 's/=.*/=<set>/'
Common issues:
export OPENAI_API_KEY=... (or whichever provider)~/.config/koda/settings.toml for the active providerRead the koda settings file:
cat ~/.config/koda/settings.toml 2>/dev/null || echo "(no settings.toml found — using defaults)"
Check for:
provider — is it what the user expects?model — does it exist on that provider?base_url — is it reachable?List any user-level agent or skill overrides:
ls ~/.config/koda/agents/ 2>/dev/null && echo "---agents above---" || echo "(no user agents)"
ls ~/.config/koda/skills/ 2>/dev/null && echo "---skills above---" || echo "(no user skills)"
If custom agents exist, read any that seem relevant to the issue.
Test raw connectivity to the configured provider endpoint. Use the base URL from settings.toml or the provider default:
# OpenAI-compatible (OpenAI, Groq, Fireworks, local LM Studio, etc.)
curl -s -o /dev/null -w "%{http_code}" \
-H "Authorization: Bearer $OPENAI_API_KEY" \
https://api.openai.com/v1/models 2>&1 | head -5
# Anthropic
curl -s -o /dev/null -w "%{http_code}" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
https://api.anthropic.com/v1/models 2>&1
Expected: HTTP 200. Common failures:
Check whether memory files exist and are well-formed:
wc -l ~/.config/koda/memory.md 2>/dev/null || echo "(no global memory)"
wc -l ./MEMORY.md 2>/dev/null || echo "(no project memory)"
wc -l ./CLAUDE.md 2>/dev/null || echo "(no CLAUDE.md)"
Large memory files (>500 lines) can cause context overflow. If suspiciously large, read the first 50 lines.
After running all steps, provide:
RUST_LOG=koda_core=debug,koda_cli=debug koda ... and share the resulting log fileRUST_LOG=debug for maximum verbosity (very noisy)