跳到主内容
智客 ZICQ

技能库 智客分类:Agent 工作流 cawplan-coding-insights

Cawplan Coding Insights

显示 AI 编码用法: 成本、 符号、 会话活动以及按成员、 模型、 代理、 项目、 产品或即时质量分类的分解。 还发现在Team(CawPlan产品线)上谁没有提交每日编码报告,卷起一个Team的成本,标出高成本/低水平的会话,并标出一个成员的成本增长. 使用时:用户询问编码成本,AI使用统计,团队会话活动,模型花用,代理用用用,即时质量,生产率度量,团队成员尚未提交/承诺的编码报告,团队的总编码成本,成本过高的会话与代码变化,或者某人的编码成本是否显著增长. 不用于:提交报告、创建票单、产品健康指标或排放跟踪.

84 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

显示 AI 编码用法: 成本、 符号、 会话活动以及按成员、 模型、 代理、 项目、 产品或即时质量分类的分解。 还发现在团队(CawPlan产品线)上谁没有提交日常编码报告,卷起团队成本,标出高成本/低成本会议,并标出成员成本增长

何时用

用户询问编码成本,AI使用统计,团队会话活动,模型支出,代理使用,即时质量,生产率度量表,团队成员尚未提交/承诺提交编码报告,团队总编码成本,成本与代码不成比例高的会话

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:CawPlan Coding Insights、Bootstrap、Workflow、Workspace Overview、Cost Breakdown Dimensions (workspace-wide)、Member Views。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/CAWPLAN_OPEN_API.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

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.

CawPlan Coding InsightsBootstrapWorkflowWorkspace OverviewCost Breakdown Dimensions (workspace-wide)Member ViewsFirst resolve your user_id if neededProduct Eligibility (coding-insights control)Product-Scoped ViewsHuman Input (Prompt Quality) AnalysisSession Conversation Drill-downTeam Submission Gap ("who hasn't submitted")

· allowed-tools:Bash

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
cawplan-coding-insights
description
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.
allowed-tools
Bash实验字段,支持情况取决于客户端;字段声明本身不会授予工具权限。
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 1
  • references/CAWPLAN_OPEN_API.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「cawplan-coding-insights」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-29c8e2d2090fd278-Cawplan-%E7%BC%96%E7%A0%81%E9%80%8F%E8%A7%86.html
请存为 .cursor/skills/cawplan-coding-insights/SKILL.md 或 .claude/skills/cawplan-coding-insights/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/cawcut/skill-cawplan 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/cawcut/skill-cawplan' --list

