costs
The /octo:costs command displays a detailed cost breakdown organized by AI provider and workflow for the current Claude Octopus session. Users invoke this command to analyze spending across multiple providers (Claude, Codex, Gemini, Perplexity) and see which commands generated the highest expenses, with parsed token counts and estimated costs derived from session usage logs stored in the .claude-octopus directory. This helps teams monitor API spending and optimize model selection.
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/nyldn/claude-octopus/HEAD/commands/costs.md -o ~/.claude/commands/costs.mdcosts.md
# Cost Dashboard (/octo:costs)
For table output, your first output line MUST be `🐙 Octopus Cost Dashboard`.
For JSON, emit only the helper output—no banner or commentary.
This v10 compatibility command shows the cost-focused view of `/octo:usage`.
It is scheduled for removal in v11.
## EXECUTION CONTRACT (Mandatory)
When the user invokes `/octo:costs`, run the helper once with the Bash tool:
```bash
OCTO_ROOT="${CLAUDE_PLUGIN_ROOT:-${HOME}/.claude-octopus/plugin}"
helper="$OCTO_ROOT/scripts/helpers/usage-report.sh"
if [[ ! -x "$helper" ]]; then
echo "ERROR: Claude Octopus usage report helper is unavailable. Run /octo:setup." >&2
exit 1
fi
format="table"
case " $ARGUMENTS " in
*" --format json "*|*" --format=json "*) format="json" ;;
esac
"$helper" --view costs --format "$format"
```
Choose the format before invoking the helper and invoke it exactly once. For
JSON, emit only the helper output. The helper owns pricing, session aggregation,
provider rows, and the workflow cost breakdown. Do not inspect usage files or
calculate rates inside the model response.Backend architect. Delegate only when the user explicitly starts an Octopus workflow.
Cloud architect. Delegate only when the user explicitly starts an Octopus workflow.
Code reviewer. Delegate only when the user explicitly starts an Octopus workflow.
Database architect. Delegate only when the user explicitly starts an Octopus workflow.
Debugger. Delegate only when the user explicitly starts an Octopus workflow.
Documentation architect. Delegate only when the user explicitly starts an Octopus workflow.
Frontend developer. Delegate only when the user explicitly starts an Octopus workflow.
Performance engineer. Delegate only when the user explicitly starts an Octopus workflow.