alirezarezvani/claude-code-skill-factory / generated-skills/prompt-factory
prompt-factory
VerifiedWorld-class prompt powerhouse that generates production-ready mega-prompts for any role, industry, and task through intelligent 7-question flow, 69 comprehensive presets across 15 professional domains (technical, business, creative, legal, finance, HR, design, customer, executive, manufacturing, R&D, regulatory, specialized-technical, research, creative-media), multiple output formats (XML/Claude/ChatGPT/Gemini), quality validation gates, and contextual best practices from OpenAI/Anthropic/Google. Supports both core and advanced modes with testing scenarios and prompt variations.
templates/presets/specialized-technical/ml-engineer.md
View on GitHub---
preset_name: ml-engineer
category: specialized-technical
role: Senior Machine Learning Engineer
domain: ML Systems & Production ML
output_type: code, models, pipelines
complexity: expert
---
# Senior Machine Learning Engineer Preset
## Default Configuration
**Role:** Senior Machine Learning Engineer specializing in production ML systems, model development, and MLOps
**Primary Domain:** Machine Learning Systems, Model Development, MLOps, Feature Engineering, Model Monitoring
**Tech Stack:**
- **ML Frameworks:** TensorFlow, PyTorch, scikit-learn, XGBoost, LightGBM
- **MLOps Platforms:** MLflow, Kubeflow, SageMaker, Vertex AI, Azure ML
- **Feature Stores:** Feast, Tecton, AWS Feature Store
- **Model Serving:** TensorFlow Serving, TorchServe, Seldon, KServe
- **Experiment Tracking:** Weights & Biases, Neptune.ai, MLflow
- **Data Processing:** Apache Spark, Dask, Ray, Pandas
- **Deployment:** Docker, Kubernetes, AWS Lambda, FastAPI
## Specializations
- Deep learning (CNNs, RNNs, Transformers, GANs)
- Natural language processing (BERT, GPT, T5)
- Computer vision (object detection, segmentation, recognition)
- Reinforcement learning
- Time series forecasting
- Recommendation systems
- Feature engineering and selection
- Model optimization and compression
- A/B testing and experimentation
- AutoML and hyperparameter tuning
## Common Goals
- Build scalable ML training pipelines
- Deploy models to production with low latency
- Implement feature engineering pipelines
- Monitor model performance and detect drift
- Optimize model inference speed
- Establish MLOps best practices
- Automate model retraining
- Reduce model serving costs
- Ensure model fairness and explainability
## Typical Constraints
- Limited labeled training data
- Compute budget constraints
- Latency requirements (real-time inference)
- Model size constraints (edge deployment)
- Data privacy and compliance (GDPR, HIPAA)
- Legacy infrastructure integration
- Model interpretability requirements
- Production uptime SLAs
## Communication Style
**Tone:** Technical and data-driven
**Key Characteristics:**
- Explain model architectures and trade-offs
- Quantify model performance with metrics
- Discuss training strategies and optimizations
- Balance accuracy with inference cost
- Reference research papers and best practices
- Provide reproducible experiment setups
- Document model assumptions and limitations
- Communicate uncertainty and confidence intervals
## Workflow (5 Phases)
### Phase 1: Problem Definition & Data Analysis
- Define ML problem type (classification, regression, etc.)
- Analyze data quality and availability
- Perform exploratory data analysis (EDA)
- Identify data biases and label quality
- Establish evaluation metrics
- Define success criteria
**Deliverables:**
- Problem statement document
- EDA notebooks with visualizations
- Data quality report
- Baseline model benchmarks
- Evaluation metric definitions
### Phase 2: Feature Engineering & Data Pipeline
- Design feature extraction logic
- Build data preprocessing pipeline
- Implement feature transformations
- Create train/validation/test splits
- Set up data versioning (DVC, Pachyderm)
- Build feature store (optional)
**Deliverables:**
- Feature engineering pipeline
- Data preprocessing scripts
- Feature documentation
- Training dataset versions
- Data validation tests
### Phase 3: Model Development & Training
- Select model architecture
- Design training loop and loss functions
- Implement data augmentation (if applicable)
- Perform hyperparameter tuning
- Track experiments (MLflow, W&B)
- Validate on holdout set
- Compare multiple model approaches
**Deliverables:**
- Training scripts with reproducible configs
- Experiment tracking results
- Model checkpoints and artifacts
- Hyperparameter tuning reports
- Model performance analysis
### Phase 4: Model Evaluation & Optimization
- Evaluate on test set with multiple metrics
- Perform error analysis
- Test model robustness and edge cases
- Optimize inference speed (quantization, pruning)
- Validate fairness and bias metrics
- Document model limitations
- Prepare model for deployment
**Deliverables:**
- Model evaluation report
- Error analysis notebook
- Model card (documentation)
- Optimized model artifacts
- Inference performance benchmarks
### Phase 5: Deployment & Monitoring
- Package model for serving
- Set up model serving infrastructure
- Implement model monitoring
- Configure alerting for drift and degradation
- Establish retraining triggers
- Document deployment procedures
- Plan rollback strategy
**Deliverables:**
- Dockerized model service
- API endpoints (REST/gRPC)
- Monitoring dashboards
- Model registry entries
- Deployment documentation
- Retraining automation scripts
## Best Practices
### Model Development
- Start with simple baselines before complex models
- Use cross-validation for robust evaluation
- Track all experiments with version control
- Document model architectures and hyperparameters
- Validate assumptions about data distribution
- Test models on edge cases and adversarial examples
- Ensure reproducibility with random seeds
- Use early stopping to prevent overfitting
### Feature Engineering
- Create features based on domain knowledge
- Normalize and standardize features
- Handle missing values appropriately
- Encode categorical variables effectively
- Create temporal features for time series
- Use feature selection to reduce dimensionality
- Document feature definitions and transformations
- Validate feature importance
### Training Pipeline
- Use GPU acceleration for deep learning
- Implement distributed training for large models
- Use mixed precision training for speed
- Monitor training with validation metrics
- Save checkpoints regularly
- Use learning rate scheduling
- Implement gradient clipping for stability
- Log metrics to experiment tracking
### Model Serving
- Separate model training from inference
- Use batch prediction for high throughput
- Implement model caching for frequent queries
- Use model compression for edge deployment
- Monitor latency and throughput
- Implement graceful degradation
- Use A/B testing for new models
- Version models in production
### MLOps & Production
- Automate model training pipelines
- Use CI/CD for ML code
- Version datasets and models
- Monitor model drift and data drift
- Set up automated retraining triggers
- Implement feature store for consistency
- Use canary deployments for safety
- Document model lineage
### Model Monitoring
- Track prediction latency and throughput
- Monitor model accuracy over time
- Detect data drift with statistical tests
- Alert on prediction anomalies
- Log prediction samples for debugging
- Track business metrics (conversion, revenue)
- Monitor resource utilization (CPU, GPU, memory)
- Establish SLAs for model performance
## Example Use Cases
### Image Classification Model for Production
**Objective:** Deploy a production-ready image classifier with 95%+ accuracy
**Approach:**
- Use transfer learning (ResNet, EfficientNet)
- Implement data augmentation (rotation, crop, color jitter)
- Fine-tune on domain-specific dataset
- Optimize with TensorRT or ONNX
- Deploy with TensorFlow Serving or FastAPI
- Monitor prediction confidence and latency
- Set up retraining pipeline for new data
### Recommendation System for E-commerce
**Objective:** Build scalable recommendation system with sub-100ms latency
**Approach:**
- Implement collaborative filtering (matrix factorization)
- Use neural collaborative filtering (NCF)
- Create user and item embeddings
- Build real-time feature pipeline
- Deploy with Redis caching
- A/B test recommendation strategies
- Monitor click-through rate (CTR) and conversion
### Time Series Forecasting for Demand Prediction
**Objective:** Forecast product demand with 90%+ accuracy
**Approach:**
- Analyze seasonality and trends
- Engineer lag features and rolling statistics
- Compare ARIMA, Prophet, and LSTM models
- Implement cross-validation for time series
- Use ensemble methods for robustness
- Deploy with scheduled batch predictions
- Monitor forecast accuracy and adjust model
### NLP Model for Sentiment Analysis
**Objective:** Classify customer sentiment with high accuracy
**Approach:**
- Fine-tune BERT or RoBERTa on labeled data
- Implement text preprocessing pipeline
- Use data augmentation (backtranslation)
- Optimize model with distillation or quantization
- Deploy with ONNX Runtime for speed
- Monitor for domain shift in language
- Retrain quarterly with new customer feedback
## Customization Options
### Adjust by ML Problem Type
- **Computer Vision:** Focus on CNN architectures, data augmentation, image preprocessing
- **NLP:** Focus on transformers, tokenization, language modeling
- **Time Series:** Focus on sequential models, lag features, seasonality
- **Recommendation Systems:** Focus on collaborative filtering, embeddings, retrieval
### Adjust by Deployment Environment
- **Cloud (AWS/GCP/Azure):** Use managed ML services, auto-scaling, serverless
- **On-Premise:** Focus on containerization, resource optimization
- **Edge Devices:** Model compression, quantization, mobile optimization
### Adjust by Data Availability
- **Large Labeled Dataset:** Use supervised deep learning
- **Limited Labels:** Use transfer learning, few-shot learning, semi-supervised
- **No Labels:** Use unsupervised learning, clustering, autoencoders
### Adjust by Latency Requirements
- **Real-Time (<10ms):** Model compression, caching, simplified models
- **Near Real-Time (<100ms):** Optimized serving, batch processing
- **Batch Processing:** Focus on throughput, distributed processing
## Key Metrics & Deliverables
**Model Performance Metrics:**
- Accuracy, Precision, Recall, F1-Score
- AUC-ROC, AUC-PR
- Mean Absolute Error (MAE), Root Mean Squared Error (RMSE)
- R-squared for regression
- Mean Average Precision (mAP) for object detection
- BLEU, ROUGE for NLP tasks
**System Performance Metrics:**
- Inference latency (p50, p95, p99)
- Throughput (predictions per second)
- Model size (MB or GB)
- Training time
- Cost per prediction
- GPU/CPU utilization
**Production Metrics:**
- Model drift score
- Data drift score
- Prediction distribution shift
- Online model accuracy
- A/B test lift
- Business impact (revenue, conversion)
**Deliverables:**
- Trained model artifacts (weights, checkpoints)
- Training pipeline code (Python, notebooks)
- Feature engineering scripts
- Model serving API (REST/gRPC)
- Docker containers for deployment
- Model documentation (model cards)
- Experiment tracking results
- Model monitoring dashboards
- Deployment runbooks
- Retraining automation scripts
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |