New advertisers: 50% off your first month with code FIRSTMONTHSee slots

Unofficial Hugging Face publishing tools for agents: create repos, Spaces, DOIs, and gated access.

version
1.0.0
GitHub stars
32
View on GitHub

What it does

  • Adds create-dataset, create-model, create-space, and explainer-space skills for public or private repos under your account or orgs
  • Covers visibility changes, collections upkeep, DOI minting, Hub inventory snapshots, and Storage Buckets over S3
  • Reviews access requests on gated repos and accepts or rejects only the users you name
  • Designed for publishers who keep account, naming, and policy settings in a private profile outside the plugin

Unofficial Hugging Face publisher skills for AI agents: create datasets, models and Spaces (static, Gradio, Docker), set visibility, build explainer Spaces from templates you can override, keep collections, review and decide access requests on gated repos (only the users you name), mint DOIs, take a Hub inventory, convert loose audio datasets to parquet, curate sentence-dataset lists, use Storage Buckets over S3, and contact support. Your account, orgs, naming style and policies live in a private profile outside the plugin (setup). Companion: hf-research.

Add marketplace

/plugin marketplace add danielrosehill/Claude-Code-Plugins

Run it inside Claude Code once, then install the plugin below.

Install

/plugin install hf-publisher-tools@danielrosehill

Run it inside Claude Code after adding the marketplace.

Files

Discovered from source

Gated access requests

Unofficial skill of the hf-publisher-tools plugin. Not affiliated with Hugging Face.

1. Load your settings

Find the data folder (see shared/settings.md: $HF_PUB_HOME, $CLAUDE_USER_DATA/hf-publisher-tools/, then ~/.claude-user-data/hf-publisher-tools/). Read profile.env and access-requests.md there if they exist. They win over the defaults below, and comments in profile.env are instructions.

  • access-requests.md holds your acceptance policy (for example "non-commercial use is free, commercial use needs a licence: flag it") and any contact address or wording to point requesters to. Apply it when you read the requests in step 3.
  • Owners scanned: --owner args, else HF_PUB_OWNERS, else HF_PUB_DEFAULT_OWNER, else the token's whoami user plus its orgs. The script reads profile.env itself; real environment variables win.
  • With no notes, the default is: list the requests, show them with a neutral reading of the form answers, and decide nothing until the user names the users.

2. Access

Deciding requests needs a token with the write or admin role on the repo's owner, in HF_TOKEN or from hf auth login. A read token, or a non-member, gets HTTP 403. If the token lacks the role, say so; the settings pages in the browser fallback below need the same role.

3. Requesters' data stays out of files

Usernames, full names, e-mail addresses and form answers are personal data. Show them in the chat only. Never write them to any file (no logs, notes, commit messages or issues) and do not redirect the script's output into a repository. The script never prints e-mail addresses. When you report afterwards, give counts and repo names.

4. Steps

R="uv run --no-project --with huggingface_hub python3 ${CLAUDE_PLUGIN_ROOT}/scripts/access-requests.py"
$R --profiles                   # dry run: every gated repo of your owners, pending requests
  1. List. Run the dry run (it walks every model and dataset of each owner, so it can take a while; --limit-repos N scans only the first N gated repos per owner for a quick look). Output: repos (each gated repo, its mode, pending count) and pending (repo, user, full name, requested at, form answers, whether a form was filled in, and with --profiles the public profile counts and URL).
  2. Show the list as a table: repo, user, full name, requested, the form answers that matter, and a reading. The reading follows your policy from access-requests.md; with none, keep it neutral ("states a research use", "no answers"). No e-mail addresses.
  3. Wait for the decision. Accept or reject only the users the publisher names, never on your own judgement and never in bulk because requests "look fine". Then, for exactly those users:
    $R --accept alice,bob --apply                            # every repo each asked for
    $R --accept alice --repo owner/name --apply              # one repo
    $R --reject carol --reason "short reason" --apply        # the reason is shown to the requester
    
    Run without --apply first if the list may have changed; not_pending lists names that matched no pending request (typo, or already decided).
  4. Verify the thing: re-run the dry run; the decided users are gone from pending. For a spot check, open https://huggingface.co/<owner>/<repo>/settings/gated-user-access (models) or https://huggingface.co/datasets/<owner>/<repo>/settings/gated-user-access (datasets).

