<< All versions
Skill v1.0.0
currentLLM-judged scan90/100christoffermattssonlangseth/codex-skills/karospace-r2-uploader
──Details
PublishedOctober 21, 2026 at 08:26 AM
Content Hashsha256:14f4115820080e5b...
Git SHA3092d14677ec
──Files
Files (1 file, 2.7 KB)
SKILL.md2.7 KBactive
SKILL.md · 68 lines · 2.7 KB
version: "1.0.0" name: karospace-r2-uploader description: Prepare exported KaroSpace viewer bundles for website/R2 upload. Use when Codex is given an exported viewer HTML file plus its .genes.json manifest and shard directory, needs to sanity-check the bundle layout, and should generate the exact bash commands for staging, dry-run upload, live upload, and optional local sidecar validation.
KaroSpace R2 Uploader
Use this skill when the user already has a KaroSpace export and wants upload commands, not when the main task is creating a new dataset card or thumbnail.
Workflow
- Verify the three required inputs exist:
- exported HTML viewer
- exported
.genes.jsonmanifest - shard directory
- Run
scripts/emit_r2_upload_commands.pyto generate the staging and upload commands. - Prefer a temporary staging directory plus
--viewers-dirover per-file uploads. - If the repository has
scripts/upload_to_r2.py, keep the commands rooted at that repo and emit both:
- dry run
- real upload
- When helpful, also emit the optional local validation block that calls
portal_validation.validate_viewers_tree(...)on the staging directory.
Rules
- Preserve the source bundle names exactly when copying into the staging directory.
- Stage the shard directory under the same basename that appears in the export.
- Use
rsync -a --deletefor the shard directory so reruns stay clean. - Default the staging directory to
/tmp/<stage-name>-r2. - If the user already has the files refreshed under the repo's local
viewers/tree, generate commands from those repo-local paths. - If the user only gives source export paths outside the repo, generate commands directly from those source paths rather than forcing a copy into
viewers/. - Keep the answer compact: one bash block for upload, one optional bash block for validation.
Output Pattern
Use this structure unless the user asks for something else:
bash
cd /path/to/repoSTAGE_DIR=/tmp/<stage-name>-r2rm -rf "$STAGE_DIR"mkdir -p "$STAGE_DIR"cp /path/to/viewer.html "$STAGE_DIR/"cp /path/to/manifest.genes.json "$STAGE_DIR/"rsync -a --delete \/path/to/shards/ \"$STAGE_DIR/shards/"python scripts/upload_to_r2.py --viewers-dir "$STAGE_DIR" --dry-runpython scripts/upload_to_r2.py --viewers-dir "$STAGE_DIR"
Optional local validation block:
bash
cd /path/to/repopython -c 'from pathlib import Path; import sys; sys.path.insert(0, "scripts"); from portal_validation import validate_viewers_tree, format_report; print(format_report(validate_viewers_tree(Path("/tmp/<stage-name>-r2"))))'
Resources
scripts/
emit_r2_upload_commands.py: validate the export paths and print the exact upload and optional validation blocks.