agentleFS
DoubleMLDoubleML/doubleml-for-py/.claude/skills/techdebt/SKILL.md

techdebt

Skill795 starsChanged 4 months agoBSD-3-ClauseView on GitHub

Find and fix technical debt in DoubleML codebase. Checks for code smells, type issues, style violations, and outdated patterns.

We split this skill into the rules it gives an agent

2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use of Any where specific types are possible

    line 15
  2. Distinctive:

    Import ordering issues (ruff rule I)

    line 27

“Common” is measured: kept by at least 6 in 10 of the 7 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Technical Debt Finder for DoubleML

Identify and fix technical debt aligned with project standards.

Project-Specific Checks

Type Annotations (MyPy Strict Mode)

  • Missing type hints on functions (disallow_untyped_defs = true)
  • Missing return type annotations
  • Use of Any where specific types are possible
  • Old-style typing (typing.List → list, typing.Dict → dict)
  • Missing from __future__ import annotations for forward references

Docstrings (NumPy Style)

  • Missing docstrings on public functions/classes
  • Incorrect docstring format (must be NumPy-style)
  • Missing Parameters, Returns, or Raises sections
  • Outdated parameter documentation

Code Style (Black + Ruff)

  • Lines exceeding 127 characters
  • Import ordering issues (ruff rule I)
  • Unused imports (ruff rule F401)
  • Undefined names (ruff rule F821)
  • Old-style string formatting (use f-strings)

Scikit-learn Compatibility

  • Learners missing fit()/predict() interface
  • Classifiers missing predict_proba() for propensity scores
  • Missing clone() compatibility

DoubleML Patterns

  • Inconsistent use of _check_learner() for validation
  • Missing score function validation with _check_score()
  • Incorrect sample splitting structure
  • Missing psi_a/psi_b score elements

Workflow

  1. Run Automated Checks
    # Type checking
    mypy
    
    # Linting
    ruff check .
    
    # Format check (dry-run)
    black --check .
  2. Scan for Code Smells
    • Functions longer than 50 lines
    • More than 5 parameters
    • Deep nesting (> 3 levels)
    • Duplicate code blocks
    • Magic numbers without constants
  3. Check for Dead Code
    • Unused imports
    • Unused functions/classes
    • Commented-out code blocks
    • Unreachable code paths
  4. Report Findings Format: file_path:line_number - [severity] description
  5. Fix Issues
    • Auto-fix with ruff check --fix .
    • Auto-format with black .
    • Manual fixes for type hints and docstrings
  6. Verify
    ruff check .
    mypy
    pytest -m ci  # Run CI tests

Severity Levels

SeverityDescriptionExamples
highBreaks CI or type safetyMissing type hints, mypy errors
mediumStyle violationsLine length, import order
lowCode smellsLong functions, magic numbers

Arguments

Specify scope to focus the scan:

  • /techdebt - Scan entire doubleml/ package
  • /techdebt doubleml/plm/ - Scan PLM module
  • /techdebt doubleml/utils/_checks.py - Scan specific file

Output Format

## Technical Debt Report

### High Severity
- `doubleml/plm/plr.py:45` - Missing return type annotation
- `doubleml/utils/_checks.py:123` - Type hint uses `typing.List`

### Medium Severity
- `doubleml/did/did.py:89` - Line exceeds 127 characters
- `doubleml/irm/irm.py:12` - Unused import `warnings`

### Low Severity
- `doubleml/double_ml.py:234` - Function has 67 lines (>50)
- `doubleml/utils/resampling.py:45` - Magic number `5` should be constant

### Fixed
- ✓ Auto-fixed 3 import ordering issues
- ✓ Auto-formatted 2 files with black

### Remaining
- 2 high severity items need manual fixes
- Consider refactoring `_nuisance_est()` in next session

Download now (ZIP)

  • Other versions13 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 13

    1. DataDog/dd-trace-java★ 738same name
    2. chenzhen7/akari★ 232same name
    3. jh941213/ADLC-harness★ 125same name
    4. jh941213/my-cc-harness★ 125same name
    5. jh941213/my-claude-code-asset★ 125same name
    6. aromanarguello/roman-skills★ 18same name
    7. rayketcham-lab/qn-claude-web★ 2same name
    8. almax000/claude-skills★ 1same name
    9. LucasCooperBey/claude-skills★ 1same name
    10. renatorozas/claude-code-config★ 1same name

    3 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.

  • Used alongsideProjects with it also use docs-ci, docs-interfaces and 10 more.

    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.
    • jh941213Skill

      docs-ci

      문서 CI(링크·OpenAPI lint·breaking 게이트·mermaid 검증)나 문서 드리프트 감지(docs.yaml 신선도 검사)를 설치하거나 돌릴 때 사용. 문서 내용 작성은 docs-architecture·docs-interfaces·docs-manuals.

      Also in 3 projects that use this

    • jh941213Skill

      docs-interfaces

      API·이벤트 인터페이스 문서(OpenAPI·swagger·AsyncAPI 명세, 엔드포인트 레퍼런스, API 구성도·시퀀스, API CHANGELOG)를 만들거나 코드와 맞출 때 사용. 시스템 구성도는 docs-architecture, API 설계 원칙은 api-design-principles.

      Also in 3 projects that use this

    • RachaelQuiselSkill

      client-docs

      Client documentation. Use when a build needs documentation updates or missing project documents need to be identified.

      Also in 3 projects that use this

    • planailabsSkill

      docs-architecture

      Layout, build pipeline, and structural gotchas for this dual-Astro repo. Read before changing structure, routing, or adding content. Operational/dev-server questions → dev-build skill.

      Also in 3 projects that use this

    • yu-iskwSkill

      test-and-fix

      Run unit tests and automatically fix code failures, regression bugs, or test mismatches. Use when tests are failing, after implementing new features, or to repair "broken" tests.

      Also in 3 projects that use this

    • llama-farmSkill

      commit-push-pr

      Commit changes, push to GitHub, and open a PR. Includes quality checks (security, patterns, simplification). Use --quick to skip checks.

      Also in 5 projects that use this

    • +4 more from jh941213
  • In this repository3 other files it gives its agents.

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.