affaan-m/ECC/skills/ml-adoption-playbook/SKILL.md
ml-adoption-playbook
End-to-end methodology for AI agents and software engineers to add machine learning algorithms to existing non-ML codebases. Covers problem framing, data readiness, architectural decoupling, and baseline model integration.
- Source repository stars
- 234,327
- Declared platforms
- 0
- Static risk flags
- 0
- Last source update
- 2026-07-27
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
This skill provides an adaptive methodology for implementing machine learning models into existing software engineering projects. It bridges the gap between traditional SWE and MLOps by structuring how ML should be researched, decoupled, trained, and integrated.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/affaan-m/ECC --skill "skills/ml-adoption-playbook"Inspect the Agent Skill "ml-adoption-playbook" from https://github.com/affaan-m/ECC/blob/4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38/skills/ml-adoption-playbook/SKILL.md at commit 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Phase 1: Problem Framing & Feasibility
Before writing model code, establish the "why" and "how". - Heuristic Check: Ask the user if a simple heuristic (e.g., regex, rule-based sorting) could solve the problem faster. If yes, start there. - Metric Definition: Define what business metric the ML model is trying to impro…
Heuristic Check: Ask the user if a simple heuristic (e.g., regex, rule-based sorting) could solve the problem faster. If yes, start there.Metric Definition: Define what business metric the ML model is trying to improve (e.g., click-through rate, reduced latency).Mistake Budget: Define what a "bad" prediction looks like and how the system should handle it. - 02
Phase 2: Data Readiness
ML is useless without clean, accessible data. - Audit Data Sources: Identify where the training data lives. Is it a live database, a static CSV, or an API? - Data Contract: Establish a schema for the input data. What features are required? What happens if a feature is missing? -…
Audit Data Sources: Identify where the training data lives. Is it a live database, a static CSV, or an API?Data Contract: Establish a schema for the input data. What features are required? What happens if a feature is missing?Leakage Prevention: Ensure the user's proposed data split does not accidentally leak future information into the training set (e.g., chronological splitting for time-series data). - 03
Phase 3: Architectural Integration & Decoupling
Do not tightly couple model inference to core business logic. - API Boundary: Suggest placing the model behind an API endpoint (e.g., using fastapi-patterns or django-patterns) or a dedicated service class. - Fallback Mechanisms: Design a default state. If the model takes too lo…
API Boundary: Suggest placing the model behind an API endpoint (e.g., using fastapi-patterns or django-patterns) or a dedicated service class.Fallback Mechanisms: Design a default state. If the model takes too long to respond or throws an error, the system must gracefully fall back to a hardcoded rule.Feature Flags: Wrap the new ML inference call in a feature flag so it can be rolled out (or rolled back) safely. - 04
Phase 4: Model Implementation & Training
Structure the code for reproducibility and iteration. - Start Simple: Build a baseline model first (e.g., a simple scikit-learn Logistic Regression or a barebones PyTorch linear layer). - Reproducibility: Apply pytorch-patterns or similar best practices: fix random seeds, make c…
Start Simple: Build a baseline model first (e.g., a simple scikit-learn Logistic Regression or a barebones PyTorch linear layer).Reproducibility: Apply pytorch-patterns or similar best practices: fix random seeds, make code device-agnostic, and explicitly document tensor/array shapes.Automated Evidence: Require tests for the data transforms and inference schema. Do not accept a model without an evaluation script comparing it against the baseline. - 05
Phase 5: Handoff to MLOps
Once the baseline model is integrated, shift focus to continuous operations. - Refer to mle-workflow: Guide the user toward setting up experiment tracking, model registries, and drift detection. - CI/CD: Add the model evaluation step to the existing CI pipeline to ensure future…
Refer to mle-workflow: Guide the user toward setting up experiment tracking, model registries, and drift detection.CI/CD: Add the model evaluation step to the existing CI pipeline to ensure future commits do not degrade model performance.Once the baseline model is integrated, shift focus to continuous operations. - Refer to mle-workflow: Guide the user toward setting up experiment tracking, model registries, and drift detection. - CI/CD: Add the model e…
Permission review
Static risk signals and limitations
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 75/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 234,327 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- affaan-m/ECC
- Skill path
- skills/ml-adoption-playbook/SKILL.md
- Commit
- 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38
- License
- MIT
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
ML Adoption Playbook
This skill provides an adaptive methodology for implementing machine learning models into existing software engineering projects. It bridges the gap between traditional SWE and MLOps by structuring how ML should be researched, decoupled, trained, and integrated.
When to Activate
- A user asks to "add ML" or "add an algorithm" to their existing codebase.
- Planning the integration of a new model (e.g., recommendation, classification, forecasting) into a non-ML application.
- Structuring a workflow for an agent to build, train, and deploy an ML component adaptively.
Phase 1: Problem Framing & Feasibility
Before writing model code, establish the "why" and "how".
- Heuristic Check: Ask the user if a simple heuristic (e.g., regex, rule-based sorting) could solve the problem faster. If yes, start there.
- Metric Definition: Define what business metric the ML model is trying to improve (e.g., click-through rate, reduced latency).
- Mistake Budget: Define what a "bad" prediction looks like and how the system should handle it.
Phase 2: Data Readiness
ML is useless without clean, accessible data.
- Audit Data Sources: Identify where the training data lives. Is it a live database, a static CSV, or an API?
- Data Contract: Establish a schema for the input data. What features are required? What happens if a feature is missing?
- Leakage Prevention: Ensure the user's proposed data split does not accidentally leak future information into the training set (e.g., chronological splitting for time-series data).
Phase 3: Architectural Integration & Decoupling
Do not tightly couple model inference to core business logic.
- API Boundary: Suggest placing the model behind an API endpoint (e.g., using
fastapi-patternsordjango-patterns) or a dedicated service class. - Fallback Mechanisms: Design a default state. If the model takes too long to respond or throws an error, the system must gracefully fall back to a hardcoded rule.
- Feature Flags: Wrap the new ML inference call in a feature flag so it can be rolled out (or rolled back) safely.
Phase 4: Model Implementation & Training
Structure the code for reproducibility and iteration.
- Start Simple: Build a baseline model first (e.g., a simple scikit-learn Logistic Regression or a barebones PyTorch linear layer).
- Reproducibility: Apply
pytorch-patternsor similar best practices: fix random seeds, make code device-agnostic, and explicitly document tensor/array shapes. - Automated Evidence: Require tests for the data transforms and inference schema. Do not accept a model without an evaluation script comparing it against the baseline.
Phase 5: Handoff to MLOps
Once the baseline model is integrated, shift focus to continuous operations.
- Refer to
mle-workflow: Guide the user toward setting up experiment tracking, model registries, and drift detection. - CI/CD: Add the model evaluation step to the existing CI pipeline to ensure future commits do not degrade model performance.
Iterative Agent Workflow
When assisting a user via this playbook, agents should:
- Ask clarifying questions to complete Phase 1 before proposing architectures.
- Draft a data contract in Phase 2 for user approval.
- Write the decoupling interface (API/Service) in Phase 3 before writing the training loop.
- Deliver a reproducible script in Phase 4 that trains the model and saves the artifact.
Alternatives
Compare before choosing
event4u-app/agent-config
design-review
Use when the user says "review the design", "check the UI", or wants a comprehensive UI/UX review. Uses a 7-phase methodology covering interaction, responsiveness, accessibility, and more.
K-Dense-AI/scientific-agent-skills
dask
Distributed computing for larger-than-RAM pandas/NumPy workflows. Use when you need to scale existing pandas/NumPy code beyond memory or across clusters. Best for parallel file processing, distributed ML, integration with existing pandas code. For out-of-core analytics on single machine use vaex; for in-memory speed use polars.
K-Dense-AI/scientific-agent-skills
medchem
Medicinal chemistry filters for compound triage. Apply drug-likeness rules (Lipinski, Veber, CNS), structural alert catalogs (PAINS, NIBR, ChEMBL), complexity metrics, and the medchem query language for library filtering.
K-Dense-AI/scientific-agent-skills
neurokit2
Use NeuroKit2 to build or audit reproducible research workflows for physiological time-series preprocessing, event/interval analysis, multimodal alignment, variability, and complexity. Trigger when code imports neurokit2 or needs its current APIs, schemas, and method-aware validation—not for diagnosis or device validation.