agentleFS
DshamirDshamir/slm-forge/skills/forge-publish/SKILL.md

forge-publish

Skill1 starsChanged 6 months agoMITView on GitHub

Final publishing step — flips both the HF model repo and HF Space from private to public via the HF API. Runs ONLY after forge-card-validator and forge-smoketest have passed. Verifies the flip succeeded by re-reading each repo's settings.

  • Reads credentials
Files
SKILL.md

forge-publish

When this fires

Phase position: PUBLISH — between SMOKETEST and TEARDOWN. Fires only if both CARD_VALIDATOR and SMOKETEST returned PASS. This is the public visibility switch.

What it does

  1. Reads state.json or v1 manifest to resolve hf_repo + hf_space
  2. Strips URLs to <namespace>/<name> form
  3. Calls PUT https://huggingface.co/api/{models,spaces}/<id>/settings with {"private": false} for both
  4. Verifies by re-reading each repo's API record — .private must be false
  5. Emits publish-report.json

Inputs

  • Reads slm-forge/.runs/<run-id>/state.json (v2 path) or v1 manifest
  • Needs HF_TOKEN from /tmp/forge-creds.env

Outputs

  • Writes slm-forge/.runs/<run-id>/publish-report.json:
    {"status":"pass","hf_repo_public":"https://...","hf_space_public":"https://...","flipped_at":"..."}
  • On fail (API rejected OR repo still private after flip): exit 1, dispatcher writes failure-report.md

Failure modes

FailureCauseRecovery
Token lacks repo:write scopeHF token was fineGrained without public-flipRotate token, re-run PUBLISH manually
One of the two flipped but not the otherAPI rate limit or partial failureRe-run PUBLISH (idempotent)

Usage

bash slm-forge/skills/forge-publish/run.sh <run-id>

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.