Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Tensorflow Pro

ASecurity

TensorFlow/Keras guidance — model building, tf.data pipelines, training, SavedModel, TF Serving, and TFLite.

2 stars
0 votes
0 copies
0 views
Added 9/29/2026
ai-agentspythongoexpressapibackendperformance

Works with

cliapi

Security Analysis

A100/100

Scanned 9/29/2026

$npx -y skills add aicodedecode/awesome-muse-skills --skill tensorflow-pro --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tensorflow Pro?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Tensorflow Pro
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aicodedecode-tensorflow-pro/badge)](https://www.skillsdirectory.com/skills/aicodedecode-tensorflow-pro)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: tensorflow-pro
description: TensorFlow/Keras guidance — model building, tf.data pipelines, training, SavedModel, TF Serving, and TFLite.
category: development
---

## Overview

TensorFlow (with Keras as its high-level API) is the production-oriented deep learning framework: strong serving story (TF Serving, TFLite, TF.js), `tf.data` pipelines, and broad deployment targets from servers to phones to browsers. Keras 3's multi-backend design (TensorFlow/JAX/PyTorch) makes model code portable in a way the ecosystem hasn't had before.

This skill covers the modern TF/Keras workflow: building models with the Functional/Sequential APIs, efficient `tf.data` pipelines, training with `fit()` and custom loops, exporting SavedModels, and deploying via TF Serving and TFLite.

## When to use

- Building models with Keras (Functional or Sequential API).
- Writing efficient `tf.data` input pipelines.
- Training with `fit()` vs custom training loops.
- Exporting SavedModel and serving with TF Serving.
- Deploying to mobile/edge with TFLite.
- Choosing between TensorFlow, PyTorch, and JAX.

## Core concepts

- **Keras APIs.** Sequential (linear stacks), Functional (DAGs — most real models), Subclassing (full control, less tooling support). Prefer Functional: it supports serialization, plotting, and multi-input/output cleanly.
- **Layers as the vocabulary.** Dense, Conv2D, LSTM/GRU, Embedding, Attention/MultiHeadAttention, normalization (BatchNorm/LayerNorm), Dropout — compose from these; custom layers via subclassing with `build`/`call`.
- **`tf.data`.** The input pipeline: `Dataset.from_tensor_slices`/TFRecord readers, `.map()` (parallel), `.batch()`, `.prefetch(tf.data.AUTOTUNE)`, `.cache()` — pipeline performance determines GPU utilization. TFRecord + prefetch is the production pattern.
- **Training with `fit()`.** Compile (optimizer, loss, metrics) → `fit()` with callbacks (EarlyStopping, ModelCheckpoint, ReduceLROnPlateau, TensorBoard). `fit()` handles distribution, callbacks, and validation correctly — use it unless custom loops are truly needed.
- **Custom training loops.** `tf.GradientTape` for research-level control — forward pass in tape context, `tape.gradient`, `optimizer.apply_gradients`. More code, more responsibility (metrics, distribution) — reach for it only when `fit()` can't express the training.
- **Losses/metrics/optimizers.** `CategoricalCrossentropy`/`SparseCategoricalCrossentropy` (know which your labels need), `BinaryCrossentropy`; Adam/AdamW; metrics as running averages via `Metric` objects. Label-format/loss mismatches are a perennial bug.
- **Mixed precision.** `tf.keras.mixed_precision.set_global_policy('mixed_float16')` — one line, significant speedup on modern GPUs, with automatic loss scaling.
- **Distribution strategies.** `MirroredStrategy` (multi-GPU single host), `MultiWorkerMirroredStrategy` (multi-host) — often just wrapping model creation and `fit()`; batch size and LR scaling as with any distributed training.
- **Callbacks.** EarlyStopping (restore_best_weights=True), ModelCheckpoint (save best), TensorBoard, LearningRateScheduler — the training harness around `fit()`.
- **SavedModel.** The serialization format: `model.save()` / `tf.saved_model.save` — architecture + weights + signatures. The handoff format for TF Serving, TFLite conversion, and TF.js. Signatures define the serving API explicitly.
- **TF Serving.** Production server for SavedModels: versioned model directories, gRPC/REST APIs, model config for multi-model serving, canary versions. The boring-reliable serving path.
- **TFLite.** Mobile/edge deployment: conversion with quantization (dynamic range, full integer, float16) trading size/latency for accuracy — always evaluate post-quantization metrics. The `TFLiteConverter` + representative dataset for full-integer quantization.
- **TFX (awareness).** The end-to-end platform (ExampleGen → Transform → Trainer → Pusher) — full MLOps on TF; adopt when the pipeline complexity justifies it, not before.
- **Keras 3 multi-backend.** Same Keras code on TensorFlow/JAX/PyTorch backends — write portable model code; backend-specific ops are the exception.

## Practical workflow

1. **Build with the Functional API.** Explicit inputs/outputs, serializable, plottable:
   ```python
   inputs = keras.Input(shape=(224, 224, 3))
   x = keras.layers.Rescaling(1.0 / 255)(inputs)
   x = keras.layers.Conv2D(64, 3, activation="relu")(x)
   x = keras.layers.GlobalAveragePooling2D()(x)
   outputs = keras.layers.Dense(10, activation="softmax")(x)
   model = keras.Model(inputs, outputs)
   ```
2. **Write the `tf.data` pipeline.** Parallel maps, batching, prefetching — and verify throughput before training:
   ```python
   ds = tf.data.Dataset.from_tensor_slices((paths, labels))
   ds = ds.map(load_and_preprocess, num_parallel_calls=tf.data.AUTOTUNE)
   ds = ds.shuffle(10000).batch(64).prefetch(tf.data.AUTOTUNE)
   ```
3. **Compile and fit with callbacks.** The right loss for your label format; early stopping with best-weight restore:
   ```python
   model.compile(optimizer=keras.optimizers.AdamW(1e-3),
                 loss="sparse_categorical_crossentropy", metrics=["accuracy"])
   model.fit(train_ds, validation_data=val_ds, epochs=50, callbacks=[
       keras.callbacks.EarlyStopping(patience=5, restore_best_weights=True),
       keras.callbacks.ModelCheckpoint("best.keras", save_best_only=True),
       keras.callbacks.TensorBoard(log_dir="logs"),
   ])
   ```
4. **Enable mixed precision.** One line near the top; verify no NaN regressions.
5. **Scale distribution.** `MirroredStrategy` scope around model creation; scale batch/LR; verify scaling efficiency.
6. **Export SavedModel.** `model.export("saved_model/1")` with explicit signatures; test the exported artifact with the same inputs serving will send.
7. **Serve or convert.** TF Serving for server deployment (versioned dirs, REST/gRPC); TFLite converter with quantization for mobile/edge — always re-evaluate metrics after quantization.
8. **Monitor training.** TensorBoard from run one: loss curves, LR, histograms; the smoke test (overfit one batch) applies here too.

## Common pitfalls

- **Wrong loss for label format** — `categorical` vs `sparse_categorical` mismatch; match loss to labels.
- **Slow `tf.data`** — Python-level maps without parallelism/prefetch; AUTOTUNE + TFRecords.
- **Custom loops when `fit()` suffices** — reimplementing distribution/callbacks badly; default to `fit()`.
- **Forgetting `restore_best_weights`** — EarlyStopping returning the overfit final epoch; always restore.
- **No mixed precision** — leaving 2x performance on the table; one line to enable.
- **Quantization without re-evaluation** — TFLite accuracy drops unnoticed; evaluate the converted model.
- **Serving signature mismatches** — SavedModel signatures not matching client inputs; define and test signatures.
- **Subclassed models breaking tooling** — serialization/plotting issues; prefer Functional API.
- **BatchNorm in custom loops** — `training=True/False` not passed; silent train/infer discrepancy.
- **Shuffling without enough buffer** — poor randomization; adequate shuffle buffer or file-level shuffling.
- **Ignoring TensorBoard** — training blind; log from the first run.
- **TFX too early** — platform complexity for a single model; adopt with pipeline count.
- **Version skew TF/Serving** — SavedModel ops unsupported by the serving version; align versions.

Attribution

aicodedecodeaicodedecode
View sourceSee grades on GitHubMore from aicodedecode →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Caveman

Terse caveman voice: answer first, fluff gone, every technical fact kept. Use for /caveman, "caveman mode", "talk like caveman", "be brief", "less tokens". Stays on until "stop caveman" or "normal mode".

1100021 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

698621 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →