npx skills add ...
npx skills add cawcut/skill-cawplan --skill cawplan-coding-insights
Show AI coding usage insights: cost, tokens, session activity, and breakdowns by member, model, agent, project, product, or prompt quality. Also finds who on a Team (CawPlan product line) hasn't submitted their daily coding report, rolls up a Team's cost, flags high-cost/low-diff sessions, and flags a member's cost growth. Use when: the user asks about coding costs, AI usage stats, team session activity, model spend, agent usage, prompt quality, productivity metrics, which team members haven't submitted/committed a coding report, a Team's total coding cost, sessions with disproportionately high cost vs code changed, or whether someone's coding cost has grown notably. NOT for: submitting reports, creating tickets, product health metrics, or release tracking.
npx skills add cawcut/skill-cawplan --skill cawplan-coding-insights
Fetch the relevant views in parallel based on what the user is asking for. Use --date for a single day; use --from/--to for a range.
If the user provides no prompt or only invokes /cawplan-coding-insights, default to the current user's report for today:
Use this default output to summarize the user's own sessions, cost, tokens, files changed, and human input highlights for today.
Total cost, tokens, active members:
Daily trend (cost and tokens over time):
Available report dates (for date picker):
By member:
By AI model (Claude Opus, Sonnet, Haiku, etc.):
By model + token type (input / output / cache):
By AI coding agent (Claude Code, Cursor, Codex, etc.):
By git project/repository:
By CawPlan product (requires product-repo mapping):
All breakdown commands support --page-num and --page-size for pagination.
List all members with data:
Full detail for one member:
Personal session drill-down (overview + session list):
Personal prompt quality summary:
Every product returned by cawplan products list carries a controls array (e.g. ["dashboard", "version-plans", "issues-suggestions", "knowledge", "test-suites", "coding-insights"]) — the features enabled for that product. Only a product with "coding-insights" in its controls has any coding session data; treat every other product as out of scope for this skill and never call product-* session endpoints against it:
cawplan products list --search "<name>"): accept an exact accessible-name match (case-insensitive after trimming whitespace), a unique short-form/token-prefix match, or a candidate the user explicitly confirms. If the stated product is absent or ambiguous, list candidates and ask which product they mean; never substitute a non-unique closest name. Then check the matched product's controls before querying. If coding-insights is missing, tell the user this product hasn't enabled coding insights and stop instead of calling product-overview/product-trend/etc.cawplan products list --product_line_id <id>, used by Team Submission Gap and Team Cost Rollup below): drop any product whose controls lacks coding-insights before unioning members.rds or summing cost. Don't flag that product's R&D members for "hasn't submitted" and don't include the product in cost totals — it was never going to have session data. Name which products were excluded and why, so the exclusion isn't silent.Requires product unique_id. Resolve it first (and confirm it has the coding-insights control per the rule above):
Product cost overview:
Product daily trend:
Product breakdown by member:
Product breakdown by model:
Product prompt quality summary:
Workspace prompt summary (categories, topics, quality):
Prompt quality score distribution:
Prompt count and quality by product:
Paginated prompt list with filters:
"Team" here means a CawPlan product line (cawplan product-lines ... — the CLI's own init prompt literally calls this "Select CawPlan Team"). "Coding commit" means an uploaded AI daily session report (cawplan-coding-commit), not a git commit.
The roster comes straight from the team's products — no per-user reverse lookup needed. products list --product_line_id already returns each product's members object, and members.rds[] (the R&D/developer members configured on that product) is exactly who'd be expected to submit a coding report.
Resolve the Team name to a product_line_id (page and match by name client-side, same as cawplan-product-report's Team workflow):
Require an exact Team-name match (case-insensitive after trimming whitespace), a unique short-form/token-prefix match, or explicit user confirmation of a listed candidate. Ask the user to disambiguate if more than one name matches. If no unique name matches, list candidates and ask which Team they mean rather than guessing the closest one.
Resolve the team's products and build the roster from the same response:
First drop any product whose controls doesn't include coding-insights (see Product Eligibility above) — name what was excluded. Then union members.rds[].user_id (with first_name/last_name for display) across the remaining products — this is the roster. If a remaining product has an empty rds list, say so explicitly: real coding activity could still happen there, but this workflow has no roster to check it against for that product, so a gap on it would be invisible rather than flagged.
Resolve the target date the same way as the rest of this skill (today="$(date +%F)", or the exact date/range the user gave — don't pass a literal "today" string). Find who actually submitted in that window — session data only exists because someone ran the cawplan-coding-commit upload flow (there's no passive/automatic collection in this CLI), so a user_id appearing here means they submitted, not just "was active":
Run once per product from step 2 — each session record carries user_id directly, no join needed. Union the user_ids across all results — this is the "submitted" set. Note any submitted user_id that isn't in the roster as a bonus observation (someone contributing without a configured RD assignment) rather than silently dropping it.
Diff: roster (step 2) minus submitted (step 3) = who hasn't submitted for that window. Report by name.
There's no product_line_id parameter on any session cost command — only --product-id. Roll it up yourself:
product_line_id and its products, same as Team Submission Gap steps 1-2 — including dropping products without the coding-insights control before proceeding.product-overview total (e.g. a model bucket the by-model endpoint doesn't categorize), report both numbers rather than silently picking one — don't assume they'll always reconcile.This is one or two calls per product on the team — mention the count if the team has an unusually large number of products, but this is normally cheap (bounded by product count, not workspace user count).
Uploaded reports carry files_changed / files_added / files_deleted per session alongside cost — this flags sessions where the two are out of proportion.
user_id (same pattern as Member Views: auth status for yourself, users query --email/--keyword for someone else), then cawplan session my-sessions --user-id <user_id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>. Use this, not session member-detail --member <git-username> — verified live that member-detail's per-session records carry tokens but no cost field at all, so it can't support the cost-side of this ranking; my-sessions's records have both cost and files_changed.coding-insights isn't in its controls), then cawplan session product-sessions --product-id <id> (add --from/--to for a range) — verified live that its records include both cost and files_changed.cawplan session members then my-sessions --user-id <id> per member (not member-detail, for the same cost-field reason as the member bullet above) — this one genuinely is O(workspace members), unlike Team Submission Gap (which reads the roster straight off products list, not a per-user loop). Tell the user the call count and get an explicit go-ahead before firing more than ~30 calls.files_changed ascending, and surface whichever sessions sit disproportionately in both directions at once — with small result sets (roughly under ~10 sessions) don't force a strict quartile cutoff, since it can mechanically exclude an obvious outlier by a hair; use the ranking as a guide and flag the standout(s) with their numbers shown, noting when a flagged session narrowly misses a strict quartile cut. State that the flagging is relative to the fetched set, not an absolute cutoff, and show the actual cost/files_changed numbers so the user can judge for themselves.session_name/project looks like alongside the numbers rather than just flagging it as an anomaly.--from <last Monday> --to <last Sunday>--from <first of month> --to <today>--date <YYYY-MM-DD>cawplan session dates to discover which dates actually have data.Structure the response based on what was requested:
by-product requires product-repo mappings to be configured (cawplan session product-repos).product-* commands require a product unique_id, not a name.references/CAWPLAN_OPEN_API.mdcawplan session overview --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session trend --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session datescawplan session by-member --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session by-model --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session by-model-dimension --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session by-agent --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session by-project --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session by-product --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session memberscawplan session member-detail --member <git-username># First resolve your user_id if needed
cawplan users query --email <your-email>
cawplan session my-sessions --user-id <user_id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session user-human-inputs --user-id <user_id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan products list --search "<product name>"cawplan session product-overview --product-id <id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session product-trend --product-id <id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session product-by-member --product-id <id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session product-by-model --product-id <id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session product-human-inputs --product-id <id> --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session human-input-summary --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session human-input-quality --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session human-input-by-product --from <YYYY-MM-DD> --to <YYYY-MM-DD>cawplan session human-inputs \
--from <YYYY-MM-DD> --to <YYYY-MM-DD> \
[--member <name>] \
[--product <name>] \
[--category <name>] \
[--topic <name>] \
[--q <search text>] \
[--needs-review] \
[--limit 25] [--offset 0]cawplan session conversation --entry-id <entry_id>