Agent skill

Codemie Analytics

by codemie-ai in codemie-ai/codemie-code

CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to…

Apache-2.0Auto-check passedAI & LLM Engineering

Install Codemie Analytics

skills CLI
$ npx skills add codemie-ai/codemie-code --skill codemie-analytics -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codemie-ai/codemie-code codemie-analytics --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codemie-ai/codemie-code.git skills-src && mkdir -p .claude/skills && cp -r skills-src/src/agents/plugins/claude/plugin/skills/codemie-analytics .claude/skills/codemie-analytics && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
codemie-analytics
GitHub stars
294
Token cost
~7.5k tokens
SKILL.md length
2,598 words
Files
6 (incl. scripts, references)
Skills in repo
9
Repo updated
First seen
Licence
Apache-2.0

At a glance

CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to…

  • Works in 4 steps: Understand what the user wants → Run the analytics CLI → 5 — Inspect data structure → …
  • The user asks about CodeMie usage data
  • SKILL.md covers Step 1 — Understand what the…, Security, Step 2 — Run the analytics CLI and Step 2.5 — Inspect data…, plus 6 more sections
  • Runs JavaScript scripts from its folder; calls node; needs LITELLM_KEY and CODEMIE_API_KEY

What it does

Codemie Analytics is an agent skill from codemie-ai/codemie-code. CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to build a dashboard/report from CodeMie or LiteLLM APIs. Also triggers for: "who uses CodeMie most", "show me AI analytics", "get spending data", "generate a report", "leaderboard", "cost analysis", "LiteLLM customer info", "enrich CSV with costs", "top performers", "AI champions", "tier distribution", or any custom…

Its SKILL.md is about 7.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts and reference files (for example `references/leaderboard-dashboard-report.md`, `references/people-spending-dashboard-report.md` and `scripts/analytics-cli.js`).

It sits in AI & LLM Engineering, covering Model routing and gateways and CSV and tabular files. The repository describes itself as: AI Run CodeMie CLI with analytics capabilities. The licence is Apache-2.0.

When your agent uses it

  • The user asks about CodeMie usage data
  • AI adoption metrics
  • User leaderboards
  • Wants to build a dashboard/report from CodeMie

Example prompts

  • “who uses CodeMie most”
  • “show me AI analytics”
  • “get spending data”
  • “/codemie-analytics”

Requirements

  • Node.js
  • A credential in LITELLM_KEY
  • A credential in CODEMIE_API_KEY

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Understand what the user wants
  2. Run the analytics CLI
  3. 5 — Inspect data structure
  4. Build the HTML report

What it can do on your machine

Read from SKILL.md and the folder at commit 0218c8d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (JavaScript), which the agent can run.

    Shell commands in SKILL.md call:

    • node

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • codemie.lab.epam.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • LITELLM_KEY
    • CODEMIE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Codemie Analytics loads about 7.5k tokens when it runs, and up to ~43k if it reads all its reference files. Until then it costs about 162 tokens; SKILL.md has 2,598 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~162
When it runs · the whole SKILL.md, loaded when a task matches
~7.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~43k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from codemie-ai/codemie-code at commit 0218c8d, republished under its Apache-2.0 licence (© codemie-ai). 2,598 words, ~7,505 tokens.

Download SKILL.mdSave it as .claude/skills/codemie-analytics/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
codemie-analytics
description
CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to build a dashboard/report from CodeMie or LiteLLM APIs. Also triggers for: "who uses CodeMie most", "show me AI analytics", "get spending data", "generate a report", "leaderboard", "cost analysis", "LiteLLM customer info", "enrich CSV with costs", "top performers", "AI champions", "tier distribution", or any custom analytics query against the platform. Always use this skill when CodeMie analytics, reporting, or cost data is involved.

CodeMie Analytics Skill

You are an analytics expert for the CodeMie (EPAM AI/Run) platform. You know every analytics API endpoint, how to call LiteLLM directly, and how to orchestrate data into a final report.

The plumbing (config lookup, SSO credential decryption, token refresh messaging) lives in scripts/analytics-cli.js. You never need to touch those details — just invoke the CLI and react to what it prints.


Step 1 — Understand what the user wants

Identify the analytics scenario. The CLI supports these command families:

Leaderboard (AI Champions)

The leaderboard ranks users across 6 scoring dimensions:

  • D1: Core Platform Usage (20%) — conversations, assistant interactions
  • D2: Core Platform Creation (20%) — assistants, datasources created
  • D3: Workflow Usage (10%) — workflow executions
  • D4: Workflow Creation (10%) — workflows authored
  • D5: CLI & Agentic Engineering (30%) — coding agent sessions, tokens, repos
  • D6: Impact & Knowledge (10%) — marketplace publishing, knowledge sharing

