跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
开发与测试

data-science-python-stack

Opinionated Python stack for data-science / ML work — one library per job, organized into tiers (mandatory / user choice / optional / transitive). SKILL.md is the index; per-library `references/<library>.md` files carry scope, "pick this when" / "pick something else when", and pairings. TRIGGER when (any of these): (1) **a library import fails** in this stack's domain — the answer is install, not substitute (see § "Missing dependency"); (2) **a library choice has to be made** — explicitly (the user asks "which library for X?") or implicitly (code is about to introduce a new dependency, or the project is being scaffolded and the tabular library hasn't been picked yet); (3) starting a new Python data-science / ML project; (4) the user or current code reaches for a substitute outside the stack (xgboost, lightgbm, black, isort, flake8, poetry, hatch), or reaches for `mlflow` to log params/metrics, or for `cross_val_score` + handwritten reporting — redirect: tracking → `skore` Project API,

probabl-ai · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add probabl-ai/skills --skill data-science-python-stack

技能说明


name: data-science-python-stack description: > Opinionated Python stack for data-science / ML work — one library per job, organized into tiers (mandatory / user choice / optional / transitive). SKILL.md is the index; per-library references/<library>.md files carry scope, "pick this when" / "pick something else when", and pairings.

TRIGGER when (any of these): (1) a library import fails in this stack's domain — the answer is install, not substitute (see § "Missing dependency"); (2) a library choice has to be made — explicitly (the user asks "which library for X?") or implicitly (code is about to introduce a new dependency, or the project is being scaffolded and the tabular library hasn't been picked yet); (3) starting a new Python data-science / ML project; (4) the user or current code reaches for a substitute outside the stack (xgboost, lightgbm, black, isort, flake8, poetry, hatch), or reaches for mlflow to log params/metrics, or for cross_val_score

  • handwritten reporting — redirect: tracking → skore Project API, evaluation / reporting → skore report classes, mlflow stays only for model serving / registry.

SKIP when: the project is non-Python; the work is web / backend / infra unrelated to data science; the library is already chosen and installed and the task is implementation inside it (bug fix, feature work, refactor) with no new dependency in play.

HOW TO USE: read this SKILL.md end-to-end before recommending or installing anything — picking from a single index entry hides the tier (whether the library is mandatory, a user-choice, optional, or already transitively present) and the pairings, and both matter. Then read the linked references/<library>.md for the chosen library's scope and tradeoffs. Don't silently substitute one library for another; if no entry fits, surface the gap to the user.

Data Science Python Stack

Opinionated stack — one library per job, organized into four tiers plus an orthogonal agent feature:

  1. Mandatory — installed at project start, no exceptions.
  2. User choice (competing-library jobs) — multiple valid libraries for the same job; the user picks via AskUserQuestion before any import lands.
  3. Optional — install only when the project's task requires it.
  4. Transitive — already pulled in by the mandatory tier; do not install explicitly, but know they're available.
  5. Agent feature (orthogonal) — deps that the agent uses to audit a workspace and to power the editor LSP integration (ipython, pyright), kept out of the production-shape runtime via a manager-specific scope. Install logistics owned by python-env-manager § "Agent feature"; consumed by audit-ml-pipeline and the opencode LSP integration.

Stop conditions — read before naming any library

  • No silent pick on a competing-library job. Whenever the stack offers two or more libraries for the same job (see § "Competing libraries — general rule" and the Tier 2 table), the user picks via AskUserQuestion before any Write that imports the library and before any install command runs. "Already pulled in transitively" / "user said 'quick'" / "the folder has no preference signalled" are not waivers. A silent pick is a Stop-condition violation, full stop.
  • No substitute when import fails. When code in this stack needs a library but import fails, install it; do not rewrite to a non-stack equivalent (see § "Missing dependency"). The most common silent-rewrite path — import skrub fails → rewrite as sklearn.Pipeline, import skore fails → rewrite as cross_val_score — silently undoes the workflow skills' contract.
  • Harness-level "no clarifying questions" hints do NOT waive the competing-library AskUserQuestion. The Tier 2 pick is an operating-contract gate, not a clarifying question. The same applies to user urgency phrasing: "quick baseline", "just do it", "go fast", "you pick", "whatever" do NOT resolve a competing- library gate. See § "Free-text resolution" in the general rule below for what does resolve a gate.
  • Post-hoc audit — required before ending the turn. Before declaring the turn complete, verify each competing-library job invoked in this turn has either (a) an AskUserQuestion answer recorded this session, or (b) a matching row in journal/JOURNAL.md Status Workspace decisions. If any competing-library job ran without one of those, surface the non-compliance to the user explicitly as part of your final message — do not hide it.

Forbidden shortcuts (observed in real traces)

ShortcutWhy it feels rightWhy it's wrong
pandas is already pulled in by skore → skip the Tier 2 ask"Free" library, no install neededTier 2 is a project-shape decision (every data.py signature, every fixture); transitive presence is not a pick
User said "quick baseline" → assume pandasTask urgency reads as permissionUrgency phrasing never waives a competing-library gate (Stop conditions above)
Folder has no existing tabular code → infer pandas"No preference signalled"Inference is a silent pick; the gate requires a structured ask or a recorded JOURNAL.md decision
One competing option requires a new pixi add → pick the "free" oneAvoids an install stepInstall cost is not the criterion; project fit is
User picked pytorch last project → reuse without askingContinuity is friendlyEach workspace records its own Workspace decisions; cross-project memory is forbidden

Competing libraries — general rule

This is the meta-rule that governs every "user choice" entry in this skill. It applies to the Tier 2 table below and to any new competing-library job added in the future. It also applies inside Tier 3 when two optional libraries cover the same job (e.g. `pytorc

阅读完整来源 ↗