Skip to content
Back to skills

Tensorflow Hub

ASecurity

"Use TensorFlow Hub to resolve, load, wrap, and export

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 9, 2026
datapythonbashapi

Works with

  • api

Security analysis

A96/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 17 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill tensorflow-hub --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Tensorflow Hub?

Add the live security badge to your README. It updates with every re-scan.

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

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

Download with Pro
SKILL.md
---
name: tensorflow-hub
description: "Use TensorFlow Hub to resolve, load, wrap, and export
  Hub-compatible TensorFlow SavedModels."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# TensorFlow Hub

Use this repo skill when a task involves the `tensorflow-hub` package, the `tensorflow_hub` import, TensorFlow Hub/Kaggle Models handles, `tfhub.dev` URLs, local Hub-compatible `SavedModel` directories, `hub.load`, `hub.resolve`, or `hub.KerasLayer`.

The current package surface verified for this skill exposes only these top-level APIs:

```python
import tensorflow_hub as hub

hub.load
hub.resolve
hub.KerasLayer
```

Feature-column text embedding support is available through a submodule import, not as a top-level `hub` attribute:

```python
import tensorflow_hub.feature_column_v2 as hub_feature_column_v2
```

## Quick install and import check

Use a TensorFlow runtime that matches the Python environment. In Keras 3 environments, install the matching `tf-keras` compatibility package as well.

```bash
python -m pip install tensorflow-hub tensorflow tf-keras
python - <<'PY'
import tensorflow as tf
import tensorflow_hub as hub
print("tensorflow", tf.__version__)
print("tensorflow_hub", hub.__version__)
print("exports", hub.__all__)
PY
```

If the import check fails, read [references/troubleshooting.md](references/troubleshooting.md) before changing package versions.

## Route map

| User task or symptom | Read next |
| --- | --- |
| Resolve or load a Hub handle, local SavedModel path, `tfhub.dev`/Kaggle Models URL, or archive | [sub-skills/load-and-wrap/SKILL.md](sub-skills/load-and-wrap/SKILL.md) |
| Diagnose `TFHUB_CACHE_DIR`, `TFHUB_MODEL_LOAD_FORMAT`, download locks, corrupt archives, or certificate validation | [sub-skills/load-and-wrap/references/load-resolve-cache.md](sub-skills/load-and-wrap/references/load-resolve-cache.md) |
| Wrap a Hub SavedModel in Keras, choose `signature`, `output_key`, `signature_outputs_as_dict`, `output_shape`, or `trainable` | [sub-skills/load-and-wrap/references/keras-layer.md](sub-skills/load-and-wrap/references/keras-layer.md) |
| Use `text_embedding_column_v2`, `DenseFeatures`, or recover from `hub.text_embedding_column_v2` `AttributeError` | [sub-skills/load-and-wrap/references/feature-column-v2.md](sub-skills/load-and-wrap/references/feature-column-v2.md) |
| Create a TF2 `SavedModel` that can be consumed by TensorFlow Hub | [sub-skills/export-and-save/SKILL.md](sub-skills/export-and-save/SKILL.md) |
| Export text embeddings from a token/vector file | [sub-skills/export-and-save/references/text-embedding-export.md](sub-skills/export-and-save/references/text-embedding-export.md) |
| Migrate or triage old TF1 `hub.Module`, `create_module_spec`, or `add_signature` snippets | [sub-skills/export-and-save/references/legacy-tf1-notes.md](sub-skills/export-and-save/references/legacy-tf1-notes.md) |
| Check whether this skill matches the current source checkout | [references/repo-provenance.md](references/repo-provenance.md) |

## Safe local validation

Before using a network-backed handle or a large model, run the no-download smoke script from the loading sub-skill:

```bash
python sub-skills/load-and-wrap/scripts/smoke_load_and_wrap.py --feature-column
```

For text embedding export tasks, use the bundled exporter under the export sub-skill:

```bash
python sub-skills/export-and-save/scripts/export_text_embeddings_v2.py --help
```

Both scripts create only temporary/local outputs chosen by the caller and do not read the original repository checkout.

## Boundaries

Use this skill for:

- loading or resolving TensorFlow Hub handles and local SavedModels;
- Keras integration through `hub.KerasLayer`;
- feature-column text embedding workflows through `tensorflow_hub.feature_column_v2`;
- creating TF2 `SavedModel` exports that are meant to be reloaded by TensorFlow Hub;
- text embedding SavedModel export from small or production token/vector files;
- troubleshooting TensorFlow Hub import, cache, signature, and legacy API confusion.

Do not use this skill as the main route for:

- general TensorFlow model training unrelated to TensorFlow Hub handles or exports;
- deprecated TF1 image-retraining scripts;
- TensorFlow Hub repository maintenance, Bazel release builds, or pull-request policy;
- current code that assumes `hub.Module`, `hub.create_module_spec`, `hub.add_signature`, or top-level `hub.text_embedding_column_v2` exist without first checking an older archived runtime.

Files in this skill

  • SKILL.md4.4 KB
  • references/repo-provenance.md2.6 KB
  • references/repo-routing-metadata.json319 B
  • references/troubleshooting.md4.8 KB
  • sub-skills/export-and-save/SKILL.md2.7 KB
  • sub-skills/export-and-save/references/legacy-tf1-notes.md4.4 KB
  • sub-skills/export-and-save/references/savedmodel-export.md7 KB
  • sub-skills/export-and-save/references/text-embedding-export.md5.6 KB
  • sub-skills/export-and-save/references/troubleshooting.md5.7 KB
  • sub-skills/export-and-save/scripts/export_text_embeddings_v2.py12.9 KB
  • sub-skills/load-and-wrap/SKILL.md3.8 KB
  • sub-skills/load-and-wrap/references/api-reference.md2 KB
  • sub-skills/load-and-wrap/references/feature-column-v2.md2.8 KB
  • sub-skills/load-and-wrap/references/keras-layer.md4.2 KB
  • sub-skills/load-and-wrap/references/load-resolve-cache.md3.9 KB
  • sub-skills/load-and-wrap/references/troubleshooting.md4.1 KB
  • sub-skills/load-and-wrap/scripts/smoke_load_and_wrap.py6.1 KB

Attribution

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

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.