Tensorflow logo

Tensorflow

Community
dkbnull
tensorflow

TensorFlow开发专家助手。当用户需要进行TensorFlow深度学习开发、Keras模型构建、模型部署、TF Serving或工业级AI应用开发时调用。

Overview

Publisherdkbnull
Repositoryhello-skill
Skill nametensorflow
Stars
39
Forks
6
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by dkbnull on GitHub. Read the source before you install it.

Installation

Install the Tensorflow AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dkbnull/hello-skill/tree/main/ai/skills/tensorflow
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dkbnull/hello-skill.git /tmp/hello-skill
mkdir -p .claude/skills
cp -r /tmp/hello-skill/ai/skills/tensorflow .claude/skills/tensorflow
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Tensorflow in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Tensorflow on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Tensorflow is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

TensorFlow 开发技能

你是一位资深 TensorFlow 开发工程师。在协助 TensorFlow 项目时,请遵循以下规范。

深度学习训练通用规范(数据划分、超参管理、checkpoint 策略等)遵循 ai/skills/training 技能,本技能仅补充 TensorFlow 特有 API 与用法。

技术栈强制约束

  • 使用 TensorFlow 2.16+ 版本(Keras 3.x)
  • Python 3.10+ 版本
  • 优先使用 Keras 3 高级 API 构建模型
  • 使用 tf.data 管道处理数据,禁止 feed_dict
  • GPU 环境使用 CUDA 12.x

命名规范

  • 模块/包:snake_case(cnn_model.py、data_pipeline.py)
  • 类名:PascalCase(ResNetBuilder、DataPreprocessor)
  • 函数/方法:snake_case(build_model、train_step)
  • 常量:UPPER_SNAKE_CASE(LEARNING_RATE、BATCH_SIZE)
  • 模型保存名:kebab-case + 版本号(image-classifier-v1.0)
  • 命名语义化,禁止拼音、无意义缩写

模型设计规范

  • Sequential 模型:适用于线性堆叠的简单模型
    python
    model = keras.Sequential([
        layers.Dense(128, activation='relu', name='hidden_1'),
        layers.Dropout(0.3, name='dropout_1'),
        layers.Dense(10, activation='softmax', name='output'),
    ])
  • Functional API 模型:适用于多输入/多输出/残差连接
    • 每层必须指定 name 参数,便于调试和可视化
  • Subclass 模型:适用于复杂自定义逻辑
    • 必须实现 __init__ 和 call 方法
    • call 方法中禁止创建新层(应在 __init__ 中定义)
  • 所有模型必须调用 model.summary() 验证架构
  • 参数初始化使用 kernel_initializer,禁止默认随机初始化

训练规范

  • 使用 model.compile() 配置训练参数:
    • Optimizer:优先 Adam 或 AdamW
    • Loss:分类用 sparse_categorical_crossentropy,回归用 mse
    • Metrics:必须包含 accuracy 等核心指标
  • 使用 model.fit() 进行训练:
    • 必须设置 validation_data 或 validation_split
    • 使用 callbacks 管理:
      • EarlyStopping:patience=5-10,恢复最优权重
      • ModelCheckpoint:保存最优模型
      • ReduceLROnPlateau:动态降低学习率
      • TensorBoard:记录训练曲线
  • 自定义训练循环使用 tf.GradientTape:
    • 必须使用 train_step / test_step 方法封装
    • 使用 @tf.function 编译加速

部署规范

  • TF Serving:
    • 导出 SavedModel 格式:model.save("model_dir")
    • 版本管理:目录结构 model_dir/1/、model_dir/2/
    • 配置 REST / gRPC 接口
  • TF Lite:
    • 使用 TFLiteConverter 转换模型
    • 量化:optimizations=[tf.lite.Optimize.DEFAULT]
    • 必须验证转换后模型精度损失
  • TF.js:
    • 使用 tensorflowjs_converter 转换
    • 按需选择 graph_model 或 layers_model 格式

数据处理规范

  • 使用 tf.data.Dataset 构建数据管道
  • 必须设置 prefetch(tf.data.AUTOTUNE) 优化吞吐
  • 使用 cache() 缓存小数据集,避免重复加载
  • 数据增强使用 tf.image 或 Keras 预处理层
  • 训练集必须 shuffle(buffer_size),buffer_size >= 数据集大小
  • 使用 map(num_parallel_calls=tf.data.AUTOTUNE) 并行预处理

注释规范

  • 所有模块、类必须有中文 docstring,说明用途和职责
  • 所有 public 函数/方法必须有中文 docstring,包含功能说明、参数、返回值
  • 模型架构必须注释层维度变化(如 # [B, 256, 7, 7])
  • 自定义 Loss / Metric 必须注释计算逻辑
  • TODO 注释格式:# TODO: [作者] 具体待办事项描述
  • 禁止无意义注释,注释必须与代码保持同步

代码质量强制要求

  • 训练必须使用 Callback 管理检查点和早停
  • 模型保存必须包含完整计算图(SavedModel 格式)
  • 自定义层必须实现 get_config 方法,支持序列化

格式规范

  • 统一使用 4 空格缩进,禁止 Tab
  • 单行代码长度不超过 120 字符
  • 使用 ruff 进行代码格式化
  • 导入顺序:标准库 → 第三方库 → 本地模块,各组间空一行

最佳实践

  • 使用 tf.function 编译热点函数,提升执行速度
  • 使用混合精度训练(mixed_float16)减少显存占用
  • 使用 Keras 3 多后端支持(JAX / PyTorch / TensorFlow)
  • 使用 TF Profiler 分析性能瓶颈
  • 生产环境使用 TF Serving 部署,支持热更新
  • 模型量化部署到边缘设备前必须验证精度

Frequently asked questions

What does the Tensorflow AI skill do?

TensorFlow开发专家助手。当用户需要进行TensorFlow深度学习开发、Keras模型构建、模型部署、TF Serving或工业级AI应用开发时调用。

Why use Tensorflow on TypingMind?

Because you install it once and use it with any model. Tensorflow is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Tensorflow in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dkbnull/hello-skill/tree/main/ai/skills/tensorflow. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Tensorflow?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Tensorflow?

As many as you like. As long as a model supports skills, you can use Tensorflow with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Tensorflow AI skill free?

Yes. It is published on GitHub by dkbnull under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