When
The App must read Space context, request viewer consent, or act through Cohub APIs, rather than only show static HTML.
Outcome
- App scaffolded from the bundled Work Kit template
- Runtime boundary preserved (
runtime/query/hooks,base: "./", HashRouter) - Published directory App with explicit
appScopesand viewer-grant requests
Steps
- Install the kit and publish skills: ``
bash npx skills add https://github.com/markbang/cohub-work-skill \ --skill cohub-work-kit --agent codex --yes --copy npx skills add https://github.com/markbang/cohub-work-skill \ --skill cohub-work-publish --agent codex --yes --copy`` - Copy the template from the installed skill: ``
bash cp -a .agents/skills/cohub-work-kit/template/. apps/my-app/`` - Implement product UI under
src/pages/*; keep the runtime helpers insrc/lib/*stable. - Read through Query when runtime is
ready; request viewer grants only after a user gesture. - Keep App-specific context explicit:
app.homeSpaceis the owning Space, whileinvocation.spaceIdmay identify the Space hosting a preview or background. Usectx.shellto react to what is currently open. - For server-side work, add entrypoints under
.cohub/actions/(owner-funded App Actions) - see App Actions. pnpm install && pnpm build- Publish with least privilege and verify the public App URL inside the Cohub shell.
Done when
- [ ] Build succeeds
- [ ] Public App becomes runtime-ready in Cohub
- [ ] App scopes and viewer grants are listed and justified
- [ ] No parallel login system is invented
- [ ] Server-side work runs as an App Action instead of shipping credentials to the browser
Avoid
- BrowserRouter on static directory Apps
- Authorizing on page load
- Treating a port App as the default production shape
- Assuming
app.homeSpaceand invocation Space are always the same