Hub Operations logo

Hub Operations

Organization
VectorSpaceLab
hub-operations

Operate Hugging Face Hub repositories and API resources with authenticated or mocked Python workflows, explicit revision control, safe mutations, and actionable error recovery.

Overview

PublisherVectorSpaceLab
RepositoryAREX-Skill
Skill namehub-operations
Stars
341
Forks
26
Bundled files
3
LicenseApache-2.0
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.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

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

Installation

Install the Hub Operations 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/VectorSpaceLab/AREX-Skill/tree/main/examples/creator/repo-to-skills/artifacts/huggingface_hub/huggingface-hub/sub-skills/hub-operations
  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/VectorSpaceLab/AREX-Skill.git /tmp/AREX-Skill
mkdir -p .claude/skills
cp -r /tmp/AREX-Skill/examples/creator/repo-to-skills/artifacts/huggingface_hub/huggingface-hub/sub-skills/hub-operations .claude/skills/hub-operations
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Hub Operations 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 Hub Operations 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 Hub Operations 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.

Hub Operations

Use this sub-skill for Python workflows that discover or mutate Hub API resources: repositories, files and commits, refs, collections, cards, discussions and pull requests, and webhook registrations. It is grounded in huggingface_hub 1.29.0.

Trigger And Route

This is the routing surface, not a full API manual. Select the smallest linked reference that covers the request, then keep the operation and verification boundaries visible.

Request signalRouteRead next
create/inspect/search a repo, list files/tree/commits, or manage refsrepository and discoveryAPI reference
upload/copy/delete files, create a commit or PR, or pin a parent SHAfiles and commitsWorkflows
cards, metadata, collections, discussions, or PR reviewcollaboration and metadataAPI reference and Workflows
webhook registration, scope, enable/disable, or deletionwebhook resourcesWorkflows
token precedence, access, 401/403/404/409/412/429, or ambiguous mutationauthentication and recoveryTroubleshooting
deterministic unit-style behavior without Hub accessmocked HfApi caseMocked recovery case

Use this route when the request includes one or more of:

  • create, list, inspect, update, delete, move, or duplicate a model, dataset, or Space repository;
  • upload, delete, or server-side copy repository files; create a commit or PR;
  • inspect a revision or manage branches and tags;
  • search models, datasets, or Spaces and interpret returned info objects;
  • create or curate collections and repository cards;
  • read or manage discussions, PRs, and their events;
  • create, inspect, enable, disable, update, or delete webhook resources;
  • configure or diagnose authentication needed upstream of these operations;
  • identify and recover from Hub API errors, including stale-parent conflicts.

Route elsewhere when the primary task is:

  • download/cache behavior, HfFileSystem, or buckets: sibling downloads-and-storage route;
  • hosted inference or Inference Endpoints: sibling inference-and-endpoints route;
  • exact hf command syntax, output modes, or shell automation: sibling cli-and-automation route;
  • Jobs, sandboxes, Space runtime/hardware, or a deployed webhook server: sibling hosted-compute-and-integrations route.

Webhook registration is owned here; receiving payloads in a server is not. Space repository metadata is owned here; running or scaling the Space is not.

Operating Contract

  1. Classify the operation. Label every step READ-ONLY, MUTATION, or DESTRUCTIVE. Do not hide a mutation inside an inspection step.
  2. Resolve identity. Record repo_id, repo_type, revision, endpoint, and token source before calling the API. Prefer explicit namespace/name; Python uses singular repo types: model, dataset, space.
  3. Authenticate safely. Prefer HF_TOKEN or a previously saved login. Never hardcode, log, print, serialize, or include a token in an exception report. Use a write-scoped token only for mutations.
  4. Inspect before mutation. Fetch the target object and revision, confirm ownership/type/visibility, capture the current SHA when concurrency matters, and preview local paths or remote resources affected.
  5. Use explicit mutation intent. Set a meaningful commit_message; pass repo_type; choose revision; use create_pr=True when review is safer; use parent_commit for optimistic concurrency.
  6. Verify the result. Assert returned IDs/types and inspect the resulting revision. For PR commits, verify CommitInfo.pr_revision and inspect that ref rather than assuming main changed.
  7. Guard destructive actions. Require an exact target display, a dry-run plan, and explicit confirmation immediately before delete, merge, move, or visibility reduction. Re-inspect after confirmation if the workflow waited.
  8. Recover narrowly. Branch on typed exceptions and HTTP status. Retry only operations shown to be safe, bounded, and still valid after re-read.

