osf-artifact-uploadlisted
Install: claude install-skill zernie/paperlint
<!-- vigiles:sha256:334c907233abc97c compiled from skills/osf-artifact-upload/SKILL.md.spec.ts -->
# osf-artifact-upload — push/replace a file on an OSF project via API
Verified working 2026-07-18 (replaced `artifact.zip` on the node of a real submission's artifact).
## Prereq — an OSF personal access token
- Create at **osf.io/settings/tokens** → scope **`osf.full_write`** (read-only cannot write). Shown once.
- Put it in the env as `OSF_TOKEN` for the session, OR the user pastes it. **NEVER commit it, never echo it,
never write it into a file or the skill.** Remind the user to **revoke it** after the upload.
- ⚠️ Note: a token stored as a gzipped/base64 blob in some other env var may be **blocked from decoding by
the auto-mode classifier** (correctly). Don't fight it — ask for a fresh `osf.full_write` token instead.
## Gotchas learned (bake these in)
- **curl globbing:** OSF API URLs with `[ ]` (e.g. `?page[size]=50`) make curl fail silently (empty body,
no status). Always use **`curl -g`** (disable globbing) or drop the bracketed param.
- **Flaky proxy:** calls intermittently return 0 bytes / empty. **Retry** (loop until valid JSON;
`--retry 3`). Verify by API metadata, not only by the waterbutler download (download-back flakes most).
- **CA bundle:** in this env, add `--cacert /root/.ccr/ca-bundle.crt` to every curl.
- **Node GUID:** the `osf.io/<guid>` in the paper's Availability (a five-character guid, e.g. `ab12c`) IS the node id; the
`?view_only=…` is a