Publish Local Skills Catalog
Overview
Synchronize personal Codex skills from the local $CODEX_HOME/skills tree into a GitHub catalog repository. Preserve each skill folder, regenerate catalog indexes, validate the copied skills, and publish only after the diff is understood.
This skill is for user-created skills only. Never include .system skills or plugin/cache skills.
Default Repository
Use https://github.com/manager-rubens/codex-skills.git and branch main unless the user names a different catalog repository or branch.
Read references/catalog-format.md when the repository structure is unfamiliar, when updating the sync script, or when a diff looks inconsistent with the catalog format.
Workflow
Resolve scope:
- Confirm the target repository URL and branch.
- Resolve the local skills root. Prefer
$CODEX_HOME/skills; if CODEX_HOME is unset, use ~/.codex/skills.
- Exclude
.system, plugin caches, and folders without SKILL.md.
Prepare the repository:
- Clone the catalog if no checkout exists.
- If a checkout exists, run
git status -sb before modifying it.
- Stop if the checkout has unrelated local changes.
- Fetch and fast-forward the target branch before syncing.
- Stop if the branch has diverged or cannot fast-forward cleanly.
Synchronize:
- Run
scripts/sync_personal_skills_catalog.ps1 without -Publish first unless the user already explicitly approved publishing in the current request.
- Copy the complete folder for each local personal skill into
skills/<name>/, preserving SKILL.md, agents/, references/, scripts/, and assets/.
- Regenerate
README.md, docs/skills.md, data/skills.json, and data/skills.csv.
- Calculate SHA-256 from each copied
SKILL.md.
Handle removals cautiously:
- Treat skills that exist in the repository but not locally as stale remote skills.
- Do not delete stale remote skills unless the user explicitly approves removals.
- If removals are approved, pass
-AllowRemovals to the script and mention the removed skill names in the summary.
Validate:
- Run
quick_validate.py for each synchronized skill unless validation is impossible.
- Parse
data/skills.json to confirm valid JSON.
- Run
git diff --check.
- Review
git status -sb and git diff --stat.
Publish:
- Publish only when the user asked for publishing or approves after seeing the diff summary.
- Stage only catalog files and
skills/.
- Commit with a short message such as
Update personal Codex skills catalog.
- Push to the configured remote branch.
- If
gh is unavailable, use plain git push; do not require a PR unless the user asks for one.
Script
Use the bundled script for deterministic synchronization:
powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps1
Common forms:
# Prepare a local diff only
powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps1
# Commit and push after approval
powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps1 -Publish
# Allow deletion of remote skills that no longer exist locally
powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps1 -Publish -AllowRemovals
The script clones or updates the catalog checkout, copies personal skill folders, regenerates indexes, validates skills, prints the diff summary, and optionally commits and pushes.
Output
Report:
- repository path, branch, and remote;
- local skills found;
- added, changed, unchanged, and stale remote skills;
- validation result;
- diff stat;
- commit hash and push result when published;
- any blocked step and the exact reason.
Keep the final response short when publication succeeds. If publication is blocked, give the next safe action.
1---2name: codex-ops-publish-local-skills-catalog3description: Compare user-created local Codex skills in $CODEX_HOME/skills with the GitHub catalog repository, synchronize changed skill folders and generated catalog files, validate the result, and publish safe updates to GitHub. Use when the user asks to varrer, sincronizar, comparar, atualizar, publicar, pushar, or catalogar local skills in manager-rubens/codex-skills or another personal skills catalog repository.4---56# Publish Local Skills Catalog78## Overview910Synchronize personal Codex skills from the local `$CODEX_HOME/skills` tree into a GitHub catalog repository. Preserve each skill folder, regenerate catalog indexes, validate the copied skills, and publish only after the diff is understood.1112This skill is for user-created skills only. Never include `.system` skills or plugin/cache skills.1314## Default Repository1516Use `https://github.com/manager-rubens/codex-skills.git` and branch `main` unless the user names a different catalog repository or branch.1718Read `references/catalog-format.md` when the repository structure is unfamiliar, when updating the sync script, or when a diff looks inconsistent with the catalog format.1920## Workflow21221. Resolve scope:23 - Confirm the target repository URL and branch.24 - Resolve the local skills root. Prefer `$CODEX_HOME/skills`; if `CODEX_HOME` is unset, use `~/.codex/skills`.25 - Exclude `.system`, plugin caches, and folders without `SKILL.md`.26272. Prepare the repository:28 - Clone the catalog if no checkout exists.29 - If a checkout exists, run `git status -sb` before modifying it.30 - Stop if the checkout has unrelated local changes.31 - Fetch and fast-forward the target branch before syncing.32 - Stop if the branch has diverged or cannot fast-forward cleanly.33343. Synchronize:35 - Run `scripts/sync_personal_skills_catalog.ps1` without `-Publish` first unless the user already explicitly approved publishing in the current request.36 - Copy the complete folder for each local personal skill into `skills/<name>/`, preserving `SKILL.md`, `agents/`, `references/`, `scripts/`, and `assets/`.37 - Regenerate `README.md`, `docs/skills.md`, `data/skills.json`, and `data/skills.csv`.38 - Calculate SHA-256 from each copied `SKILL.md`.39404. Handle removals cautiously:41 - Treat skills that exist in the repository but not locally as stale remote skills.42 - Do not delete stale remote skills unless the user explicitly approves removals.43 - If removals are approved, pass `-AllowRemovals` to the script and mention the removed skill names in the summary.44455. Validate:46 - Run `quick_validate.py` for each synchronized skill unless validation is impossible.47 - Parse `data/skills.json` to confirm valid JSON.48 - Run `git diff --check`.49 - Review `git status -sb` and `git diff --stat`.50516. Publish:52 - Publish only when the user asked for publishing or approves after seeing the diff summary.53 - Stage only catalog files and `skills/`.54 - Commit with a short message such as `Update personal Codex skills catalog`.55 - Push to the configured remote branch.56 - If `gh` is unavailable, use plain `git push`; do not require a PR unless the user asks for one.5758## Script5960Use the bundled script for deterministic synchronization:6162```powershell63powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps164```6566Common forms:6768```powershell69# Prepare a local diff only70powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps17172# Commit and push after approval73powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps1 -Publish7475# Allow deletion of remote skills that no longer exist locally76powershell -NoProfile -ExecutionPolicy Bypass -File <skill-dir>\scripts\sync_personal_skills_catalog.ps1 -Publish -AllowRemovals77```7879The script clones or updates the catalog checkout, copies personal skill folders, regenerates indexes, validates skills, prints the diff summary, and optionally commits and pushes.8081## Output8283Report:8485- repository path, branch, and remote;86- local skills found;87- added, changed, unchanged, and stale remote skills;88- validation result;89- diff stat;90- commit hash and push result when published;91- any blocked step and the exact reason.9293Keep the final response short when publication succeeds. If publication is blocked, give the next safe action.