Datachain Jobs Analytics
Track Studio job metrics including compute hours, spend, failures, and cluster usage.
Installation
- Make sure Claude is on your device and in your terminal.
Skills load from
~/.claude/skills/when Claude Code starts up β so you need it on your machine first. If you don't have it yet, install it once with the command below, then runclaudein any terminal to verify.One-time setupnpm i -g @anthropic-ai/claude-codeAlready have it? Skip ahead.
- Paste into Claude Code or into your terminal.
This copies the whole skill folder into
~/.claude/skills/datachain-jobs-datachain-ai/β the SKILL.md plus any scripts, reference docs, or templates the skill ships with. Safe default: works for every skill.Faster alternative (instruction-only skills)
Skips the clone and grabs only the SKILL.md file. Don't use this if the skill ships Python scripts, reference markdowns, or asset templates β they won't be downloaded and the skill will fail when it tries to load them.
Quick install (SKILL.md only)Sign up to copy - Restart Claude Code.
Quit and reopen Claude Code (or any other agent that loads from
~/.claude/skills/). New skills are picked up on startup. - Just ask Claude.
Skills auto-activate when your request matches the skill's description β no slash command needed. Trigger phrases live in the skill's own frontmatter; you can read them in the βWhat this skill doesβ section above.
Prefer to read the source first? Open on GitHub.
When Claude uses it
Use when asked about Studio job analytics β compute hours, user spend, failure rates, cost estimation, cluster usage. Generates and maintains dc-knowledge/jobs/index.md.
What this skill does
You are now loaded with the datachain-jobs skill. Maintain a jobs analytics file at dc-knowledge/jobs/index.md. Follow the 3-step flow below exactly.
Step 1 β Check Staleness
python3 {skill_dir}/scripts/jobs.py --plan
- If
"studio_available": falseβ report theerrormessage and stop. - If
"up_to_date": trueβ skip to Step 3. - If
"up_to_date": falseβ continue to Step 2.
Step 2 β Fetch & Write
python3 {skill_dir}/scripts/jobs.py --fetch [--days N] [--limit N] [--enrich]
- Use
--days Nfrom the user's request if stated (e.g. "last 7 days" β--days 7). Default:--days 30. - Add
--enrichonly when the question requires duration, workers, or cluster data ANDenriched: falsein an existing index β tell the user it makes one API call per terminal job. - If the script fails β report the error and stop.
Write dc-knowledge/jobs/index.md using EXACTLY this format:
---
generated: <generated from script output>
days_covered: <days_covered>
total_jobs: <filtered_count>
failed_count: <failed_count>
complete_count: <complete_count>
running_count: <running_count>
other_count: <other_count>
enriched: <true|false>
duration_note: "Wall-clock duration (submitβfinish). Null when enriched=false or job still running."
truncated: <true|false>
---
## Clusters
| Name | Cloud | Max Workers | Default |
|------|-------|-------------|---------|
| <name> | <cloud_provider> | <max_workers> | <yes if is_default else no> |
## Jobs
| Date | ID | Name | Status | User | Workers | Duration | Cluster | Python |
|------|----|------|--------|------|---------|----------|---------|--------|
| <created_display> | <id> | <name> | <status> | <created_by> | <workers> | <duration_str or β> | <cluster_name or β> | <python_version or β> |
Section rules:
- Omit
## Clustersif theclustersarray is empty. - Duration cell:
duration_strvalue (e.g."9000s") when known,βwhen null. - Workers: always a number (
workersfield, defaults to 1). - Cluster, Python: use
βwhen null. - Date column:
created_display(YYYY-MM-DD HH:MMUTC). - Rows: newest-first (already sorted by script).
- If
truncated: true, add after the table:_(Results truncated at <limit> jobs. Use --limit N for more.)_
Step 3 β Answer
Read dc-knowledge/jobs/index.md and answer the user's question.
Duration arithmetic
Duration cells contain plain seconds strings like "9000s". Parse the integer before s, sum, then convert:
- Example: filter rows for user "alice" in the last 7 days, sum all Duration values β total seconds β divide by 3600 for hours.
- If all Duration cells are
β(enriched: false) β say: "Duration data requires enrichment. Re-fetch with:python3 {skill_dir}/scripts/jobs.py --fetch --enrich" and offer to do so.
Failure rate
- Overall:
failed_count / total_jobs * 100from frontmatter. - Per user or per day: count rows matching Status =
failedin the table.
Price estimation
When the user asks for cost:
- If hourly rate unknown β ask: "What is the instance hourly rate in $/hr? (e.g.
3.20for $3.20/hr)" - If Workers column is all
ββ ask: "How many workers per job?" or compute single-worker cost and note it. - Compute per job:
duration_seconds / 3600 Γ rate Γ workers. Group by user/day/cluster as requested. - Present as a table: User | Compute-hours | Est. cost (@$X/hr Γ N workers)
Per-cluster / per-user analytics
Filter the Jobs table by the Cluster or User column. Aggregate (Ns) Duration values for totals.
Related skills
Contract & Proposal Writer
alirezarezvani
Generate professional contracts, proposals, and legal documents for multiple jurisdictions.
CFO Financial Advisor
alirezarezvani
Build financial models, analyze unit economics, and plan fundraising strategy for startups.
CHRO People Advisor
alirezarezvani
Build hiring plans, compensation frameworks, and organizational structures that scale.
Domain Name Brainstormer
Prat011
Generate creative domain name ideas and check availability across multiple extensions.