Safety confirmations

Deletion, move, visibility reduction, branch/tag deletion, collection or webhook deletion, irreversible comment hiding, and PR merge require a read-only plan, a dry-run gate, exact target confirmation, an immediate SHA or state recheck, one mutation, and a post-check. --yes or APPLY=1 is only a mechanism; non-interactive use must receive approval from an upstream reviewed control. See the guarded workflow.

Core Concepts

  • repo_id is normally namespace/name. A bare name can use the authenticated namespace for creation, but explicit IDs are safer in automation.
  • repo_type=None means a model for most APIs. Always pass dataset or space; never pass plural forms to Python methods.
  • A revision can be a branch, tag, commit OID, or PR ref such as refs/pr/3. Mutating methods normally default to main; verify the method-specific constraints before combining revision and create_pr.
  • exist_ok=True makes repository, branch, or tag creation tolerant of an existing target. It does not prove that the existing resource has the requested visibility or settings. Collections spell this exists_ok.
  • visibility accepts public or private, plus protected for Spaces. Do not pass both private and visibility.
  • parent_commit is a full or short commit OID used as an optimistic concurrency check. On conflict, fetch the new head and re-evaluate; do not blindly drop the check.
  • create_pr=True places a proposed commit on a PR ref. CommitInfo exposes pr_url, pr_num, and pr_revision; main is unchanged until merge.
  • commit_message is the commit summary. Keep it specific and never place credentials, signed URLs, or private payload content in it.
  • API listings are iterables and returned info fields are often optional. Limit iteration and test for None; an info query usually contains more detail than a list query.

Choose The Client Surface

Use HfApi(...) when several calls should share an endpoint, token, user-agent, or headers. Root-level helpers such as create_repo, upload_file, and list_models expose the same public operations and are convenient for isolated calls. Keep one configured client through a workflow so endpoint and credentials cannot drift.

Read API reference before writing calls or interpreting RepoUrl, info, collection, discussion, webhook, or commit objects. It contains signatures verified from the installed 1.29.0 package.

Read workflows when implementing create → inspect → upload → revision/PR flows, discovery, refs, cards, collections, discussions, webhook resources, or a check-before-delete plan. Examples explicitly mark read-only and mutation boundaries.

Read troubleshooting when credentials, identity, access, revisions, concurrency, upload patterns, rate limits, network failures, or destructive safeguards are involved. Follow its typed, bounded recovery rules instead of broad retries.

Output Expectations

Return or record, without secrets:

  • resolved endpoint, repo_id, repo_type, and requested revision;
  • mutation classification and whether confirmation occurred;
  • observed starting SHA and resulting SHA or PR ref when applicable;
  • concise fields from returned objects, not raw object dumps containing secrets (notably webhook resources);
  • verification observations: resource exists, expected path/ref/card/event is present, or resource is absent after an approved deletion;
  • typed error, HTTP status, request ID, recovery attempted, and any remaining ambiguity.

Stop rather than guess when target ownership, repo type, destructive intent, credential scope, or post-conflict content validity cannot be established.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Hub Operations AI skill do?

Operate Hugging Face Hub repositories and API resources with authenticated or mocked Python workflows, explicit revision control, safe mutations, and actionable error recovery.

Why use Hub Operations on TypingMind?

Because you install it once and use it with any model. Hub Operations 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 Hub Operations in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/VectorSpaceLab/AREX-Skill/tree/main/examples/creator/repo-to-skills/artifacts/huggingface_hub/huggingface-hub/sub-skills/hub-operations. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Hub Operations?

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 Hub Operations?

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

Is the Hub Operations AI skill free?

Yes. It is published on GitHub by VectorSpaceLab under the Apache-2.0 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 👇