Analyze Agent Smith session metrics and produce tuning recommendations for Claude Code, Codex, or OpenCode. Use when asked to analyze metrics, tune config, review agent performance, generate a performance report, or optimize agent settings.
Analyze session metrics and produce tuning recommendations for Claude Code, Codex, or OpenCode configuration.
Before running any scripts, resolve AGENT_SMITH_ROOT:
scripts/analyze-config.sh plus .claude-plugin/plugin.json, .codex-plugin/plugin.json, or opencode-plugin/package.json, use the current repo root.claude when running inside Claude Code, codex when running inside Codex, and opencode when running inside OpenCode. Do not mix them unless the user explicitly asks for a cross-agent report.bash "${AGENT_SMITH_ROOT}/scripts/metrics-rollup.sh" to ensure the SQLite database at ~/.config/agent-smith/rollup.db is currentbash "${AGENT_SMITH_ROOT}/scripts/analyze-config.sh" --sessions 50 --tool <initiating-agent> (adjust session count as needed)~/.config/agent-smith/reports/bash "${AGENT_SMITH_ROOT}/scripts/analyze-config.sh" --llm --sessions 50 --tool <initiating-agent>. Only add --include-settings if the user explicitly approves sending the relevant local settings snapshot.permissions.allow in settings.jsonmax_tokens) -> suggest model or effort level adjustmentsSafe to apply directly (non-breaking):
~/.claude/commands/*.md or .claude/commands/*.mdRequires user approval:
permissions.allow in settings.jsonLocal raw analysis is the default: bash "${AGENT_SMITH_ROOT}/scripts/analyze-config.sh" --sessions 50 --tool <initiating-agent>