Tiers: pioneer (80+), expert (65+), advanced (45+), practitioner (25+), newcomer (<25)

ScenarioCommandWhat it retrieves
Full leaderboard (paginated, filterable)leaderboarddata.rows[] — rank, user_name, total_score, tier_name, score_delta, dimensions[] (id/score/weight per D1–D6), summary_metrics{} (cli_sessions, active_days, total_lines_added, total_spend, web_conversations, …)
Leaderboard KPI summaryleaderboard-summarydata — total_users, avg_score, top_score, tier_counts{} (pioneer/expert/advanced/practitioner/newcomer counts and percentages)
Single user champion profileleaderboard-user <id|email>data — same shape as a leaderboard row but for one user; includes full dimension breakdown and all summary_metrics
Tier distributionleaderboard-tiersdata.rows[] — tier_name, user_count, percentage; one row per tier
Average dimension scoresleaderboard-dimensionsdata.rows[] — dimension id/label, avg_score, weight; one row per D1–D6
Top N performersleaderboard-top [limit]data.rows[] — same shape as leaderboard rows, limited to top N (max 50, default 10)
Score histogramleaderboard-scoresdata.rows[] — score_range (e.g. "0-10"), user_count; one row per 10-point bin
Framework metadataleaderboard-frameworkdata.framework{} — title, principles, calculation_steps; data.tiers[] — name, label, min_score; data.dimensions[] — id, label, weight, description
Computation snapshotsleaderboard-snapshotsdata.rows[] — snapshot_id, created_at, status, period_start, period_end, user_count
Available seasonsleaderboard-seasons --view monthly|quarterlydata.rows[] — season_key (e.g. "2026-03"), label, start_date, end_date

Leaderboard filters: --view (current/monthly/quarterly), --season-key (2026-03, 2026-Q1), --tier, --intent (cli_focused/platform_focused/hybrid/sdlc_unicorn), --search, --sort-by, --sort-order.

CLI Insights
ScenarioCommandWhat it retrieves
Full CLI overview (agents, repos, tools, errors)cli-insightsComposite object with sub-keys: summary (total sessions, cost, tokens, repos, users), agents[] (agent name + session count), top_users[], top_repos[], errors[], llms[]
User classification & top spenderscli-insights-usersdata.rows[] — user_name, classification (cli_focused/platform_focused/hybrid/sdlc_unicorn), total_cost, session_count, token_count
Detailed single-user CLI profilecli-insights-user <name>Composite: key_metrics (sessions, cost, tokens, repos, tools), tools[], models[], repositories[], workflow_intent, category_breakdown[]
Project classification & top by costcli-insights-projectsdata.rows[] — project_name, classification, total_cost, session_count, user_count
Usage patterns (weekday, hourly, session depth)cli-insights-patternsComposite with sub-keys: weekday.data.rows[] (weekday_name, session_count), hourly.data.rows[] (hour_utc, session_count), session_depth.data.rows[] (depth_bucket, count)
General Analytics
ScenarioCommandWhat it retrieves
Overall usage summary (tokens, cost, users)summariesdata — total_cost, total_tokens, total_requests, unique_users (MAU), unique_users_daily (DAU), cli_invocations, assistants_count, workflows_count, skills_count, mcp_servers_count
User list + activity trendsusersdata.rows[] — user_name, email, total_cost, total_tokens, last_active; plus activity[] time-series
Per-project spendingprojects-spendingdata.rows[] — project_name, total_cost, total_tokens, user_count, request_count
Per-project activity time-seriesprojects-activityComposite with activity.data.rows[] and uniqueDaily.data.rows[]
LLM model breakdownllms-usagedata.rows[] — model_name, request_count, total_tokens, input_tokens, output_tokens, total_cost
Tool usagetools-usagedata.rows[] — tool_name, invocation_count, success_count, error_count, total_tokens
Workflow execution analyticsworkflowsdata.rows[] — workflow_name, run_count, success_count, failure_count, avg_duration_ms, total_cost
Agent execution analyticsagents-usagedata.rows[] — assistant_name, execution_count, total_cost, total_tokens
Embedding model usageembeddings-usagedata.rows[] — model_name, request_count, total_tokens, total_cost
Chat assistant conversationsassistants-chatsdata.rows[] — assistant, conversation_count, user_count, total_cost
Webhook invocation analyticswebhooks-usagedata.rows[] — user_id, invocation_count, total_cost
MCP server usagemcp-serversdata.rows[] — mcp_name, request_count, user_count, total_cost
MCP server usage by usermcp-servers-by-usersdata.rows[] — user_name, mcp_name, request_count
Power user analyticspower-usersdata.rows[] — user_email, session_count, total_cost, features_used
Knowledge sharing metricsknowledge-sharingdata.rows[] — user_email, shared_count, viewed_count
Top agents by usagetop-agentsdata.rows[] — assistant_name, execution_count, total_cost
Top workflows by usagetop-workflowsdata.rows[] — workflow_name, run_count, total_cost
Assets published to marketplacemarketplacedata.rows[] — user_email, asset_name, published_at
Budget alerts (soft + hard limits)budgetComposite with soft.data.rows[] and hard.data.rows[] — user_email, max_spent (users approaching or over limit)
Personal spending & budgetspendingdata — current_spend, budget_limit, hard_budget_limit, budget_reset_at, percentage_used
Per-user spending (platform + cli split)spending-by-usersComposite with platform.data.rows[] and cli.data.rows[] — user_name/email, total_cost, token_count
Weekly engagement histogramengagementdata.rows[] — day_label, hour_start, feature_type, session_count, cost; covers last 7 days in 3-hour intervals
LiteLLM & CSV Enrichment
ScenarioCommandOutput
LiteLLM customer lookuplitellm-customer [user_id]JSON
LiteLLM spend logslitellm-spendSpend entries
LiteLLM virtual keyslitellm-keysKey info
Enrich CSV/Excel with LiteLLM costsenrich-csv <file>Enriched table
Unlisted / experimental endpointcustom /v1/analytics/<path>Raw JSON — use a named command if one exists

