跳到正文
cccskills
免费在 GitHub 公开

ml-adoption-playbook

Add machine learning to an existing application through a structured workflow. The skill guides problem definition, data checks, separation from business logic, and training and evaluation of a simple initial model.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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. Use when adding a machine learning capability to a codebase that has none, from problem framing through a baseline model.

查看安装方法

适用场景

  • Adding recommendations to an existing application
  • Checking whether training data is ready
  • Integrating a prediction model with fallback rules
  • Preparing reproducible training and evaluation scripts

包含的文件(1)

  • SKILL.md3.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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

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 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:

  1. Ask clarifying questions to complete Phase 1 before proposing architectures.
  2. Draft a data contract in Phase 2 for user approval.
  3. Write the decoupling interface (API/Service) in Phase 3 before writing the training loop.
  4. Deliver a reproducible script in Phase 4 that trains the model and saves the artifact.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Design and audit interfaces for Web, iOS, and Android using WCAG 2.2 accessibility guidance. Check screen-reader labels, keyboard navigation, contrast, and control sizes to identify barriers and guide implementation for people using assistive technology.

中文简介正在准备中。当前显示英语简介。

  • Adding descriptive labels to icon-only buttons
  • Reviewing keyboard navigation and modal focus
  • Checking contrast and control sizes
affaan-m/ECC28.3万2026年10月16日 更新

Investigate unreliable AI agents across 12 layers, including instructions, memory, tool execution, and display. Use code and logs to trace failures, rank findings by severity, and produce an ordered repair plan that prioritizes code changes.

中文简介正在准备中。当前显示英语简介。

  • Investigating failures that appear only inside an agent application
  • Tracing old conversation content leaking into new sessions
  • Checking skipped or falsely claimed tool execution
affaan-m/ECC28.3万2026年10月16日 更新

Compare coding agents on tasks from your own codebase. Define success checks, run agents in separate Git working directories, and report pass rates, available API costs, completion time, and consistency across repeated trials.

中文简介正在准备中。当前显示英语简介。

  • Comparing coding agents on real development tasks
  • Evaluating a new tool or model before adoption
  • Checking performance after agent updates
affaan-m/ECC28.3万2026年10月16日 更新

Design and refine an AI agent’s available actions, tool inputs, and result formats. Define recovery steps for errors, manage the information kept in context, and evaluate changes through completion rates, retries, and cost per successful task.

中文简介正在准备中。当前显示英语简介。

  • Define an AI agent’s tool set and input formats
  • Make tool results and next steps easier to interpret
  • Specify safe retries and stopping conditions
affaan-m/ECC28.3万2026年10月16日 更新

Diagnose failed AI agent runs by capturing errors, checking likely causes, and choosing small, reversible recovery actions. The workflow produces a structured report of the failure, recovery steps, and evidence, helping explain repeated retries or stalled progress.

中文简介正在准备中。当前显示英语简介。

  • Diagnosing repeated tool calls with no progress
  • Investigating quality loss as context grows
  • Checking file paths and environment mismatches
affaan-m/ECC28.3万2026年10月16日 更新

Diagnose AI agent runs that fail repeatedly, loop through tools, or lose track of the task. Capture errors and environment details, test a focused recovery action, and produce a report explaining the evidence and outcome.

中文简介正在准备中。当前显示英语简介。

  • Diagnosing repeated failures in an agent run
  • Investigating loops through the same tool calls
  • Reviewing output degradation as context grows
affaan-m/ECC28.3万2026年10月5日 更新

查看 affaan-m 的全部技能

报告此技能的问题