agentsclimarketplace

Cohub work publish

Skill markbang/cohub-work-skill/skills/cohub-work-publish

Build and publish a Cohub Work from a Vite/React app directory (usually Work Kit). Use when publishing or updating a Work with --dir dist, setting work/viewer scopes, or refreshing a work-kit based product URL.From its SKILL.md

Install
npx -y skills add markbang/cohub-work-skill --skill cohub-work-publish

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • 27 days oldThe repository was created 27 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

2.4 KB, 581 tokens by cl100k_base, as published. Nobody here has run it

Cohub Work Publish

Publish a static Cohub Work from a built app directory.

Install this skill

npx skills add https://github.com/markbang/cohub-work-skill \
  --skill "cohub-work-publish" \
  --agent codex \
  --yes \
  --copy

When to use

  • User asks to publish / update a Work
  • A Work Kit product is ready for dist/ snapshot publish
  • Need a public URL after build

Inputs

Resolve:

  • space_id (default $COHUB_SPACE_ID)
  • app directory containing package.json + vite.config.ts
  • Work slug (stable; keep existing if updating)
  • scopes actually required by the product

Preconditions

  1. App builds with relative base:
// vite.config.ts
base: "./"
  1. Router is hash-based for static directory Works.
  2. Owner username + space slug exist (public Work identity).

Build

cd <app-dir>
pnpm install
pnpm build

Confirm:

test -f dist/index.html

Publish

From the Space workspace root (paths are Space-relative):

cohub -s "$space_id" works publish "$slug" \
  --dir <space-relative-path-to-dist> \
  --work-scope file.view \
  --json

Add scopes only as needed:

--work-scope space.view
--work-scope session.view
--viewer-scope session.prompt.readonly
--viewer-scope session.prompt.fullaccess

Notes:

  • --dir must be a path inside the Space file tree
  • Re-publishing the same slug updates the Work version

Fetch public URL

cohub -s "$space_id" works ls --json
cohub works get <workId> --json

Return publicUrl (fallback content.url).

Smoke check

  • Open publicUrl
  • Runtime should become ready inside Cohub shell
  • Relative JS/CSS load (no absolute /assets 404)
  • Optional: one read query + one authorized action if those scopes were published

Failure hints

SymptomCheck
invalid path / not foundSpace-relative --dir, files actually uploaded
assets 404base: "./" missing
context nullopened raw asset URL instead of Cohub Work page
403 on files/sessionsmissing workScopes
auth dialog never usefulmissing allowedViewerScopes

Done criteria

  • build ok
  • publish ok
  • publicUrl returned to user
  • scopes listed explicitly

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 326,144. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.