
hf-publisher-tools
Unofficial Hugging Face publishing tools for agents: create repos, Spaces, DOIs, and gated access.
- version
- 1.0.0
- GitHub stars
- 32
What it does
- Adds
create-dataset,create-model,create-space, andexplainer-spaceskills 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-PluginsRun it inside Claude Code once, then install the plugin below.
Install
/plugin install hf-publisher-tools@danielrosehillRun it inside Claude Code after adding the marketplace.
Files
Discovered from sourceGated 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.mdholds 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:
--ownerargs, elseHF_PUB_OWNERS, elseHF_PUB_DEFAULT_OWNER, else the token'swhoamiuser plus its orgs. The script readsprofile.envitself; 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
- List. Run the dry run (it walks every model and dataset of each owner, so it can take a while;
--limit-repos Nscans only the first N gated repos per owner for a quick look). Output:repos(each gated repo, its mode, pending count) andpending(repo, user, full name, requested at, form answers, whether a form was filled in, and with--profilesthe public profile counts and URL). - 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. - 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:
Run without$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--applyfirst if the list may have changed;not_pendinglists names that matched no pending request (typo, or already decided). - Verify the thing: re-run the dry run; the decided users are gone from
pending. For a spot check, openhttps://huggingface.co/<owner>/<repo>/settings/gated-user-access(models) orhttps://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)
| Call | Detail |
|---|---|
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 fields | username, 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_requests | same 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 form | the 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
| Skill | Does |
|---|---|
list-orgs | your user and orgs, and whether the token can write to each |
create-dataset / create-model | new repo, public or private, under you or an org, with your naming style |
set-visibility | check or flip public/private |
create-space | static, Gradio or Docker Space: create, deploy, status, restart, verify |
explainer-space | build and publish an explainer/demo Space from a template library (yours override the built-ins) |
collections | list, find unfiled repos, create, add, remove, note, reorder, rename, delete |
access-requests | review 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-doi | find public repos without a DOI, mint them through the web UI |
hub-inventory | CSV snapshot of every model, dataset and Space you own |
audio-parquet-standardise | convert audio datasets stored as loose files to parquet, verified |
sentence-collections / sentence-collections-sync | curated lists of text-only sentence datasets with a length-balance audit, plus a consolidated union |
s3-buckets | Storage Buckets over s3.hf.co with boto3, AWS CLI or rclone |
contact-support | email Hugging Face support or billing with a self-contained request |
setup | write 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)
| Op | Request | Notes |
|---|---|---|
| identity, orgs, scopes | GET /api/whoami-v2 | fine-grained scopes at auth.accessToken.fineGrained.scoped[] (entity.name, permissions incl. repo.write) |
| exists | GET /api/{datasets,models,spaces}/<id> | 200 with private, gated; 404 if absent or private and out of scope |
| create | POST /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 |
| visibility | PUT /api/{datasets,models,spaces}/<id>/settings {private} | |
| list collections | GET /api/collections?owner=<o>&limit=100 | 100 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 collection | POST /api/collections {title, namespace, private, description} | returns slug; title ≤ 60 chars, description ≤ 150 (400 above, 2026-10-31) |
| add to collection | POST /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 present | GET /api/{datasets,models}?author=<o>&full=true | a doi:10.57967/hf/<n> entry in tags (2026-10-25). Minting has no public endpoint: web Settings only |
| one collection | GET /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 repo | GET /api/collections?item=<models|datasets|spaces>/<owner>/<name>&limit=100 | any owner (2026-10-25) |
| edit item | PATCH /api/collections/<slug>/items/<item _id> {note?, position?} | positions don't re-index others |
| remove item | DELETE /api/collections/<slug>/items/<item _id> | |
| edit collection | PATCH /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 collection | DELETE /api/collections/<slug> | repos untouched |
| Space runtime | GET /api/spaces/<id>/runtime | stage, hardware.current/requested, errorMessage |
| Space restart | POST /api/spaces/<id>/restart[?factory=true] | static Spaces answer 400 "Can't restart a static Space"; not yet run on a Gradio Space |
| search | GET /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 sample | GET 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 config | GET https://huggingface.co/<id>/resolve/main/config.json | context from max_position_embeddings/n_positions |
| repo file tree | GET /api/datasets/<id>/tree/main?recursive=true | paged 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) |
| delete | DELETE /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- hf3dv1.1.0
- home-assistant-managerv1.0.0
- home-assistant-mgmtv1.0.0
- home-audiov1.0.0
- home-budget-helperv1.0.0
- hotkey-builderv0.2.1
- html-email-designerv1.0.0
- ideationv1.0.0
- ideation-planningv1.4.3
- ikea-israelv0.1.1
- image-annotationv1.1.0
- image-editingv1.0.0
- image-productionv2.4.2
- imagemeterv1.0.0
- input-device-mapperv0.2.0
- israel-agent-skillsv1.1.2
- israel-open-datav0.1.0
- israel-opening-hoursv0.2.1
- israel-osintv0.1.0
- israel-postv0.3.0
- israel-shoppingv1.9.0
- israeli-tech-shoppingv1.0.0
- jewish-texts-referencev1.1.0
- jewish-utilitiesv1.0.0
Similar to hf-publisher-tools
More LLM Integration
claude-apianthropics/skills196.9K starsClaude API and SDK documentation skill for building LLM-powered applications
prompts.chatf/prompts.chat178.2K starsAccess thousands of AI prompts and skills directly in your AI coding assistant. Search prompts, discover skills, save your own, and improve prompts with AI.
security-guidanceanthropics/claude-code156.1K starsSecurity review for Claude-generated code. Pattern-based warnings on edits, LLM-powered diff review on Stop, and an agentic commit reviewer that catches injecti
agentdbruvnet/ruflo82.2K starsAgentDB (external: maintained in ruvnet/agentdb, pinned to commit 27678c3, plugin 3.6.0): agentdb's own standalone MCP server pinned to agentdb@3.6.0 (vector me
headroom-skillheadroomlabs-ai/headroom80.3K starsSkill: add headroom-ai compress() to a Python or TypeScript app to cut LLM input tokens (tool outputs, logs, JSON, chat history). No API key.
context7-pluginupstash/context765K starsUp-to-date documentation lookup. Pull version-specific documentation and code examples directly from source repositories into your LLM context.