/ai-toolkit:deep-learningfrom ai-toolkit
Builds and trains neural networks with Keras 3 on JAX, TensorFlow, or PyTorch backends. Covers model building APIs, loss/optimizer selection, custom training loops, callbacks, transfer learning, mixed precision, and multi-GPU training.
Ships in ai-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Help the user build models that train correctly and generalize, using patterns from Deep Learning with Python by François Chollet (the 3rd edition, 2025, covers Keras 3 on JAX, PyTorch and TensorFlow).
Keras 3 runs on several backends, and several references below use TensorFlow-only APIs (tf.data, tf.GradientTape, tf.distribute). Check which backend the user runs (keras.backend.backend(), or KERAS_BACKEND) before using a TensorFlow-only pattern, and prefer keras.ops and backend-neutral APIs when the user isn't on TensorFlow. Library APIs move between releases: check keras.__version__ and, if a docs or web tool is available, look up anything you're unsure of. Current as of October 2026: Keras 3.15.
tf.data.Dataset, a PyTorch DataLoader, or a keras.utils.PyDataset. All of these work with every backend.model.compile(optimizer, loss, metrics).model.fit(data, epochs=..., validation_data=..., callbacks=...).model.evaluate(test_data).Sequential - Simple stack of layers:
model = keras.Sequential([
layers.Dense(64, activation="relu"),
layers.Dense(10, activation="softmax")
])
Functional - Multi-input/output, shared layers, non-linear topologies:
inputs = keras.Input(shape=(64,))
x = layers.Dense(64, activation="relu")(inputs)
outputs = layers.Dense(10, activation="softmax")(x)
model = keras.Model(inputs=inputs, outputs=outputs)
Subclassing - Full flexibility with call() method:
class MyModel(keras.Model):
def __init__(self):
super().__init__()
self.dense1 = layers.Dense(64, activation="relu")
self.dense2 = layers.Dense(10, activation="softmax")
def call(self, inputs):
x = self.dense1(inputs)
return self.dense2(x)
| Task | Loss | Final Activation |
|---|---|---|
| Binary classification | binary_crossentropy | sigmoid |
| Multiclass (one-hot) | categorical_crossentropy | softmax |
| Multiclass (integers) | sparse_categorical_crossentropy | softmax |
| Regression | mse or mae | None |
Optimizers: adam is the usual starting point; rmsprop is the book's default for many examples; sgd with momentum is common when fine-tuning a pretrained model.
| Topic | Reference | Use for | Backend |
|---|---|---|---|
| Keras 3 and backends | references/keras3_changes.md | Start here: multi-backend setup, keras.ops, import keras, migrating from tf.keras | Any |
| Fundamentals | references/basics.md | Overfitting, regularization, data prep, K-fold validation | Any |
| Keras in depth | references/keras_working.md | Custom metrics, callbacks, custom training steps | Mostly any; training-loop sections are TensorFlow |
| Computer vision | references/computer_vision.md | Convnets, augmentation, transfer learning | Any (uses tf.data for loading) |
| Advanced vision | references/advanced_cv.md | Segmentation, residual nets, Xception, Grad-CAM | TensorFlow |
| Time series | references/timeseries.md | LSTM/GRU, 1D convnets, forecasting | Any |
| Text and Transformers | references/nlp_transformers.md | Text vectorization, embeddings, Transformer encoder/decoder | TensorFlow |
| Generative models | references/generative_dl.md | Text generation, VAEs, GANs, style transfer | TensorFlow |
| Best practices | references/best_practices.md | KerasTuner, mixed precision, multi-GPU, TPU | Mixed: noted per section |
When a reference is TensorFlow-only and the user is on JAX or PyTorch, translate tf.* calls to keras.ops where an equivalent exists, or say that the pattern needs the TensorFlow backend.
callbacks = [
keras.callbacks.EarlyStopping(monitor="val_loss", patience=3),
keras.callbacks.ModelCheckpoint("best.keras", save_best_only=True),
keras.callbacks.TensorBoard(log_dir="./logs")
]
model.fit(..., callbacks=callbacks)
In this skill's scripts/ folder (after install: ${CLAUDE_PLUGIN_ROOT}/skills/deep-learning/scripts/).
| Script | Description |
|---|---|
scripts/quick_train.py | Reusable training template with standard callbacks and history plotting |
scripts/visualize_filters.py | Visualize convnet filter patterns via gradient ascent (TensorFlow backend) |
references/advanced_cv.md (opens in a new tab)references/basics.md (opens in a new tab)references/best_practices.md (opens in a new tab)references/computer_vision.md (opens in a new tab)references/generative_dl.md (opens in a new tab)references/keras3_changes.md (opens in a new tab)references/keras_working.md (opens in a new tab)references/nlp_transformers.md (opens in a new tab)references/timeseries.md (opens in a new tab)scripts/quick_train.py (opens in a new tab)scripts/visualize_filters.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub aznatkoiny/zai-skills --plugin ai-toolkit6 skills in this plugin
/cpp-reinforcement-learningReinforcement learning in C++ with LibTorch (the PyTorch C++ frontend) and C++20. Use when the user is implementing DQN, PPO or SAC in C++, building a replay buffer or rollout buffer in C++, fixing libtorch memory growth or GPU issues in a C++ agent, running environments in parallel threads, or loading a policy trained in Python into a C++ program (games, robotics, simulators). Not for Python RL with Gymnasium or Stable-Baselines3, including exporting a Python policy to ONNX (use reinforcement-learning), or for general deep learning (use deep-learning)./openclaw-setupInstall, configure, secure and troubleshoot OpenClaw (formerly Clawdbot / Moltbot), the self-hosted personal AI assistant that answers through messaging apps. Covers installing on a Mac or Linux machine or a VPS with Docker (including Hostinger), Anthropic API setup and cost control, Telegram and iMessage channels, and hardening (gateway binding, pairing, tool limits). Use when the user mentions OpenClaw, Clawdbot or Moltbot, `openclaw onboard`, `openclaw doctor`, or setting up, fixing or hardening their OpenClaw gateway. Not for building an assistant from scratch with an SDK, generic VPS or SSH hardening unrelated to OpenClaw, or writing OpenClaw plugins. For a read-only security check of an existing install, /openclaw-audit runs the checklist./prompt-engineerWrite, review, debug, and migrate prompts for Claude models (Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5) using Anthropic's official prompt engineering guidance. Covers system prompts, agent and harness prompts, tool descriptions, few-shot examples, and effort/thinking settings. Use this whenever the user wants to create or improve a prompt or system prompt. Also use it when they ask why Claude is behaving a certain way: too verbose or too terse, stops early or asks permission mid-task, over-engineers, goes silent between tool calls, skips searches or tool calls, refuses benign requests, ignores mid-turn messages, or returns broken JSON. It also covers migrating prompts or API calls to a newer Claude model, choosing an effort level or thinking configuration, and writing instructions that another LLM agent will follow, even when the user never says "prompt engineering"./reinforcement-learningReinforcement learning in Python with Gymnasium and Stable-Baselines3 (PPO, SAC, DQN, TD3, A2C). Use when the user is building a custom Gymnasium environment, choosing an algorithm, training or tuning an agent, debugging an agent that won't learn (flat reward, collapse, NaNs), evaluating a policy, or exporting one to ONNX. Includes runnable scripts that validate an environment, sanity-check it before training, and write an evaluation report. Not for RL in C++/libtorch (use cpp-reinforcement-learning), RLHF or LLM post-training (GRPO, DPO), or supervised deep learning (use deep-learning)./x402-paymentsBuild apps that charge for, or pay for, HTTP requests with the x402 protocol (HTTP 402 "Payment Required" plus stablecoin payments, usually USDC on Base or Solana). Covers paid API endpoints and middleware (Express, Hono, Next.js), clients and AI agents that pay for x402 resources with spending limits, MCP tools that charge or pay through x402, and moving from testnet to mainnet. Use when the user mentions x402, HTTP 402, per-request USDC payments, paywalled APIs for agents, or agent-to-agent payments. Not for card or Stripe billing, Coinbase Commerce checkout, smart-contract development, or general wallet and trading code. For a new project, /x402-scaffold generates a working testnet starter.Other plugins' skills for the same job