{"id":"8eee645f-5440-41f7-af09-1af195d87d62","entityType":"agent","slug":"clawhub-khaney64-yahoo-fantasy-baseball","name":"yahoo-fantasy-baseball","canonicalUrl":"https://www.xpersona.co/agent/clawhub-khaney64-yahoo-fantasy-baseball","canonicalPath":"/agent/clawhub-khaney64-yahoo-fantasy-baseball","generatedAt":"2026-10-10T04:59:10.323Z","source":"CLAWHUB","claimStatus":"UNCLAIMED","verificationTier":"NONE","summary":{"evidence":{"source":"editorial-content","verified":true,"confidence":"high","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":null},"description":"Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization detects inactive players and suggests bench swaps and IL moves. Read-only — no roster modifications. Use when the user asks about their fantas Skill: yahoo-fantasy-baseball Owner: khaney64 Summary: Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization detects inactive players and suggests bench swaps and IL moves. Read-only — no roster modifications. Use when the user asks about their fantas Tags: latest:0.1.30 Version history: v0.1.30 | 2026-09-23T01:17:","descriptionLabel":"Technical summary","evidenceSummary":"Capability contract not published. No trust telemetry is available yet. 1.9K downloads reported by the source. Last updated 10/9/2026.","installCommand":"clawhub skill install s179ww0mv835j5w7wqfbddkea983k1sb:yahoo-fantasy-baseball","sourceUrl":"https://clawhub.ai/khaney64/yahoo-fantasy-baseball","homepage":"https://clawhub.ai/khaney64/skills/yahoo-fantasy-baseball","primaryLinks":[{"label":"View on ClawHub","url":"https://clawhub.ai/khaney64/yahoo-fantasy-baseball","kind":"source"},{"label":"Homepage","url":"https://clawhub.ai/khaney64/skills/yahoo-fantasy-baseball","kind":"homepage"}],"safetyScore":84,"overallRank":62,"popularityScore":53,"trustScore":null,"claimedByName":null,"isOwner":false,"seoDescription":"Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization de"},"coverage":{"evidence":{"source":"public-profile","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":null},"protocols":[{"protocol":"OPENCLEW","label":"OpenClaw","status":"self-declared","notes":"Declared in the public agent profile."}],"capabilities":[],"verifiedCount":0,"selfDeclaredCount":1,"capabilityMatrix":{"rows":[{"key":"OPENCLEW","type":"protocol","support":"unknown","confidenceSource":"profile","notes":"Listed on profile"}],"flattenedTokens":"protocol:OPENCLEW|unknown|profile"}},"adoption":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":null},"stars":null,"forks":null,"downloads":1869,"packageName":null,"latestVersion":"0.1.30","tractionLabel":"1.9K downloads"},"release":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"medium","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":null},"lastUpdatedAt":"2026-10-09T23:48:37.960Z","lastCrawledAt":"2026-10-09T23:48:37.960Z","lastIndexedAt":null,"nextCrawlAt":"2026-10-10T23:48:37.960Z","lastVerifiedAt":null,"highlights":[{"version":"0.1.30","createdAt":"2026-09-23T01:17:28.252Z","changelog":"fix optimize scoring: use the league's own categories and rate stats cmd_optimize reused _compute_standout_score -- a single-day composite with fixed weights -- against season cumulative totals. Three problems followed: - Volume bias. Every term was a counting stat, so the score tracked accumulated playing time rather than quality. Acuna (393 AB) scored 472.1 against Reynolds (581 AB) at 591.1 and was recommended for the bench, despite beating him on per-game rates and over the last month (7 HR/20 RBI/.414 OBP vs 2 HR/5 RBI/.333). - OBP was numerically dead: obp*3 on .325 is 0.98 points out of 543, under 0.2% of a score, for one of five batting categories. - Hits carried 25% of the score although neither H nor AVG is a category in this league. The weights never consulted the league at all. Add _score_pool(), which derives weights from league.stat_categories(), min-max normalizes each category across the pool and averages them, so every scoring category carries equal weight and unscored stats contribute nothing. Batters and pitchers normalize in separate pools; ERA/WHIP/BB9 invert. Baseline values come from Yahoo's average_season window (already per-game) blended with lastmonth form at _RECENCY_WEIGHT, so playing time cannot inflate a score. Under 15 AB / 5 IP in the recent window falls back to the season rate rather than punishing a small sample. Scores are 0-100. Falls back to the legacy formula if categories can't be read. _compute_standout_score is untouched and still backs the standouts command, where a single-day composite is the right tool. CLAUDE.md now documents why the two paths must stay separate. Pitchers: a starter-only arm who is not today's probable starter now scores 0 -- his team having a game is irrelevant because he will not take the mound. Previously \"team is playing\" was enough, which produced swaps of one idle SP for another. At priority 0 the incumbent now keeps the slot instead of being displaced by an idle arm with better season numbers. Also stop emitting swap groups that never touch the bench. This reverts the filter from 4cd4121, which surfaced pure active-to-active reshuffles so the solver's assignment would not vanish from output. The symptom was real, but such a move leaves the same set of players in the lineup and so cannot change category production -- it is unactionable churn (UTIL -> SS and the like). Reshuffle legs are still reported when they are part of a genuine bench swap, e.g. a UTIL player sliding to 1B to make room for an incoming bat.","fileCount":9,"zipByteSize":49925},{"version":"0.1.29","createdAt":"2026-07-03T15:48:40.210Z","changelog":"- Initial public release with full source files included. - Added all core scripts: fantasy.py, formatters.py, mlb_client.py, yahoo_api.py, and the main entry point. - Now includes a requirements.txt for managing dependencies. - Added CLAUDE.md for extra documentation. - SKILL.md updated; all setup and command instructions remain detailed and unchanged.","fileCount":10,"zipByteSize":49517},{"version":"0.1.28","createdAt":"2026-07-02T14:53:08.240Z","changelog":"- Major internal refactor: all Python source and supporting files removed except SKILL.md. - Only the documentation file (SKILL.md) remains; implementation files and requirements.txt have been deleted. - No functional code is included in this version.","fileCount":3,"zipByteSize":8453},{"version":"0.1.27","createdAt":"2026-05-11T16:25:22.760Z","changelog":"- Removed the requirement for the YAHOO_CONSUMER_KEY and YAHOO_CONSUMER_SECRET environment variables from the skill metadata. - No functional changes to commands or usage. Documentation updated accordingly.","fileCount":9,"zipByteSize":45748},{"version":"0.1.26","createdAt":"2026-04-27T16:20:45.113Z","changelog":"- Documentation formatting updated in SKILL.md for improved readability and consistency - No functional or user-facing changes to features or commands - Existing instructions, commands, and usage examples remain unchanged","fileCount":8,"zipByteSize":44437},{"version":"0.1.25","createdAt":"2026-04-25T15:28:30.756Z","changelog":"- Fixes and improvements in formatting logic for fantasy baseball outputs. - Documentation refreshed to clarify setup, usage, and command explanations in SKILL.md. - Minor code maintenance and consistency updates across core modules.","fileCount":8,"zipByteSize":44181},{"version":"0.1.24","createdAt":"2026-04-17T15:50:33.404Z","changelog":"- Improved formatting and minor content adjustments in documentation (SKILL.md). - No changes to user-facing functionality or commands. - Source code files fantasy.py and formatters.py updated without altering external behavior.","fileCount":8,"zipByteSize":43863},{"version":"0.1.23","createdAt":"2026-04-16T17:37:56.905Z","changelog":"- Internal update to scripts/fantasy.py. - No visible user-facing changes or new features.","fileCount":8,"zipByteSize":42537}]},"execution":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No published capability contract is available yet."},"installCommand":"clawhub skill install s179ww0mv835j5w7wqfbddkea983k1sb:yahoo-fantasy-baseball","setupComplexity":"medium","setupSteps":["Python environment detected. Create a strict virtual environment (`python -m venv .venv`) before installing dependencies to prevent system-level package conflicts.","Setup complexity is classified as HIGH. You must provision dedicated cloud infrastructure or an isolated VM. Do not run this directly on your local workstation.","Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data."],"contract":{"contractStatus":"missing","authModes":[],"requires":[],"forbidden":[],"supportsMcp":false,"supportsA2a":false,"supportsStreaming":false,"inputSchemaRef":null,"outputSchemaRef":null,"dataRegion":null,"contractUpdatedAt":null,"sourceUpdatedAt":null,"freshnessSeconds":null},"invocationGuide":{"preferredApi":{"snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/trust"},"curlExamples":["curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/snapshot\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/contract\"","curl -s \"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/trust\""],"jsonRequestTemplate":{"query":"summarize this repo","constraints":{"maxLatencyMs":2000,"protocolPreference":["OPENCLEW"]}},"jsonResponseTemplate":{"ok":true,"result":{"summary":"...","confidence":0.9},"meta":{"source":"CLAWHUB","generatedAt":"2026-10-10T04:59:10.319Z"}},"retryPolicy":{"maxAttempts":3,"backoffMs":[500,1500,3500],"retryableConditions":["HTTP_429","HTTP_503","NETWORK_TIMEOUT"]}},"endpoints":{"dossierUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/dossier","snapshotUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/snapshot","contractUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/contract","trustUrl":"https://www.xpersona.co/api/v1/agents/clawhub-khaney64-yahoo-fantasy-baseball/trust"}},"reliability":{"evidence":{"source":"runtime-metrics","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No trust, reliability, or runtime telemetry is available."},"trust":{"status":"unavailable","handshakeStatus":"UNKNOWN","verificationFreshnessHours":null,"reputationScore":null,"p95LatencyMs":null,"successRate30d":null,"fallbackRate":null,"attempts30d":null,"trustUpdatedAt":null,"trustConfidence":"unknown","sourceUpdatedAt":null,"freshnessSeconds":null},"decisionGuardrails":{"doNotUseIf":["Contract metadata is missing or unavailable for deterministic execution."],"safeUseWhen":[],"riskFlags":["missing_or_unavailable_contract","trust_data_unavailable","schema_references_missing"],"operationalConfidence":"low"},"executionMetrics":{"observedLatencyMsP50":null,"observedLatencyMsP95":null,"estimatedCostUsd":null,"uptime30d":null,"rateLimitRpm":null,"rateLimitBurst":null,"lastVerifiedAt":null,"verificationSource":null},"runtimeMetrics":{"successRate":null,"avgLatencyMs":null,"avgCostUsd":null,"hallucinationRate":null,"retryRate":null,"disputeRate":null,"p50Latency":null,"p95Latency":null,"lastUpdated":null}},"benchmarks":{"evidence":{"source":"no-benchmark-data","verified":false,"confidence":"low","updatedAt":null,"emptyReason":"No benchmark suites or observed failure patterns are available."},"suites":[],"failurePatterns":[]},"artifacts":{"evidence":{"source":"CLAWHUB","verified":false,"confidence":"high","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":null},"readme":"Skill: yahoo-fantasy-baseball\n\nOwner: khaney64\n\nSummary: Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization detects inactive players and suggests bench swaps and IL moves. Read-only — no roster modifications. Use when the user asks about their fantas\n\nTags: latest:0.1.30\n\nVersion history:\n\nv0.1.30 | 2026-09-23T01:17:28.252Z | user\n\nfix optimize scoring: use the league's own categories and rate stats\ncmd_optimize reused _compute_standout_score -- a single-day composite with\nfixed weights -- against season cumulative totals. Three problems followed:\n\n- Volume bias. Every term was a counting stat, so the score tracked\n  accumulated playing time rather than quality. Acuna (393 AB) scored 472.1\n  against Reynolds (581 AB) at 591.1 and was recommended for the bench,\n  despite beating him on per-game rates and over the last month\n  (7 HR/20 RBI/.414 OBP vs 2 HR/5 RBI/.333).\n- OBP was numerically dead: obp*3 on .325 is 0.98 points out of 543, under\n  0.2% of a score, for one of five batting categories.\n- Hits carried 25% of the score although neither H nor AVG is a category\n  in this league. The weights never consulted the league at all.\n\nAdd _score_pool(), which derives weights from league.stat_categories(),\nmin-max normalizes each category across the pool and averages them, so\nevery scoring category carries equal weight and unscored stats contribute\nnothing. Batters and pitchers normalize in separate pools; ERA/WHIP/BB9\ninvert. Baseline values come from Yahoo's average_season window (already\nper-game) blended with lastmonth form at _RECENCY_WEIGHT, so playing time\ncannot inflate a score. Under 15 AB / 5 IP in the recent window falls back\nto the season rate rather than punishing a small sample. Scores are 0-100.\nFalls back to the legacy formula if categories can't be read.\n\n_compute_standout_score is untouched and still backs the standouts command,\nwhere a single-day composite is the right tool. CLAUDE.md now documents why\nthe two paths must stay separate.\n\nPitchers: a starter-only arm who is not today's probable starter now scores\n0 -- his team having a game is irrelevant because he will not take the\nmound. Previously \"team is playing\" was enough, which produced swaps of one\nidle SP for another. At priority 0 the incumbent now keeps the slot instead\nof being displaced by an idle arm with better season numbers.\n\nAlso stop emitting swap groups that never touch the bench. This reverts the\nfilter from 4cd4121, which surfaced pure active-to-active reshuffles so the\nsolver's assignment would not vanish from output. The symptom was real, but\nsuch a move leaves the same set of players in the lineup and so cannot change\ncategory production -- it is unactionable churn (UTIL -> SS and the like).\nReshuffle legs are still reported when they are part of a genuine bench swap,\ne.g. a UTIL player sliding to 1B to make room for an incoming bat.\n\nv0.1.29 | 2026-07-03T15:48:40.210Z | auto\n\n- Initial public release with full source files included.\n- Added all core scripts: fantasy.py, formatters.py, mlb_client.py, yahoo_api.py, and the main entry point.\n- Now includes a requirements.txt for managing dependencies.\n- Added CLAUDE.md for extra documentation.\n- SKILL.md updated; all setup and command instructions remain detailed and unchanged.\n\nv0.1.28 | 2026-07-02T14:53:08.240Z | auto\n\n- Major internal refactor: all Python source and supporting files removed except SKILL.md.\n- Only the documentation file (SKILL.md) remains; implementation files and requirements.txt have been deleted.\n- No functional code is included in this version.\n\nv0.1.27 | 2026-05-11T16:25:22.760Z | auto\n\n- Removed the requirement for the YAHOO_CONSUMER_KEY and YAHOO_CONSUMER_SECRET environment variables from the skill metadata.\n- No functional changes to commands or usage. Documentation updated accordingly.\n\nv0.1.26 | 2026-04-27T16:20:45.113Z | auto\n\n- Documentation formatting updated in SKILL.md for improved readability and consistency\n- No functional or user-facing changes to features or commands\n- Existing instructions, commands, and usage examples remain unchanged\n\nv0.1.25 | 2026-04-25T15:28:30.756Z | auto\n\n- Fixes and improvements in formatting logic for fantasy baseball outputs.\n- Documentation refreshed to clarify setup, usage, and command explanations in SKILL.md.\n- Minor code maintenance and consistency updates across core modules.\n\nv0.1.24 | 2026-04-17T15:50:33.404Z | auto\n\n- Improved formatting and minor content adjustments in documentation (SKILL.md).\n- No changes to user-facing functionality or commands.\n- Source code files fantasy.py and formatters.py updated without altering external behavior.\n\nv0.1.23 | 2026-04-16T17:37:56.905Z | auto\n\n- Internal update to scripts/fantasy.py.\n- No visible user-facing changes or new features.\n\nv0.1.22 | 2026-04-16T02:30:32.082Z | auto\n\n- Minor documentation update to the SKILL.md\n- Clarified language in the \"optimize\" section and improved example output descriptions\n- No functional code changes; usage and command options remain the same\n\nv0.1.21 | 2026-04-16T02:27:01.322Z | auto\n\nNo changes detected in this release.\n\n- Version bumped with no file changes or updates.\n- Behavior, features, and documentation remain the same as previous version.\n\nv0.1.20 | 2026-04-15T16:25:15.604Z | auto\n\n- Improved: Internal updates to scripts/yahoo_api.py to enhance API handling.\n- No changes to features or user-facing commands.\n- Documentation remains unchanged except for internal file maintenance.\n\nv0.1.19 | 2026-04-12T16:10:32.198Z | auto\n\n- Improved code formatting and minor code cleanups in scripts/fantasy.py.\n- No user-facing command or feature changes.\n- Documentation and functionality remain unchanged.\n\nv0.1.18 | 2026-04-08T16:49:39.820Z | auto\n\n# yahoo-fantasy-baseball 0.1.18\n\n- Documentation updated in SKILL.md for clearer usage and command instructions.\n- No user-facing feature or API changes.\n\nv0.1.17 | 2026-04-08T16:27:02.786Z | auto\n\n- Added improved error handling and output formatting.\n- Refactored internal scripts for better maintainability.\n- Updated dependencies in requirements.txt.\n- Minor documentation updates and clarifications in SKILL.md.\n\nv0.1.16 | 2026-04-06T22:21:00.000Z | user\n\n- This release makes the skill entirely read-only — roster changes and modifications are no longer supported.\n- Updated description and documentation to clarify the skill now only provides data queries, lineup analysis, and suggestions.\n- Installation process now highlights the use of the `--setup` command and provides more specific environment variable requirements.\n- Write operations (add, drop, swap, claim, etc.) have been removed from both the usage documentation and feature set.\n- All optimization and management features now deliver suggestions only, without making actual roster changes.\n\nv0.1.15 | 2026-04-06T21:33:34.773Z | user\n\n- optimize shouldn't recommend position to position swaps, only those from/to the bench.\n\nv0.1.14 | 2026-04-04T21:18:14.463Z | user\n\n- don't include locked players in swap decisions.\n\nv0.1.13 | 2026-04-04T21:09:43.237Z | user\n\nAdditional optimization fixes, be aware of games in progress or completed (locked), be more clear about multi-move replacements.\n\nv0.1.12 | 2026-04-02T15:45:26.105Z | user\n\n- off and scratched players shouldn't be considered for swaps in optimize.\n\nv0.1.11 | 2026-04-02T03:37:00.734Z | user\n\n- added lineup-check command and optimize updated to consider whether player is in the lineup\n\nv0.1.10 | 2026-03-31T15:46:34.213Z | user\n\n- fixed bug in optimize (not considering valid position).\n- consider preseason stats when ranking available players for optimize, early in the season.\n\nv0.1.9 | 2026-03-30T18:41:33.834Z | user\n\nAdditional optimize enhancements.\n\nv0.1.8 | 2026-03-30T15:55:19.731Z | user\n\n- improvements to the optimize command.\n\nv0.1.7 | 2026-03-28T18:47:50.407Z | user\n\nVersion 0.1.7\n\n- Added `standouts` command to show yesterday's top performers and notable bench stats for all league teams.\n- Updated documentation to detail the new `standouts` feature and usage examples.\n\nv0.1.6 | 2026-03-28T16:16:16.823Z | user\n\nVersion 0.1.6\n\n- Added support for filtering transactions by date range using the `--since` flag in the `transactions` command.\n- Updated documentation to include the new `--since 3d` usage example.\n- fixed scoreboard\n\nv0.1.5 | 2026-03-26T17:34:23.272Z | user\n\nAdd game time to roster (day) output.\n\nv0.1.4 | 2026-03-23T02:02:57.540Z | auto\n\n- Improved MLB team/player name matching for schedule lookups, handling edge cases like special characters and alternate abbreviations.\n- Refined status formatting for daily roster and schedule commands to reduce false \"off day\" flags and increase accuracy.\n- Various minor fixes for robust handling of team names and abbreviations across MLB data sources.\n- Updated documentation to reflect improved handling of MLB player name edge cases and to clarify common flags.\n\nv0.1.3 | 2026-03-23T01:30:02.584Z | auto\n\n- Added a new `day` command to view roster status for a specific date (`--date YYYY-MM-DD`).\n- Documented `day` in the Quick Start and Daily Management sections; clarified that `today` is a shortcut for `day` using today's date.\n- Roster status output now shows all eligible positions for each player when using `day` or `today`.\n- Updated command documentation in SKILL.md for consistency and to reflect new features.\n\nv0.1.2 | 2026-03-22T17:05:29.466Z | auto\n\n- Updated all example commands to use the absolute path prefix (`python3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py`) instead of just `python`.\n- No changes to functionality or features; documentation only.\n\nv0.1.1 | 2026-03-21T17:46:24.128Z | auto\n\n- Updated the description of the `--sort` flag in the SKILL.md for clarity, specifying sort order meanings and labeling \"OR\" as the default.\n- No changes to features, logic, or interface; documentation update only.\n\nv0.1.0 | 2026-03-15T23:00:27.203Z | auto\n\nInitial release of Yahoo Fantasy Baseball skill.  \n- Manage Yahoo Fantasy Baseball teams with roster, standings, matchup, draft, transaction, and injury views.\n- Daily roster optimization suggests lineup swaps, IL moves, and pitching adjustments.\n- Execute team management: swap positions, add/drop, move to IL, and submit waiver claims with preview/confirmation.\n- Auto-installs dependencies and streamlines Yahoo OAuth authentication.\n- Flexible command-line tools for data queries and team actions with multiple output formats.\n\nArchive index:\n\nArchive v0.1.30: 9 files, 49925 bytes\n\nFiles: requirements.txt (27b), scripts/fantasy.py (78670b), scripts/formatters.py (47258b), scripts/mlb_client.py (15634b), scripts/yahoo_api.py (22427b), skill-card.md (2124b), SKILL.md (20639b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nFile v0.1.30:SKILL.md\n\n---\r\nname: yahoo-fantasy-baseball\r\ndescription: >\r\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\r\n  free agents, draft results, transactions, and injuries. Daily roster\r\n  optimization detects inactive players and suggests bench swaps and IL moves.\r\n  Read-only — no roster modifications. Use when the user asks about their\r\n  fantasy baseball team, who to start or sit, league standings, available\r\n  free agents, or injury updates.\r\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"]}}}\r\n---\r\n\r\n# Yahoo Fantasy Baseball\r\n\r\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\r\n\r\n## Requirements\r\n\r\n- Python 3.10+\r\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\r\n\r\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\r\n\r\n```bash\r\npython3 yahoo-fantasy-baseball.py --setup\r\n```\r\n\r\n## Setup\r\n\r\n### 1. Create a Yahoo Developer App\r\n\r\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\r\n2. Click \"Create an App\"\r\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\r\n4. Copy the **Consumer Key** and **Consumer Secret**\r\n\r\n### 2. Authenticate\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\r\n```\r\n\r\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\r\n\r\n### 3. Find Your League\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\r\n```\r\n\r\n### 4. Set Defaults\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\r\n```\r\n\r\nThe skill auto-detects your team within the league. You can also set it explicitly:\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\r\n```\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# View your roster\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\r\n\r\n# Daily roster status (who's playing, who's off)\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\r\n\r\n# Roster status for a specific date\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\r\n\r\n# Get optimization suggestions\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\r\n\r\n# League standings\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\r\n```\r\n\r\n## Commands\r\n\r\n### Data Commands (Read)\r\n\r\n```bash\r\n# Auth & Config\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\r\n\r\n# Leagues & Teams\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\r\n\r\n# Roster & Lineup\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\r\n\r\n# Standings & Matchups\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\r\n\r\n# Players & Draft\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\r\n\r\n# Lineup Check — confirmed MLB lineups vs fantasy roster\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\r\n```\r\n\r\n### Daily Management\r\n\r\n```bash\r\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\r\n\r\n# Day: roster status for a specific date\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\r\n```\r\n\r\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\r\n\r\n```bash\r\n# Standouts: yesterday's top performers across all league teams\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\r\n```\r\n\r\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\r\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\r\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\r\n\r\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\r\n\r\n```bash\r\n# Lineup check: verify active players are in confirmed MLB lineups\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\r\n```\r\n\r\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\r\n\r\n```bash\r\n# Optimize: smart roster analysis with suggestions\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\r\n```\r\n\r\nThree analysis categories:\r\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\r\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Probable starters get highest priority, then relief pitchers whose teams are playing. A starter-only arm who is **not** today's probable starter is treated as worth nothing — his team having a game is irrelevant, because he won't take the mound — so he ranks alongside pitchers whose teams are off. When nobody in contention can appear today, the pitcher already holding the slot keeps it rather than being swapped for another idle arm with better season numbers. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\r\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\r\n\r\nEach move includes team, opponent, score, and (when set) Yahoo injury status (e.g. `DTD`, `IL10`) inline in the parenthetical. If a player suggested to *start* is `DTD`, a `⚠️ Day-to-day — confirm in lineup before locking.` caution is rendered beneath the line — the optimizer scores ignore status, so a higher-scoring DTD player can still surface as a swap recommendation. Moves to BN may include a `reason` indicator:\r\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\r\n- `🔒` — player's game has already started (locked by Yahoo)\r\n- `📅` — player's team is off today\r\n\r\nIn `--format json`, every entry in `swap_groups[].start`, `swap_groups[].bench`, `swap_groups[].reshuffle` (and the pitcher equivalents) carries a `status` field — empty string when the player has no Yahoo status. The flat `moves[]` and `pitcher_moves[]` arrays mirror the text view: they include every move that is part of a swap group, each tagged with a `swap_group` index. A group always moves at least one player to or from the bench. Pure active↔active shuffles (e.g. UTIL → SS with no bench involvement) leave the same set of players in the lineup and therefore cannot change scoring, so they are dropped from both the groups and the flat arrays rather than reported as busywork. A `reshuffle` leg still appears when it is part of a real bench swap — a UTIL player sliding to 1B to make room for an incoming bench bat.\r\n\r\n### How players are scored\r\n\r\nScores run 0–100 and are derived from **the league's own scoring categories**, read from `league.stat_categories()` — not a fixed formula. Each category is min-max normalized across the roster pool and the results averaged, so every category carries equal weight, which is how category leagues actually settle. A stat your league does not score contributes nothing.\r\n\r\nTwo stat windows feed the score:\r\n- **Baseline** — Yahoo's `average_season` window, which is already per-game (or a true rate for OBP/ERA/WHIP). Using rates rather than totals means accumulated playing time cannot inflate a score: a part-time or recently-injured star is compared on quality, not on how many at-bats he has banked.\r\n- **Recent form** — the `lastmonth` window, weighted at `_RECENCY_WEIGHT` (default 0.35). Counting stats in this window are divided by AB (batters) or IP (pitchers) to keep them rate-based.\r\n\r\nBatters and pitchers are normalized within their own pools, since their categories aren't comparable. Categories where lower is better (ERA, WHIP, BB/9) are inverted. A player with less than 15 AB (or 5 IP) in the recent window falls back to his season rate for that component rather than being penalized for a small sample — this keeps a player just back from the IL from being buried. If the league's categories can't be read at all, scoring falls back to the legacy composite formula.\r\n\r\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\r\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points on the 0–100 scale (rank 1 gets the max, last-ranked gets 0)\r\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\r\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\r\n\r\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\r\n\r\n## Common Flags\r\n\r\n| Flag | Description |\r\n|------|-------------|\r\n| `--league ID` | League ID (overrides config default) |\r\n| `--team ID` | Team ID (overrides config/auto-detect) |\r\n| `--season YEAR` | Season year (for historical data) |\r\n| `--week N` | Scoring week number |\r\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\r\n| `--format text\\|json\\|discord` | Output format (default: text) |\r\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\r\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = alphabetical, or stat abbreviation. See stat sort reference below |\r\n| `--sort-type season\\|lastweek\\|lastmonth` | Sort period (used with --sort) |\r\n| `--stat-season YEAR` | Season year for stat columns (auto-detects: falls back to previous year if league hasn't started) |\r\n| `--since 3d\\|1w\\|24h\\|2w` | Filter transactions by time window (h=hours, d=days, w=weeks, m=months) |\r\n\r\n### Sort Reference\r\n\r\nBuilt-in sort modes:\r\n\r\n| Value | Description |\r\n|-------|-------------|\r\n| `OR` | Overall Rank (preseason/projected) |\r\n| `AR` | Actual Rank (by real performance) |\r\n| `PTS` | Fantasy Points |\r\n| `NAME` | Alphabetical |\r\n\r\nBatting stats:\r\n\r\n| Abbrev | Description |\r\n|--------|-------------|\r\n| `R` | Runs |\r\n| `H` | Hits |\r\n| `1B` | Singles |\r\n| `2B` | Doubles |\r\n| `3B` | Triples |\r\n| `HR` | Home Runs |\r\n| `RBI` | Runs Batted In |\r\n| `SB` | Stolen Bases |\r\n| `BB` | Walks |\r\n| `K` | Strikeouts |\r\n| `AVG` | Batting Average |\r\n| `OBP` | On-base Percentage |\r\n| `SLG` | Slugging Percentage |\r\n| `OPS` | On-base + Slugging |\r\n| `AB` | At Bats |\r\n| `PA` | Plate Appearances |\r\n| `TB` | Total Bases |\r\n| `XBH` | Extra Base Hits |\r\n\r\nPitching stats:\r\n\r\n| Abbrev | Description |\r\n|--------|-------------|\r\n| `W` | Wins |\r\n| `L` | Losses |\r\n| `SV` | Saves |\r\n| `HLD` | Holds |\r\n| `SV+H` | Saves + Holds |\r\n| `BSV` | Blown Saves |\r\n| `ERA` | Earned Run Average |\r\n| `WHIP` | Walks + Hits per Inning Pitched |\r\n| `IP` | Innings Pitched |\r\n| `QS` | Quality Starts |\r\n| `K9` | Strikeouts per 9 Innings |\r\n| `BB9` | Walks per 9 Innings |\r\n\r\n## Output Format\r\n\r\n### Text (Default)\r\n\r\n**roster:**\r\n\r\n```\r\nRoster — Team Name\r\nName                      Pos          Slot  Team   Status\r\n----------------------------------------------------------\r\nAaron Judge               OF,Util      OF    NYY\r\nMookie Betts              SS,OF,Util   SS    LAD\r\nZack Wheeler              SP           IL    PHI    IL-60\r\n```\r\n\r\n**today / day:**\r\n\r\n```\r\nToday — Team Name\r\n  First pitch: 1:10 PM\r\n\r\n  ACTIVE (team playing today) (8)\r\n    Aaron Judge            OF,Util        NYY  vs BOS 7:05 PM\r\n    Gerrit Cole            SP             NYY  vs BOS 7:05 PM  [PROBABLE STARTER]\r\n\r\n  NOT PLAYING (team off today) (3)\r\n    Mookie Betts           SS,OF,Util     LAD\r\n\r\n  BENCH (3)\r\n    Jake Burger            3B,1B,Util     MIA  at ATL 1:10 PM\r\n\r\n  INJURED LIST (1)\r\n    Zack Wheeler           SP             PHI                   (IL-60)\r\n```\r\n\r\n**optimize:**\r\n\r\n```\r\nRoster Optimization Suggestions\r\n==================================================\r\n\r\n  LINEUP CHANGES (2 swaps)\r\n\r\n    Swap 1 — 3B\r\n      ▶ Start Jake Burger (MIA vs ATL, score: 18.3)\r\n      ▼ Bench Josh Smith (TEX vs SEA, score: 9.2)\r\n        ⚠️  not in confirmed MLB lineup\r\n\r\n    Swap 2 — SS / UTIL\r\n      ▶ Start Willy Adames at SS (SF vs PHI, score: 35.0)\r\n      ↔ Move Mookie Betts from SS → UTIL\r\n      ▼ Bench Tyler Fitzgerald (SF, score: 12.0)\r\n        📅  team off today\r\n\r\n  PITCHER ROTATION (1 swap)\r\n\r\n    Swap 1 — P\r\n      ▶ Start Gerrit Cole (NYY vs BOS, score: 42.1) — probable starter today\r\n      ▼ Bench Nathan Eovaldi (TEX vs SEA, score: 39.0)\r\n        💡  not starting today\r\n\r\n  IL MANAGEMENT (1 suggested)\r\n    Move Zack Wheeler (IL-60) from SP slot to IL to free a roster spot.\r\n\r\nTotal: 4 suggestion(s)\r\n```\r\n\r\nPlayers on teams whose games are already in progress or finished are locked and excluded from optimization — they will not appear in the move list.\r\n\r\n**scoreboard:**\r\n\r\n```\r\nLeague Scoreboard — Week 1\r\n------------------------------------------------------------\r\n  Clanker Killerz                  6  vs  4   1% AI 99% hot gas\r\n                                    In progress\r\n\r\n  Mossi Possi                      1  vs  7   Normal Men\r\n                                    In progress\r\n```\r\n\r\n**transactions:**\r\n\r\n```\r\nRecent Transactions\r\n------------------------------------------------------------\r\nadd | 1% AI 99% hot gas | Mar 25, 07:38 PM\r\n  Add from Free Agent:Luis Castillo (SEA - SP)\r\n\r\nadd/drop | 1% AI 99% hot gas | Mar 25, 04:14 AM\r\n  Add from Waivers:   Josh Smith (TEX - 1B,3B,SS,OF)\r\n  Drop:               Luis Robert Jr. (NYM - OF)\r\n```\r\n\r\n### JSON\r\n\r\nAll commands support `--format json` for structured output.\r\n\r\n### Discord\r\n\r\nAll commands support `--format discord` which wraps text output in code blocks.\r\n\r\n## Output Fields\r\n\r\n- **name** — Player's full name\r\n- **player_id** — Yahoo player ID (numeric)\r\n- **positions** — Eligible fantasy positions (e.g., OF, SP, Util)\r\n- **selected_position** — Current lineup slot\r\n- **team** — Real MLB team abbreviation\r\n- **status** — Injury designation (IL, IL-60, DTD, etc.)\r\n- **game_time** — Game start time in local timezone (today/day commands)\r\n- **first_pitch** — Earliest game start time across all games (today/day commands, JSON top-level)\r\n- **percent_owned** — Ownership percentage (free agents)\r\n- **player_position** — Display position (draft results)\r\n\r\n## Limitations\r\n\r\n- **Rate limits**: Yahoo enforces API rate limits. Avoid rapid-fire requests.\r\n- **Season scope**: Data is scoped to the configured season. Use `--season` for historical data.\r\n- **OAuth tokens**: Tokens auto-refresh but may eventually expire, requiring re-authentication via `auth`.\r\n- **MLB schedule**: The `today`, `day`, `optimize`, and `lineup-check` commands use the MLB Stats API for schedule data (off days, probable pitchers, confirmed batting lineups). This data is not available from the Yahoo Fantasy API.\r\n\r\n## Credential Storage\r\n\r\n**Preferred: Environment variables.** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` via OpenClaw config or your shell environment. The skill will use these automatically — no need to run `auth`. Note: credentials are still written to `oauth2.json` on disk because the underlying `yahoo_oauth` library requires a file for token management. File permissions are set to 0600 on Unix.\r\n\r\n**Alternative: Interactive setup.** Run the `auth` command to enter credentials interactively. Tokens are stored in `~/.openclaw/credentials/yahoo-fantasy/`:\r\n- `oauth2.json` — OAuth consumer key/secret and tokens (managed by yahoo_oauth, file permissions set to 0600 on Unix)\r\n- `yahoo-fantasy.json` — Default league_id, team_id, season\r\n\r\nLegacy YFPY `.env` credentials are auto-migrated to `oauth2.json` on first use.\r\n\r\n## Notes\r\n\r\n- Data is sourced from the Yahoo Fantasy Sports API via the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) library.\r\n- MLB schedule and probable pitcher data comes from the [MLB Stats API](https://statsapi.mlb.com/) (stdlib only, no dependencies).\r\n- Run `--setup` to create a local venv at `.deps/` and install dependencies before first use.\r\n- Auto-detect identifies your team using `league.team_key()`. If detection fails, use `config --team <ID>` to set it manually.\n\nFile v0.1.30:_meta.json\n\n{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.30\",\n  \"publishedAt\": 1790126248252\n}\n\nFile v0.1.30:skill-card.md\n\n## Description:\n\nQuery a Yahoo Fantasy Baseball league for rosters, standings, matchups, free agents, draft results, transactions, injuries, and read-only daily roster optimization suggestions.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[khaney64](https://clawhub.ai/user/khaney64)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nFantasy baseball managers and agents use this skill to inspect Yahoo league data, monitor daily roster availability, and generate lineup, pitcher rotation, and injured-list suggestions without applying roster changes.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill accesses Yahoo Fantasy Baseball data and stores Yahoo OAuth tokens locally.\n\nMitigation: Install and authenticate intentionally, use the documented credential path, and protect ~/.openclaw/credentials/yahoo-fantasy/.\n\nRisk: Lineup optimizer output could be mistaken for an applied roster change or definitive instruction.\n\nMitigation: Treat optimization output as advisory; review suggestions in Yahoo before making any roster move.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/khaney64/skills/yahoo-fantasy-baseball)\n- [Yahoo Developer Apps](https://developer.yahoo.com/apps/)\n- [yahoo-fantasy-api library](https://github.com/spilchen/yahoo_fantasy_api)\n- [MLB Stats API](https://statsapi.mlb.com/)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Plain text, Discord-style Markdown code blocks, and structured JSON depending on the selected command format.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Read-only recommendations; optimization suggestions are advisory and do not apply roster changes.]\n\n## Skill Version(s):\n\n0.1.30 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.30:requirements.txt\n\nyahoo_fantasy_api==2.12.2\n\nArchive v0.1.29: 10 files, 49517 bytes\n\nFiles: CLAUDE.md (7435b), requirements.txt (27b), scripts/fantasy.py (71609b), scripts/formatters.py (47258b), scripts/mlb_client.py (15634b), scripts/yahoo_api.py (22427b), skill-card.md (2540b), SKILL.md (18629b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nFile v0.1.29:SKILL.md\n\n---\r\nname: yahoo-fantasy-baseball\r\ndescription: >\r\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\r\n  free agents, draft results, transactions, and injuries. Daily roster\r\n  optimization detects inactive players and suggests bench swaps and IL moves.\r\n  Read-only — no roster modifications. Use when the user asks about their\r\n  fantasy baseball team, who to start or sit, league standings, available\r\n  free agents, or injury updates.\r\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"]}}}\r\n---\r\n\r\n# Yahoo Fantasy Baseball\r\n\r\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\r\n\r\n## Requirements\r\n\r\n- Python 3.10+\r\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\r\n\r\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\r\n\r\n```bash\r\npython3 yahoo-fantasy-baseball.py --setup\r\n```\r\n\r\n## Setup\r\n\r\n### 1. Create a Yahoo Developer App\r\n\r\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\r\n2. Click \"Create an App\"\r\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\r\n4. Copy the **Consumer Key** and **Consumer Secret**\r\n\r\n### 2. Authenticate\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\r\n```\r\n\r\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\r\n\r\n### 3. Find Your League\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\r\n```\r\n\r\n### 4. Set Defaults\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\r\n```\r\n\r\nThe skill auto-detects your team within the league. You can also set it explicitly:\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\r\n```\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# View your roster\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\r\n\r\n# Daily roster status (who's playing, who's off)\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\r\n\r\n# Roster status for a specific date\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\r\n\r\n# Get optimization suggestions\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\r\n\r\n# League standings\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\r\n```\r\n\r\n## Commands\r\n\r\n### Data Commands (Read)\r\n\r\n```bash\r\n# Auth & Config\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\r\n\r\n# Leagues & Teams\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\r\n\r\n# Roster & Lineup\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\r\n\r\n# Standings & Matchups\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\r\n\r\n# Players & Draft\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\r\n\r\n# Lineup Check — confirmed MLB lineups vs fantasy roster\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\r\n```\r\n\r\n### Daily Management\r\n\r\n```bash\r\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\r\n\r\n# Day: roster status for a specific date\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\r\n```\r\n\r\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\r\n\r\n```bash\r\n# Standouts: yesterday's top performers across all league teams\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\r\n```\r\n\r\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\r\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\r\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\r\n\r\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\r\n\r\n```bash\r\n# Lineup check: verify active players are in confirmed MLB lineups\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\r\n```\r\n\r\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\r\n\r\n```bash\r\n# Optimize: smart roster analysis with suggestions\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\r\n```\r\n\r\nThree analysis categories:\r\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\r\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Relief pitchers whose teams are playing today are prioritized over non-starting SPs or pitchers whose teams are off. Probable starters get highest priority. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\r\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\r\n\r\nEach move includes team, opponent, score, and (when set) Yahoo injury status (e.g. `DTD`, `IL10`) inline in the parenthetical. If a player suggested to *start* is `DTD`, a `⚠️ Day-to-day — confirm in lineup before locking.` caution is rendered beneath the line — the optimizer scores ignore status, so a higher-scoring DTD player can still surface as a swap recommendation. Moves to BN may include a `reason` indicator:\r\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\r\n- `🔒` — player's game has already started (locked by Yahoo)\r\n- `📅` — player's team is off today\r\n\r\nIn `--format json`, every entry in `swap_groups[].start`, `swap_groups[].bench`, `swap_groups[].reshuffle` (and the pitcher equivalents) carries a `status` field — empty string when the player has no Yahoo status. The flat `moves[]` and `pitcher_moves[]` arrays mirror the text view: they include every move that is part of a swap group (each tagged with a `swap_group` index), including pure active↔active reshuffles (e.g. moving a player from UTIL into an open position slot with no bench involved) — these appear as a `reshuffle`-only group with an empty `start`/`bench`.\r\n\r\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\r\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points (rank 1 gets the max, last-ranked gets 0)\r\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\r\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\r\n\r\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\r\n\r\n## Common Flags\r\n\r\n| Flag | Description |\r\n|------|-------------|\r\n| `--league ID` | League ID (overrides config default) |\r\n| `--team ID` | Team ID (overrides config/auto-detect) |\r\n| `--season YEAR` | Season year (for historical data) |\r\n| `--week N` | Scoring week number |\r\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\r\n| `--format text\\|json\\|discord` | Output format (default: text) |\r\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\r\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = alphabetical, or stat abbreviation. See stat sort reference below |\r\n| `--sort-type season\\|lastweek\\|lastmonth` | Sort period (used with --sort) |\r\n| `--stat-season YEAR` | Season year for stat columns (auto-detects: falls back to previous year if league hasn't started) |\r\n| `--since 3d\\|1w\\|24h\\|2w` | Filter transactions by time window (h=hours, d=days, w=weeks, m=months) |\r\n\r\n### Sort Reference\r\n\r\nBuilt-in sort modes:\r\n\r\n| Value | Description |\r\n|-------|-------------|\r\n| `OR` | Overall Rank (preseason/projected) |\r\n| `AR` | Actual Rank (by real performance) |\r\n| `PTS` | Fantasy Points |\r\n| `NAME` | Alphabetical |\r\n\r\nBatting stats:\r\n\r\n| Abbrev | Description |\r\n|--------|-------------|\r\n| `R` | Runs |\r\n| `H` | Hits |\r\n| `1B` | Singles |\r\n| `2B` | Doubles |\r\n| `3B` | Triples |\r\n| `HR` | Home Runs |\r\n| `RBI` | Runs Batted In |\r\n| `SB` | Stolen Bases |\r\n| `BB` | Walks |\r\n| `K` | Strikeouts |\r\n| `AVG` | Batting Average |\r\n| `OBP` | On-base Percentage |\r\n| `SLG` | Slugging Percentage |\r\n| `OPS` | On-base + Slugging |\r\n| `AB` | At Bats |\r\n| `PA` | Plate Appearances |\r\n| `TB` | Total Bases |\r\n| `XBH` | Extra Base Hits |\r\n\r\nPitching stats:\r\n\r\n| Abbrev | Description |\r\n|--------|-------------|\r\n| `W` | Wins |\r\n| `L` | Losses |\r\n| `SV` | Saves |\r\n| `HLD` | Holds |\r\n| `SV+H` | Saves + Holds |\r\n| `BSV` | Blown Saves |\r\n| `ERA` | Earned Run Average |\r\n| `WHIP` | Walks + Hits per Inning Pitched |\r\n| `IP` | Innings Pitched |\r\n| `QS` | Quality Starts |\r\n| `K9` | Strikeouts per 9 Innings |\r\n| `BB9` | Walks per 9 Innings |\r\n\r\n## Output Format\r\n\r\n### Text (Default)\r\n\r\n**roster:**\r\n\r\n```\r\nRoster — Team Name\r\nName                      Pos          Slot  Team   Status\r\n----------------------------------------------------------\r\nAaron Judge               OF,Util      OF    NYY\r\nMookie Betts              SS,OF,Util   SS    LAD\r\nZack Wheeler              SP           IL    PHI    IL-60\r\n```\r\n\r\n**today / day:**\r\n\r\n```\r\nToday — Team Name\r\n  First pitch: 1:10 PM\r\n\r\n  ACTIVE (team playing today) (8)\r\n    Aaron Judge            OF,Util        NYY  vs BOS 7:05 PM\r\n    Gerrit Cole            SP             NYY  vs BOS 7:05 PM  [PROBABLE STARTER]\r\n\r\n  NOT PLAYING (team off today) (3)\r\n    Mookie Betts           SS,OF,Util     LAD\r\n\r\n  BENCH (3)\r\n    Jake Burger            3B,1B,Util     MIA  at ATL 1:10 PM\r\n\r\n  INJURED LIST (1)\r\n    Zack Wheeler           SP             PHI                   (IL-60)\r\n```\r\n\r\n**optimize:**\r\n\r\n```\r\nRoster Optimization Suggestions\r\n==================================================\r\n\r\n  LINEUP CHANGES (2 swaps)\r\n\r\n    Swap 1 — 3B\r\n      ▶ Start Jake Burger (MIA vs ATL, score: 18.3)\r\n      ▼ Bench Josh Smith (TEX vs SEA, score: 9.2)\r\n        ⚠️  not in confirmed MLB lineup\r\n\r\n    Swap 2 — SS / UTIL\r\n      ▶ Start Willy Adames at SS (SF vs PHI, score: 35.0)\r\n      ↔ Move Mookie Betts from SS → UTIL\r\n      ▼ Bench Tyler Fitzgerald (SF, score: 12.0)\r\n        📅  team off today\r\n\r\n  PITCHER ROTATION (1 swap)\r\n\r\n    Swap 1 — P\r\n      ▶ Start Gerrit Cole (NYY vs BOS, score: 42.1) — probable starter today\r\n      ▼ Bench Nathan Eovaldi (TEX vs SEA, score: 39.0)\r\n        💡  not starting today\r\n\r\n  IL MANAGEMENT (1 suggested)\r\n    Move Zack Wheeler (IL-60) from SP slot to IL to free a roster spot.\r\n\r\nTotal: 4 suggestion(s)\r\n```\r\n\r\nPlayers on teams whose games are already in progress or finished are locked and excluded from optimization — they will not appear in the move list.\r\n\r\n**scoreboard:**\r\n\r\n```\r\nLeague Scoreboard — Week 1\r\n------------------------------------------------------------\r\n  Clanker Killerz                  6  vs  4   1% AI 99% hot gas\r\n                                    In progress\r\n\r\n  Mossi Possi                      1  vs  7   Normal Men\r\n                                    In progress\r\n```\r\n\r\n**transactions:**\r\n\r\n```\r\nRecent Transactions\r\n------------------------------------------------------------\r\nadd | 1% AI 99% hot gas | Mar 25, 07:38 PM\r\n  Add from Free Agent:Luis Castillo (SEA - SP)\r\n\r\nadd/drop | 1% AI 99% hot gas | Mar 25, 04:14 AM\r\n  Add from Waivers:   Josh Smith (TEX - 1B,3B,SS,OF)\r\n  Drop:               Luis Robert Jr. (NYM - OF)\r\n```\r\n\r\n### JSON\r\n\r\nAll commands support `--format json` for structured output.\r\n\r\n### Discord\r\n\r\nAll commands support `--format discord` which wraps text output in code blocks.\r\n\r\n## Output Fields\r\n\r\n- **name** — Player's full name\r\n- **player_id** — Yahoo player ID (numeric)\r\n- **positions** — Eligible fantasy positions (e.g., OF, SP, Util)\r\n- **selected_position** — Current lineup slot\r\n- **team** — Real MLB team abbreviation\r\n- **status** — Injury designation (IL, IL-60, DTD, etc.)\r\n- **game_time** — Game start time in local timezone (today/day commands)\r\n- **first_pitch** — Earliest game start time across all games (today/day commands, JSON top-level)\r\n- **percent_owned** — Ownership percentage (free agents)\r\n- **player_position** — Display position (draft results)\r\n\r\n## Limitations\r\n\r\n- **Rate limits**: Yahoo enforces API rate limits. Avoid rapid-fire requests.\r\n- **Season scope**: Data is scoped to the configured season. Use `--season` for historical data.\r\n- **OAuth tokens**: Tokens auto-refresh but may eventually expire, requiring re-authentication via `auth`.\r\n- **MLB schedule**: The `today`, `day`, `optimize`, and `lineup-check` commands use the MLB Stats API for schedule data (off days, probable pitchers, confirmed batting lineups). This data is not available from the Yahoo Fantasy API.\r\n\r\n## Credential Storage\r\n\r\n**Preferred: Environment variables.** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` via OpenClaw config or your shell environment. The skill will use these automatically — no need to run `auth`. Note: credentials are still written to `oauth2.json` on disk because the underlying `yahoo_oauth` library requires a file for token management. File permissions are set to 0600 on Unix.\r\n\r\n**Alternative: Interactive setup.** Run the `auth` command to enter credentials interactively. Tokens are stored in `~/.openclaw/credentials/yahoo-fantasy/`:\r\n- `oauth2.json` — OAuth consumer key/secret and tokens (managed by yahoo_oauth, file permissions set to 0600 on Unix)\r\n- `yahoo-fantasy.json` — Default league_id, team_id, season\r\n\r\nLegacy YFPY `.env` credentials are auto-migrated to `oauth2.json` on first use.\r\n\r\n## Notes\r\n\r\n- Data is sourced from the Yahoo Fantasy Sports API via the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) library.\r\n- MLB schedule and probable pitcher data comes from the [MLB Stats API](https://statsapi.mlb.com/) (stdlib only, no dependencies).\r\n- Run `--setup` to create a local venv at `.deps/` and install dependencies before first use.\r\n- Auto-detect identifies your team using `league.team_key()`. If detection fails, use `config --team <ID>` to set it manually.\n\nFile v0.1.29:_meta.json\n\n{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.29\",\n  \"publishedAt\": 1783093720210\n}\n\nFile v0.1.29:CLAUDE.md\n\n# CLAUDE.md\r\n\r\nThis file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.\r\n\r\n## Overview\r\n\r\nThis is an **OpenClaw skill** for Yahoo Fantasy Baseball. It accesses league data via the Yahoo Fantasy Sports API using the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) Python library. The skill is **read-only** — it queries data and suggests optimizations but does not modify rosters.\r\n\r\n## Architecture\r\n\r\n```\r\nyahoo-fantasy-baseball/\r\n  SKILL.md                    — Skill manifest (frontmatter + docs)\r\n  CLAUDE.md                   — This file\r\n  yahoo-fantasy-baseball.py   — Entry point (--setup for deps, fail-fast if missing)\r\n  requirements.txt            — yahoo_fantasy_api dependency\r\n  .gitignore                  — .deps/, __pycache__, .env\r\n  scripts/\r\n    fantasy.py                — Main CLI (argparse subcommands)\r\n    yahoo_api.py              — yahoo-fantasy-api wrapper: auth, config, league/team construction\r\n    formatters.py             — Text, JSON, Discord output formatting\r\n    mlb_client.py             — MLB Stats API client (stdlib only): schedule + probable pitchers\r\n```\r\n\r\n### Entry Point\r\n\r\n`yahoo-fantasy-baseball.py` is the entry point. Run `--setup` to create the `.deps/` venv and install pinned dependencies from `requirements.txt`. On normal runs, it fails fast if deps are missing, then re-execs into the venv and calls `scripts/fantasy.py:main()`.\r\n\r\n### Module Responsibilities\r\n\r\n**`scripts/yahoo_api.py`** — API layer:\r\n- `run_auth()` — Interactive OAuth setup, stores consumer key/secret to `~/.openclaw/credentials/yahoo-fantasy/oauth2.json` (0600 perms on Unix)\r\n- `_migrate_legacy_env()` — Auto-migrates YFPY `.env` credentials to `oauth2.json` format\r\n- `get_game(season)` — Returns authenticated `(yfa.Game, OAuth2)` tuple\r\n- `get_league(league_id, season)` — Returns `yfa.League` instance\r\n- `get_team(league, team_key)` — Returns `yfa.Team` instance\r\n- `fetch_players_sorted(league, status, position, sort, sort_type, sort_season)` — Custom Yahoo API call bypassing the library to support sort params (`OR`, `AR`, `PTS`, `NAME`), status filtering (`FA`, `T`, `A`, `W`, `ALL`), and ownership data. `ALL` is synthetic — merges `T` + `A` results.\r\n- `_parse_players_page(raw)` — Custom JSON parser for Yahoo player responses with `percent_owned` + `ownership` subresources (library only handles `percent_owned`)\r\n- `load_config()` / `save_config()` — Read/write `yahoo-fantasy.json` defaults\r\n- `resolve_league_id()` — Resolves league ID from args or config\r\n- `resolve_team_key()` — Resolves team key from args, config, or auto-detection via `league.team_key()`\r\n\r\n**`scripts/fantasy.py`** — CLI layer:\r\n- Argparse with subcommands: `auth`, `config`, `leagues`, `teams`, `roster`, `lineup`, `standings`, `matchup`, `scoreboard`, `players`, `draft`, `transactions`, `injuries`, `today`, `day`, `lineup-check`, `standouts`, `optimize`\r\n- All commands are read-only\r\n- Each `cmd_*` function: resolves args → calls yahoo_api → calls formatters → prints\r\n\r\n**`scripts/formatters.py`** — Output layer:\r\n- One `format_*` function per data type\r\n- Each supports text (tabular), JSON (`json.dumps`), and discord (wrapped in code blocks)\r\n- Helper functions handle dict-based data from yahoo-fantasy-api via `_safe()` accessor\r\n\r\n**`scripts/mlb_client.py`** — MLB schedule layer (stdlib only):\r\n- `teams_playing_today(date_str)` — Set of team abbreviations with games today\r\n- `probable_pitchers_today(date_str)` — Dict of team abbr → pitcher name\r\n- `game_opponents_today(date_str)` — Dict of team abbr → opponent abbr\r\n- `normalize_team_abbr(yahoo_abbr)` — Convert Yahoo team abbr to MLB Stats API abbr\r\n\r\n## Running\r\n\r\n```bash\r\n# First time: install dependencies\r\npython yahoo-fantasy-baseball.py --setup\r\n\r\n# Normal usage\r\npython yahoo-fantasy-baseball.py roster\r\n\r\n# Or from scripts/ directly (requires venv active)\r\ncd scripts && python fantasy.py roster\r\n```\r\n\r\n## Key yahoo-fantasy-api Methods Used\r\n\r\n| Command | yahoo-fantasy-api Method |\r\n|---------|--------------------------|\r\n| `leagues` | `gm.league_ids(seasons=[year])` |\r\n| `teams` | `league.teams()` |\r\n| `roster` | `team.roster(day=date)` |\r\n| `lineup` | roster + `league.stat_categories()` + `league.player_stats()` |\r\n| `standings` | `league.standings()` |\r\n| `matchup` | `team.matchup(week)` |\r\n| `scoreboard` | `league.matchups(week)` |\r\n| `players` | `league.free_agents(position)` / `league.player_details(name)` / `yahoo_api.fetch_players_sorted()` (with `--sort`, `--status`, or `--status ALL`). With `--position`, also fetches `league.stat_categories()` + `league.player_stats()` to display stat columns (batting or pitching based on position type). `--stat-season` controls which season's stats to show (auto-detects pre-season → previous year). |\r\n| `draft` | `league.draft_results()` |\r\n| `transactions` | `league.transactions(types, count)` |\r\n| `injuries` | `team.roster(day=today)` filtered |\r\n| `today` | roster + `mlb_client.teams_playing_today()` + `mlb_client.probable_pitchers_today()` (shortcut for `day` with today's date) |\r\n| `day` | roster + `mlb_client.teams_playing_today(date)` + `mlb_client.probable_pitchers_today(date)` |\r\n| `standouts` | `league.teams()` + `team.roster(day=date)` x N + `league.player_stats(ids, \"date\", date=yesterday)` |\r\n| `optimize` | roster + MLB schedule + position analysis |\r\n\r\n## Data Format\r\n\r\nyahoo-fantasy-api returns plain Python dicts (not custom objects). Key shapes:\r\n\r\n- **Roster player**: `{\"player_id\": int, \"name\": str, \"position_type\": \"B\"|\"P\", \"eligible_positions\": [str], \"selected_position\": str, \"status\": str}`\r\n- **Teams**: `dict[team_key, team_dict]` — keyed by team_key string\r\n- **Standings**: `list[dict]` — ordered by rank (1st = index 0)\r\n- **Free agents**: `list[dict]` — same shape as roster players plus `percent_owned`\r\n- **Draft picks**: `list[dict]` — with `round`, `pick`, `team_key`, `player_id`, enriched with `team_name`, `player_name`, `player_position` via `league.teams()` and `league.player_details()`\r\n\r\n## Credential Storage\r\n\r\n**Preferred:** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` env vars (via OpenClaw config or shell). The skill writes them to `oauth2.json` for yahoo_oauth token management, but the static secrets don't need to be entered interactively.\r\n\r\n```\r\n~/.openclaw/credentials/yahoo-fantasy/\r\n  oauth2.json             — OAuth consumer key/secret + tokens (managed by yahoo_oauth, 0600 perms on Unix)\r\n  yahoo-fantasy.json      — Default league_id, team_id, season\r\n```\r\n\r\nLegacy `.env` credentials from YFPY are auto-migrated to `oauth2.json` on first use.\r\n\r\n## Dependencies\r\n\r\n- **yahoo_fantasy_api==2.12.2** (installed via `--setup`) — Yahoo Fantasy Sports API wrapper\r\n- **yahoo_oauth** (dependency of yahoo_fantasy_api) — OAuth2 authentication\r\n- Python 3.10+\r\n\r\n## Key Conventions\r\n\r\n- Data from yahoo-fantasy-api is plain dicts. Use `formatters._safe(obj, key, default)` to safely access values.\r\n- The game code for MLB is `\"mlb\"`. Game keys vary by season.\r\n- Team auto-detection uses `league.team_key()` which returns the current user's team key.\r\n- All output goes to stdout. Errors go to stderr.\r\n- All commands are read-only — no roster modifications.\r\n- MLB schedule data comes from the MLB Stats API (stdlib only, no dependencies).\n\nFile v0.1.29:skill-card.md\n\n## Description:\n\nQuery Yahoo Fantasy Baseball league data, including rosters, standings, matchups, free agents, draft results, transactions, injuries, and read-only daily roster optimization suggestions.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[khaney64](https://clawhub.ai/user/khaney64)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nExternal fantasy baseball users and agents use this skill to retrieve Yahoo Fantasy league data and generate read-only lineup, matchup, player, transaction, and injury guidance. The skill is intended to inform decisions without modifying Yahoo rosters.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: Yahoo OAuth tokens and related credentials are stored locally under ~/.openclaw/credentials/yahoo-fantasy/.\n\nMitigation: Use a normal unprivileged account, restrict access to the credentials directory, and revoke or refresh Yahoo authorization if the host is shared or compromised.\n\nRisk: The setup path installs Python dependencies, including transitive packages that are not hash-verified.\n\nMitigation: Review the dependency list before setup and run installation in an unprivileged environment.\n\nRisk: Roster suggestions can be affected by Yahoo API rate limits, token expiry, or MLB schedule and lineup data availability.\n\nMitigation: Confirm time-sensitive roster choices in Yahoo Fantasy Baseball or official MLB data before acting on suggestions.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/khaney64/skills/yahoo-fantasy-baseball)\n- [Yahoo Developer Apps](https://developer.yahoo.com/apps/)\n- [yahoo-fantasy-api library](https://github.com/spilchen/yahoo_fantasy_api)\n- [MLB Stats API](https://statsapi.mlb.com/)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [CLI text tables, JSON objects, Discord-ready Markdown code blocks, and setup or configuration command examples.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Read-only fantasy baseball query and recommendation output; authentication and setup can write local credential, token, configuration, and dependency files.]\n\n## Skill Version(s):\n\n0.1.29 (source: server release evidence)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.\n\nFile v0.1.29:requirements.txt\n\nyahoo_fantasy_api==2.12.2\n\nArchive v0.1.28: 3 files, 8453 bytes\n\nFiles: skill-card.md (2790b), SKILL.md (18255b), _meta.json (142b)\n\nFile v0.1.28:SKILL.md\n\n---\nname: yahoo-fantasy-baseball\ndescription: >\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\n  free agents, draft results, transactions, and injuries. Daily roster\n  optimization detects inactive players and suggests bench swaps and IL moves.\n  Read-only — no roster modifications. Use when the user asks about their\n  fantasy baseball team, who to start or sit, league standings, available\n  free agents, or injury updates.\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Yahoo Fantasy Baseball\n\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\n\n## Requirements\n\n- Python 3.10+\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\n\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\n\n```bash\npython3 yahoo-fantasy-baseball.py --setup\n```\n\n## Setup\n\n### 1. Create a Yahoo Developer App\n\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\n2. Click \"Create an App\"\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\n4. Copy the **Consumer Key** and **Consumer Secret**\n\n### 2. Authenticate\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\n```\n\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\n\n### 3. Find Your League\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\n```\n\n### 4. Set Defaults\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\n```\n\nThe skill auto-detects your team within the league. You can also set it explicitly:\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\n```\n\n## Quick Start\n\n```bash\n# View your roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\n\n# Daily roster status (who's playing, who's off)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n\n# Get optimization suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n\n# League standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\n```\n\n## Commands\n\n### Data Commands (Read)\n\n```bash\n# Auth & Config\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\n\n# Leagues & Teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\n\n# Roster & Lineup\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\n\n# Standings & Matchups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\n\n# Players & Draft\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\n\n# Lineup Check — confirmed MLB lineups vs fantasy roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\n```\n\n### Daily Management\n\n```bash\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Day: roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n```\n\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\n\n```bash\n# Standouts: yesterday's top performers across all league teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\n```\n\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\n\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\n\n```bash\n# Lineup check: verify active players are in confirmed MLB lineups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\n```\n\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\n\n```bash\n# Optimize: smart roster analysis with suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n```\n\nThree analysis categories:\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Relief pitchers whose teams are playing today are prioritized over non-starting SPs or pitchers whose teams are off. Probable starters get highest priority. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\n\nEach move includes team, opponent, score, and (when set) Yahoo injury status (e.g. `DTD`, `IL10`) inline in the parenthetical. If a player suggested to *start* is `DTD`, a `⚠️ Day-to-day — confirm in lineup before locking.` caution is rendered beneath the line — the optimizer scores ignore status, so a higher-scoring DTD player can still surface as a swap recommendation. Moves to BN may include a `reason` indicator:\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\n- `🔒` — player's game has already started (locked by Yahoo)\n- `📅` — player's team is off today\n\nIn `--format json`, every entry in `swap_groups[].start`, `swap_groups[].bench`, `swap_groups[].reshuffle` (and the pitcher equivalents) carries a `status` field — empty string when the player has no Yahoo status. The flat `moves[]` and `pitcher_moves[]` arrays mirror the text view: they include every move that is part of a swap group (each tagged with a `swap_group` index), including pure active↔active reshuffles (e.g. moving a player from UTIL into an open position slot with no bench involved) — these appear as a `reshuffle`-only group with an empty `start`/`bench`.\n\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points (rank 1 gets the max, last-ranked gets 0)\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\n\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\n\n## Common Flags\n\n| Flag | Description |\n|------|-------------|\n| `--league ID` | League ID (overrides config default) |\n| `--team ID` | Team ID (overrides config/auto-detect) |\n| `--season YEAR` | Season year (for historical data) |\n| `--week N` | Scoring week number |\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\n| `--format text\\|json\\|discord` | Output format (default: text) |\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = alphabetical, or stat abbreviation. See stat sort reference below |\n| `--sort-type season\\|lastweek\\|lastmonth` | Sort period (used with --sort) |\n| `--stat-season YEAR` | Season year for stat columns (auto-detects: falls back to previous year if league hasn't started) |\n| `--since 3d\\|1w\\|24h\\|2w` | Filter transactions by time window (h=hours, d=days, w=weeks, m=months) |\n\n### Sort Reference\n\nBuilt-in sort modes:\n\n| Value | Description |\n|-------|-------------|\n| `OR` | Overall Rank (preseason/projected) |\n| `AR` | Actual Rank (by real performance) |\n| `PTS` | Fantasy Points |\n| `NAME` | Alphabetical |\n\nBatting stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `R` | Runs |\n| `H` | Hits |\n| `1B` | Singles |\n| `2B` | Doubles |\n| `3B` | Triples |\n| `HR` | Home Runs |\n| `RBI` | Runs Batted In |\n| `SB` | Stolen Bases |\n| `BB` | Walks |\n| `K` | Strikeouts |\n| `AVG` | Batting Average |\n| `OBP` | On-base Percentage |\n| `SLG` | Slugging Percentage |\n| `OPS` | On-base + Slugging |\n| `AB` | At Bats |\n| `PA` | Plate Appearances |\n| `TB` | Total Bases |\n| `XBH` | Extra Base Hits |\n\nPitching stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `W` | Wins |\n| `L` | Losses |\n| `SV` | Saves |\n| `HLD` | Holds |\n| `SV+H` | Saves + Holds |\n| `BSV` | Blown Saves |\n| `ERA` | Earned Run Average |\n| `WHIP` | Walks + Hits per Inning Pitched |\n| `IP` | Innings Pitched |\n| `QS` | Quality Starts |\n| `K9` | Strikeouts per 9 Innings |\n| `BB9` | Walks per 9 Innings |\n\n## Output Format\n\n### Text (Default)\n\n**roster:**\n\n```\nRoster — Team Name\nName                      Pos          Slot  Team   Status\n----------------------------------------------------------\nAaron Judge               OF,Util      OF    NYY\nMookie Betts              SS,OF,Util   SS    LAD\nZack Wheeler              SP           IL    PHI    IL-60\n```\n\n**today / day:**\n\n```\nToday — Team Name\n  First pitch: 1:10 PM\n\n  ACTIVE (team playing today) (8)\n    Aaron Judge            OF,Util        NYY  vs BOS 7:05 PM\n    Gerrit Cole            SP             NYY  vs BOS 7:05 PM  [PROBABLE STARTER]\n\n  NOT PLAYING (team off today) (3)\n    Mookie Betts           SS,OF,Util     LAD\n\n  BENCH (3)\n    Jake Burger            3B,1B,Util     MIA  at ATL 1:10 PM\n\n  INJURED LIST (1)\n    Zack Wheeler           SP             PHI                   (IL-60)\n```\n\n**optimize:**\n\n```\nRoster Optimization Suggestions\n==================================================\n\n  LINEUP CHANGES (2 swaps)\n\n    Swap 1 — 3B\n      ▶ Start Jake Burger (MIA vs ATL, score: 18.3)\n      ▼ Bench Josh Smith (TEX vs SEA, score: 9.2)\n        ⚠️  not in confirmed MLB lineup\n\n    Swap 2 — SS / UTIL\n      ▶ Start Willy Adames at SS (SF vs PHI, score: 35.0)\n      ↔ Move Mookie Betts from SS → UTIL\n      ▼ Bench Tyler Fitzgerald (SF, score: 12.0)\n        📅  team off today\n\n  PITCHER ROTATION (1 swap)\n\n    Swap 1 — P\n      ▶ Start Gerrit Cole (NYY vs BOS, score: 42.1) — probable starter today\n      ▼ Bench Nathan Eovaldi (TEX vs SEA, score: 39.0)\n        💡  not starting today\n\n  IL MANAGEMENT (1 suggested)\n    Move Zack Wheeler (IL-60) from SP slot to IL to free a roster spot.\n\nTotal: 4 suggestion(s)\n```\n\nPlayers on teams whose games are already in progress or finished are locked and excluded from optimization — they will not appear in the move list.\n\n**scoreboard:**\n\n```\nLeague Scoreboard — Week 1\n------------------------------------------------------------\n  Clanker Killerz                  6  vs  4   1% AI 99% hot gas\n                                    In progress\n\n  Mossi Possi                      1  vs  7   Normal Men\n                                    In progress\n```\n\n**transactions:**\n\n```\nRecent Transactions\n------------------------------------------------------------\nadd | 1% AI 99% hot gas | Mar 25, 07:38 PM\n  Add from Free Agent:Luis Castillo (SEA - SP)\n\nadd/drop | 1% AI 99% hot gas | Mar 25, 04:14 AM\n  Add from Waivers:   Josh Smith (TEX - 1B,3B,SS,OF)\n  Drop:               Luis Robert Jr. (NYM - OF)\n```\n\n### JSON\n\nAll commands support `--format json` for structured output.\n\n### Discord\n\nAll commands support `--format discord` which wraps text output in code blocks.\n\n## Output Fields\n\n- **name** — Player's full name\n- **player_id** — Yahoo player ID (numeric)\n- **positions** — Eligible fantasy positions (e.g., OF, SP, Util)\n- **selected_position** — Current lineup slot\n- **team** — Real MLB team abbreviation\n- **status** — Injury designation (IL, IL-60, DTD, etc.)\n- **game_time** — Game start time in local timezone (today/day commands)\n- **first_pitch** — Earliest game start time across all games (today/day commands, JSON top-level)\n- **percent_owned** — Ownership percentage (free agents)\n- **player_position** — Display position (draft results)\n\n## Limitations\n\n- **Rate limits**: Yahoo enforces API rate limits. Avoid rapid-fire requests.\n- **Season scope**: Data is scoped to the configured season. Use `--season` for historical data.\n- **OAuth tokens**: Tokens auto-refresh but may eventually expire, requiring re-authentication via `auth`.\n- **MLB schedule**: The `today`, `day`, `optimize`, and `lineup-check` commands use the MLB Stats API for schedule data (off days, probable pitchers, confirmed batting lineups). This data is not available from the Yahoo Fantasy API.\n\n## Credential Storage\n\n**Preferred: Environment variables.** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` via OpenClaw config or your shell environment. The skill will use these automatically — no need to run `auth`. Note: credentials are still written to `oauth2.json` on disk because the underlying `yahoo_oauth` library requires a file for token management. File permissions are set to 0600 on Unix.\n\n**Alternative: Interactive setup.** Run the `auth` command to enter credentials interactively. Tokens are stored in `~/.openclaw/credentials/yahoo-fantasy/`:\n- `oauth2.json` — OAuth consumer key/secret and tokens (managed by yahoo_oauth, file permissions set to 0600 on Unix)\n- `yahoo-fantasy.json` — Default league_id, team_id, season\n\nLegacy YFPY `.env` credentials are auto-migrated to `oauth2.json` on first use.\n\n## Notes\n\n- Data is sourced from the Yahoo Fantasy Sports API via the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) library.\n- MLB schedule and probable pitcher data comes from the [MLB Stats API](https://statsapi.mlb.com/) (stdlib only, no dependencies).\n- Run `--setup` to create a local venv at `.deps/` and install dependencies before first use.\n- Auto-detect identifies your team using `league.team_key()`. If detection fails, use `config --team <ID>` to set it manually.\n\nFile v0.1.28:_meta.json\n\n{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.28\",\n  \"publishedAt\": 1783003988240\n}\n\nFile v0.1.28:skill-card.md\n\n## Description: <br>\nQuery a Yahoo Fantasy Baseball league for rosters, standings, matchups, free agents, draft results, transactions, injuries, and read-only lineup optimization guidance. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[khaney64](https://clawhub.ai/user/khaney64) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal fantasy baseball managers use this skill to inspect Yahoo league data and receive read-only guidance about rosters, starts, sits, standings, available players, injuries, and lineup optimization. This release contains documentation only, so the documented Python commands require a release that includes the implementation files before they can run. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: This release contains only SKILL.md, so the documented Python commands cannot run unless implementation files are supplied by another release. <br>\nMitigation: Confirm the release includes the expected executable files before relying on the documented commands. <br>\nRisk: Yahoo developer credentials and OAuth tokens may be stored locally for reuse when using an implementation release. <br>\nMitigation: Review the implementation before entering credentials, use approved secret handling, and verify local token file permissions. <br>\nRisk: Roster optimization guidance depends on Yahoo and MLB data freshness, API availability, and rate limits. <br>\nMitigation: Review suggestions against current league and lineup information before acting, and avoid rapid repeated API calls. <br>\n\n\n## Reference(s): <br>\n- [Server-resolved GitHub provenance](https://github.com/khaney64/yahoo-fantasy-baseball) <br>\n- [ClawHub skill page](https://clawhub.ai/khaney64/skills/yahoo-fantasy-baseball) <br>\n- [Yahoo Developer Apps](https://developer.yahoo.com/apps/) <br>\n- [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) <br>\n- [MLB Stats API](https://statsapi.mlb.com/) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [Text, JSON, Shell commands, Configuration, Guidance] <br>\n**Output Format:** [Text, JSON, Discord-formatted Markdown, and Markdown with inline bash command examples] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Read-only Yahoo Fantasy Baseball data and recommendations; this release evidence says no executable code is included.] <br>\n\n## Skill Version(s): <br>\n0.1.28 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nArchive v0.1.27: 9 files, 45748 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (68759b), scripts/formatters.py (46020b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), skill-card.md (2532b), SKILL.md (18169b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nFile v0.1.27:SKILL.md\n\n---\nname: yahoo-fantasy-baseball\ndescription: >\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\n  free agents, draft results, transactions, and injuries. Daily roster\n  optimization detects inactive players and suggests bench swaps and IL moves.\n  Read-only — no roster modifications. Use when the user asks about their\n  fantasy baseball team, who to start or sit, league standings, available\n  free agents, or injury updates.\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"]}}}\n---\n\n# Yahoo Fantasy Baseball\n\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\n\n## Requirements\n\n- Python 3.10+\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\n\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\n\n```bash\npython3 yahoo-fantasy-baseball.py --setup\n```\n\n## Setup\n\n### 1. Create a Yahoo Developer App\n\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\n2. Click \"Create an App\"\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\n4. Copy the **Consumer Key** and **Consumer Secret**\n\n### 2. Authenticate\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\n```\n\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\n\n### 3. Find Your League\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\n```\n\n### 4. Set Defaults\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\n```\n\nThe skill auto-detects your team within the league. You can also set it explicitly:\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\n```\n\n## Quick Start\n\n```bash\n# View your roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\n\n# Daily roster status (who's playing, who's off)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n\n# Get optimization suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n\n# League standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\n```\n\n## Commands\n\n### Data Commands (Read)\n\n```bash\n# Auth & Config\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\n\n# Leagues & Teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\n\n# Roster & Lineup\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\n\n# Standings & Matchups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\n\n# Players & Draft\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\n\n# Lineup Check — confirmed MLB lineups vs fantasy roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\n```\n\n### Daily Management\n\n```bash\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Day: roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n```\n\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\n\n```bash\n# Standouts: yesterday's top performers across all league teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\n```\n\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\n\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\n\n```bash\n# Lineup check: verify active players are in confirmed MLB lineups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\n```\n\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\n\n```bash\n# Optimize: smart roster analysis with suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n```\n\nThree analysis categories:\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Relief pitchers whose teams are playing today are prioritized over non-starting SPs or pitchers whose teams are off. Probable starters get highest priority. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\n\nEach move includes team, opponent, score, and (when set) Yahoo injury status (e.g. `DTD`, `IL10`) inline in the parenthetical. If a player suggested to *start* is `DTD`, a `⚠️ Day-to-day — confirm in lineup before locking.` caution is rendered beneath the line — the optimizer scores ignore status, so a higher-scoring DTD player can still surface as a swap recommendation. Moves to BN may include a `reason` indicator:\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\n- `🔒` — player's game has already started (locked by Yahoo)\n- `📅` — player's team is off today\n\nIn `--format json`, every entry in `swap_groups[].start`, `swap_groups[].bench`, `swap_groups[].reshuffle` (and the pitcher equivalents) carries a `status` field — empty string when the player has no Yahoo status. The flat `moves[]` and `pitcher_moves[]` arrays mirror the text view: they include only moves that are part of a bench-involving swap group (each tagged with a `swap_group` index). Pure active↔active reshuffles that are omitted from the text output are also omitted from JSON.\n\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points (rank 1 gets the max, last-ranked gets 0)\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\n\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\n\n## Common Flags\n\n| Flag | Description |\n|------|-------------|\n| `--league ID` | League ID (overrides config default) |\n| `--team ID` | Team ID (overrides config/auto-detect) |\n| `--season YEAR` | Season year (for historical data) |\n| `--week N` | Scoring week number |\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\n| `--format text\\|json\\|discord` | Output format (default: text) |\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = alphabetical, or stat abbreviation. See stat sort reference below |\n| `--sort-type season\\|lastweek\\|lastmonth` | Sort period (used with --sort) |\n| `--stat-season YEAR` | Season year for stat columns (auto-detects: falls back to previous year if league hasn't started) |\n| `--since 3d\\|1w\\|24h\\|2w` | Filter transactions by time window (h=hours, d=days, w=weeks, m=months) |\n\n### Sort Reference\n\nBuilt-in sort modes:\n\n| Value | Description |\n|-------|-------------|\n| `OR` | Overall Rank (preseason/projected) |\n| `AR` | Actual Rank (by real performance) |\n| `PTS` | Fantasy Points |\n| `NAME` | Alphabetical |\n\nBatting stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `R` | Runs |\n| `H` | Hits |\n| `1B` | Singles |\n| `2B` | Doubles |\n| `3B` | Triples |\n| `HR` | Home Runs |\n| `RBI` | Runs Batted In |\n| `SB` | Stolen Bases |\n| `BB` | Walks |\n| `K` | Strikeouts |\n| `AVG` | Batting Average |\n| `OBP` | On-base Percentage |\n| `SLG` | Slugging Percentage |\n| `OPS` | On-base + Slugging |\n| `AB` | At Bats |\n| `PA` | Plate Appearances |\n| `TB` | Total Bases |\n| `XBH` | Extra Base Hits |\n\nPitching stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `W` | Wins |\n| `L` | Losses |\n| `SV` | Saves |\n| `HLD` | Holds |\n| `SV+H` | Saves + Holds |\n| `BSV` | Blown Saves |\n| `ERA` | Earned Run Average |\n| `WHIP` | Walks + Hits per Inning Pitched |\n| `IP` | Innings Pitched |\n| `QS` | Quality Starts |\n| `K9` | Strikeouts per 9 Innings |\n| `BB9` | Walks per 9 Innings |\n\n## Output Format\n\n### Text (Default)\n\n**roster:**\n\n```\nRoster — Team Name\nName                      Pos          Slot  Team   Status\n----------------------------------------------------------\nAaron Judge               OF,Util      OF    NYY\nMookie Betts              SS,OF,Util   SS    LAD\nZack Wheeler              SP           IL    PHI    IL-60\n```\n\n**today / day:**\n\n```\nToday — Team Name\n  First pitch: 1:10 PM\n\n  ACTIVE (team playing today) (8)\n    Aaron Judge            OF,Util        NYY  vs BOS 7:05 PM\n    Gerrit Cole            SP             NYY  vs BOS 7:05 PM  [PROBABLE STARTER]\n\n  NOT PLAYING (team off today) (3)\n    Mookie Betts           SS,OF,Util     LAD\n\n  BENCH (3)\n    Jake Burger            3B,1B,Util     MIA  at ATL 1:10 PM\n\n  INJURED LIST (1)\n    Zack Wheeler           SP             PHI                   (IL-60)\n```\n\n**optimize:**\n\n```\nRoster Optimization Suggestions\n==================================================\n\n  LINEUP CHANGES (2 swaps)\n\n    Swap 1 — 3B\n      ▶ Start Jake Burger (MIA vs ATL, score: 18.3)\n      ▼ Bench Josh Smith (TEX vs SEA, score: 9.2)\n        ⚠️  not in confirmed MLB lineup\n\n    Swap 2 — SS / UTIL\n      ▶ Start Willy Adames at SS (SF vs PHI, score: 35.0)\n      ↔ Move Mookie Betts from SS → UTIL\n      ▼ Bench Tyler Fitzgerald (SF, score: 12.0)\n        📅  team off today\n\n  PITCHER ROTATION (1 swap)\n\n    Swap 1 — P\n      ▶ Start Gerrit Cole (NYY vs BOS, score: 42.1) — probable starter today\n      ▼ Bench Nathan Eovaldi (TEX vs SEA, score: 39.0)\n        💡  not starting today\n\n  IL MANAGEMENT (1 suggested)\n    Move Zack Wheeler (IL-60) from SP slot to IL to free a roster spot.\n\nTotal: 4 suggestion(s)\n```\n\nPlayers on teams whose games are already in progress or finished are locked and excluded from optimization — they will not appear in the move list.\n\n**scoreboard:**\n\n```\nLeague Scoreboard — Week 1\n------------------------------------------------------------\n  Clanker Killerz                  6  vs  4   1% AI 99% hot gas\n                                    In progress\n\n  Mossi Possi                      1  vs  7   Normal Men\n                                    In progress\n```\n\n**transactions:**\n\n```\nRecent Transactions\n------------------------------------------------------------\nadd | 1% AI 99% hot gas | Mar 25, 07:38 PM\n  Add from Free Agent:Luis Castillo (SEA - SP)\n\nadd/drop | 1% AI 99% hot gas | Mar 25, 04:14 AM\n  Add from Waivers:   Josh Smith (TEX - 1B,3B,SS,OF)\n  Drop:               Luis Robert Jr. (NYM - OF)\n```\n\n### JSON\n\nAll commands support `--format json` for structured output.\n\n### Discord\n\nAll commands support `--format discord` which wraps text output in code blocks.\n\n## Output Fields\n\n- **name** — Player's full name\n- **player_id** — Yahoo player ID (numeric)\n- **positions** — Eligible fantasy positions (e.g., OF, SP, Util)\n- **selected_position** — Current lineup slot\n- **team** — Real MLB team abbreviation\n- **status** — Injury designation (IL, IL-60, DTD, etc.)\n- **game_time** — Game start time in local timezone (today/day commands)\n- **first_pitch** — Earliest game start time across all games (today/day commands, JSON top-level)\n- **percent_owned** — Ownership percentage (free agents)\n- **player_position** — Display position (draft results)\n\n## Limitations\n\n- **Rate limits**: Yahoo enforces API rate limits. Avoid rapid-fire requests.\n- **Season scope**: Data is scoped to the configured season. Use `--season` for historical data.\n- **OAuth tokens**: Tokens auto-refresh but may eventually expire, requiring re-authentication via `auth`.\n- **MLB schedule**: The `today`, `day`, `optimize`, and `lineup-check` commands use the MLB Stats API for schedule data (off days, probable pitchers, confirmed batting lineups). This data is not available from the Yahoo Fantasy API.\n\n## Credential Storage\n\n**Preferred: Environment variables.** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` via OpenClaw config or your shell environment. The skill will use these automatically — no need to run `auth`. Note: credentials are still written to `oauth2.json` on disk because the underlying `yahoo_oauth` library requires a file for token management. File permissions are set to 0600 on Unix.\n\n**Alternative: Interactive setup.** Run the `auth` command to enter credentials interactively. Tokens are stored in `~/.openclaw/credentials/yahoo-fantasy/`:\n- `oauth2.json` — OAuth consumer key/secret and tokens (managed by yahoo_oauth, file permissions set to 0600 on Unix)\n- `yahoo-fantasy.json` — Default league_id, team_id, season\n\nLegacy YFPY `.env` credentials are auto-migrated to `oauth2.json` on first use.\n\n## Notes\n\n- Data is sourced from the Yahoo Fantasy Sports API via the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) library.\n- MLB schedule and probable pitcher data comes from the [MLB Stats API](https://statsapi.mlb.com/) (stdlib only, no dependencies).\n- Run `--setup` to create a local venv at `.deps/` and install dependencies before first use.\n- Auto-detect identifies your team using `league.team_key()`. If detection fails, use `config --team <ID>` to set it manually.\n\nFile v0.1.27:_meta.json\n\n{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.27\",\n  \"publishedAt\": 1778516722760\n}\n\nFile v0.1.27:skill-card.md\n\n## Description: <br>\nQuery a Yahoo Fantasy Baseball league to view rosters, standings, matchups, free agents, draft results, transactions, injuries, and read-only daily roster optimization suggestions. <br>\n\nThis skill is ready for commercial/non-commercial use. <br>\n\n## Publisher: <br>\n[khaney64](https://clawhub.ai/user/khaney64) <br>\n\n### License/Terms of Use: <br>\nMIT-0 <br>\n\n\n## Use Case: <br>\nExternal Yahoo Fantasy Baseball users use this skill to inspect league data and get read-only lineup, bench, pitcher rotation, and injured-list suggestions before making their own roster decisions. <br>\n\n### Deployment Geography for Use: <br>\nGlobal <br>\n\n## Known Risks and Mitigations: <br>\nRisk: The skill stores Yahoo OAuth material locally. <br>\nMitigation: Install and run it only on a trusted machine, keep credential files private, and revoke the Yahoo app or token and remove ~/.openclaw/credentials/yahoo-fantasy when access is no longer needed. <br>\nRisk: The setup flow installs a pinned Python dependency. <br>\nMitigation: Review yahoo_fantasy_api==2.12.2 before running --setup and avoid setup on untrusted systems. <br>\nRisk: Roster suggestions depend on current Yahoo and MLB data and may become stale near game lock times. <br>\nMitigation: Review recommendations against current league and lineup information before making roster changes in Yahoo. <br>\n\n\n## Reference(s): <br>\n- [ClawHub Skill Page](https://clawhub.ai/khaney64/yahoo-fantasy-baseball) <br>\n- [Publisher Profile](https://clawhub.ai/user/khaney64) <br>\n- [Yahoo Developer Apps](https://developer.yahoo.com/apps/) <br>\n- [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) <br>\n- [MLB Stats API](https://statsapi.mlb.com/) <br>\n\n\n## Skill Output: <br>\n**Output Type(s):** [text, markdown, json, shell commands, configuration, guidance] <br>\n**Output Format:** [Plain text, JSON, or Discord-formatted markdown depending on command flags.] <br>\n**Output Parameters:** [1D] <br>\n**Other Properties Related to Output:** [Read-only outputs may include roster tables, standings, matchup summaries, player lists, transaction reports, injury reports, and lineup optimization suggestions.] <br>\n\n## Skill Version(s): <br>\n0.1.27 (source: server release evidence) <br>\n\n## Ethical Considerations: <br>\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment. <br>\n\nFile v0.1.27:requirements.txt\n\nyahoo_fantasy_api==2.12.2\n\nArchive v0.1.26: 8 files, 44437 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (68759b), scripts/formatters.py (46020b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), SKILL.md (18222b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nFile v0.1.26:SKILL.md\n\n---\nname: yahoo-fantasy-baseball\ndescription: >\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\n  free agents, draft results, transactions, and injuries. Daily roster\n  optimization detects inactive players and suggests bench swaps and IL moves.\n  Read-only — no roster modifications. Use when the user asks about their\n  fantasy baseball team, who to start or sit, league standings, available\n  free agents, or injury updates.\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"],\"env\":[\"YAHOO_CONSUMER_KEY\",\"YAHOO_CONSUMER_SECRET\"]}}}\n---\n\n# Yahoo Fantasy Baseball\n\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\n\n## Requirements\n\n- Python 3.10+\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\n\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\n\n```bash\npython3 yahoo-fantasy-baseball.py --setup\n```\n\n## Setup\n\n### 1. Create a Yahoo Developer App\n\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\n2. Click \"Create an App\"\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\n4. Copy the **Consumer Key** and **Consumer Secret**\n\n### 2. Authenticate\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\n```\n\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\n\n### 3. Find Your League\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\n```\n\n### 4. Set Defaults\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\n```\n\nThe skill auto-detects your team within the league. You can also set it explicitly:\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\n```\n\n## Quick Start\n\n```bash\n# View your roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\n\n# Daily roster status (who's playing, who's off)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n\n# Get optimization suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n\n# League standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\n```\n\n## Commands\n\n### Data Commands (Read)\n\n```bash\n# Auth & Config\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\n\n# Leagues & Teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\n\n# Roster & Lineup\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\n\n# Standings & Matchups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\n\n# Players & Draft\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\n\n# Lineup Check — confirmed MLB lineups vs fantasy roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\n```\n\n### Daily Management\n\n```bash\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Day: roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n```\n\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\n\n```bash\n# Standouts: yesterday's top performers across all league teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\n```\n\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\n\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\n\n```bash\n# Lineup check: verify active players are in confirmed MLB lineups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\n```\n\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\n\n```bash\n# Optimize: smart roster analysis with suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n```\n\nThree analysis categories:\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Relief pitchers whose teams are playing today are prioritized over non-starting SPs or pitchers whose teams are off. Probable starters get highest priority. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\n\nEach move includes team, opponent, score, and (when set) Yahoo injury status (e.g. `DTD`, `IL10`) inline in the parenthetical. If a player suggested to *start* is `DTD`, a `⚠️ Day-to-day — confirm in lineup before locking.` caution is rendered beneath the line — the optimizer scores ignore status, so a higher-scoring DTD player can still surface as a swap recommendation. Moves to BN may include a `reason` indicator:\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\n- `🔒` — player's game has already started (locked by Yahoo)\n- `📅` — player's team is off today\n\nIn `--format json`, every entry in `swap_groups[].start`, `swap_groups[].bench`, `swap_groups[].reshuffle` (and the pitcher equivalents) carries a `status` field — empty string when the player has no Yahoo status. The flat `moves[]` and `pitcher_moves[]` arrays mirror the text view: they include only moves that are part of a bench-involving swap group (each tagged with a `swap_group` index). Pure active↔active reshuffles that are omitted from the text output are also omitted from JSON.\n\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points (rank 1 gets the max, last-ranked gets 0)\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\n\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\n\n## Common Flags\n\n| Flag | Description |\n|------|-------------|\n| `--league ID` | League ID (overrides config default) |\n| `--team ID` | Team ID (overrides config/auto-detect) |\n| `--season YEAR` | Season year (for historical data) |\n| `--week N` | Scoring week number |\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\n| `--format text\\|json\\|discord` | Output format (default: text) |\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = alphabetical, or stat abbreviation. See stat sort reference below |\n| `--sort-type season\\|lastweek\\|lastmonth` | Sort period (used with --sort) |\n| `--stat-season YEAR` | Season year for stat columns (auto-detects: falls back to previous year if league hasn't started) |\n| `--since 3d\\|1w\\|24h\\|2w` | Filter transactions by time window (h=hours, d=days, w=weeks, m=months) |\n\n### Sort Reference\n\nBuilt-in sort modes:\n\n| Value | Description |\n|-------|-------------|\n| `OR` | Overall Rank (preseason/projected) |\n| `AR` | Actual Rank (by real performance) |\n| `PTS` | Fantasy Points |\n| `NAME` | Alphabetical |\n\nBatting stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `R` | Runs |\n| `H` | Hits |\n| `1B` | Singles |\n| `2B` | Doubles |\n| `3B` | Triples |\n| `HR` | Home Runs |\n| `RBI` | Runs Batted In |\n| `SB` | Stolen Bases |\n| `BB` | Walks |\n| `K` | Strikeouts |\n| `AVG` | Batting Average |\n| `OBP` | On-base Percentage |\n| `SLG` | Slugging Percentage |\n| `OPS` | On-base + Slugging |\n| `AB` | At Bats |\n| `PA` | Plate Appearances |\n| `TB` | Total Bases |\n| `XBH` | Extra Base Hits |\n\nPitching stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `W` | Wins |\n| `L` | Losses |\n| `SV` | Saves |\n| `HLD` | Holds |\n| `SV+H` | Saves + Holds |\n| `BSV` | Blown Saves |\n| `ERA` | Earned Run Average |\n| `WHIP` | Walks + Hits per Inning Pitched |\n| `IP` | Innings Pitched |\n| `QS` | Quality Starts |\n| `K9` | Strikeouts per 9 Innings |\n| `BB9` | Walks per 9 Innings |\n\n## Output Format\n\n### Text (Default)\n\n**roster:**\n\n```\nRoster — Team Name\nName                      Pos          Slot  Team   Status\n----------------------------------------------------------\nAaron Judge               OF,Util      OF    NYY\nMookie Betts              SS,OF,Util   SS    LAD\nZack Wheeler              SP           IL    PHI    IL-60\n```\n\n**today / day:**\n\n```\nToday — Team Name\n  First pitch: 1:10 PM\n\n  ACTIVE (team playing today) (8)\n    Aaron Judge            OF,Util        NYY  vs BOS 7:05 PM\n    Gerrit Cole            SP             NYY  vs BOS 7:05 PM  [PROBABLE STARTER]\n\n  NOT PLAYING (team off today) (3)\n    Mookie Betts           SS,OF,Util     LAD\n\n  BENCH (3)\n    Jake Burger            3B,1B,Util     MIA  at ATL 1:10 PM\n\n  INJURED LIST (1)\n    Zack Wheeler           SP             PHI                   (IL-60)\n```\n\n**optimize:**\n\n```\nRoster Optimization Suggestions\n==================================================\n\n  LINEUP CHANGES (2 swaps)\n\n    Swap 1 — 3B\n      ▶ Start Jake Burger (MIA vs ATL, score: 18.3)\n      ▼ Bench Josh Smith (TEX vs SEA, score: 9.2)\n        ⚠️  not in confirmed MLB lineup\n\n    Swap 2 — SS / UTIL\n      ▶ Start Willy Adames at SS (SF vs PHI, score: 35.0)\n      ↔ Move Mookie Betts from SS → UTIL\n      ▼ Bench Tyler Fitzgerald (SF, score: 12.0)\n        📅  team off today\n\n  PITCHER ROTATION (1 swap)\n\n    Swap 1 — P\n      ▶ Start Gerrit Cole (NYY vs BOS, score: 42.1) — probable starter today\n      ▼ Bench Nathan Eovaldi (TEX vs SEA, score: 39.0)\n        💡  not starting today\n\n  IL MANAGEMENT (1 suggested)\n    Move Zack Wheeler (IL-60) from SP slot to IL to free a roster spot.\n\nTotal: 4 suggestion(s)\n```\n\nPlayers on teams whose games are already in progress or finished are locked and excluded from optimization — they will not appear in the move list.\n\n**scoreboard:**\n\n```\nLeague Scoreboard — Week 1\n------------------------------------------------------------\n  Clanker Killerz                  6  vs  4   1% AI 99% hot gas\n                                    In progress\n\n  Mossi Possi                      1  vs  7   Normal Men\n                                    In progress\n```\n\n**transactions:**\n\n```\nRecent Transactions\n------------------------------------------------------------\nadd | 1% AI 99% hot gas | Mar 25, 07:38 PM\n  Add from Free Agent:Luis Castillo (SEA - SP)\n\nadd/drop | 1% AI 99% hot gas | Mar 25, 04:14 AM\n  Add from Waivers:   Josh Smith (TEX - 1B,3B,SS,OF)\n  Drop:               Luis Robert Jr. (NYM - OF)\n```\n\n### JSON\n\nAll commands support `--format json` for structured output.\n\n### Discord\n\nAll commands support `--format discord` which wraps text output in code blocks.\n\n## Output Fields\n\n- **name** — Player's full name\n- **player_id** — Yahoo player ID (numeric)\n- **positions** — Eligible fantasy positions (e.g., OF, SP, Util)\n- **selected_position** — Current lineup slot\n- **team** — Real MLB team abbreviation\n- **status** — Injury designation (IL, IL-60, DTD, etc.)\n- **game_time** — Game start time in local timezone (today/day commands)\n- **first_pitch** — Earliest game start time across all games (today/day commands, JSON top-level)\n- **percent_owned** — Ownership percentage (free agents)\n- **player_position** — Display position (draft results)\n\n## Limitations\n\n- **Rate limits**: Yahoo enforces API rate limits. Avoid rapid-fire requests.\n- **Season scope**: Data is scoped to the configured season. Use `--season` for historical data.\n- **OAuth tokens**: Tokens auto-refresh but may eventually expire, requiring re-authentication via `auth`.\n- **MLB schedule**: The `today`, `day`, `optimize`, and `lineup-check` commands use the MLB Stats API for schedule data (off days, probable pitchers, confirmed batting lineups). This data is not available from the Yahoo Fantasy API.\n\n## Credential Storage\n\n**Preferred: Environment variables.** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` via OpenClaw config or your shell environment. The skill will use these automatically — no need to run `auth`. Note: credentials are still written to `oauth2.json` on disk because the underlying `yahoo_oauth` library requires a file for token management. File permissions are set to 0600 on Unix.\n\n**Alternative: Interactive setup.** Run the `auth` command to enter credentials interactively. Tokens are stored in `~/.openclaw/credentials/yahoo-fantasy/`:\n- `oauth2.json` — OAuth consumer key/secret and tokens (managed by yahoo_oauth, file permissions set to 0600 on Unix)\n- `yahoo-fantasy.json` — Default league_id, team_id, season\n\nLegacy YFPY `.env` credentials are auto-migrated to `oauth2.json` on first use.\n\n## Notes\n\n- Data is sourced from the Yahoo Fantasy Sports API via the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) library.\n- MLB schedule and probable pitcher data comes from the [MLB Stats API](https://statsapi.mlb.com/) (stdlib only, no dependencies).\n- Run `--setup` to create a local venv at `.deps/` and install dependencies before first use.\n- Auto-detect identifies your team using `league.team_key()`. If detection fails, use `config --team <ID>` to set it manually.\n\nFile v0.1.26:_meta.json\n\n{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.26\",\n  \"publishedAt\": 1777306845113\n}\n\nFile v0.1.26:requirements.txt\n\nyahoo_fantasy_api==2.12.2\n\nArchive v0.1.25: 8 files, 44181 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (68385b), scripts/formatters.py (46020b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), SKILL.md (17943b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nFile v0.1.25:SKILL.md\n\n---\nname: yahoo-fantasy-baseball\ndescription: >\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\n  free agents, draft results, transactions, and injuries. Daily roster\n  optimization detects inactive players and suggests bench swaps and IL moves.\n  Read-only — no roster modifications. Use when the user asks about their\n  fantasy baseball team, who to start or sit, league standings, available\n  free agents, or injury updates.\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"],\"env\":[\"YAHOO_CONSUMER_KEY\",\"YAHOO_CONSUMER_SECRET\"]}}}\n---\n\n# Yahoo Fantasy Baseball\n\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\n\n## Requirements\n\n- Python 3.10+\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\n\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\n\n```bash\npython3 yahoo-fantasy-baseball.py --setup\n```\n\n## Setup\n\n### 1. Create a Yahoo Developer App\n\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\n2. Click \"Create an App\"\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\n4. Copy the **Consumer Key** and **Consumer Secret**\n\n### 2. Authenticate\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\n```\n\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\n\n### 3. Find Your League\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\n```\n\n### 4. Set Defaults\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\n```\n\nThe skill auto-detects your team within the league. You can also set it explicitly:\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\n```\n\n## Quick Start\n\n```bash\n# View your roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\n\n# Daily roster status (who's playing, who's off)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n\n# Get optimization suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n\n# League standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\n```\n\n## Commands\n\n### Data Commands (Read)\n\n```bash\n# Auth & Config\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\n\n# Leagues & Teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\n\n# Roster & Lineup\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\n\n# Standings & Matchups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\n\n# Players & Draft\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\n\n# Lineup Check — confirmed MLB lineups vs fantasy roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\n```\n\n### Daily Management\n\n```bash\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Day: roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n```\n\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\n\n```bash\n# Standouts: yesterday's top performers across all league teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\n```\n\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\n\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\n\n```bash\n# Lineup check: verify active players are in confirmed MLB lineups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\n```\n\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\n\n```bash\n# Optimize: smart roster analysis with suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n```\n\nThree analysis categories:\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Relief pitchers whose teams are playing today are prioritized over non-starting SPs or pitchers whose teams are off. Probable starters get highest priority. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\n\nEach move includes team, opponent, score, and (when set) Yahoo injury status (e.g. `DTD`, `IL10`) inline in the parenthetical. If a player suggested to *start* is `DTD`, a `⚠️ Day-to-day — confirm in lineup before locking.` caution is rendered beneath the line — the optimizer scores ignore status, so a higher-scoring DTD player can still surface as a swap recommendation. Moves to BN may include a `reason` indicator:\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\n- `🔒` — player's game has already started (locked by Yahoo)\n- `📅` — player's team is off today\n\nIn `--format json`, every entry in `swap_groups[].start`, `swap_groups[].bench`, `swap_groups[].reshuffle` (and the pitcher equivalents) carries a `status` field — empty string when the player has no Yahoo status.\n\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points (rank 1 gets the max, last-ranked gets 0)\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\n\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\n\n## Common Flags\n\n| Flag | Description |\n|------|-------------|\n| `--league ID` | League ID (overrides config default) |\n| `--team ID` | Team ID (overrides config/auto-detect) |\n| `--season YEAR` | Season year (for historical data) |\n| `--week N` | Scoring week number |\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\n| `--format text\\|json\\|discord` | Output format (default: text) |\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = alphabetical, or stat abbreviation. See stat sort reference below |\n| `--sort-type season\\|lastweek\\|lastmonth` | Sort period (used with --sort) |\n| `--stat-season YEAR` | Season year for stat columns (auto-detects: falls back to previous year if league hasn't started) |\n| `--since 3d\\|1w\\|24h\\|2w` | Filter transactions by time window (h=hours, d=days, w=weeks, m=months) |\n\n### Sort Reference\n\nBuilt-in sort modes:\n\n| Value | Description |\n|-------|-------------|\n| `OR` | Overall Rank (preseason/projected) |\n| `AR` | Actual Rank (by real performance) |\n| `PTS` | Fantasy Points |\n| `NAME` | Alphabetical |\n\nBatting stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `R` | Runs |\n| `H` | Hits |\n| `1B` | Singles |\n| `2B` | Doubles |\n| `3B` | Triples |\n| `HR` | Home Runs |\n| `RBI` | Runs Batted In |\n| `SB` | Stolen Bases |\n| `BB` | Walks |\n| `K` | Strikeouts |\n| `AVG` | Batting Average |\n| `OBP` | On-base Percentage |\n| `SLG` | Slugging Percentage |\n| `OPS` | On-base + Slugging |\n| `AB` | At Bats |\n| `PA` | Plate Appearances |\n| `TB` | Total Bases |\n| `XBH` | Extra Base Hits |\n\nPitching stats:\n\n| Abbrev | Description |\n|--------|-------------|\n| `W` | Wins |\n| `L` | Losses |\n| `SV` | Saves |\n| `HLD` | Holds |\n| `SV+H` | Saves + Holds |\n| `BSV` | Blown Saves |\n| `ERA` | Earned Run Average |\n| `WHIP` | Walks + Hits per Inning Pitched |\n| `IP` | Innings Pitched |\n| `QS` | Quality Starts |\n| `K9` | Strikeouts per 9 Innings |\n| `BB9` | Walks per 9 Innings |\n\n## Output Format\n\n### Text (Default)\n\n**roster:**\n\n```\nRoster — Team Name\nName                      Pos          Slot  Team   Status\n----------------------------------------------------------\nAaron Judge               OF,Util      OF    NYY\nMookie Betts              SS,OF,Util   SS    LAD\nZack Wheeler              SP           IL    PHI    IL-60\n```\n\n**today / day:**\n\n```\nToday — Team Name\n  First pitch: 1:10 PM\n\n  ACTIVE (team playing today) (8)\n    Aaron Judge            OF,Util        NYY  vs BOS 7:05 PM\n    Gerrit Cole            SP             NYY  vs BOS 7:05 PM  [PROBABLE STARTER]\n\n  NOT PLAYING (team off today) (3)\n    Mookie Betts           SS,OF,Util     LAD\n\n  BENCH (3)\n    Jake Burger            3B,1B,Util     MIA  at ATL 1:10 PM\n\n  INJURED LIST (1)\n    Zack Wheeler           SP             PHI                   (IL-60)\n```\n\n**optimize:**\n\n```\nRoster Optimization Suggestions\n==================================================\n\n  LINEUP CHANGES (2 swaps)\n\n    Swap 1 — 3B\n      ▶ Start Jake Burger (MIA vs ATL, score: 18.3)\n      ▼ Bench Josh Smith (TEX vs SEA, score: 9.2)\n        ⚠️  not in confirmed MLB lineup\n\n    Swap 2 — SS / UTIL\n      ▶ Start Willy Adames at SS (SF vs PHI, score: 35.0)\n      ↔ Move Mookie Betts from SS → UTIL\n      ▼ Bench Tyler Fitzgerald (SF, score: 12.0)\n        📅  team off today\n\n  PITCHER ROTATION (1 swap)\n\n    Swap 1 — P\n      ▶ Start Gerrit Cole (NYY vs BOS, score: 42.1) — probable starter today\n      ▼ Bench Nathan Eovaldi (TEX vs SEA, score: 39.0)\n        💡  not starting today\n\n  IL MANAGEMENT (1 suggested)\n    Move Zack Wheeler (IL-60) from SP slot to IL to free a roster spot.\n\nTotal: 4 suggestion(s)\n```\n\nPlayers on teams whose games are already in progress or finished are locked and excluded from optimization — they will not appear in the move list.\n\n**scoreboard:**\n\n```\nLeague Scoreboard — Week 1\n------------------------------------------------------------\n  Clanker Killerz                  6  vs  4   1% AI 99% hot gas\n                                    In progress\n\n  Mossi Possi                      1  vs  7   Normal Men\n                                    In progress\n```\n\n**transactions:**\n\n```\nRecent Transactions\n------------------------------------------------------------\nadd | 1% AI 99% hot gas | Mar 25, 07:38 PM\n  Add from Free Agent:Luis Castillo (SEA - SP)\n\nadd/drop | 1% AI 99% hot gas | Mar 25, 04:14 AM\n  Add from Waivers:   Josh Smith (TEX - 1B,3B,SS,OF)\n  Drop:               Luis Robert Jr. (NYM - OF)\n```\n\n### JSON\n\nAll commands support `--format json` for structured output.\n\n### Discord\n\nAll commands support `--format discord` which wraps text output in code blocks.\n\n## Output Fields\n\n- **name** — Player's full name\n- **player_id** — Yahoo player ID (numeric)\n- **positions** — Eligible fantasy positions (e.g., OF, SP, Util)\n- **selected_position** — Current lineup slot\n- **team** — Real MLB team abbreviation\n- **status** — Injury designation (IL, IL-60, DTD, etc.)\n- **game_time** — Game start time in local timezone (today/day commands)\n- **first_pitch** — Earliest game start time across all games (today/day commands, JSON top-level)\n- **percent_owned** — Ownership percentage (free agents)\n- **player_position** — Display position (draft results)\n\n## Limitations\n\n- **Rate limits**: Yahoo enforces API rate limits. Avoid rapid-fire requests.\n- **Season scope**: Data is scoped to the configured season. Use `--season` for historical data.\n- **OAuth tokens**: Tokens auto-refresh but may eventually expire, requiring re-authentication via `auth`.\n- **MLB schedule**: The `today`, `day`, `optimize`, and `lineup-check` commands use the MLB Stats API for schedule data (off days, probable pitchers, confirmed batting lineups). This data is not available from the Yahoo Fantasy API.\n\n## Credential Storage\n\n**Preferred: Environment variables.** Set `YAHOO_CONSUMER_KEY` and `YAHOO_CONSUMER_SECRET` via OpenClaw config or your shell environment. The skill will use these automatically — no need to run `auth`. Note: credentials are still written to `oauth2.json` on disk because the underlying `yahoo_oauth` library requires a file for token management. File permissions are set to 0600 on Unix.\n\n**Alternative: Interactive setup.** Run the `auth` command to enter credentials interactively. Tokens are stored in `~/.openclaw/credentials/yahoo-fantasy/`:\n- `oauth2.json` — OAuth consumer key/secret and tokens (managed by yahoo_oauth, file permissions set to 0600 on Unix)\n- `yahoo-fantasy.json` — Default league_id, team_id, season\n\nLegacy YFPY `.env` credentials are auto-migrated to `oauth2.json` on first use.\n\n## Notes\n\n- Data is sourced from the Yahoo Fantasy Sports API via the [yahoo-fantasy-api](https://github.com/spilchen/yahoo_fantasy_api) library.\n- MLB schedule and probable pitcher data comes from the [MLB Stats API](https://statsapi.mlb.com/) (stdlib only, no dependencies).\n- Run `--setup` to create a local venv at `.deps/` and install dependencies before first use.\n- Auto-detect identifies your team using `league.team_key()`. If detection fails, use `config --team <ID>` to set it manually.\n\nFile v0.1.25:_meta.json\n\n{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.25\",\n  \"publishedAt\": 1777130910756\n}\n\nFile v0.1.25:requirements.txt\n\nyahoo_fantasy_api==2.12.2\n\nArchive v0.1.24: 8 files, 43863 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (68281b), scripts/formatters.py (45346b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), SKILL.md (17398b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nFile v0.1.24:SKILL.md\n\n---\nname: yahoo-fantasy-baseball\ndescription: >\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\n  free agents, draft results, transactions, and injuries. Daily roster\n  optimization detects inactive players and suggests bench swaps and IL moves.\n  Read-only — no roster modifications. Use when the user asks about their\n  fantasy baseball team, who to start or sit, league standings, available\n  free agents, or injury updates.\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"],\"env\":[\"YAHOO_CONSUMER_KEY\",\"YAHOO_CONSUMER_SECRET\"]}}}\n---\n\n# Yahoo Fantasy Baseball\n\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\n\n## Requirements\n\n- Python 3.10+\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\n\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\n\n```bash\npython3 yahoo-fantasy-baseball.py --setup\n```\n\n## Setup\n\n### 1. Create a Yahoo Developer App\n\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\n2. Click \"Create an App\"\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\n4. Copy the **Consumer Key** and **Consumer Secret**\n\n### 2. Authenticate\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\n```\n\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\n\n### 3. Find Your League\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\n```\n\n### 4. Set Defaults\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\n```\n\nThe skill auto-detects your team within the league. You can also set it explicitly:\n\n```bash\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\n```\n\n## Quick Start\n\n```bash\n# View your roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\n\n# Daily roster status (who's playing, who's off)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n\n# Get optimization suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n\n# League standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\n```\n\n## Commands\n\n### Data Commands (Read)\n\n```bash\n# Auth & Config\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3 --season 2026\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config\n\n# Leagues & Teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues [--season YEAR]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py teams\n\n# Roster & Lineup\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster [--date YYYY-MM-DD]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup [--week N]\n\n# Standings & Matchups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py matchup [--week N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py scoreboard [--week N]\n\n# Players & Draft\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py players [--search NAME] [--position POS] [--status FA|A|T|W|ALL] [--sort OR|AR|PTS|NAME|HR|ERA|...] [--sort-type season|lastweek|lastmonth] [--stat-season YEAR] [--count N]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py draft [--team ID]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py transactions [--type add,drop,trade] [--since 3d]\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py injuries\n\n# Lineup Check — confirmed MLB lineups vs fantasy roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check [--date YYYY-MM-DD]\n```\n\n### Daily Management\n\n```bash\n# Today: roster status with MLB schedule awareness (shortcut for 'day' with today's date)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Day: roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n```\n\nGroups your roster into ACTIVE (team playing), NOT PLAYING (team off), INJURED, and BENCH. Shows each player's eligible positions, game start times (local timezone), and flags probable starting pitchers. Displays \"First pitch\" time at the top so you know when to finalize your lineup. The `today` command is a shortcut for `day` with today's date.\n\n```bash\n# Standouts: yesterday's top performers across all league teams\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standouts [--date YYYY-MM-DD] [--min-points N] [--count N]\n```\n\nFetches daily player stats for all rostered players across every team in the league and identifies standout performances. Output is split into two sections:\n1. **Top Performers** — players in active lineup slots who scored the most fantasy points\n2. **Left on the Bench** — benched players with notable performances (points that didn't count)\n\nEach player shows their fantasy points, key stat line, and achievement badges (e.g., \"Multi-HR\", \"10+ K\", \"Gem\", \"CGSO\"). Defaults to yesterday; use `--date` for a specific date.\n\n```bash\n# Lineup check: verify active players are in confirmed MLB lineups\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py lineup-check --date 2026-04-01\n```\n\nCross-references active fantasy roster players against confirmed MLB batting lineups (from MLB Stats API `hydrate=lineups`). Flags position players who are in a starting fantasy slot but NOT in their team's confirmed real-life lineup (e.g., scratched, resting, benched vs lefty/righty). Pitchers are excluded (they don't appear in batting lineups). Players whose team's lineup hasn't been posted are NOT flagged — only players whose lineup IS posted and who are absent. Lineups are typically posted 1-3 hours before game time.\n\n```bash\n# Optimize: smart roster analysis with suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n```\n\nThree analysis categories:\n1. **Lineup changes** — optimal batter assignment via constraint solver (position-aware, fills restrictive slots before UTIL). Outputs grouped swap instructions showing who starts (from bench), who gets benched, and any intermediate position reshuffles needed within that chain (e.g., a UTIL player sliding to 1B to make room). Pure position shuffles among active slots (without bench involvement) are omitted. Also checks confirmed MLB batting lineups — players confirmed not in their team's lineup are treated as unavailable (score 0) and will be moved to bench. Players whose games have already started are locked in place (Yahoo locks roster slots at first pitch) and excluded from the solver.\n2. **Pitcher rotation** — priority-based pitcher slot optimization with swap suggestions. Relief pitchers whose teams are playing today are prioritized over non-starting SPs or pitchers whose teams are off. Probable starters get highest priority. Outputs grouped swap instructions (same format as batter swaps). Locked games are excluded.\n3. **IL management** — players with IL designations (IL, IL10, IL15, IL60) not in IL slots, cleared players still in IL. DTD players are excluded since Yahoo does not allow moving them to IL.\n\nEach move includes team, opponent, and score context. Moves to BN may include a `reason` indicator:\n- `⚠️` — player not in confirmed MLB lineup (urgent — they won't play)\n- `🔒` — player's game has already started (locked by Yahoo)\n- `📅` — player's team is off today\n\n**Early-season preseason rank blending:** The optimizer blends Yahoo's preseason overall rank (OR) into player scores during the first weeks of the season, when current-year stats are too small a sample to be reliable. The blending schedule:\n- **Weeks 1–2**: Full weight — preseason rank contributes up to 15 bonus points (rank 1 gets the max, last-ranked gets 0)\n- **Weeks 3–6**: Linear taper — preseason influence decreases by ~20% per week\n- **Week 7+**: Zero weight — scoring is based entirely on current-season stats\n\nThis prevents the optimizer from overreacting to small early-season slumps (e.g., benching a star who went 0-for-8 in the first series). The preseason ranks are fetched via one additional Yahoo API call (`sort=OR, status=T`) per optimize run.\n\n## Common Flags\n\n| Flag | Description |\n|------|-------------|\n| `--league ID` | League ID (overrides config default) |\n| `--team ID` | Team ID (overrides config/auto-detect) |\n| `--season YEAR` | Season year (for historical data) |\n| `--week N` | Scoring week number |\n| `--date` | Specific date — accepts MM/DD/YYYY, M/D/YYYY, MM-DD-YYYY, or YYYY-MM-DD (roster, day commands) |\n| `--format text\\|json\\|discord` | Output format (default: text) |\n| `--status FA\\|A\\|T\\|W\\|ALL` | Player status filter: FA (free agents), A (available=FA+W), T (taken), W (waivers), ALL (every player) |\n| `--sort OR\\|AR\\|PTS\\|NAME\\|{stat}` | Sort order: OR = overall/preseason rank (default), AR = actual/current rank, PTS = points, NAME = \n\nArchive v0.1.23: 8 files, 42537 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (62069b), scripts/formatters.py (43705b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), SKILL.md (17074b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nArchive v0.1.22: 8 files, 42577 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (62116b), scripts/formatters.py (43705b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), SKILL.md (17074b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)\n\nArchive v0.1.21: 8 files, 42512 bytes\n\nFiles: requirements.txt (26b), scripts/fantasy.py (62195b), scripts/formatters.py (43705b), scripts/mlb_client.py (15205b), scripts/yahoo_api.py (21800b), SKILL.md (16960b), yahoo-fantasy-baseball.py (2473b), _meta.json (142b)","readmeExcerpt":"Skill: yahoo-fantasy-baseball Owner: khaney64 Summary: Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization detects inactive players and suggests bench swaps and IL moves. Read-only — no roster modifications. Use when the user asks about their fantas Tags: latest:0.1.30 Version history: v0.1.30 | 2026-09-23T01:17:","codeSnippets":[],"executableExamples":[{"language":"bash","snippet":"python3 yahoo-fantasy-baseball.py --setup"},{"language":"bash","snippet":"python3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth"},{"language":"bash","snippet":"python3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues"},{"language":"bash","snippet":"python3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345"},{"language":"bash","snippet":"python3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3"},{"language":"bash","snippet":"# View your roster\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\n\n# Daily roster status (who's playing, who's off)\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\n\n# Roster status for a specific date\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\n\n# Get optimization suggestions\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\n\n# League standings\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py standings"}],"parameters":null,"dependencies":[],"permissions":[],"extractedFiles":[{"path":"SKILL.md","content":"---\r\nname: yahoo-fantasy-baseball\r\ndescription: >\r\n  Query your Yahoo Fantasy Baseball league: view roster, standings, matchups,\r\n  free agents, draft results, transactions, and injuries. Daily roster\r\n  optimization detects inactive players and suggests bench swaps and IL moves.\r\n  Read-only — no roster modifications. Use when the user asks about their\r\n  fantasy baseball team, who to start or sit, league standings, available\r\n  free agents, or injury updates.\r\nmetadata: {\"openclaw\":{\"emoji\":\"⚾\",\"requires\":{\"bins\":[\"python3\"]}}}\r\n---\r\n\r\n# Yahoo Fantasy Baseball\r\n\r\nQuery your Yahoo Fantasy Baseball league: view data and optimize your daily lineup via the Yahoo Fantasy Sports API. Read-only — no roster modifications are made.\r\n\r\n## Requirements\r\n\r\n- Python 3.10+\r\n- `yahoo_fantasy_api` — Yahoo Fantasy Sports API wrapper\r\n\r\n**Installation:** Before first use, run `--setup` to create a local `.deps/` virtual environment and install dependencies from `requirements.txt`. Subsequent runs reuse the existing venv. To force a clean reinstall, delete the `.deps/` directory and run `--setup` again.\r\n\r\n```bash\r\npython3 yahoo-fantasy-baseball.py --setup\r\n```\r\n\r\n## Setup\r\n\r\n### 1. Create a Yahoo Developer App\r\n\r\n1. Go to [https://developer.yahoo.com/apps/](https://developer.yahoo.com/apps/)\r\n2. Click \"Create an App\"\r\n3. Set **Redirect URI** to `oob` (out-of-band — Yahoo displays the auth code on screen instead of redirecting to a URL)\r\n4. Copy the **Consumer Key** and **Consumer Secret**\r\n\r\n### 2. Authenticate\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py auth\r\n```\r\n\r\nFollow the prompts to enter your Consumer Key and Secret. A browser window opens for Yahoo OAuth authorization. Tokens are cached automatically — you only need to do this once.\r\n\r\n### 3. Find Your League\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py leagues\r\n```\r\n\r\n### 4. Set Defaults\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345\r\n```\r\n\r\nThe skill auto-detects your team within the league. You can also set it explicitly:\r\n\r\n```bash\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py config --league 12345 --team 3\r\n```\r\n\r\n## Quick Start\r\n\r\n```bash\r\n# View your roster\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py roster\r\n\r\n# Daily roster status (who's playing, who's off)\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py today\r\n\r\n# Roster status for a specific date\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py day --date 2026-03-25\r\n\r\n# Get optimization suggestions\r\npython3 /home/claw/.openclaw/workspace/skills/yahoo-fantasy-baseball/yahoo-fantasy-baseball.py optimize\r\n\r\n# League standings\r\npython3 /home/claw/.ope"},{"path":"_meta.json","content":"{\n  \"ownerId\": \"kn79fcpv9w4xxjsxt6jwwqm87580e1t3\",\n  \"slug\": \"yahoo-fantasy-baseball\",\n  \"version\": \"0.1.30\",\n  \"publishedAt\": 1790126248252\n}"},{"path":"skill-card.md","content":"## Description:\n\nQuery a Yahoo Fantasy Baseball league for rosters, standings, matchups, free agents, draft results, transactions, injuries, and read-only daily roster optimization suggestions.\n\nThis skill is ready for commercial/non-commercial use.\n\n## Publisher:\n\n[khaney64](https://clawhub.ai/user/khaney64)\n\n### License/Terms of Use:\n\nMIT-0\n\n## Use Case:\n\nFantasy baseball managers and agents use this skill to inspect Yahoo league data, monitor daily roster availability, and generate lineup, pitcher rotation, and injured-list suggestions without applying roster changes.\n\n### Deployment Geography for Use:\n\nGlobal\n\n## Known Risks and Mitigations:\n\nRisk: The skill accesses Yahoo Fantasy Baseball data and stores Yahoo OAuth tokens locally.\n\nMitigation: Install and authenticate intentionally, use the documented credential path, and protect ~/.openclaw/credentials/yahoo-fantasy/.\n\nRisk: Lineup optimizer output could be mistaken for an applied roster change or definitive instruction.\n\nMitigation: Treat optimization output as advisory; review suggestions in Yahoo before making any roster move.\n\n## Reference(s):\n\n- [ClawHub skill page](https://clawhub.ai/khaney64/skills/yahoo-fantasy-baseball)\n- [Yahoo Developer Apps](https://developer.yahoo.com/apps/)\n- [yahoo-fantasy-api library](https://github.com/spilchen/yahoo_fantasy_api)\n- [MLB Stats API](https://statsapi.mlb.com/)\n\n## Skill Output:\n\n**Output Type(s):** [text, markdown, JSON, shell commands, configuration, guidance]\n\n**Output Format:** [Plain text, Discord-style Markdown code blocks, and structured JSON depending on the selected command format.]\n\n**Output Parameters:** [1D]\n\n**Other Properties Related to Output:** [Read-only recommendations; optimization suggestions are advisory and do not apply roster changes.]\n\n## Skill Version(s):\n\n0.1.30 (source: ClawHub release metadata)\n\n## Ethical Considerations:\n\nUsers should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment."},{"path":"requirements.txt","content":"yahoo_fantasy_api==2.12.2"}],"languages":[],"docsSourceLabel":"CLAWHUB","editorialOverview":"Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization detects inactive players and suggests bench swaps and IL moves. Read-only — no roster modifications. Use when the user asks about their fantas Skill: yahoo-fantasy-baseball Owner: khaney64 Summary: Query your Yahoo Fantasy Baseball league: view roster, standings, matchups, free agents, draft results, transactions, and injuries. Daily roster optimization detects inactive players and suggests bench swaps and IL moves. Read-only — no roster modifications. Use when the user asks about their fantas Tags: latest:0.1.30 Version history: v0.1.30 | 2026-09-23T01:17:","editorialQuality":{"score":100,"threshold":65,"status":"ready","wordCount":1667,"uniquenessScore":51,"reasons":[]}},"media":{"evidence":{"source":"no-media","verified":false,"confidence":"low","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":"No screenshots, media assets, or demo links are available."},"primaryImageUrl":null,"mediaAssetCount":0,"assets":[],"demoUrl":null},"ownerResources":{"evidence":{"source":"unclaimed","verified":false,"confidence":"low","updatedAt":"2026-10-09T23:48:37.960Z","emptyReason":"This page has not been claimed by the agent owner."},"hasCustomPage":false,"customPageUpdatedAt":null,"customLinks":[],"structuredLinks":{"docsUrl":null,"demoUrl":null,"supportUrl":null,"pricingUrl":null,"statusUrl":null},"customPage":null},"relatedAgents":{"evidence":{"source":"protocol-neighbors","verified":false,"confidence":"medium","updatedAt":"2026-10-10T04:59:10.323Z","emptyReason":null},"items":[{"id":"8ebccd8e-3863-4187-8355-c3f14e1f9edf","entityType":"agent","canonicalPath":"/agent/iofficeai-aionui","slug":"iofficeai-aionui","name":"AionUi","description":"Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!","url":"https://github.com/iOfficeAI/AionUi","homepage":"https://www.aionui.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-10-09T19:11:12.944Z","createdAt":"2026-02-25T03:38:16.584Z","downloads":null},{"id":"b917f68a-ebff-438e-84f8-3f4b2494c0bc","entityType":"agent","canonicalPath":"/agent/activepieces-activepieces","slug":"activepieces-activepieces","name":"activepieces","description":"AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents","url":"https://github.com/activepieces/activepieces","homepage":"https://www.activepieces.com","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-15T02:22:12.426Z","createdAt":"2026-02-25T03:38:12.412Z","downloads":null},{"id":"5cb26759-3a39-483f-94cf-276a98c13bb8","entityType":"agent","canonicalPath":"/agent/cherryhq-cherry-studio","slug":"cherryhq-cherry-studio","name":"cherry-studio","description":"AI productivity studio with smart chat, autonomous agents, and 300+ assistants. Unified access to frontier LLMs","url":"https://github.com/CherryHQ/cherry-studio","homepage":"https://cherry-ai.com","source":"GITHUB_REPOS","protocols":["MCP","OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-04-11T14:38:40.986Z","createdAt":"2026-02-25T03:38:19.379Z","downloads":null},{"id":"6f6582d0-5d76-4f0f-b81d-86520247950b","entityType":"agent","canonicalPath":"/agent/copilotkit-copilotkit","slug":"copilotkit-copilotkit","name":"CopilotKit","description":"The Frontend for Agents & Generative UI. React + Angular","url":"https://github.com/CopilotKit/CopilotKit","homepage":"https://docs.copilotkit.ai","source":"GITHUB_REPOS","protocols":["OPENCLAW"],"capabilities":[],"safetyScore":100,"overallRank":70,"updatedAt":"2026-03-25T09:50:57.846Z","createdAt":"2026-02-25T03:39:14.617Z","downloads":null}],"links":{"hub":"/agent","source":"/agent/source/clawhub","protocols":[{"label":"OpenClaw","href":"/agent/protocol/openclew"}]}}}