Skill Learned
Use this skill to keep the custom Codex skills on this machine synchronized with the GitHub repository:
https://github.com/Alina-Shen/codex-skills
Local repository:
/clusterfs/mhg-data/yaoshen/codex-skills
Live Codex skills directory:
/global/home/users/yaoshen/.codex/skills
Workflow
Identify changed or new custom skills.
- Custom skills live under
/global/home/users/yaoshen/.codex/skills. - Exclude
/global/home/users/yaoshen/.codex/skills/.system. - Each skill should contain a
SKILL.md. - Include relevant bundled resources such as
agents/,scripts/,references/, andassets/.
- Custom skills live under
Sync skills into the repo.
- Repo skill folders live under
/clusterfs/mhg-data/yaoshen/codex-skills/skills. - Copy new or changed custom skill folders from the live skills directory into the repo.
- Do not copy
.systemskills. - Preserve executable bits on scripts.
- Repo skill folders live under
Validate changed skills.
- Run:
python3 /global/home/users/yaoshen/.codex/skills/.system/skill-creator/scripts/quick_validate.py <skill-folder> - Fix validation errors before committing.
- For skills with helper scripts, run a light syntax or smoke test when practical.
- Run:
Update the repo README.
- README path:
/clusterfs/mhg-data/yaoshen/codex-skills/README.md - Ensure every custom skill in
skills/is listed with a one-line description. - Keep descriptions aligned with each skill's
SKILL.mdfrontmatter and actual workflow. - Mention any machine-specific assumptions, such as Berkeley cluster Slurm/Q-Chem paths.
- README path:
Review before commit.
- Run:
git -C /clusterfs/mhg-data/yaoshen/codex-skills status --short git -C /clusterfs/mhg-data/yaoshen/codex-skills diff --stat - Inspect meaningful diffs, especially
SKILL.md, README, and scripts. - Check for secrets before committing:
rg -n "(token|password|secret|BEGIN .*PRIVATE KEY|github_pat|ghp_|gho_|Authorization:)" /clusterfs/mhg-data/yaoshen/codex-skills - If the search finds real credentials, stop and remove them before committing.
- Run:
Commit and push.
- Use a concise commit message, for example:
git -C /clusterfs/mhg-data/yaoshen/codex-skills add . git -C /clusterfs/mhg-data/yaoshen/codex-skills commit -m "Update Codex skills" git -C /clusterfs/mhg-data/yaoshen/codex-skills push - If GitHub authentication is blocked by sandboxing, rerun the push with escalated permissions.
- If no GitHub credential is available, leave the local commit ready and report the exact command needed.
- Use a concise commit message, for example:
Safety Rules
- Never commit
.systemskills. - Never commit tokens, private keys, passwords, or temporary credential dumps.
- Do not overwrite live skill folders from the repo unless the user explicitly asks to restore from GitHub.
- Do not amend or force-push unless the user explicitly asks.
- Report the commit hash and GitHub URL after a successful push.