Security

Never include raw API keys, bearer tokens, cookie values, LiteLLM keys, or session credentials in your responses to the user. If CLI output contains sensitive fields (e.g. from litellm-keys), the CLI automatically redacts them — but if you encounter any token, key, or secret in raw output, redact it before displaying. Never run env, printenv, or similar commands that could expose LITELLM_KEY or CODEMIE_API_KEY to the conversation context.


Step 2 — Run the analytics CLI

The CLI script lives at scripts/analytics-cli.js next to this skill. It handles authentication internally. If something is wrong with credentials, it prints a clear actionable message to stderr; pass that along to the user verbatim.

bash
node ${CLAUDE_PLUGIN_ROOT}/skills/codemie-analytics/scripts/analytics-cli.js <command> [options]

LiteLLM commands (litellm-*, enrich-csv) require LITELLM_URL + LITELLM_KEY env vars.

Collecting data for reports (batch pattern)

Only fetch the data the report actually needs. Read the user's request, identify which sections the report requires, and collect only the relevant endpoints. Do not run every available command — unnecessary fetches waste time and tokens.

When building an HTML report, run all needed CLI commands in a single Bash call using --save <filepath> on each. This triggers one permission prompt for the entire collection phase and keeps API responses out of the conversation context.

Directory layout

Every report lives in its own folder under reports/. Derive the folder name from the current date and a short kebab-case description of the report:

reports/
  2026-05-07-cli-usage/          ← report folder (date + name)
    cli-usage.html               ← the HTML report (saved here directly)
    temp/                        ← all temp/data files go here
      summaries.json
      summaries.schema.json
      cli-insights.json
      ...

Never overwrite an existing report folder. Always resolve a free name before creating anything. Use a suffix loop — this is mandatory, not optional:

bash
BASE=reports/$(date +%Y-%m-%d)-<short-name>
REPORT_DIR=$BASE
n=2
while [ -d "$REPORT_DIR" ]; do REPORT_DIR="${BASE}-${n}"; n=$((n+1)); done
OUT="$REPORT_DIR/temp"

Then run only the commands the report needs:

bash
CLI=${CLAUDE_PLUGIN_ROOT}/skills/codemie-analytics/scripts/analytics-cli.js
mkdir -p "$OUT" && \
node $CLI summaries   --save "$OUT/summaries.json"   && \
node $CLI cli-insights --save "$OUT/cli-insights.json" && \
# ... only endpoints needed for this report ...
echo "✓ All data saved → $OUT"

Each command prints: ✓ Saved → <path>. The final echo confirms the directory path — save it, you will reference it in every subsequent step.

Do not cat, Read, or print the saved JSON files into the conversation. Raw API responses can be hundreds of KB. Use Step 2.5 to inspect structure instead.

Temp files are not cleaned up automatically.

Common filter flags
FlagExampleNotes
--time-periodlast_30_daysPredefined period
--start-date2024-01-01T00:00:00Custom range start
--end-date2024-03-31T23:59:59Custom range end
--usersalice,bobComma-separated usernames
--projectsmy-projectComma-separated project names
--page1Pagination
--per-page100Results per page (default 50)
--outputjsonjson | table | csv
--pretty(flag)Pretty-print JSON
Leaderboard-specific flags
FlagExampleNotes
--viewmonthlycurrent | monthly | quarterly
--season-key2026-Q1Specific season to query
--tierpioneerFilter by tier
--intentcli_focusedFilter by user intent profile
--searchjohnPartial name/email search
--sort-bytotal_scorerank | total_score | user_name | tier_level
--sort-orderdescasc | desc
--limit20Max entries for leaderboard-top (max 50)
Example invocations
bash
CLI=${CLAUDE_PLUGIN_ROOT}/skills/codemie-analytics/scripts/analytics-cli.js

# Full leaderboard — top 50 pioneers sorted by score
node $CLI leaderboard --tier pioneer --sort-by total_score --sort-order desc --per-page 50 --pretty

# Single user champion profile
node $CLI leaderboard-user user@example.com --pretty

# Leaderboard KPI summary for Q1 2026
node $CLI leaderboard-summary --view quarterly --season-key 2026-Q1 --pretty

# Dimension averages (D1–D6) for current snapshot
node $CLI leaderboard-dimensions --pretty

# Tier distribution
node $CLI leaderboard-tiers --pretty

# Top 10 performers
node $CLI leaderboard-top 10 --pretty

# 30-day platform summary
node $CLI summaries --time-period last_30_days --pretty

# Full CLI insights
node $CLI cli-insights --time-period last_30_days --pretty

# Detailed CLI profile for a specific user
node $CLI cli-insights-user alice@example.com --time-period last_30_days --pretty

# Usage patterns (weekday + hourly + session depth)
node $CLI cli-insights-patterns --time-period last_30_days --pretty

# Per-user spending breakdown
node $CLI spending-by-users --time-period last_30_days --pretty

# Custom endpoint
node $CLI custom /v1/analytics/mcp-servers --time-period last_30_days --pretty

Step 2.5 — Inspect data structure

After collection, run inspect-schema.js to generate a compact .schema.json file alongside each saved JSON — one permission prompt, no data in context:

bash
node ${CLAUDE_PLUGIN_ROOT}/skills/codemie-analytics/scripts/inspect-schema.js "$OUT"

Output is a short listing of generated schema files with sizes, for example:

Schemas written to: reports/2026-05-07-cli-usage/temp/
  ✓ leaderboard-top.schema.json (1.3 KB)
  ✓ summaries.schema.json (0.4 KB)
  ...

Then read only the .schema.json files you actually need for the report using the Read tool. Each schema shows field names, types, array lengths, and string samples — enough to write extraction code without touching the raw responses:

CRITICAL — schema is the source of truth for field names. Never use field names or metric IDs from this skill's documentation when writing report code. Documentation can be stale. The .schema.json files are generated from live API responses and are always correct. Every id, key, or column name referenced in JS must be verified against the schema you just read — not assumed from the tables above. If the schema contradicts the docs, trust the schema.

json
{
  "_envelope": "[envelope] data_as_of: '2026-05-07T02:00:10', total_count: 50",
  "data": {
    "rows": {
      "_type": "array",
      "_count": 50,
      "_item": {
        "rank": "number",
        "user_name": "string ~ 'Jane Smith'",
        "total_score": "number",
        "tier_name": "string ~ 'expert'",
        "score_delta": "number | null",
        "dimensions": { "_type": "array", "_count": 6, "_item": { "id": "string ~ 'd1'", "score": "number", "weight": "number" } },
        "summary_metrics": { "cli_sessions": "number", "active_days": "number", "total_lines_added": "number", "total_spend": "number" }
      }
    }
  }
}

Step 3 — Build the HTML report

Save the HTML report directly inside $REPORT_DIR (not in temp/). Use a kebab-case filename matching the folder name:

reports/2026-05-07-cli-usage/cli-usage.html
reports/2026-05-07-leaderboard/leaderboard.html
reports/2026-05-07-spending/spending.html
Step 3a — Write the HTML

Invoke the codemie-html-report skill. Pass:

  1. The schemas inspected in Step 2.5 — field names and structure.
  2. The user's intent — e.g. "leaderboard dashboard with tier distribution".
  3. Timestamp context — _envelope lines in schemas include data_as_of.
  4. Output path — e.g. $REPORT_DIR/leaderboard.html.

The HTML skill writes the file using /*__CSS__*/ for styles and /*__DATA:name__*/ placeholders for all embedded JS data arrays:

html
<script>
  const LEADERBOARD = /*__DATA:leaderboard__*/;
  const SUMMARIES   = /*__DATA:summaries__*/;
</script>

Each placeholder name maps to a saved file in $OUT (without the .json extension).

Step 3b — Inject data

After the HTML file exists, run the shared inject-data.js from the codemie-html-report skill. It matches each JSON file in $OUT to a /*__DATA:name__*/ placeholder by filename (without .json) and replaces it in-place.

Do not run inject-data.js before the HTML file is written.

