check-outdated-practices
Skill160 starsChanged 6 months agoMITView on GitHub
Check ETL step files for outdated coding patterns and offer to fix them. Use when user mentions outdated practices, legacy code patterns, modernizing steps, or wants to check code quality of ETL steps.
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 36
When applying fixes, keep these notes in mind:
- Very specific: line 40
Linting: After fixing patterns, always run make check (or let the code-quality-fixer agent handle it).
- Very specific: line 45
Run node vscode_extensions/detect-outdated-practices/src/cli.mts <paths> --json on them
- Distinctive: line 52
Ask the user: "Found N outdated patterns.
- Very specific: line 53
If yes, apply the modern replacements described in each finding's message and show a summary of changes.
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Check Outdated Practices
Scan ETL step files for outdated coding patterns and offer to fix them.
Source of truth
The rules live in vscode_extensions/detect-outdated-practices/src/detector.mts, the same module the VS Code extension uses for its editor warnings. Run the detector; never re-implement it with grep. Not every rule is a per-line regex: the ds["table"] subscript-read rule tracks which variables hold a Dataset across the file, so grepping the OUTDATED_PATTERNS regexes silently misses it.
node vscode_extensions/detect-outdated-practices/src/cli.mts <file-or-dir> [...] # file:line:column: problem
node vscode_extensions/detect-outdated-practices/src/cli.mts <file-or-dir> [...] --json # adds each rule's full fix guidanceIt takes files or directories (recursing into .py files), applies each rule's path scope against the repo-relative path, and needs only Node 22.18 or later — no build step, no npm install. If it can't run (older Node), say so and stop rather than falling back to grep.
Scope
By default, check the files involved in the current task (e.g., the steps being updated). If the user provides explicit paths or asks for a broader scan, use those instead.
Accept any of:
- A step path:
etl/steps/data/garden/wb/2026-03-25/poverty_projections.py - A namespace/version/short_name:
wb/2026-03-25/poverty_projections - A glob:
etl/steps/data/garden/wb/2026-03-25/*.py all— passetl/steps/data snapshots(a few seconds). That includes step files of retired versions still in the repo, so filter the report to active steps (dag/*.yml) unless the user wants everything.
Fix guidance
When applying fixes, keep these notes in mind:
paths.regions.harmonize_names(tb):country_col,countries_file, andexcluded_countries_fileare all inferred by default — it assumes the column is"country", uses the step's.countries.json, and (when the file exists) the step's.excluded_countries.json. So a call that passes only those three defaults collapses topaths.regions.harmonize_names(tb); only pass an argument when you're overriding the default. The fallbacks come from theRegionsinstancePathFinderbuilds (self.countries_file/self.excluded_countries_fileinetl/helpers.py, defaulted insideharmonize_names) —excluded_countries_fileis wired only when the.excluded_countries.jsonis present, so dropping it is behavior-preserving exactly when the file exists. Preserve any non-default kwargs (warn_on_unused_countries,make_missing_countries_nan, etc.).ds["table"]→ds.read("table"):read()resets the index by default, sods["table"].reset_index()becomes plainds.read("table")— keeping the trailing.reset_index()adds a spuriousindexcolumn. Where the step needs the index kept (typically a grapher step passing tables straight tocreate_dataset), useds.read("table", reset_index=False). Keep anysafe_types=Falsethe step already relies on for large tables. After the swap, rebuild the step and confirm the output tables keep their index and shape.- Linting: After fixing patterns, always run
make check(or let the code-quality-fixer agent handle it). In particular, don't leave extra blank lines between imports — follow the project's import style (no blank lines within import groups, one blank line between standard library and third-party groups).
Workflow
- Identify the files to scan based on the user's scope
- Run
node vscode_extensions/detect-outdated-practices/src/cli.mts <paths> --jsonon them - Report findings as a summary table, using each finding's
messagefor the issue:| File | Issue | Line | |------|-------|------| | snapshots/wb/.../file.py | <message from extension> | 29 | - Ask the user: "Found N outdated patterns. Fix them?"
- If yes, apply the modern replacements described in each finding's
messageand show a summary of changes. Re-run the detector on the edited files to confirm they come back clean.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/instructions/copilot-instructions.mdCopilot instructions
- add-gdp-scatterSkill
- add-ivs-indicatorsSkill
- add-provider-regionsSkill
- babysit-prSkill
- check-chart-previewSkill
- check-empty-entitiesSkill
- check-hardcoded-yearsSkill
- check-metadata-styleSkill
- check-metadata-typosSkill
- create-chartSkill
- create-datasetSkill
- create-etl-stepsSkill
- create-explorerSkill
- create-snapshotSkill
- create-static-vizSkill
- develop-vscode-extensionSkill
- develop-wizard-appSkill
- draft-data-update-slack-postSkill
- edit-faust-metadataSkill
- fact-check-datasetSkill
- find-chart-referencesSkill
- fix-dependabotSkill
- generate-metadataSkill
- map-charts-to-mdimSkill
- map-explorer-to-mdimSkill
- migrate-explorer-to-etlSkill
- profile-etl-stepSkill
- query-grapher-dbSkill
- remap-ghost-variablesSkill
- report-indicator-changesSkill
- review-data-prSkill
- sync-grapher-schemaSkill
- tool-owlSkill
- update-climate-dataSkill
- update-datasetSkill
- update-wildfires-dataSkill
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.

