# Build PyTorch Models with an ML Specialist

Machine learning implementation often needs architecture, training, and validation choices aligned together. This skill gives Claude, Codex, and Claude Code a specialist workflow for PyTorch delivery.

## Install

```bash
npx skillstore add dnyoussef/ml-expert
```

## Metadata

- Status: approved
- Slug: dnyoussef-ml-expert
- Skillstore revision: r1
- Version status: missing
- Tree hash: c35c259217735bb898330d5e5239406940cd7d530f3a8edcb84f06b23f98b7fb
- Author: DNYoussef
- GitHub username: DNYoussef
- License: MIT
- Repository: https://github.com/DNYoussef/ai-chrome-extension/tree/main/.claude/skills/ml-expert
- Ref: c579efd02184f1128d6741d16e6c8d951d7d4208
- Supported tools: Claude, Codex, Claude Code
- Audit status: complete
- Agent install advisory: allowed
- Manual install advisory: allowed
- Artifact signature: available
- Audit attestation: unavailable
- Human verification: not\_verified
- Risk factors: external\_commands
- Quality score: 78
- Quality tier: bronze
- Public page: https://skillstore.pages.dev/skills/dnyoussef-ml-expert
- Manifest: https://skillstore.pages.dev/api/skills/dnyoussef-ml-expert/manifest

## Capabilities

- Guides PyTorch model architecture design with modules, configs, and parameter budgeting.
- Plans training loops, checkpointing, validation, and optimizer choices.
- Reviews performance options such as torch.compile, gradient checkpointing, and memory reduction.
- Defines testing expectations for shapes, gradients, integration, and parameter counts.
- Formats implementation plans, progress updates, and final delivery summaries.
- Coordinates fixes from ML training debugging outputs.

## Use Cases

- Implement a New Model Architecture: Turn architecture requirements into a PyTorch implementation plan with modules, configs, tests, and documentation.
- Repair Training Behavior: Apply targeted fixes to training components after a diagnosis, then define tests that confirm the issue is resolved.
- Prepare Production ML Code: Review model code for performance, memory use, testing coverage, and delivery readiness before integration.

## Prompt Templates

### Create a Starter Model

```
Design a PyTorch model for [task]. Include the module structure, config fields, expected inputs, and basic tests.
```

### Fix Training Instability

```
My model has [symptom] during training. Review the likely causes, propose a fix, and define validation tests.
```

### Optimize Inference Performance

```
Optimize this PyTorch model for [latency or memory target]. Preserve behavior and include benchmarking guidance.
```

### Implement a Research Architecture

```
Implement the architecture from [paper or notes] with [parameter budget], [hardware limit], and full tests.
```

## Limitations

- The audited package contains guidance prompts, not executable helper scripts or templates.
- Generated implementations still need local review, tests, and dependency checks.
- Architecture details may require papers, existing code, or user clarification.
- Performance estimates depend on hardware, dataset size, and runtime configuration.

## Best Practices

- Provide architecture constraints, hardware limits, and expected inputs before requesting implementation.
- Ask for tests that cover shapes, gradients, integration, and parameter counts.
- Review generated changes locally before training on real data or deploying the model.

## Anti Patterns

- Do not request large architecture changes without a parameter budget or target hardware.
- Do not accept performance claims without reproducible benchmark settings.
- Do not skip tests for gradient flow, checkpoint loading, and train or eval mode behavior.

## Security Audit

- Audited at: 2026-07-05T13:43:59.854\+00:00
- Summary: AI review found the static alerts are false positives caused by Markdown code fences, inline code references, and normal ML terminology. No evidence found of Ruby or shell backtick execution, network reconnaissance, data exfiltration, prompt injection, or malicious intent in the scanned files.

## Stats

- Views: 209
- Downloads: 8
- Favorites: 0
- Popularity score: 0
