feature-engineering
Skill0 starsChanged 29 days agoMITView on GitHub
Builds leak-free model features for golf from BirdieAPI data: ratings as of a date, rolling strokes versus the field, field-strength adjusted form, course history with shrinkage, par-type splits, field and event features, with rules for time order and target definition. Use when the user is building a golf model and asks what features to use, how to compute form, how to avoid leakage, or how to structure a training table per golfer per tournament. Do not use for validating the model -- see walk-forward-validation. Do not use for the rating explanation -- see strokes-vs-field. Do not use for simulating tournaments -- see outright-model.
14 other projects use a version of this.
Adopted by
Most recently taken up by
- SSameer20/data-analyst-toolkittheir own version, first seen Nov 8, 2026
- Lu1sDV/skillsmdtheir own version, first seen Nov 4, 2026
- Harrypatria/data-mining-mltheir own version, first seen Nov 1, 2026
- berriosb/data-analytics-agentstheir own version, first seen Oct 20, 2026
- noahowsh/endzoneapi-mcptheir own version, first seen Oct 17, 2026
- PuckAPI/claude-sports-analyticstheir own version, first seen Oct 14, 2026
Used with
Projects with it also use mean-reversion and position-sizing.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
agiprolabsSkillmean-reversion
Mean-reversion strategy tools including Hurst exponent, half-life estimation, z-score signals, ADF testing, and Ornstein-Uhlenbeck modeling
Also in 3 projects that use this
Bhala-SrinivashSkillposition-sizing
Calculate optimal position sizes for NSE/BSE equity trades using fixed fractional, ATR-based, and Kelly criterion methods. Includes portfolio constraints and leverage adjustments.
Also in 3 projects that use this
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- skforecast/skforecast★ 1.5ksame name
- agiprolabs/claude-trading-skills★ 366same name
- brainbytes-dev/everything-claude-trading★ 16same name
- SSameer20/data-analyst-toolkit★ 4same name
- PuckAPI/claude-sports-analytics★ 3same name
- ffsshhttiikk/opencode-agents-skills★ 2same name
- gmanch94/claude-code-aidlc-template★ 2same name
- Harrypatria/data-mining-ml★ 2same name
- Lu1sDV/skillsmd★ 2same name
- noahowsh/acesapi-mcp★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- backtestingSkill
- birdieapi-toolSkill
- course-fitSkill
- dispatchSkill
- edge-detectionSkill
- hole-scoringSkill
- odds-analysisSkill
- odds-explorerSkill
- outright-modelSkill
- player-scoutingSkill
- probability-calibrationSkill
- strokes-vs-fieldSkill
- tournament-lookupSkill
- tournament-previewSkill
- walk-forward-validationSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 12 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 133
If the free tier is the budget, train on ratings and leaderboards only (2 credits each) and add rounds for a shortlist.
“Common” is measured: kept by at least 6 in 10 of the 12 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Feature Engineering
Default data tool: BirdieAPI (
birdieapi-tool).get_player_results(5 credits per player) is the workhorse: every round withadj_vs_field.get_ratings(2) withas_ofsupplies point-in-time ratings.get_leaderboard(2) supplies finishes.
You are an expert in building point-in-time features for golf. Your goal is a training table where every feature for a golfer-tournament row was knowable before round 1 of that tournament, and where the target is something with enough observations to learn from.
When to Use
- "What features should I use to predict who wins?"
- "How do I compute form without leaking the future?"
- "How should I lay out the training table?"
- Deciding whether course history, par-type splits or recent form belong in the model
When NOT to Use
- Splitting data and scoring -- see
walk-forward-validation - Explaining the rating -- see
strokes-vs-field - Running the simulation -- see
outright-model
Commands Available
| Command | What It Does | Credits |
get_player_results | Round-level strokes, field_avg, vs_field, adj_vs_field, finish, per tournament | 5 |
get_ratings | Rating at as_of | 2 |
get_leaderboard | The whole field, finishing order, cut status, rounds | 2 |
get_course_history | Record at an event or course | 5 |
get_player_stats | Season hole scoring, sg_par*, ball-striking lines | 5 |
list_tournaments | The event calendar and start_date for time ordering | 1 |
Commands That Do NOT Exist
| Not Available | Use Instead |
get_features, get_training_data | Build the table yourself from the calls above |
get_world_ranking_history | get_ratings at different as_of dates |
get_weather, get_tee_times, get_wave | Not available; do not feature them |
get_field for a future event | Not available |
The table
One row per golfer per tournament. Order by start_date.
| Column | Source | Note |
rating_asof | get_ratings with as_of = day before round 1 | the main feature |
weighted_rounds | same | confidence in the rating |
form_8, form_24 | get_player_results, last 8 and 24 rounds before this event | adj_vs_field mean |
form_trend | form_8 - form_24 | |
par3_split, par4_split, par5_split | get_player_stats for the prior season | sg_par*, score-based |
course_fit | get_course_history, shrunk (see course-fit) | only editions before this one |
n_prior_starts_event | same | |
days_since_last | list_tournaments / results dates | |
field_mean_rating, field_size | the field's ratings | event feature, shared by all rows |
is_major, tour | list_tournaments | |
| target | see below |
Targets
Winners are rare: one per event. Train on targets with enough data, then convert.
- Best: round-level
adj_vs_fieldfor each golfer-round. Thousands of rows per season. Predict the mean, estimate the spread, simulate winners (seeoutright-model). - Good: made cut (binary), top 10 (binary), finishing percentile.
- Last: winner (binary). Fewer than one positive per hundred rows. Use only for evaluation, not training, unless you pool many events.
How It Works
Step 1: Choose the unit and the clock. The clock is the tournament start_date. Every feature for a row uses data strictly before it.
Step 2: Rolling form with a shift.
import pandas as pd
# rounds: one row per golfer-round, columns: player_id, start_date, round, adj_vs_field
rounds = rounds.sort_values(["player_id", "start_date", "round"])
g = rounds.groupby("player_id")["adj_vs_field"]
rounds["form_8"] = g.transform(lambda s: s.shift(1).rolling(8, min_periods=4).mean())shift(1) is the leakage guard: a round's own score is never in its own feature. But within a tournament, round 3 can see round 2 of the same event, which is not available before round 1 of a pre-tournament model. For pre-tournament features, aggregate by tournament first and shift by tournament:
per_event = rounds.groupby(["player_id", "start_date"])["adj_vs_field"].mean().reset_index()
per_event["form_2ev"] = (per_event.groupby("player_id")["adj_vs_field"]
.transform(lambda s: s.shift(1).rolling(2, min_periods=1).mean()))Step 3: Point-in-time ratings. Pull get_ratings with as_of for each event date, keyed to the day before round 1. One call returns up to 500 players, so one call per event. For 30 events that is 60 credits.
get_ratings {"as_of": "2024-04-04", "limit": 500, "min_rounds": 20}Step 4: Course history inside the clock. For event edition E, include only editions before E. The summary returned by get_course_history covers every edition, so do not use summary for training rows; recompute from editions filtered to earlier dates.
Step 5: Season-level stats. get_player_stats returns a full season. For an event in April 2024 use 2023, not 2024. The 2024 line already contains the event.
Step 6: Field features. Field mean rating and size are event-level. For the cut and for the winner probability, the strength of the competition matters as much as a golfer's own number.
Leakage checklist
| Leak | How it happens | Fix |
| Today's rating on a past row | get_ratings without as_of | as_of day before |
| Season stats for the same season | get_player_stats season = event year | use the prior season |
get_course_history summary | Includes the target edition | rebuild from editions |
| Rolling window without shift | Row includes its own round | shift(1) and tournament-level shifts |
| Random split | Same tournament in train and test | split by date |
| Field proxy from results | Using the finished leaderboard as the pre-event field | the priced list or the user's list |
Cross-tour features
Ids are shared across tours, so a LIV golfer's PGA Tour history joins on player_id. Ratings are not comparable across tours. Add tour as a feature, or fit separately, and treat cross-tour golfers with wider uncertainty.
Credit Usage
| Operation | Credits | Notes |
| Ratings for 30 events | 60 | one call per event |
| Rounds for 100 golfers | 500 | one call per golfer; exceeds the free tier |
| Course history for the top 20 in one event | 100 |
If the free tier is the budget, train on ratings and leaderboards only (2 credits each) and add rounds for a shortlist.
Anti-patterns
| What Claude Might Do | Why It's Wrong | Do This Instead |
| Predict the winner label directly | About 1 positive per 100 rows | Predict round scores, simulate |
| Use finishing position as the target | Depends on field size | Use strokes versus the field or percentile |
| Hand-pick features after seeing test results | Selection leakage | Fix the list before the test period |
| Standardise on the full dataset | Test statistics leak into train | Fit scalers in the training window |
| Many highly correlated form windows | Overfit with few tournaments | Two or three windows |
Output Format
Training table: <N> golfer-events, <first season>-<last season>, one row per golfer per event
Features: rating_asof, weighted_rounds, form_8, form_24, par5_split, course_fit (shrunk), field_mean_rating
Target: mean adj_vs_field per round (regression), winners kept for evaluation
Leakage checks: ratings as_of day before round 1; season stats from prior season; no random splitWhat to Do Next
| What You Built | Next Action | Skill |
| A feature table | Validate in time order | walk-forward-validation |
| A model | Simulate winners | outright-model |
| Probabilities | Check calibration | probability-calibration |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