npx skills add 'https://github.com/cawcut/skill-cawplan' --skill 'cawplan-coding-insights'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版
--- version: 0.2.8 name: cawplan-coding-insights description: | 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. argument-hint: "[date range, member, product, model, agent, dimension]" allowed-tools: Bash --- # CawPlan Coding Insights ## Bootstrap ```bash cawplan skill check ``` ## Workflow 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: ```bash today="$(date +%F)" cawplan session my-sessions --date "$today" cawplan session user-human-inputs --date "$today" ``` Use this default output to summarize the user's own sessions, cost, tokens, files changed, and human input highlights for today. --- ### Workspace Overview **Total cost, tokens, active members:** ```bash cawplan session overview --from --to ``` **Daily trend (cost and tokens over time):** ```bash cawplan session trend --from --to ``` **Available report dates (for date picker):** ```bash cawplan session dates ``` --- ### Cost Breakdown Dimensions (workspace-wide) **By member:** ```bash cawplan session by-member --from --to ``` **By AI model (Claude Opus, Sonnet, Haiku, etc.):** ```bash cawplan session by-model --from --to ``` **By model + token type (input / output / cache):** ```bash cawplan session by-model-dimension --from --to ``` **By AI coding agent (Claude Code, Cursor, Codex, etc.):** ```bash cawplan session by-agent --from --to ``` **By git project/repository:** ```bash cawplan session by-project --from --to ``` **By CawPlan product (requires product-repo mapping):** ```bash cawplan session by-product --from --to ``` All breakdown commands support `--page-num` and `--page-size` for pagination. --- ### Member Views **List all members with data:** ```bash cawplan session members ``` **Full detail for one member:** ```bash cawplan session member-detail --member ``` **Personal session drill-down (overview + session list):** ```bash # First resolve your user_id if needed cawplan users query --email cawplan session my-sessions --user-id --from --to ``` **Personal prompt quality summary:** ```bash cawplan session user-human-inputs --user-id --from --to ``` --- ### Product Eligibility (coding-insights control) 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: - **Resolving a single product** (`cawplan products list --search ""`): 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. - **Building a Team roster or rollup** (`cawplan products list --product_line_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. --- ### Product-Scoped Views Requires product unique_id. Resolve it first (and confirm it has the `coding-insights` control per the rule above): ```bash cawplan products list --search "" ``` **Product cost overview:** ```bash cawplan session product-overview --product-id --from --to ``` **Product daily trend:** ```bash cawplan session product-trend --product-id --from --to ``` **Product breakdown by member:** ```bash cawplan session product-by-member --product-id --from --to ``` **Product breakdown by model:** ```bash cawplan session product-by-model --product-id --from --to ``` **Product prompt quality summary:** ```bash cawplan session product-human-inputs --product-id --from --to ``` --- ### Human Input (Prompt Quality) Analysis **Workspace prompt summary (categories, topics, quality):** ```bash cawplan session human-input-summary --from --to ``` **Prompt quality score distribution:** ```bash cawplan session human-input-quality --from --to ``` **Prompt count and quality by product:** ```bash cawplan session human-input-by-product --from --to ``` **Paginated prompt list with filters:** ```bash cawplan session human-inputs \ --from --to \ [--member ] \ [--product ] \ [--category ] \ [--topic ] \ [--q ] \ [--needs-review] \ [--limit 25] [--offset 0] ``` --- ### Session Conversation Drill-down ```bash cawplan session conversation --entry-id ``` --- ### Team Submission Gap ("who hasn't submitted") "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. 1. Resolve the Team name to a `product_line_id` (page and match by name client-side, same as `cawplan-product-report`'s Team workflow): ```bash cawplan product-lines list --page_size 100 ``` 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. 2. Resolve the team's products **and build the roster from the same response**: ```bash cawplan products list --product_line_id ``` 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. 3. 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": ```bash cawplan session product-sessions --product-id --date # or --from/--to for a range ``` Run once per product from step 2 — each session record carries `user_id` directly, no join needed. Union the `user_id`s 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. 4. **Diff**: roster (step 2) minus submitted (step 3) = who hasn't submitted for that window. Report by name. --- ### Team Cost Rollup There's no `product_line_id` parameter on any `session` cost command — only `--product-id`. Roll it up yourself: 1. Resolve the Team to `product_line_id` and its products, same as Team Submission Gap steps 1-2 — including dropping products without the `coding-insights` control before proceeding. 2. For each remaining product: ```bash cawplan session product-overview --product-id --from --to cawplan session product-by-model --product-id --from --to # only if the user asked for a model breakdown ``` 3. Sum cost/tokens across products for the total. For the model breakdown, sum matching model names across products rather than reporting per-product tables, unless the user asked to see it per-product. If the summed by-model total doesn't match the `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). --- ### Cost/Diff Anomaly Detection ("high cost, low diff") Uploaded reports carry `files_changed` / `files_added` / `files_deleted` per session alongside cost — this flags sessions where the two are out of proportion. 1. Determine scope from the request: - **A member** → resolve their `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 --from --to `. Use this, **not** `session member-detail --member ` — 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`. - **A product** → resolve it per Product Eligibility above first (skip if `coding-insights` isn't in its `controls`), then `cawplan session product-sessions --product-id ` (add `--from`/`--to` for a range) — verified live that its records include both `cost` and `files_changed`. - **The whole workspace** → `cawplan session members` then `my-sessions --user-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. 2. Don't invent a fixed cost or diff threshold (e.g. "cost > $50") — the org's normal range is unknown to you. Instead, rank the fetched sessions by cost descending and by `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. 3. Don't treat a session with zero files_changed as automatically suspicious without checking — legitimate non-coding sessions (planning, research, review-only) can have real cost and no diff. Say what the session's `session_name`/project looks like alongside the numbers rather than just flagging it as an anomaly. --- ### Cost Growth Detection (member) 1. Resolve the member (same pattern as other member-scoped views in this skill). 2. Pick two comparable, non-overlapping periods of equal length. Default to "last 30 days" vs. "the 30 days before that" if the user doesn't specify; cap the total lookback at 3 months unless they explicitly ask for more. ```bash cawplan session user-trend --user-id --from --to cawplan session user-trend --user-id --from --to ``` 3. Compute percent change in cost between the two periods. Report the actual number (e.g. "+340% vs. the prior period, $42 → $185") rather than a vague "significant increase" — don't apply your own judgment threshold for what counts as "growth"; state the number and let the user decide if it's notable. If the prior period's cost was $0, percent change is undefined — report the raw before/after numbers ("$0 → $X, new activity this period") instead of computing a percentage or dividing by zero. --- ## Date Range Rules - "last week" → `--from --to ` - "this month" → `--from --to ` - "today" / "yesterday" → use `--date ` - If no prompt is specified, default to the current user's report for today. - If the prompt asks for a metric but omits a date, default to today unless the wording implies a broader period. - Use `cawplan session dates` to discover which dates actually have data. ## Output Structure the response based on what was requested: - **Summary**: total cost ($), total tokens, active members in the period. - **Trend**: daily cost table if more than 2 days were requested. - **Top members**: top 5 by cost with token count. - **By model/agent**: rank by cost, show % of total. - **By product/project**: list with session count and cost. - **Prompt quality**: category breakdown and quality score distribution if human-input data was fetched. - **Key observations**: 1–3 notable patterns (high cost days, top contributor, unusual model spend, etc.). ## Notes - `by-product` requires product-repo mappings to be configured (`cawplan session product-repos`). - `product-*` commands require a product `unique_id`, not a name. ## References - `references/CAWPLAN_OPEN_API.md`

相关技能

Agent 工作流

Skill Creator

创造有效技能指南。 当用户想创造出新的技能(或更新现有的技能),以专业知识,工作流程,或工具集成来扩展克洛德的能力时,应该使用这种技能.

Agent 工作流

Clawdhub

使用ClawdHub CLI搜索,安装,更新并发布从taladhub.com的代理技能. 需要获取苍蝇上的新技能时使用,将安装的技能同步到最新版本或特定版本,或者发布 npm-instainddhub CLI 的新/更新的技能文件夹.

Agent 工作流

Agent Team Orchestration

管弦乐团多代理团队,任务设定周期,交接协议,审查工作流程. 使用时间: (1)建立2+特派员队伍,具有不同专业,(2)确定任务路线和生命周期(收录框_ spec_建设_审查_完成),(3)在特派员之间制定交接协议,(4)建立审查和质量关口,(5)管理特派员之间的交流和文物共享.

Agent 工作流

Superpowers

Spec-first,TDD,子代理驱动的软件开发工作流程. 当:(1)构建任何新功能或应用——触发脑暴_计划_子代理执行回路,(2)调试出一个bug或测试失败——触发系统性的根起过程,(3)用户说"让我们构建","帮助我计划","我想添加X",或"这个被打破",(4)完成一个功…