mlb-regression-flagger

识别梦幻棒球中表层数据(wOBA、ERA、打击率)与底层 Statcast 质量指标(xwOBA、FIP、xBA)背离的球员,输出从 -100(非常幸运,应高位卖出)到 +100(非常不幸,应低位买入)的“回归指数”(regression_index)。该指标作为交易和自由球员市场中“低位买入/高位卖出”决策的主要信号。适用于用户提及“低位买入”“高位卖出”“回归候选”“幸运/不幸”“xwOBA 差距”“ERA-FIP 差距”“BABIP”“即将回归均值”等情形,或在基于球员是否超常/失常来做交易决策时使用。

仓库最近推送
GitHub Stars
206
Forks
28
Issues / PRs
3

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "mlb-regression-flagger":https://skillpi.com/zh/skills/deepskill-d341eee29763b0cd29c88eaa4f9ea374f343804df07a063de04f0d7802c2a3c3。安装前核对上游来源和版本:https://github.com/lyndonkl/claude。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

识别梦幻棒球中表层数据(wOBA、ERA、打击率)与底层 Statcast 质量指标(xwOBA、FIP、xBA)背离的球员,输出从 -100(非常幸运,应高位卖出)到 +100(非常不幸,应低位买入)的“回归指数”(regression_index)。该指标作为交易和自由球员市场中“低位买入/高位卖出”决策的主要信号。适用于用户提及“低位买入”“高位卖出”“回归候选”“幸运/不幸”“xwOBA 差距”“ERA-FIP 差距”“BABIP”“即将回归均值”等情形,或在基于球员是否超常/失常来做交易决策时使用。

0 下载

介绍来源: third_party · lyndonkl · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: mlb-regression-flagger
description: Identifies fantasy baseball players whose surface stats (wOBA, ERA, batting average) are diverging from their underlying Statcast quality (xwOBA, FIP, xBA) — emits a `regression_index` from -100 (very lucky, sell high) to +100 (very unlucky, buy low). Primary signal for buy-low/sell-high decisions on trades and waivers. Use when user mentions "buy low", "sell high", "regression candidate", "lucky", "unlucky", "xwOBA gap", "ERA-FIP gap", "BABIP", "due for regression", or is deciding whether to trade for / trade away a player based on over- or under-performance.

MLB Regression Flagger

Table of Contents

Example

Scenario: User asks "Is Junior Caminero a buy-low candidate or am I chasing noise?"

Raw data gathered from Baseball Savant + FanGraphs (cite URLs):

  • Caminero 2026 wOBA: .310 (actual results)
  • Caminero 2026 xwOBA: .380 (expected based on exit velocity + launch angle)
  • BABIP: .255 (well below .300 league mean)
  • Barrel %: 14.2% (elite, 90th percentile)
  • Hard-Hit %: 52% (elite)

Regression index calculation:

regression_index = (xwOBA - wOBA) x 500
                 = (.380 - .310) x 500
                 = +35

Secondary check — BABIP: .255 is below the .240 lower-outlier threshold for hitters only if we tighten further, but .255 plus elite contact quality confirms unlucky. Not a "will correct to .300" player, but unlikely to stay at .255 given the batted-ball profile.

Verdict: regression_index = +35 → BUY. Caminero has been unlucky; underlying contact quality is elite. Expect his surface stats to catch up over the next 30 days.

