diff --git a/.github/workflows/clawhub-publish.yml b/.github/workflows/clawhub-publish.yml new file mode 100644 index 0000000..35ebe59 --- /dev/null +++ b/.github/workflows/clawhub-publish.yml @@ -0,0 +1,35 @@ +name: ClawHub publish + +on: + pull_request: + workflow_dispatch: + inputs: + owner: + description: ClawHub owner or publisher handle for the skill publish. Leave empty to publish as the authenticated user. + type: string + required: false + default: "" + +permissions: {} + +jobs: + skill-dry-run: + if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + permissions: + contents: read + id-token: write + uses: openclaw/clawhub/.github/workflows/skill-publish.yml@v0.19.0 + with: + dry_run: true + + skill-publish: + if: github.event_name == 'workflow_dispatch' + permissions: + contents: read + id-token: write + uses: openclaw/clawhub/.github/workflows/skill-publish.yml@v0.19.0 + with: + owner: ${{ inputs.owner }} + dry_run: false + secrets: + clawhub_token: ${{ secrets.CLAWHUB_TOKEN }} diff --git a/AGENTS.md b/AGENTS.md index e1ba6cb..2ca2a1b 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,7 +2,8 @@ This repository packages the Mainframe Cursor, Codex, and Claude Code plugins. Keep it focused on the Cursor, Codex, and Claude Code manifests, hosted MCP wiring, the `share-video` skill, and the -stop hooks. +stop hooks. OpenClaw installs the same package as a bundle (reusing those host markers, the +`./.mcp.json` wiring, and `skills/`), so it needs no OpenClaw-specific manifest or code. ## Repository boundaries @@ -11,7 +12,9 @@ stop hooks. - Cursor, Codex, and Claude Code are the supported hosts. All three plugins share the repo root, the `share-video` skill, the `./.mcp.json` wiring, and the `hooks/core` runtime. Codex and Claude Code share the same Stop hook contract, so they both use `hooks/core/stop-hook.ts`; only the - transcript parser differs per host. Do not add other host surfaces unless the product task + transcript parser differs per host. OpenClaw reuses these same bundle markers, MCP wiring, and + skill (auto-detected as a bundle), so it gets the skill and MCP without a separate manifest; + bundles do not run the stop hook. Do not add other host surfaces unless the product task explicitly asks for them. - Run `bun run verify` before considering changes ready. - Generated Cursor, Codex, and Claude Code manifest and marketplace files come from diff --git a/README.md b/README.md index c99e9ac..9c46082 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Mainframe plugins Mainframe is the video sharing platform for agents. This repository ships the `share-video` skill -and Mainframe plugins for Cursor, Codex, and Claude Code. +and Mainframe plugins for Cursor, Codex, Claude Code, and OpenClaw. ## Install @@ -47,6 +47,37 @@ claude The Claude Code plugin gives Claude the same `share-video` skill and Mainframe tools as the Cursor and Codex plugins. +### OpenClaw + +OpenClaw consumes this package as a **bundle**: it reads the same `.cursor-plugin`, +`.codex-plugin`, and `.claude-plugin` markers, the `./.mcp.json` wiring, and the `skills/` +directory the other hosts already ship — no OpenClaw-specific manifest or code. Installing it +auto-loads the `share-video` skill and connects the hosted Mainframe MCP server (which provides the +`generate_video`, `upload_video`, and `get_video` tools), with no manual configuration: + +```sh +openclaw plugins install mainframecomputer/mainframe-plugins +``` + +OpenClaw bundles do not run agent-lifecycle hooks, so the conservative AFK "leave a video" stop hook +is Cursor, Codex, and Claude Code only. On OpenClaw the `share-video` skill itself guides the agent +on when a short video is worthwhile. + +#### Publishing the skill to ClawHub + +The canonical `share-video` skill is also published to [ClawHub](https://clawhub.ai), the public +skill registry for OpenClaw, so any agent can install just the skill: + +```sh +clawhub install share-video +``` + +Publishing is automated by [`.github/workflows/clawhub-publish.yml`](.github/workflows/clawhub-publish.yml), +which reuses ClawHub's official `skill-publish` reusable workflow instead of duplicating publish +logic. Pull requests run a dry-run preview, and a manual `workflow_dispatch` run performs the real +publish. A real publish needs a `CLAWHUB_TOKEN` repository secret and an `owner` handle; publishing +the skill to ClawHub releases it under `MIT-0`. + ## Included skill - `share-video` — share a short video that explains what the agent did, useful for demos, diff --git a/bun.lock b/bun.lock index 8e1c213..7220acc 100644 --- a/bun.lock +++ b/bun.lock @@ -1,5 +1,6 @@ { "lockfileVersion": 1, + "configVersion": 0, "workspaces": { "": { "name": "@mainframe/plugins", diff --git a/skills/share-video/SKILL.md b/skills/share-video/SKILL.md index 3d2ccdc..6c9bcdc 100644 --- a/skills/share-video/SKILL.md +++ b/skills/share-video/SKILL.md @@ -7,6 +7,9 @@ description: | for trivial answers, active back-and-forth, unfinished work, or sensitive data. author: Mainframe +metadata: + openclaw: + homepage: https://mainframe.app --- # Share video