Tracks docs/plans and docs/brainstorms, adds .gitleaks.toml with privacy rules, and runs a history-mode gitleaks scan in CI. Docs and tooling only - no releasable change.
8.7 KiB
ClawHub Skill Publishing & Scalable Skill Architecture Brainstorm
Date: 2026-03-02 Status: Decided Trigger: agent-desktop has a mature skill ready for public distribution. Need a scalable architecture for multi-platform, multi-app skill publishing to ClawHub.
Problem Statement
The agent-desktop skill exists locally in skills/agent-desktop/ with a SKILL.md and 5 reference files. A separate agent-desktop-macos skill lives in .claude/skills/ (not git-tracked). As we add Windows/Linux platforms and app-specific knowledge (Slack, Notion, VS Code quirks), we need:
- A scalable directory structure under
skills/that supports platform and app-specific sub-skills - Automated CI publishing to ClawHub on every release (no manual steps)
- A scaffolding pattern so adding a new platform or app skill is trivial
Data
| Metric | Value |
|---|---|
| Current skill files | 1 SKILL.md + 5 reference docs + 1 platform SKILL.md |
| Total content | ~42KB across all files |
| Commands documented | 54 |
| ClawHub skills total | 5,700+ |
| Desktop automation skills on ClawHub | Very few (niche) |
| ClawHub CLI batch command | clawhub sync --root skills/ --all |
What We're Building
A nested skill hierarchy where platform skills contain app-specific references, with CI-driven auto-publishing to ClawHub on every release.
Directory Structure
skills/
├── agent-desktop/ # Core skill (platform-agnostic)
│ ├── SKILL.md # Commands, observe-act loop, ref system, JSON contract
│ └── references/
│ ├── commands-observation.md
│ ├── commands-interaction.md
│ ├── commands-system.md
│ └── workflows.md # 12 common automation patterns
│
├── agent-desktop-macos/ # macOS platform skill
│ ├── SKILL.md # TCC permissions, AX API, smart activation chain, surfaces
│ └── references/
│ ├── slack.md # Slack on macOS: Electron quirks, clipboard paste pattern
│ ├── notion.md # Notion on macOS: block navigation, slash commands
│ ├── vscode.md # VS Code on macOS: command palette, editor interaction
│ └── notifications.md # NC lifecycle, dismiss strategies, stacked notifications
│
├── agent-desktop-windows/ # Windows platform skill (Phase 2)
│ ├── SKILL.md # UIA setup, permission model, COM automation
│ └── references/
│ ├── slack.md # Slack on Windows
│ ├── teams.md # Teams on Windows (UIA-native)
│ └── vscode.md # VS Code on Windows
│
└── agent-desktop-linux/ # Linux platform skill (Phase 3)
├── SKILL.md # AT-SPI setup, D-Bus, Wayland vs X11
└── references/
├── slack.md # Slack on Linux
└── vscode.md # VS Code on Linux
Key design principles
-
App quirks are platform-scoped — Slack on macOS (AX + Electron depth-skip) differs from Slack on Windows (UIA + Chromium detection). App references live inside the platform skill, not in a separate top-level skill.
-
Core skill stays platform-agnostic —
agent-desktop/documents commands, JSON contract, ref system. Zero platform detail. Thereferences/macos.mdthat currently lives here moves toagent-desktop-macos/SKILL.md. -
Each
skills/*/folder is independently publishable — ClawHubclawhub sync --root skills/ --alldiscovers and publishes each subfolder as a separate skill. -
Git-tracked source of truth — everything under
skills/is committed. The.claude/skills/and.agents/skills/symlinks are derived (gitignored).
Why This Approach
-
Matches how the project actually scales — each platform adapter (Phase 2, 3) brings platform-specific AX behavior AND app-specific quirks. The skill hierarchy mirrors the crate hierarchy.
-
App knowledge compounds — every time we test Slack/Notion/VS Code, we document quirks in the platform's
references/folder. Future agents benefit automatically. -
clawhub synchandles multi-skill publishing — one CI step publishes all skills inskills/. No per-skill config. Adding a new skill = adding a new folder. -
Fewer top-level skills — users install
agent-desktop(core) +agent-desktop-macos(their platform). App knowledge comes free inside the platform skill. No need to installagent-desktop-slackseparately.
Approaches Considered
1. Flat app-specific skills (agent-desktop-slack, agent-desktop-notion, etc.)
- One top-level skill per app, published separately
- Rejected: App behavior is platform-dependent. Slack on macOS vs Windows differs fundamentally. Flat app skills would either duplicate platform info or be incomplete.
2. Nested hierarchy — platform > apps (CHOSEN)
- Platform skills contain app-specific references
- App knowledge scoped to platform where it's actually useful
- Fewer skills to install, more content per skill
3. Monolithic single skill with everything
- One massive
agent-desktopskill with all platform + app info - Rejected: Too much context loaded at once. Users on macOS don't need Windows/Linux info in context.
CI Automation
Add a publish-skills job to .github/workflows/release.yml:
publish-skills:
needs: [release-please]
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with: { node-version: '22' }
- run: npm i -g clawhub
- run: |
clawhub sync \
--root skills/ \
--all \
--bump patch \
--changelog "${{ needs.release-please.outputs.tag_name }}"
env:
CLAWHUB_TOKEN: ${{ secrets.CLAWHUB_TOKEN }}
This runs automatically when release-please creates a new release. All skills under skills/ are published in one step.
Symlink Automation
Add a post-checkout script or Makefile target to wire .claude/skills/:
# scripts/link-skills.sh
for skill_dir in skills/*/; do
name=$(basename "$skill_dir")
mkdir -p .claude/skills
ln -sfn "../../$skill_dir" ".claude/skills/$name"
done
Key Decisions
- Nested hierarchy (platform > apps) — app references scoped to platform
- CI auto-publish via
clawhub syncon every release — zero manual steps - Move
references/macos.mdfrom core skill toagent-desktop-macos/— core stays platform-agnostic - Move
agent-desktop-macosfrom.claude/skills/toskills/— git-tracked, publishable - Version synced to npm/Cargo version via release-please
CLAWHUB_TOKENas GitHub secret for CI authentication- Symlink script to wire
skills/→.claude/skills/for local development
Scaffolding: Adding a New App Reference
To add Slack macOS knowledge:
- Create
skills/agent-desktop-macos/references/slack.md - Document: Electron quirks, clipboard paste pattern, block structure, known AX issues
- Reference it from
skills/agent-desktop-macos/SKILL.mdreference table - Commit → next release auto-publishes to ClawHub
To add a new platform (e.g., Windows):
- Create
skills/agent-desktop-windows/SKILL.mdwith platform-specific frontmatter - Create
skills/agent-desktop-windows/references/for app-specific docs - Run
scripts/link-skills.shto wire local symlinks - Commit → next release auto-publishes
Migration Steps (from current state)
- Move
.claude/skills/agent-desktop-macos/SKILL.md→skills/agent-desktop-macos/SKILL.md - Move
skills/agent-desktop/references/macos.md→ merge intoskills/agent-desktop-macos/SKILL.md - Remove
macos.mdfrom core skill's reference table in SKILL.md - Add ClawHub metadata (
version,tags,requirements) to all SKILL.md frontmatters - Create
scripts/link-skills.shfor local symlink management - Add
publish-skillsjob torelease.yml - Store
CLAWHUB_TOKENin GitHub repo secrets - First publish: manual
clawhub sync --root skills/ --allto verify - After verification: CI handles all future publishes
Open Questions
None — architecture is clear.
Sources
- ClawHub Docs — publish CLI, sync command, token management
- ClawHub GitHub — skill directory structure
- Anthropic Skills Repo — SKILL.md format standard
- ClawHub Publisher Skill — batch publish, CI integration