# Skill Learned

> Commit and publish changes to the user's custom Codex skills GitHub repository. Use when the user says skill_learned or asks to save, commit, sync, push, publish, or add new/updated Codex skills to the `Alina-Shen/codex-skills` repo, or asks to update that repo README with skill descriptions.

- Skill: `alina-shen/skill-learned` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add alina-shen/skill-learned`
- Raw SKILL.md: https://api.skillmd.com/api/skills/alina-shen/skill-learned/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Alina-Shen (https://skillmd.com/u/alina-shen)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/alina-shen/skill-learned

---


# 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

1. 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/`, and `assets/`.

2. 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 `.system` skills.
   - Preserve executable bits on scripts.

3. Validate changed skills.
   - Run:
     ```bash
     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.

4. 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.md` frontmatter and actual workflow.
   - Mention any machine-specific assumptions, such as Berkeley cluster Slurm/Q-Chem paths.

5. Review before commit.
   - Run:
     ```bash
     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:
     ```bash
     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.

6. Commit and push.
   - Use a concise commit message, for example:
     ```bash
     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.

## Safety Rules

- Never commit `.system` skills.
- 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.

