Agent skill

Model API

by VectorSpaceLab in VectorSpaceLab/AREX-Skill

A skill your agent uses when working with RobustVideoMatting MattingNetwork APIs, recurrent states, model variants, refiners, tensor shapes, and safe synthetic forward checks.

GPL-3.0Auto-check passedAI & LLM Engineering

Install Model API

skills CLI
$ npx skills add VectorSpaceLab/AREX-Skill --skill model-api -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install VectorSpaceLab/AREX-Skill model-api --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/VectorSpaceLab/AREX-Skill.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/repositories/repo-skills/robust-video-matting/sub-skills/model-api .claude/skills/model-api && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
model-api
GitHub stars
328
Token cost
~1.1k tokens
SKILL.md length
427 words
Files
4 (incl. scripts, references)
Skills in repo
159
Repo updated
First seen
Licence
GPL-3.0

At a glance

A skill your agent uses when working with RobustVideoMatting MattingNetwork APIs, recurrent states, model variants, refiners, tensor shapes, and safe synthetic forward checks.

  • Works in 5 steps: Ensure the RVM source modules are… → Instantiate the model without… → Feed RGB tensors normalized to 0..1 in… → …
  • Working with RobustVideoMatting MattingNetwork APIs
  • SKILL.md covers Read this when, Core workflow, Bundled references and scripts and Decision points, plus 1 more section
  • Runs Python scripts from its folder; calls python

What it does

Model API is an agent skill from VectorSpaceLab/AREX-Skill. Use when working with RobustVideoMatting MattingNetwork APIs, recurrent states, model variants, refiners, tensor shapes, and safe synthetic forward checks.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including scripts and reference files (for example `references/api-reference.md`, `references/troubleshooting.md` and `scripts/rvm_model_smoke.py`).

It sits in AI & LLM Engineering. It works with PyTorch. The repository describes itself as: A Skill Library for Automated Machine Learning. The licence is GPL-3.0.

When your agent uses it

  • Working with RobustVideoMatting MattingNetwork APIs
  • Recurrent states
  • Safe synthetic forward checks

Example prompts

  • “/model-api”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the first numbered list in SKILL.md.

  1. Ensure the RVM source modules are importable as model and that PyTorch and
  2. Instantiate the model without downloading backbone weights unless the user
  3. Feed RGB tensors normalized to 0..1 in channel-first format
  4. Recycle all four recurrent states in temporal order
  5. Validate the output contract. Matting mode returns foreground fgr, alpha

What it can do on your machine

Read from SKILL.md and the folder at commit ac3fe1a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Model API loads about 1.1k tokens when it runs, and up to ~3.2k if it reads all its reference files. Until then it costs about 41 tokens; SKILL.md has 427 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~41
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from VectorSpaceLab/AREX-Skill at commit ac3fe1a, republished under its GPL-3.0 licence (© VectorSpaceLab). 427 words, ~1,056 tokens.

Download SKILL.mdSave it as .claude/skills/model-api/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
model-api
description
Use when working with RobustVideoMatting MattingNetwork APIs, recurrent states, model variants, refiners, tensor shapes, and safe synthetic forward checks.
disable-model-invocation
true
metadata.disco-role
operating
license
GPL 3.0

RobustVideoMatting Model API

Use this sub-skill when the task is about constructing or calling the RVM PyTorch model itself rather than converting videos, preparing training data, or running evaluation metrics.

Read this when

  • The user asks how to instantiate MattingNetwork with mobilenetv3 or resnet50.
  • The task mentions recurrent states, ConvGRU memory, downsample_ratio, segmentation_pass, foreground/alpha tensor shapes, or channel/rank errors.
  • You need a safe import/forward smoke test before writing inference or training code.
  • You need to decide whether to use deep_guided_filter or fast_guided_filter as the refiner.

Route other tasks elsewhere:

  • Video/image conversion, checkpoints, TorchHub, TorchScript, ONNX, TensorFlow, or CoreML usage: inference-workflows.
  • Dataset layouts, DATA_PATHS, training stages, losses, or augmentations: training-data.
  • LR/HR metric evaluation or speed benchmarking: evaluation-tools.

