publish-skill
Prepare and publish an OpenClaw skill to ClawHub. Handles PII/secret auditing, generalization, env var extraction, directory scaffolding, git init, and the clawhub publish command. Use when publishing a new skill or updating an existing one on ClawHub.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cdmichaelb/clawhub-publish-helperPublish Skill
Prepare and publish an OpenClaw skill to ClawHub. This skill codifies the audit → generalize → publish workflow.
When To Use
- Publishing a new skill to ClawHub
- Updating an existing published skill
- When the user says "publish this skill", "prepare for publishing", "make a publishable copy"
- NOT for installing skills from ClawHub (that's
npx clawhub@latest install)
Workflow
Step 1: Audit the Live Skill
Before creating any copy, audit the source skill for secrets and PII:
- Read every file in the skill directory recursively
- Check for these categories of sensitive content:
| Category | Examples | Action |
|---|---|---|
| Secrets | API keys, tokens, passwords, private keys | Must remove |
| Paths | Absolute paths (/home/username/..., /Users/...) | Replace with env var or ~ relative |
| Discord IDs | Channel IDs, user IDs, guild IDs, message IDs | Remove or replace with env var |
| Timezones | Hardcoded IANA timezone strings | Replace with env var |
| Personal data | Real names, emails, phone numbers, medication names | Remove or generalize |
| Network info | IP addresses, internal URLs, port numbers | Remove or replace with placeholders |
| Custom identifiers | User-specific labels, internal project names | Generalize |
- Report findings to the user before proceeding — do not silently modify
Step 2: Create Publishable Copy
Create a separate directory (never modify the live skill):
$CLAWHUB_DEFAULT_DIR/<skill-name>-skill/
Default base: ~/projects/skills (override via CLAWHUB_DEFAULT_DIR env var).
Directory structure:
<skill-name>-skill/
├── SKILL.md # Manifest (generalized)
├── README.md # User-facing docs
├── .gitignore # Standard ignores
├── scripts/ # Script files (generalized)
├── references/ # Optional reference docs
└── ... # Any other skill-specific files
Step 3: Generalize Content
For each file in the skill:
SKILL.md frontmatter:
- Add
env:block declaring all extracted env vars with descriptions and required/optional - Remove any personal identifiers from
description
Scripts (Python, Shell, etc.):
- Replace hardcoded paths with
os.environ.get("VAR", fallback)/ env var reads - Replace hardcoded timezones with env var (UTC fallback)
- Remove
now()/utc_now()fallbacks that bypass source timestamps — raise errors instead - Remove personal data (medication names become empty lists with edit instructions, etc.)
- Remove dead code and unused imports
Documentation (Markdown):
- Remove Discord IDs, channel names, user IDs
- Replace personal examples with generic ones
- Keep timezone/ID references only as example values (e.g. "e.g. America/Los_Angeles")
- Remove internal URLs/IPs
Shell wrappers:
- Use relative path resolution:
SCRIPT="$(cd "$(dirname "$0")" && pwd)/tracker.py" - Remove hardcoded absolute paths
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cdmichaelb-clawhub-publish-helper": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
sleep-channel
Handle messages in a Discord sleep-tracking channel by grounding all sleep logging and summaries on the real sleep tracker and source Discord metadata. Use when working in a dedicated sleep channel, especially for adding sleep entries, correcting the latest entry, deleting the latest entry, or rendering the current sleep log without hallucinating timestamps, dates, or entries.
food-channel
Handle messages in a food-tracking channel by routing food intake events through a deterministic food tracker. Use when working in a dedicated food channel, especially for barcode lookups, photo estimates, and daily summaries.
snippets-sync
Sync code snippets and notes between machines via file sync. Organized by language, rendered in any Markdown viewer (Obsidian, VS Code, etc.).
vitamin-tracker-channel
Manage vitamin/supplement reminders across configurable daily time slots via cron jobs. Use when adjusting supplement schedules, adding/removing supplements, or handling vitamin-related channel interactions. Triggers on "vitamin", "supplement", "vitamin reminder", "vitamin schedule".
medication-channel
Handle messages in a medication-tracking channel by routing medication events through a deterministic medication tracker instead of freehand model judgment. Use when working in a dedicated medication channel, especially for logging taken/missed/extra medication events, morning/evening completion, timestamp-grounded confirmations, and avoiding hallucinated reminders or fake times.