bash
node ${CLAUDE_PLUGIN_ROOT}/skills/codemie-html-report/scripts/inject-data.js \
  "$REPORT_DIR/<report>.html" "$OUT"

Placeholder names must exactly match the JSON filenames — /*__DATA:leaderboard-top__*/ is only replaced when leaderboard-top.json exists in $OUT.

Expected output:

  ✓ injected leaderboard-top
  ✓ injected summaries
✓ 2 data block(s) injected into reports/2026-05-07-<name>/<report>.html

Full API Reference

Leaderboard endpoints (GET /v1/analytics/leaderboard/...)

Admin-only. All accept snapshot_id, view, season_key query params.

EndpointAdditional ParamsReturns
/leaderboard/summary—Total users, tier counts, top score
/leaderboard/entriestier, search, intent, sort_by, sort_order, page, per_pagePaginated ranked entries
/leaderboard/user/{user_id}path: user ID or emailFull user profile with D1–D6 breakdown
/leaderboard/tiers—Tier name, count, percentage
/leaderboard/scores—Score histogram (10-point bins)
/leaderboard/dimensions—Average D1–D6 scores
/leaderboard/top-performerslimit (default 3, max 50)Top N by total score
/leaderboard/snapshotsview, status, is_final, page, per_pageComputation snapshots
/leaderboard/seasonsview (required: monthly/quarterly), page, per_pageAvailable seasonal periods
/leaderboard/framework—Static metadata: dimensions, tiers, intents, scoring
/leaderboard/compute (POST)period_days, view, season_keyTriggers manual computation
Show full SKILL.md (1,050 more words)Show less
CLI Insights endpoints (GET /v1/analytics/cli-insights-...)
EndpointParamsReturns
/cli-insights-weekday-patterntime filtersWeekday usage patterns
/cli-insights-hourly-usagetime filtersHourly usage patterns
/cli-insights-session-depthtime filtersSession depth distribution
/cli-insights-user-classificationtime filtersUser classification breakdown
/cli-insights-top-users-by-costtime filtersTop users ranked by cost
/cli-insights-top-spenderstime filtersTop spenders
/cli-insights-userstime filtersCLI user list
/cli-insights-user-detailuser_name (required), user_idFull user detail
/cli-insights-user-key-metricsuser_name (required), user_idUser KPIs
/cli-insights-user-toolsuser_name (required), user_idUser tool usage
/cli-insights-user-modelsuser_name (required), user_idUser model usage
/cli-insights-user-workflow-intentuser_name (required), user_idUser workflow intent
/cli-insights-user-classification-detailuser_name (required), user_idUser classification detail
/cli-insights-user-category-breakdownuser_name (required), user_idUser category breakdown
/cli-insights-user-repositoriesuser_name (required), user_idUser repositories
/cli-insights-project-classificationtime filtersProject classification
/cli-insights-top-projects-by-costtime filtersTop projects by cost
Standard CLI analytics (GET /v1/analytics/cli-...)
EndpointReturns
/cli-summaryCLI totals (tokens, cost, sessions)
/cli-agentsAgent breakdown
/cli-llmsModel breakdown
/cli-usersCLI user activity
/cli-errorsError logs
/cli-repositoriesRepo activity
/cli-top-performersTop by lines added
/cli-top-versionsCLI version distribution
/cli-top-proxy-endpointsLiteLLM endpoint usage
/cli-toolsTool usage
Dashboard analytics (GET /v1/analytics/...)

All accept time filters + users + projects + page + per_page.

EndpointReturns
/summariesPlatform totals (tokens, cost, unique users)
/users-spendingPer-user cost + tokens
/users-activityActivity time-series
/users-unique-dailyUnique users/day
/usersUser list
/projects-spendingPer-project spending
/projects-activityProject activity time-series
/projects-unique-dailyUnique projects/day
/llms-usageLLM model usage
/tools-usageTool usage
/workflowsWorkflow runs
/agents-usageAgent executions
/embeddings-usageEmbedding model usage
/assistants-chatsChat assistant conversations
/webhooks-invocationWebhook usage
/mcp-serversMCP server usage
/mcp-servers-by-usersMCP by user
/power-usersPower user analytics
/knowledge-sharingKnowledge sharing metrics
/top-agents-usageTop agents
/top-workflow-usageTop workflows
/published-to-marketplaceMarketplace publishing
Spending & Budget endpoints
EndpointMethodReturns
/spendingGETCurrent user: spend, budget_limit, hard_budget_limit, reset time
/budget_usageGETPer-key budget rows with % used
/budget-soft-limitGETSoft limit warnings
/budget-hard-limitGETHard limit hits
/spending/by-users/platformGETPer-user platform spending
/spending/by-users/cliGETPer-user CLI spending
Engagement
EndpointMethodReturns
/engagement/weekly-histogramGET3h intervals, last 7 days, by feature type
LiteLLM endpoints (via LITELLM_URL + LITELLM_KEY)
EndpointMethodParamsDescription
/customer/infoGETuser_idCustomer spend + budget + allowed models
/spend/logsGETstart_date, end_date, user_idSpend log entries
/key/infoGETkeyVirtual key details + spend
/model/infoGET—Available models
/healthGET—Proxy health
Response envelope