Core workflow

  1. Ensure the RVM source modules are importable as model and that PyTorch and TorchVision are installed. If in doubt, run the bundled smoke helper:

    bash
    python scripts/rvm_model_smoke.py --repo-root /path/to/RobustVideoMatting --variant mobilenetv3 --device cpu
  2. Instantiate the model without downloading backbone weights unless the user explicitly wants that side effect:

    python
    from model import MattingNetwork
    
    model = MattingNetwork(variant="mobilenetv3").eval()
    # or: MattingNetwork(variant="resnet50")
  3. Feed RGB tensors normalized to 0..1 in channel-first format:

    • single frame/batch: [B, C, H, W]
    • chunked sequence: [B, T, C, H, W]
  4. Recycle all four recurrent states in temporal order:

    python
    rec = [None] * 4
    fgr, pha, *rec = model(src, *rec, downsample_ratio=0.25)
  5. Validate the output contract. Matting mode returns foreground fgr, alpha pha, and four recurrent states. segmentation_pass=True returns segmentation logits plus recurrent states, not foreground/alpha.

Show full SKILL.md (211 more words)Show less

Bundled references and scripts

  • Read references/api-reference.md for verified constructor and forward signatures, tensor ranks, output shapes, recurrent state details, model variants, and architecture notes.
  • Read references/troubleshooting.md when shape errors, invalid variants, device/dtype mismatches, recurrent-state misuse, pretrained downloads, or segmentation-pass confusion appear.
  • Run scripts/rvm_model_smoke.py for a safe synthetic forward pass on CPU or CUDA. It is adapted from the repo's speed test but intentionally avoids benchmarks, downloads, and training.

Decision points

  • Prefer mobilenetv3 for most inference and smoke tests because it is the smaller recommended variant. Use resnet50 when the user explicitly wants the larger model with modest quality improvement.
  • Keep refiner="deep_guided_filter" unless the task specifically asks for the faster guided-filter refiner or export behavior.
  • Use 5D input chunks ([B,T,C,H,W]) to improve parallelism while preserving temporal recurrence across chunks. Carry only the returned four state tensors into the next chunk.
  • Do not use a CPU smoke test as proof of GPU speed, CUDA memory behavior, or high-resolution evaluation performance. Route those questions to evaluation-tools.

Acceptance check for model API answers

A good answer for this surface names the exact tensor rank/order, explains the four recurrent states, states whether the call returns fgr/pha or segmentation logits, includes a small validation snippet or smoke command, and routes any conversion/training/evaluation work to the owning sub-skill.

© VectorSpaceLab, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (scripts, references) in skills/repositories/repo-skills/robust-video-matting/sub-skills/model-api of VectorSpaceLab/AREX-Skill.

  • SKILL.md
  • references/api-reference.md
  • references/troubleshooting.md
  • scripts/rvm_model_smoke.py

Open the folder on GitHubat commit ac3fe1a

Compare with similar skills

Model API next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Model API compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Model API this skillVectorSpaceLab/AREX-Skill328—~1.1kAutomated safety check: PassGPL-3.0
Add Uint Supportpytorch/pytorch104k2 repos~2.3kAutomated safety check: PassCustom licence
CLIP Image-Text MatchingOrchestra-Research/AI-Research-SKILLs13k8 repos~1.7kAutomated safety check: PassMIT
Add Torch Shapes Examplefacebook/pyrefly7.1k—~1.3kAutomated safety check: PassMIT
Interview Cheatsheetwanshuiyin/ARIS-in-AI-Offer5741 repos~3.4kAutomated safety check: NotesMIT
Ghstack CIpytorch/pytorch104k—~1.4kAutomated safety check: PassCustom licence

Similar skills

  • Add Uint Support

    pytorch/pytorch

    Add unsigned integer (uint) type support to PyTorch operators by updating ATDISPATCH macros.

    104k GitHub starsUsed in 2 repos~2.3k tokens
    AI & LLM EngineeringAuto-check passed
  • CLIP Image-Text Matching

    Orchestra-Research/AI-Research-SKILLs

    Explains OpenAI's CLIP model for zero-shot image classification, image-text similarity, semantic image search and content moderation, with install steps and code patterns.

    13k GitHub starsUsed in 8 repos~1.7k tokens
    AI & LLM EngineeringAuto-check passed
  • Add Torch Shapes Example

    facebook/pyrefly

    Official

    A skill your agent uses when adding a new PyTorch model to Pyrefly's shape-tracking example corpus under tensor-shapes/pyrefly-torch-stubs/examples — i.e.

    7.1k GitHub stars~1.3k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Interview Cheatsheet

    wanshuiyin/ARIS-in-AI-Offer

    Generate a long-form Chinese interview-prep cheat sheet on a specific ML/LLM topic — formulas with derivations, from-scratch PyTorch code, comparison tables, and 25 高频面试题 (L1 必会 / L2 进阶 / L3 顶级 lab).

    574 GitHub starsUsed in 1 repo~3.4k tokens
    AI & LLM EngineeringAuto-check: notes
  • Ghstack CI

    pytorch/pytorch

    Manage CI for PyTorch ghstack stacks by running CI where its results are useful now and deferring other PRs with [no-ci].

    104k GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • MUSA GPU Training Optimizer

    open-infra-skills/infra-skills

    Profiles, benchmarks and tunes AI training workloads on Moore Threads MUSA GPUs with a measurement-first process that keeps model behavior unchanged.

    141 GitHub stars~1.7k tokensUpdated 2 mo ago
    AI & LLM EngineeringAuto-check passed