Gated datasets have no request form, so their requests arrive with no answers. Offer --profiles (the requester's public profile) and let the publisher decide or ask the requester.

5. History: every request in the last N days

$R --history --since 30 --owner my-org,my-user      # read-only, all statuses, newest first

Lists pending, accepted and rejected requests made in the window across every gated repo of each owner, with repo, user, full name, status and form answers, plus totals and the repos that had requests. requested is when the user asked: Hugging Face does not return when a request was decided. One *_info call per repo, so it is slow on large accounts.

Browser fallback

If the API fails, the same lists and Accept/Reject buttons are on the settings pages, in a browser logged in as a member of the owner:

  • models: https://huggingface.co/<owner>/<repo>/settings/gated-user-access
  • datasets: https://huggingface.co/datasets/<owner>/<repo>/settings/gated-user-access

API facts (huggingface_hub 2.x)

CallDetail
list_pending_access_requests(repo, repo_type=...)GET /api/{models,datasets}/{repo}/user-access-request/pending; also /accepted, /rejected. Returns a generator in 2.x: wrap in list() before len() or +
AccessRequest fieldsusername, fullname, email, timestamp, status, fields (form answers keyed by the field label in the card's extra_gated_fields; {} when the gate has no form). email is filled in for org members' tokens; the script drops it
list_accepted_access_requests / list_rejected_access_requestssame shape; timestamp is the request time for all three lists (tz-aware UTC)
accept_access_request(repo, user, repo_type=...)POST .../user-access-request/handle with {"user", "status": "accepted"}; 403 with a read token or without write/admin role; 400 if the repo is not gated
reject_access_request(repo, user, repo_type=..., rejection_reason=...)same endpoint, status: "rejected"; rejection_reason is a required keyword in 2.x (pass None for none)
model_info(id).gated / dataset_info(id).gated"manual", "auto" or False. With "auto", requests are approved without review
Gate formthe card's extra_gated_prompt and extra_gated_fields front matter

Data storage

Reads profile.env and access-requests.md from the data folder. Writes nothing: requesters' personal data is shown in chat only.

Readme

hf-publisher-tools

Skills that let an AI agent (Claude Code and similar) publish on the Hugging Face Hub. Create datasets, models and Spaces, set visibility, build explainer Spaces, keep collections, mint DOIs, review access requests on your gated repos, move files over the S3 gateway, take inventories, standardise audio datasets and contact support.

Unofficial. Not made by or affiliated with Hugging Face. Companion plugin for finding and using models: hf-research.

Skills

SkillDoes
list-orgsyour user and orgs, and whether the token can write to each
create-dataset / create-modelnew repo, public or private, under you or an org, with your naming style
set-visibilitycheck or flip public/private
create-spacestatic, Gradio or Docker Space: create, deploy, status, restart, verify
explainer-spacebuild and publish an explainer/demo Space from a template library (yours override the built-ins)
collectionslist, find unfiled repos, create, add, remove, note, reorder, rename, delete
access-requestsreview pending requests on your gated repos with their form answers, accept or reject only the users you name, history over N days; your policy lives in your private notes
generate-doifind public repos without a DOI, mint them through the web UI
hub-inventoryCSV snapshot of every model, dataset and Space you own
audio-parquet-standardiseconvert audio datasets stored as loose files to parquet, verified
sentence-collections / sentence-collections-synccurated lists of text-only sentence datasets with a length-balance audit, plus a consolidated union
s3-bucketsStorage Buckets over s3.hf.co with boto3, AWS CLI or rclone
contact-supportemail Hugging Face support or billing with a self-contained request
setupwrite your private profile

Your settings stay private

Your account, organisations, owner routing, naming style, export folder, collection names, access-request policy and support sender live outside the plugin, by default in ~/.claude-user-data/hf-publisher-tools/: profile.env for values, <skill-name>.md for your own notes on a skill, and templates/ for your explainer templates. Every skill reads them first, and plugin updates never touch them. Keys: shared/settings.md. This follows the Public Plugin, Private Overlay pattern.

Requirements

scripts/hf-hub.py is stdlib-only Python over the Hub REST API, with JSON output. scripts/access-requests.py and scripts/model-notes.py need huggingface_hub, and scripts/audio-to-parquet.py needs datasets and huggingface_hub (uv run --with ...). Token: HF_TOKEN, else ~/.cache/huggingface/token. A fine-grained token writes only where it is scoped. Org admin rights don't widen it.

Endpoints (verified live 2026-10-22; collections 2026-10-24 with probe repos, since deleted)

OpRequestNotes
identity, orgs, scopesGET /api/whoami-v2fine-grained scopes at auth.accessToken.fineGrained.scoped[] (entity.name, permissions incl. repo.write)
existsGET /api/{datasets,models,spaces}/<id>200 with private, gated; 404 if absent or private and out of scope
createPOST /api/repos/create {type, name, organization?, private, sdk?}a Space needs sdk (gradio/static/docker); the script sends gradio unless --sdk is given (verified 2026-10-25 with a probe Space, since deleted). omit organization for the user account; 409 if it exists; 403 if no write on the org
visibilityPUT /api/{datasets,models,spaces}/<id>/settings {private}
list collectionsGET /api/collections?owner=<o>&limit=100100 per page max; next page in the Link: <…cursor=…>; rel="next" header (offset is ignored, limit=200 is 400). Items need GET /api/collections/<slug> per collection
new collectionPOST /api/collections {title, namespace, private, description}returns slug; title ≤ 60 chars, description ≤ 150 (400 above, 2026-10-31)
add to collectionPOST /api/collections/<slug>/items {item: {type, id}, note?}409 if already in it; note ≤ 500 chars; type: paper with an arXiv id works (2026-10-31)
DOI presentGET /api/{datasets,models}?author=<o>&full=truea doi:10.57967/hf/<n> entry in tags (2026-10-25). Minting has no public endpoint: web Settings only
one collectionGET /api/collections/<slug>items carry _id (the item id used below), position, note.text; an old slug 307-redirects to the current one
collections holding a repoGET /api/collections?item=<models|datasets|spaces>/<owner>/<name>&limit=100any owner (2026-10-25)
edit itemPATCH /api/collections/<slug>/items/<item _id> {note?, position?}positions don't re-index others
remove itemDELETE /api/collections/<slug>/items/<item _id>
edit collectionPATCH /api/collections/<slug> {title?, description?, private?, position?}a new title gives a new slug (same hex); PATCH/DELETE on the old slug answer 307
delete collectionDELETE /api/collections/<slug>repos untouched
Space runtimeGET /api/spaces/<id>/runtimestage, hardware.current/requested, errorMessage
Space restartPOST /api/spaces/<id>/restart[?factory=true]static Spaces answer 400 "Can't restart a static Space"; not yet run on a Gradio Space
searchGET /api/{datasets,models}?search=&filter=&pipeline_tag=&sort=&expand[]=…no token needed for public. Language: bare en on models, language:en on datasets. An unknown filter returns 200 []. num_parameters doesn't bound size, so --max-params filters safetensors.total client-side (2026-10-25)
dataset sampleGET https://datasets-server.huggingface.co/{splits,size,first-rows}?dataset=<id>[&config=&split=]404 for private/gated out of scope or no viewer; columns can have odd names (marketeam/Marketing-Emails has one column named 0)
model configGET https://huggingface.co/<id>/resolve/main/config.jsoncontext from max_position_embeddings/n_positions
repo file treeGET /api/datasets/<id>/tree/main?recursive=truepaged via Link; entries {type, path, size}. The ?author= list has no siblings for datasets even with full=true (models do have them; 2026-10-30)
deleteDELETE /api/repos/delete {type, name, organization?}200 with a plain-text body, not JSON

delete is in the script (it needs --yes) but has no skill on purpose. Deleting a Hub repo is irreversible, so do it deliberately.

Licence

MIT.

Details

Marketplace
danielrosehill/Claude-Code-Plugins
Source
danielrosehill/HF-Publisher-Tools-Plugin
Author
Daniel Rosehill
Category
Data & Datasets
License
MIT

More from danielrosehill/Claude-Code-Plugins

All 264

Similar to hf-publisher-tools

More LLM Integration