Most CodeMie endpoints return:

json
{
  "data": { ... },
  "metadata": {
    "timestamp": "2024-03-15T12:00:00Z",
    "data_as_of": "2024-03-15T12:00:00Z",
    "filters_applied": {},
    "execution_time_ms": 45.2
  }
}

Always extract response.data for the actual payload.


Custom analytics requests

For endpoints not covered by preset commands:

bash
node analytics-cli.js custom /v1/analytics/mcp-servers --time-period last_30_days

# POST endpoints
node analytics-cli.js custom /v1/analytics/ai-adoption-overview --method POST \
  --time-period last_30_days

Offline CLI analytics (no API key needed)

The codemie analytics CLI command reads local session files from ~/.codemie/sessions/ with no API calls:

bash
codemie analytics --last 7d --output json
codemie analytics --agent claude --last 30d --export csv

Report References

Reference files in references/ describe canonical report layouts. Always check the relevant reference before building a new HTML report — it defines the exact components, charts, data structure, and modal design to use, ensuring consistency across users.

Report typeReference fileWhen to use
Leaderboard dashboard${CLAUDE_PLUGIN_ROOT}/references/leaderboard-dashboard-report.mdAny request for leaderboard rankings, AI champions, top performers, tier distribution
People spending dashboard${CLAUDE_PLUGIN_ROOT}/references/people-spending-dashboard-report.mdAny request to track LiteLLM costs for a specific list of users (cohort, team, bootcamp, project)

Use Cases

Use Case: People Spending Dashboard (cohort / team / bootcamp)

Trigger phrases: "build a spending dashboard for people from X", "track LiteLLM costs for a list of users", "how much did this team spend", "bootcamp spending report", "costs for people in this CSV/Excel".

Also applies when: the user asks to enrich analytics with EPAM employee data, map platform users to EPAM people, or look up user assignments/org details.

⚠️ EPAM People & Assignments Finder — required for this use case only

Before proceeding, verify the assistant is accessible:

bash
node ${CLAUDE_PLUGIN_ROOT}/skills/codemie-analytics/scripts/analytics-cli.js \
  custom /v1/assistants/5ca384d0-d042-480c-a0a9-d28150e2352f 2>&1 | head -5

If the command returns an auth error, HTTP 401/403/404, or "No CodeMie credentials" — stop. Do not run anything else. Notify the user:

⛔ EPAM People & Assignments Finder assistant is not configured on your account.

Assistant: EPAM People & Assignments Finder ID: 5ca384d0-d042-480c-a0a9-d28150e2352f

Add it with:

bash
codemie assistants add 5ca384d0-d042-480c-a0a9-d28150e2352f

Or open in browser and click Add to my assistants: https://codemie.lab.epam.com/#/assistants/5ca384d0-d042-480c-a0a9-d28150e2352f

Once added, resume this session with:

bash
claude -f

Full workflow (see ${CLAUDE_PLUGIN_ROOT}/references/people-spending-dashboard-report.md for all details):

  1. Parse the list from Excel/CSV using openpyxl. Skip header and TOTAL rows.
  2. Fetch 3 LiteLLM accounts per user using Python asyncio + aiohttp (semaphore 25, ssl=False). Account patterns:
    • Web: email (plain)
    • CLI: email_codemie_cli
    • Premium: email_codemie_premium_models Use end_user_id param (not user_id) on GET /customer/info.
  3. Save raw results to /tmp/ to avoid re-fetching on HTML rebuild.
  4. Build users array — sum three spend values, extract budget fields per account.
  5. Fetch leaderboard — paginate ALL pages (--per-page 500), ~25 pages for 12k users. Expect ~60% of a typical cohort to appear.
  6. Fetch CLI insights — cli-insights-users --per-page 500 topBySpend for top CLI users. Expect ~3–5% coverage for a general cohort.
  7. Compute KPIs — grand total, per-type totals, active user count, avg spend. Budget projection: avg_spend_per_active × total_users × 1.20.
  8. Generate HTML — use str.replace() with __TOKEN__ markers (never f-strings, which conflict with JS ${...} template literals).
  9. Wire table clicks — use data-email attribute + event delegation (never onclick="" attributes, which break under Python quote escaping).
  10. Save to reports/<date>-<name>/<name>.html (temp/data files in reports/<date>-<name>/temp/).

Key commands:

bash
CLI=${CLAUDE_PLUGIN_ROOT}/skills/codemie-analytics/scripts/analytics-cli.js

# Leaderboard (run in a loop for all pages)
node $CLI leaderboard --per-page 500 --page <N> --output json

# CLI top spenders
node $CLI cli-insights-users --time-period last_30_days --per-page 500 --output json

LiteLLM fetch requires Python (not the analytics CLI) because it needs LITELLM_URL + LITELLM_KEY env vars and concurrent calls for 1,000+ accounts.


Tips

  • Always run the CLI first, capture JSON, then hand it to the report skill — don't hardcode example data.
  • If a command returns paginated data, loop through all pages or set --per-page 500.
  • For time-series charts, use /users-unique-daily or /projects-unique-daily endpoints.
  • Budget warnings: flag rows where spend / max_budget > 0.8 (warn) and > 1.0 (error).
  • For the leaderboard dashboard, combine leaderboard + leaderboard-summary + leaderboard-tiers + leaderboard-dimensions to build a comprehensive view. Then follow ${CLAUDE_PLUGIN_ROOT}/references/leaderboard-dashboard-report.md for the exact HTML structure.
  • For a people spending dashboard, fetch LiteLLM directly with Python async (3 accounts per user), then enrich with leaderboard + CLI insights. Follow ${CLAUDE_PLUGIN_ROOT}/references/people-spending-dashboard-report.md for the exact HTML structure.
  • For a single user deep-dive, combine leaderboard-user <email> with cli-insights-user <name> for the full picture (champion score + CLI activity).
  • If the CLI prints an auth error, forward its message verbatim — it already tells the user what to do next.
  • Always save HTML reports to reports/<date>-<name>/<name>.html; temp/data files go in reports/<date>-<name>/temp/.

Type-Aware Rendering for metrics[] Arrays

Analytics metrics[] arrays are heterogeneous — each item carries a type field ("number", "string", "date", …) and a format field. The value is numeric for most items but may be an ISO date string or plain string for others.

Always inspect m.type (and m.format) per item before formatting. Never apply a single numeric or percent formatter to the whole array — doing so silently produces NaN for string/date items.

© codemie-ai, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts, references) in src/agents/plugins/claude/plugin/skills/codemie-analytics of codemie-ai/codemie-code.

  • SKILL.md
  • references/leaderboard-dashboard-report.md
  • references/people-spending-dashboard-report.md
  • references/people-spending-dashboard-template.html
  • scripts/analytics-cli.js
  • scripts/inspect-schema.js

Open the folder on GitHubat commit 0218c8d

Compare with similar skills

Codemie Analytics next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Codemie Analytics compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Codemie Analytics this skillcodemie-ai/codemie-code294—~7.5kAutomated safety check: PassApache-2.0
Anomalib Benchmarkingopen-edge-platform/anomalib6.2k—~1kAutomated safety check: PassApache-2.0
Yolo Trainingfcakyon/claude-codex-settings1.2k1 repos~1.4kAutomated safety check: PassApache-2.0
Perforatedai PlotPerforatedAI/PerforatedAI237—~1.6kAutomated safety check: PassApache-2.0
Perforatedai AnalyzePerforatedAI/PerforatedAI237—~5.1kAutomated safety check: PassApache-2.0
Extracting Clinical Entitiesmaziyarpanahi/openmed5.5k—~1.9kAutomated safety check: PassApache-2.0

Similar skills

  • Anomalib Benchmarking

    open-edge-platform/anomalib

    Runs the anomalib benchmarking pipeline to train/evaluate a grid of model + dataset (+ category) combinations and collect metrics into a results CSV.

    6.2k GitHub stars~1k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Yolo Training

    fcakyon/claude-codex-settings

    This skill should be used when user asks to "improve my mAP", "why is my model overfitting", "my training is diverging", "read my results.csv", "interpret my training curves", "my AP50 is good but…

    1.2k GitHub starsUsed in 1 repo~1.4k tokens
    AI & LLM EngineeringAuto-check passed
  • Perforatedai Plot

    PerforatedAI/PerforatedAI

    Render a single-panel PAI figure of score versus parameter count from sweep CSVs, PAI run folders, or hand-supplied numbers.

    237 GitHub stars~1.6k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Perforatedai Analyze

    PerforatedAI/PerforatedAI

    Analyze PerforatedAI training results and provide optimization recommendations.

    237 GitHub stars~5.1k tokensUpdated yesterday
    AI & LLM EngineeringAuto-check passed
  • Extracting Clinical Entities

    maziyarpanahi/openmed

    Run clinical and biomedical named-entity recognition on medical text with OpenMed's analyzetext.

    5.5k GitHub stars~1.9k tokensUpdated 2 days ago
    AI & LLM EngineeringAuto-check passed
  • Shogun Bloom Config

    yohey-w/multi-agent-shogun

    Interactive wizard: guided questions with multiple-choice options about subscriptions, then outputs a ready-to-paste capabilitytiers YAML + fixed agent model assignments.

    1.4k GitHub stars~3.1k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed

More from codemie-ai/codemie-code

All 9 skills in this repo
  • Codemie HTML Report

    codemie-ai/codemie-code

    Build static HTML pages, reports, dashboards, and mockups that match the CodeMie UI design system.

    294 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Msgraph

    codemie-ai/codemie-code

    Work with Microsoft 365 services via the Graph API — emails, calendar events, SharePoint sites (read and write), Teams chats and channel messages, OneDrive files, OneNote notebooks, Planner task…

    294 GitHub stars~4.1k tokensUpdated yesterday
    Auto-check passed
  • Codemie Assistant Builder

    codemie-ai/codemie-code

    Build, test and autonomously improve CodeMie platform assistants.

    294 GitHub stars~3.3k tokensUpdated yesterday
    Auto-check passed
  • Codemie Release

    codemie-ai/codemie-code

    Release a new version of CodeMie CLI. An agent skill from codemie-ai/codemie-code.

    294 GitHub stars~1.8k tokensUpdated yesterday
    Auto-check passed
  • Report Issue

    codemie-ai/codemie-code

    This skill should be used when the user wants to report a bug, file an issue, or suggest a feature for the CodeMie Code CLI tool (codemie-ai/codemie-code repository on GitHub).

    294 GitHub stars~2.3k tokensUpdated yesterday
    Auto-check: notes
  • Codemie Jira Assistant

    codemie-ai/codemie-code

    Business Analyst Assistant - expert to work with Jira. An agent skill from codemie-ai/codemie-code.

    294 GitHub stars~489 tokensUpdated yesterday
    Auto-check passed

Questions about Codemie Analytics

What does Codemie Analytics do?

CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to…. Codemie Analytics is an agent skill from codemie-ai/codemie-code. CodeMie Analytics expert — use this skill whenever the user asks about CodeMie usage data, AI adoption metrics, user leaderboards, CLI insights, spending, LiteLLM costs, token usage, or wants to build a dashboard/report from CodeMie or LiteLLM APIs.

When should I use Codemie Analytics?

Codemie Analytics fits situations like: the user asks about CodeMie usage data; AI adoption metrics; user leaderboards; wants to build a dashboard/report from CodeMie.

How do I install Codemie Analytics in Claude Code?

Run `npx skills add codemie-ai/codemie-code --skill codemie-analytics -a claude-code`. Or copy the skill folder (src/agents/plugins/claude/plugin/skills/codemie-analytics in codemie-ai/codemie-code) into .claude/skills/codemie-analytics in your project. Claude Code loads it when a task matches its description.

How do I install Codemie Analytics in Codex?

Run `npx skills add codemie-ai/codemie-code --skill codemie-analytics -a codex`. Or copy the skill folder (src/agents/plugins/claude/plugin/skills/codemie-analytics in codemie-ai/codemie-code) into .agents/skills/codemie-analytics in your project. Codex loads it when a task matches its description.

Can I use Codemie Analytics in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codemie-ai/codemie-code --skill codemie-analytics -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/codemie-analytics, .gemini/skills/codemie-analytics, .github/skills/codemie-analytics and .opencode/skills/codemie-analytics in your project.

What does Codemie Analytics need to run?

Going by SKILL.md and its folder, Codemie Analytics needs JavaScript for the scripts in its folder, the command-line tools its instructions call (node) and credentials named LITELLM_KEY and CODEMIE_API_KEY. Our summary lists: Node.js; A credential in LITELLM_KEY; A credential in CODEMIE_API_KEY.

Does Codemie Analytics access the network?

SKILL.md names 1 domain. As links in the text: codemie.lab.epam.com. This is read from the text; nothing was executed.

Is Codemie Analytics safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Codemie Analytics use?

Codemie Analytics is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Codemie Analytics use?

About 7.5k tokens (SKILL.md is roughly 30k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 36k tokens, read only when the agent opens those files.

What are the alternatives to Codemie Analytics?

Skills that share tags, products or a category with Codemie Analytics: Anomalib Benchmarking (open-edge-platform/anomalib, 6.2k stars), Yolo Training (fcakyon/claude-codex-settings, 1.2k stars), Perforatedai Plot (PerforatedAI/PerforatedAI, 237 stars) and Perforatedai Analyze (PerforatedAI/PerforatedAI, 237 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Codemie Analytics?

codemie-ai (a GitHub user) maintains it in codemie-ai/codemie-code, which has 294 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 6, 2026.

Source: codemie-ai/codemie-code on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.