roboflow-custom-weights-upload
Use when uploading locally trained model weights (YOLO, RF-DETR, YOLO-NAS, PaliGemma, Florence-2) to Roboflow — the client-side Python SDK upload flow, safe…
Skill by roboflow
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/roboflow-roboflow-custom-weights-upload
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/roboflow-custom-weights-upload
What's inside
- Skill name
roboflow-custom-weights-upload- Description
- Use when uploading locally trained model weights (YOLO, RF-DETR, YOLO-NAS, PaliGemma, Florence-2) to Roboflow — the client-side Python SDK upload flow, safe API key handling, per-family packaging requirements, and verifying the upload.
- License
- Apache-2.0
- Instructions
- 182 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
> **For agents:** This skill is authored in [`roboflow/computer-vision-skills`](https://github.com/roboflow/computer-vision-skills). If your client already has it loaded as a skill (for example from a Roboflow plugin), use that copy. The `skill://roboflow/<name>/SKILL.md` MCP resources serve the same skills for clients that don't have them loaded.
# Custom Weights Upload
Register weights from a model trained outside Roboflow (a laptop, a training
server, Colab) so Roboflow can convert, host, and serve it.
## Where the upload runs
Packaging reads the checkpoint from disk, so the upload always runs on the
machine that has the weights — client-side, with the Python SDK flow below.
The `models_custom_weights_upload_guide` MCP tool is a guide, not an uploader:
calling it returns this recipe and echoes back the arguments you passed
(its `upload_mode` field says whether they describe a versioned or a
workspace upload, or `undetermined` when they pin down neither). It never
packages or uploads anything, because the MCP server cannot read the user's
filesystem.
## Client-side upload with the Python SDK
Run this on the machine that has the weights, ideally in the same Python
environment used for training (it already has `torch` and the matching
`ultralytics`).
1. **Install the SDK**: both `roboflow>=1.3.13` and `rfdetr` require
**Python >= 3.10**; check `python3 --version` first (macOS ships 3.9). If
it is too old, create a venv: `uv venv --python 3.12 && source
.venv/bin/activate`. Then `pip install "roboflow>=1.3.13"`.
2. **Handle the API key safely**: never ask the user to paste a private API
key into chat, and never scan dotfiles, shell profiles, or config files
hunting for one — permission systems rightly block that. If
`ROBOFLOW_API_KEY` is already set in the environment
(`test -n "$ROBOFLOW_API_KEY"`) or the working project has a `.env` that
defines it, use it. Otherwise mint a scoped key with the MCP
`api_keys_create` tool — it returns the secret once (`api_keys_roll` is
the only other tool that does; `api_keys_list` / `api_keys_get` return
masked metadata) — and write it yourself to a `.gitignore`'d `.env` as
`ROBOFLOW_API_KEY`. Writing `.env` does not populate `os.environ`: load it
before running. For a `.env` you just wrote yourself,
`set -a; source .env; set +a` is fine. For a pre-existing `.env`, never
`source` it — sourcing executes any shell in the file and exports every
other secret it holds into the process. Read only the one key instead,
e.g. with `python-dotenv` (`pip install python-dotenv`) in the script:
```python
import os
from dotenv import dotenv_values
os.environ["ROBOFLOW_API_KEY"] = dotenv_values(".env")["ROBOFLOW_API_KEY"]
```
Scope the key for the whole deploy flow, not minimally: the SDK's
`rf.workspace()` reads the workspace and its project list before
deploying, so `project:read` plus `model:deploy` alone fails with missing
permissions. Include `workspace:read`, `project:read`, `model:deploy`,
and for a versioned deploy also `version:read` and `version:update`.
Getting the scopes right at mint time is what protects the upload: the
preflight below only confirms the key and the workspace read, not the
deploy scope.
If the `api_keys_create` call is denied (permission systems may flag
credential creation during an upload task) or unavailable, do not work
around the denial. Ask the user to choose: (a) explicitly authorize
minting a temporary scoped key, which you revoke with `api_keys_revoke`
after the upload; (b) set `ROBOFLOW_API_KEY` themselves in their shell or
a `.env`; or (c) point you at an existing `.env` that already defines it.
3. **Confirm the destination and the name with the user**: registering a
model is not easily undone. Never infer the target project or version from
the checkpoint's class count or filename — ask. The same goes for
`model_name` on a workspace upload: ask the user what the model should be
called; do not invent a name.
### Preflight before packaging
Packaging plus a 100 MB+ upload is slow; run the cheap checks first and
report every gap at once instead of failing one step at a time:
1. Python is >= 3.10 (`python3 --version`).
2. Required imports load: `torch` for YOLO, RF-DETR, and YOLO-NAS;
`ultralytics` for YOLO v8/v10/v11/v12/26; `rfdetr>=1.8.0` for raw
PyTorch-Lightning RF-DETR checkpoints.
3. The key is valid and covers the workspace read — one cheap call that
exercises the same workspace/project-list read `deploy_model` starts with:
```python
import os
from roboflow import Roboflow
Roboflow(api_key=os.environ["ROBOFLOW_API_KEY"]).workspace()
```
Be honest about the limit of this check: it does not exercise
`model:deploy`, which the platform only tests at `models/prepareUpload`,
after packaging. That is why step 2 mints the key with the full scope set
up front — the preflight catches a bad or under-read key, not a missing
deploy scope on an existing key.
Only package and upload after all three pass.
Workspace model upload (no dataset version required):
```python
import os
from roboflow import Roboflow
rf = Roboflow(api_key=os.environ["ROBOFLOW_API_KEY"])
workspace = rf.workspace("WORKSPACE_SLUG")
workspace.deploy_model(
model_type="rfdetr-base",
model_path="/path/to/training/output",
project_ids=["PROJECT_SLUG"],
model_name="MODEL_NAME",
filename="checkpoint_best_total.pth", # relative to model_path
)
```
Versioned deploy (attach weights to an existing dataset version):From roboflow/computer-vision-skills, Apache-2.0.
More from roboflow/computer-vision-skills
- 0.658score
roboflow-product-navigation
roboflow
Use when explaining where Roboflow features live in the app.roboflow.com web app, mapping intents like upload, annotate, train, deploy to specific page URLs.
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-data-management
roboflow
Use when uploading images, labeling, organizing datasets, creating Roboflow projects (detection/segmentation/keypoint/classification), tags, splits, versions…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
workflow-from-eval
roboflow
Build or improve a Roboflow Workflow using eval-driven search.
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-cloud-storage
roboflow
Use when connecting cloud storage (AWS S3 / S3-compatible or Google Cloud Storage) to Roboflow to mirror images into a workspace — creating storage…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-batch-processing
roboflow
Use when running a Roboflow Workflow over many images or videos with batch processing — Asset Library jobs (the platform stages workspace images for you) or…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-plans-and-pricing
roboflow
Use when answering questions about Roboflow plans, credit usage, or cost estimation; directs users to roboflow.com/pricing for current dollar amounts.
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-training-and-evaluation
roboflow
Use when training Roboflow models, diagnosing why a model underperforms, improving accuracy, or setting up a production feedback loop — covers architecture…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-universe
roboflow
Use when searching for or using public datasets/models on Roboflow Universe (universe.roboflow.com), the open repository of 1M+ computer vision datasets and…
SkillAFreshness: A★ 47Claude Code +9 - 0.655score
roboflow-inference
roboflow
Deployment option comparison (serverless, dedicated, self-hosted, batch) and Workflow execution patterns.
SkillAFreshness: A★ 47Claude Code +9 - 0.655score
roboflow-api-reference
roboflow
Protocol-level facts for Roboflow REST and Inference APIs — URL patterns, auth, parameters, error codes, and SDK quick-start.
SkillAFreshness: A★ 47Claude Code +9 - 0.655score
draw-vision
roboflow
Draw computer vision annotations, labels, and predictions over images and videos using supervision-js in JavaScript/TypeScript or Supervision in Python.
SkillAFreshness: A★ 47Claude Code +9
Signals
- Stars
- 47
- Forks
- 11
- Open issues
- 2
- Last commit (this folder)
- Oct 15, 2026 (13 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from roboflow
- 0.732score
AGENTS.md · roboflow/supervision
roboflow
AGENTS.md from roboflow/supervision: 160 lines covering 1.
TemplateAFreshness: A★ 51.3KCodex +5 - 0.658score
roboflow-batch-processing
roboflow
Use when running a Roboflow Workflow over many images or videos with batch processing — Asset Library jobs (the platform stages workspace images for you) or…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-data-management
roboflow
Use when uploading images, labeling, organizing datasets, creating Roboflow projects (detection/segmentation/keypoint/classification), tags, splits, versions…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-plans-and-pricing
roboflow
Use when answering questions about Roboflow plans, credit usage, or cost estimation; directs users to roboflow.com/pricing for current dollar amounts.
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-training-and-evaluation
roboflow
Use when training Roboflow models, diagnosing why a model underperforms, improving accuracy, or setting up a production feedback loop — covers architecture…
SkillAFreshness: A★ 47Claude Code +9 - 0.658score
roboflow-universe
roboflow
Use when searching for or using public datasets/models on Roboflow Universe (universe.roboflow.com), the open repository of 1M+ computer vision datasets and…
SkillAFreshness: A★ 47Claude Code +9
Cite this page
roboflow-custom-weights-upload skill. Agent Mart. https://agentmart.dev/skills/roboflow-roboflow-custom-weights-upload (last updated 2026-10-24)