More from VectorSpaceLab/AREX-Skill

All 159 skills in this repo
  • Agent Lightning

    VectorSpaceLab/AREX-Skill

    Use this repo skill for Agent Lightning package tasks: authoring trainable agents, tracing rewards and spans, running LightningStore/Trainer loops, using agl CLI services, choosing examples, and…

    328 GitHub stars~1.4k tokensUpdated 1 mo ago
    Auto-check passed
  • Agent Tools

    VectorSpaceLab/AREX-Skill

    A skill your agent uses when configuring LiteLLM for MCP tools, A2A agents, Claude Code/Cursor agent gateway traffic, MCP auth/OAuth, tool permissions, semantic filtering, or agent-specific proxy…

    328 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Awel

    VectorSpaceLab/AREX-Skill

    Build and debug DB-GPT agents, tools, skills, teams, and AWEL workflows, including deterministic local DAG runs and HTTP-trigger topology without assuming an LLM, credential, or external service.

    328 GitHub stars~2.3k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents And Middleware

    VectorSpaceLab/AREX-Skill

    Work on the actively maintained LangChain v1 agent package: initchatmodel, createagent, structured output, tools, middleware, embeddings initialization, provider routing, and agent runtime…

    328 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Agents Workflows

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for giskard.agents async chat workflows, tools, prompt templates, structured outputs, retries, rate limiting, embeddings, and optional LiteLLM backend.

    328 GitHub stars~500 tokensUpdated 1 mo ago
    Auto-check passed
  • Alphafold3

    VectorSpaceLab/AREX-Skill

    A skill your agent uses for AlphaFold 3 input preparation, prediction command planning, output interpretation, and Python API inspection.

    328 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed

Works with

Questions about Model API

What does Model API do?

A skill your agent uses when working with RobustVideoMatting MattingNetwork APIs, recurrent states, model variants, refiners, tensor shapes, and safe synthetic forward checks. Model API is an agent skill from VectorSpaceLab/AREX-Skill. Use when working with RobustVideoMatting MattingNetwork APIs, recurrent states, model variants, refiners, tensor shapes, and safe synthetic forward checks.

When should I use Model API?

Model API fits situations like: working with RobustVideoMatting MattingNetwork APIs; recurrent states; safe synthetic forward checks.

How do I install Model API in Claude Code?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill model-api -a claude-code`. Or copy the skill folder (skills/repositories/repo-skills/robust-video-matting/sub-skills/model-api in VectorSpaceLab/AREX-Skill) into .claude/skills/model-api in your project. Claude Code loads it when a task matches its description.

How do I install Model API in Codex?

Run `npx skills add VectorSpaceLab/AREX-Skill --skill model-api -a codex`. Or copy the skill folder (skills/repositories/repo-skills/robust-video-matting/sub-skills/model-api in VectorSpaceLab/AREX-Skill) into .agents/skills/model-api in your project. Codex loads it when a task matches its description.

Can I use Model API in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add VectorSpaceLab/AREX-Skill --skill model-api -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/model-api, .gemini/skills/model-api, .github/skills/model-api and .opencode/skills/model-api in your project.

What does Model API need to run?

Going by SKILL.md and its folder, Model API needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does Model API access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Model API safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Model API use?

Model API is published under the GPL-3.0 licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Model API use?

About 1.1k tokens (SKILL.md is roughly 4.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 2.2k tokens, read only when the agent opens those files.

What are the alternatives to Model API?

Skills that share tags, products or a category with Model API: Add Uint Support (pytorch/pytorch, 104k stars), CLIP Image-Text Matching (Orchestra-Research/AI-Research-SKILLs, 13k stars), Add Torch Shapes Example (facebook/pyrefly, 7.1k stars) and Interview Cheatsheet (wanshuiyin/ARIS-in-AI-Offer, 574 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Model API?

VectorSpaceLab (a GitHub organization) maintains it in VectorSpaceLab/AREX-Skill, which has 328 GitHub stars. The repository holds 159 skills in this directory. The repository was last updated on September 3, 2026.

Source: VectorSpaceLab/AREX-Skill on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.