User-facing translation (per CLAUDE.md rule #5 — beginner writing):

"Junior Caminero's raw numbers look mediocre (.310 wOBA — that's a catch-all hitting stat), but the quality of his actual contact (how hard and at what angle he hits the ball) suggests he should be hitting .380. The gap is one of the biggest in the league. ADD if available, or OFFER a trade for him before his stats correct."

Signal file emission (per signal-framework.md):

---
type: regression
date: 2026-04-17
emitted_by: mlb-regression-flagger
player: Junior Caminero
regression_index: +35
direction: BUY
confidence: 0.78
source_urls:
  - https://baseballsavant.mlb.com/savant-player/junior-caminero-...
  - https://www.fangraphs.com/players/junior-caminero/...
---

Workflow

Copy this checklist and track progress:

Regression Flagger Progress:
- [ ] Step 1: Define the candidate list (who to check)
- [ ] Step 2: Web-search Savant for expected stats (xwOBA, xERA, xBA)
- [ ] Step 3: Web-search FanGraphs for surface stats (wOBA, ERA, BABIP, HR/FB)
- [ ] Step 4: Compute regression_index per player
- [ ] Step 5: Apply secondary flags (BABIP, HR/FB)
- [ ] Step 6: Emit signal file + user-facing translation

Step 1: Define the candidate list

Who are we checking? Three entry points:

  • [ ] User's current roster (for SELL candidates — anyone overperforming)
  • [ ] Free agents + waiver wire (for BUY candidates — anyone underperforming with elite underlying metrics)
  • [ ] Specific player asked about (e.g., trade target)

Step 2: Web-search Baseball Savant for expected stats

See resources/methodology.md for exact queries and URL patterns.

  • [ ] Hitters: xwOBA, xBA, xSLG, Barrel %, Hard-Hit %
  • [ ] Pitchers: xERA, Expected Batting Average against, Whiff %, Chase %
  • [ ] Record each URL in source_urls for the signal file

Step 3: Web-search FanGraphs for surface stats

See resources/methodology.md for query patterns.

  • [ ] Hitters: wOBA, BABIP, AVG, OBP, SLG
  • [ ] Pitchers: ERA, FIP, xFIP, HR/FB %, LOB %
  • [ ] Record each URL

Step 4: Compute regression_index

See resources/methodology.md for the formulas.

  • [ ] Hitter: regression_index = (xwOBA - wOBA) x 500, clamped to ±100
  • [ ] Pitcher: regression_index = (FIP - ERA) x 50, clamped to ±100
    • Note: for pitchers, a LARGER (more positive) FIP than ERA = pitcher has been lucky (negative signal for fantasy); a SMALLER FIP than ERA = pitcher has been unlucky (positive signal). See methodology for sign convention.
  • [ ] Populate resources/template.md with the result

Step 5: Apply secondary flags

  • [ ] Hitter BABIP check: flag if > .370 (unsustainably lucky) or < .240 (unsustainably unlucky)
  • [ ] Pitcher HR/FB check: flag if > 17% (unlucky, normalizes to ~12%) or < 8% (lucky)
  • [ ] Note: secondary flags reinforce or contradict the primary regression_index. When they agree, confidence goes up; when they disagree, confidence drops and the player goes into a "watchlist" bucket instead of an actionable BUY/SELL.

Step 6: Emit signal file + user-facing translation

  • [ ] Write signals/YYYY-MM-DD-regression.md with frontmatter per signal-framework.md
  • [ ] Translate every stat to plain English for the user (per CLAUDE.md rule #5)
  • [ ] End every recommendation with an action verb: BUY / SELL / HOLD / ADD / DROP (per CLAUDE.md rule #6)
  • [ ] Validate against resources/evaluators/rubric_mlb_regression_flagger.json. Target average ≥ 3.5.

Common Patterns

Pattern 1: The Elite-Contact, Bad-Luck Hitter (classic BUY)

  • Signals: xwOBA - wOBA ≥ +.050, Barrel % ≥ 90th percentile, BABIP ≤ .260
  • Typical profile: Young hitter with elite exit velocity whose line drives are finding gloves
  • Action: Aggressive BUY. Offer a trade for them before the market catches on. Bid FAAB if they are on waivers.
  • Example: Junior Caminero — xwOBA .380 vs wOBA .310, BABIP .255 → +35, BUY.

Pattern 2: The Lucky Journeyman (classic SELL)

  • Signals: wOBA - xwOBA ≥ +.050, Barrel % below median, BABIP ≥ .360
  • Typical profile: Career-average hitter riding a hot streak on soft contact
  • Action: SELL high. Try to trade them for a BUY-LOW target of real talent.
  • Example (hypothetical): Utility IF hitting .310 with a .360 BABIP and xwOBA .295 vs wOBA .340 → -22, SELL.

Pattern 3: The Pitcher-Lucky Starter (SELL)

  • Signals: ERA much lower than FIP (e.g., 2.50 ERA, 4.20 FIP), HR/FB < 8%, strand rate (LOB%) > 80%
  • Typical profile: Starter whose fly balls aren't leaving the park and whose inherited runners aren't scoring
  • Action: SELL while his ERA still looks shiny.
  • Regression_index example: (FIP - ERA) x 50 = (4.20 - 2.50) x 50 = +85. But for pitchers a large FIP-ERA gap means he has been LUCKY → flip sign → -85, SELL. See methodology for sign convention.

Pattern 4: The Pitcher-Unlucky Starter (BUY)

  • Signals: ERA well above FIP (e.g., 5.10 ERA, 3.40 FIP), HR/FB > 17%, LOB% < 68%
  • Typical profile: Good stuff, bad sequencing / BABIP luck
  • Action: BUY before the ERA corrects.

Pattern 5: Conflicting Signals (WATCHLIST, not actionable)

  • Signals: xwOBA-wOBA gap is large but Barrel % is below median, OR BABIP is extreme but contact quality confirms it
  • Action: Do NOT auto-flag BUY/SELL. Emit regression_index with reduced confidence (< 0.5) and place on watchlist for another week.

Guardrails

  1. Sample-size minimum: Do not emit a regression_index for a hitter with fewer than 80 PAs or a pitcher with fewer than 30 IP. Statcast expected stats are noisy below that. If below threshold, emit confidence: 0.3 and label too-early.

  2. Sign convention for pitchers: (FIP - ERA) x 50 gives a raw number. A POSITIVE raw number means ERA < FIP → the pitcher has been LUCKY → negate to produce a NEGATIVE regression_index (SELL signal). A NEGATIVE raw number means ERA > FIP → UNLUCKY → negate to POSITIVE (BUY). Always negate. See methodology for the worked example. Hitters use the raw sign directly.

  3. Clamp to ±100: Extreme xwOBA gaps (>.200) are almost always small-sample artifacts. Clamp hard. Do not report regression_index of +140.

  4. Park and platoon adjustments: xwOBA from Savant is park-neutral but does not adjust for platoon splits. For a LHH playing in a tough-for-lefties park (e.g., Oracle) with many LHP starts ahead, the regression may be slower than the index suggests. Note as a caveat; do not recompute.

  5. BABIP is secondary, not primary: A high BABIP alone is not a SELL signal if underlying contact quality is elite. Hitters with extreme exit velocity (e.g., Judge, Ohtani) sustain BABIPs above .340 for full seasons. Always cross-check BABIP against Hard-Hit % before flagging.

  6. HR/FB normalization for pitchers: League-average HR/FB is ~12%. Pitchers regress toward their career HR/FB, not league average. A flyball pitcher's "normal" HR/FB is 14%; a groundball pitcher's is 9%. Use career or 3-year average when available; fall back to 12% only if no history.

  7. Web-search every fact (per CLAUDE.md): Every number that enters the formula must come from a live web search with the URL recorded in source_urls:. Never fill in from memory or training data. If a search fails, degrade to confidence: 0.3 and flag in the red-team pass.

  8. Translate for the beginner: The user has zero baseball knowledge. Every user-facing sentence that uses "xwOBA", "FIP", "BABIP" must include an inline translation on first use. See CLAUDE.md rule #5 and the Example above.

Quick Reference

Core formulas:

HITTER:  regression_index = clamp((xwOBA - wOBA) x 500, -100, +100)
         positive = UNLUCKY (BUY); negative = LUCKY (SELL)

PITCHER: raw = (FIP - ERA) x 50
         regression_index = clamp(-raw, -100, +100)
         positive = UNLUCKY (BUY); negative = LUCKY (SELL)

SECONDARY (hitter):  BABIP > .370 → lucky flag; BABIP < .240 → unlucky flag
SECONDARY (pitcher): HR/FB < 8% → lucky flag; HR/FB > 17% → unlucky flag

Action thresholds:

regression_index Direction Fantasy action
≥ +30 Very unlucky Aggressive BUY / ADD / high FAAB bid
+15 to +29 Mildly unlucky BUY if available cheaply
-14 to +14 Noise HOLD / no action
-29 to -15 Mildly lucky SELL if offered market-rate
≤ -30 Very lucky Aggressive SELL / DROP / decline offers

Data source map (per data-sources.md):

Stat Primary source URL pattern
xwOBA, xBA, xSLG, Barrel %, Hard-Hit % Baseball Savant https://baseballsavant.mlb.com/savant-player/{slug}-{id}
wOBA, BABIP (hitter) FanGraphs https://www.fangraphs.com/players/{slug}/{id}
ERA, FIP, xFIP, HR/FB, LOB% FanGraphs same
xERA Baseball Savant same

Key resources:

Inputs required:

  • Player name(s) or "scan roster" / "scan waivers"
  • League context: weeks remaining, category needs (from context/league-config.md and mlb-category-state-analyzer signals)

Outputs produced:

  • regression_index per player (-100 to +100)
  • Direction tag: BUY / SELL / HOLD / WATCHLIST
  • Secondary flag notes (BABIP, HR/FB)
  • Signal file at signals/YYYY-MM-DD-regression.md
  • User-facing summary with inline jargon translations and an action verb

版本历史

  1. 0.1 GitHub ↗
    原版更新说明

    ## What's Changed * Improve writer skill navigation and structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/1 * Consolidate stickiness content and reduce revision to 3 passes by @lyndonkl in https://github.com/lyndonkl/claude/pull/2 * Update README.md to reflect current writer skill structure by @lyndonkl in https://github.com/lyndonkl/claude/pull/3 * Add explicit instructions for AI agents to follow resource file workf… by @lyndonkl in https://github.com/lyndonkl/claude/pull/4 * Change analysis files from /tmp/ to project directory by @lyndonkl in https://github.com/lyndonkl/claude/pull/5 * Add five refined skills to production by @lyndonkl in https://github.com/lyndonkl/claude/pull/6 * Add causal-inference-root-cause skill and fix missing methodology files by @lyndonkl in https://github.com/lyndonkl/claude/pull/7 * Add workflow pattern to 6 completed skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/8 * Add chain-estimation and roleplay-debate skills with optimizations by @lyndonkl in https://github.com/lyndonkl/claude/pull/9 * Add 3 new skills and update writer skill workflow pattern by @lyndonkl in https://github.com/lyndonkl/claude/pull/10 * Add skills #12-13: constraint-based-creativity and data-schema-knowle… by @lyndonkl in https://github.com/lyndonkl/claude/pull/11 * Add skills #14-16: decision-matrix, decomposition-reconstruction, deliberation-debate-red-teaming by @lyndonkl in https://github.com/lyndonkl/claude/pull/12 * Add skills #17-19: design-of-experiments, dialectical-mapping-steelmanning, discovery-interviews-surveys by @lyndonkl in https://github.com/lyndonkl/claude/pull/13 * Add chef-assistant skill and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/14 * Fix README: Remove links to gitignored scratchpad files by @lyndonkl in https://github.com/lyndonkl/claude/pull/15 * Add skills #14-22: 9 new production-ready skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/16 * Add skills #20-24 and workflow pattern updates by @lyndonkl in https://github.com/lyndonkl/claude/pull/17 * Add skill #25: expected-value by @lyndonkl in https://github.com/lyndonkl/claude/pull/18 * Add skills #26-28: facilitation-patterns, financial-unit-economics, focus-timeboxing-8020 by @lyndonkl in https://github.com/lyndonkl/claude/pull/19 * Add skills #29-30: heuristics-and-checklists, hypotheticals-counterfactuals by @lyndonkl in https://github.com/lyndonkl/claude/pull/20 * Add skills #31-33: information-architecture, kill-criteria-exit-ramps, layered-reasoning by @lyndonkl in https://github.com/lyndonkl/claude/pull/21 * Add Claude Code plugin support by @lyndonkl in https://github.com/lyndonkl/claude/pull/22 * Fix plugin marketplace source path by @lyndonkl in https://github.com/lyndonkl/claude/pull/23 * Add skill #34: mapping-visualization-scaffolds by @lyndonkl in https://github.com/lyndonkl/claude/pull/24 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/25 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/26 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/27 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/28 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/29 * Add skill #59: skill-extraction by @lyndonkl in https://github.com/lyndonkl/claude/pull/30 * Add skill-creator: Transform documents into actionable skills by @lyndonkl in https://github.com/lyndonkl/claude/pull/31 * Update skill count from 58 to 61 in README by @lyndonkl in https://github.com/lyndonkl/claude/pull/32 * Skill refinement by @lyndonkl in https://github.com/lyndonkl/claude/pull/33 * Add d3-visualization skill: comprehensive D3.js implementation guide by @lyndonkl in https://github.com/lyndonkl/claude/pull/34 * Add comprehensive Superforecasting Toolkit with 4 skills and orchestr… by @lyndonkl in https://github.com/lyndonkl/claude/pull/35 * Add "Run in Smithery" badge by @gurdasnijor in https://github.com/lyndonkl/claude/pull/36 * Add Scientific Writing Toolkit with 6 skills and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/37 * Improve skill invocation rules and update README by @lyndonkl in https://github.com/lyndonkl/claude/pull/38 * Add Geometric Deep Learning skill suite and orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/39 * Decompose writer skill into 4 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/40 * Add GraphRAG skill suite with 5 skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/41 * Decompose cognitive-design skill into 3 focused skills + orchestrating agent by @lyndonkl in https://github.com/lyndonkl/claude/pull/42 ## New Contributors * @lyndonkl made their first contribution in https://github.com/lyndonkl/claude/pull/1 * @gurdasnijor made their first contribution in https://github.com/lyndonkl/claude/pull/36 **Full Changelog**: https://github.com/lyndonkl/claude/commits/0.1

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 解决梦幻棒球中高频刚需:基于底层数据识别被低估/高估球员
  • 提供明确的交易信号(-100到+100回归指数)指导用户决策
  • 覆盖多种典型场景(精英击球手运气差、老将投手幸运等)
触发精准90/100

亮点

  • 触发词覆盖全面,包括'buy low'、'sell high'、'regression candidate'等核心术语
  • 边界清晰,明确适用于交易和自由球员市场决策场景
结构规范85/100

待提升项

  • description写错位置 原报告严重程度:轻微

    顶层frontmatter中description为空,实际描述内容在skill_body内部

    改进建议:将description内容移至顶层frontmatter

  • 引用文件缺失 原报告严重程度:轻微

    SKILL.md引用了resources/methodology.md、resources/template.md等资源文件,但未传入

    改进建议:确保所有被引用的资源文件都包含在Skill包中,或明确说明这些是模板文件

亮点

  • 工作流程清晰分步,包含6个明确步骤和检查清单
  • 提供完整示例展示端到端执行过程
  • 包含常见模式和防护措施,提升实用性
执行可靠80/100

待提升项

  • 依赖外部资源文件 原报告严重程度:重大

    执行流程严重依赖resources/目录下的多个文件(methodology.md、template.md、evaluators等),若缺失将导致执行失败

    改进建议:将关键公式和模板内容内联到主文档,或确保所有依赖文件都包含在Skill包中

亮点

  • 数据来源明确(Baseball Savant、FanGraphs)并提供URL模式
  • 包含样本量最小值防护和极端值截断机制
  • 提供置信度评分和冲突信号处理方案
证据可验 (前四项均值)88/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • baseballsavant.mlb.com
  • www.fangraphs.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。