skills/computer-science/cs-ml/SKILL.md
ML: supervised/unsupervised/RL, CNN/RNN/Transformer, training, evaluation, MLOps, LLM fine-tuning
npx skillsauth add alphaonedev/openclaw-graph cs-mlInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill handles machine learning tasks, including supervised/unsupervised learning, reinforcement learning, CNN/RNN/Transformer models, training pipelines, evaluation metrics, MLOps workflows, and LLM fine-tuning. It integrates with OpenClaw to automate code generation and execution for ML projects.
Use this skill when building ML models from scratch, fine-tuning pre-trained models like BERT, deploying models via MLOps, or evaluating performance. Apply it for tasks involving large datasets, neural networks, or production pipelines, such as image recognition with CNNs or text generation with Transformers.
Invoke this skill via OpenClaw's CLI or API to generate code snippets. For training, specify model type and data source; for evaluation, provide a trained model path. Always set environment variables for authentication, e.g., export $OPENCLAW_API_KEY=your_key. Patterns include:
Use OpenClaw's CLI for direct execution or API for programmatic access. Authentication requires $OPENCLAW_API_KEY in your environment.
CLI Command for training a CNN:
openclaw cs-ml train --model cnn --data /path/to/images --epochs 10 --batch-size 32
This generates a Python script using TensorFlow:
from tensorflow import keras
model = keras.Sequential([keras.layers.Conv2D(32, 3, activation='relu')])
model.fit(train_data, epochs=10)
CLI Command for LLM fine-tuning:
openclaw cs-ml fine-tune --model bert --dataset /path/to/text.json --learning-rate 5e-5
Output script example:
from transformers import BertForSequenceClassification
model = BertForSequenceClassification.from_pretrained('bert-base')
trainer = Trainer(model=model, train_dataset=dataset)
trainer.train()
API Endpoint for evaluation:
POST to https://api.openclaw.com/cs-ml/evaluate with JSON body:
{ "model_path": "/path/to/model.h5", "data_path": "/path/to/test.csv", "metrics": ["accuracy", "f1"] }
Response includes metrics output.
Config Format: Use YAML for hyperparameters, e.g.:
model: transformer
params:
layers: 12
hidden_size: 768
Integrate this skill with other OpenClaw skills by chaining commands, e.g., use "data-processing" skill first for data cleaning, then pass output to cs-ml for training. For external tools, set up dependencies like installing TensorFlow via pip install tensorflow in your generated scripts. Use $OPENCLAW_API_KEY for API calls in custom code. For MLOps, link with cloud services: export model to S3 with AWS CLI, then deploy via cs-ml command. Ensure compatibility by specifying library versions, e.g., Transformers 4.20+.
Common errors include data mismatches, authentication failures, or library version conflicts. Handle them as follows:
openclaw cs-ml train fails with "Input shape mismatch", verify data with --validate-data flag.openclaw cs-ml --retry-auth.--device cuda and handle with try-except in generated code:
try:
model.fit(data)
except RuntimeError as e:
print(f"Error: {e}, falling back to CPU")
--verbose flag and debug generated scripts line-by-line.tools
Root web development: project structure, tooling selection, deployment decisions
development
WebAssembly: Rust/Go/C to WASM, wasm-bindgen, Emscripten, WASM Component Model
development
Vue 3: Composition API script setup, Pinia, Vue Router 4, SFCs, Vite, Nuxt 3
tools
Tailwind CSS 4: utility classes, config, JIT, arbitrary values, darkMode, plugins, shadcn/ui