ljg-push: Push ljg-* skills
One-click sync modified skills in local
to the GitHub repo, overwriting both the master and md branches.
Repository Paths (Hard-coded)
SKILLS_REPO="$HOME/code/ljg-skills" # Local working repo
SKILLS_LOCAL="$HOME/.claude/skills" # Local skill source
REPO_URL="git@github.com:lijigang/ljg-skills.git"
If
does not exist, the script will automatically clone it. If it exists but is not the ljg-skills Git repo, the script will exit with an error (without damaging the existing directory).
Differences Between the Two Branches
| Branch | Output Format | File Extension | Bold Format | File Header |
|---|
| (default) | org-mode | | | etc. |
| markdown | | | YAML frontmatter |
The skills in
are in
master style (source version). Differences for the md branch are automatically converted by the script + manually supplemented if necessary.
Workflow
Execute according to the steps in
→ Call
.
README Consistency (Hard Gate)
Before each push, the script enforces one task: Compare the README with local skills.
- List all skill names in
- Grep for entries in
- Identify skills that exist locally but are missing from the README — this almost certainly means the README is outdated
- If found → push is aborted, and differences are reported.
Each push is an opportunity to review the README. Ask yourself:
- Did you add a new skill? The skill list / installation command in the README needs to be updated with a new line
- Did you delete a skill? The corresponding line in the README needs to be removed
- Did you significantly modify the description of a skill? The introduction in the README may need to be synced.
When you confirm the README has been reviewed and truly does not need updates, bypass the gate:
bash
/ljg-push --skip-readme-check
Scope of Automatic Conversion
Strings automatically replaced during md branch sync:
- File extension references: → , → , etc. (denote naming convention)
- Template references: →
- Keywords: → , →
Content not automatically converted (script leaves these unchanged, manual maintenance required):
- → : In markdown files, is italic; automatic replacement would break the document's own formatting
- Org headers → YAML frontmatter: Too complex, left for manual handling
- File renaming: e.g., →
When these differences are encountered, the script will list the files with remaining differences after pushing the md branch, along with a review checklist.
Voice Notification
bash
curl -s -X POST http://localhost:31337/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running Push in ljg-push"}' \
> /dev/null 2>&1 &
Output text:
Running **Push** in **ljg-push**...
Examples
Example 1: One-click Push
User: /ljg-push
→ Detect skills in ~/.claude/skills/ljg-* that differ from the repo
→ master: rsync + bump version + commit + push
→ md: rsync + mdize + bump version + commit + push
→ Report: which skills were pushed, new version number, remaining manual differences
Example 2: Preview what will be pushed without actual pushing
User: /ljg-push --dry-run
→ List skills that will be synced
→ List markdown conversions that will be performed
→ Do not execute rsync / commit / push
Gotchas
- README drift is the easiest issue to overlook — pushing right after adding a new skill while the README still shows the old list. The script now has a hard gate to block this; when blocked, don't mindlessly add — check the README first
- The script assumes Git credentials are configured (SSH key or PAT) — ljg-push does not handle authentication, and will directly report an error if authentication fails
- Master branch must be pushed first — markdown conversion for the md branch is based on the org version from master. Pushing in reverse order will break the sequence
- Untracked files (e.g., ) will be synced to the repo via rsync — if you don't want to push them, delete them locally first or add them to
- Automatic markdown conversion only modifies strings — and Org headers remain unchanged. Complex differences for the md branch (e.g., → for ljg-paper) require manual maintenance
- The script automatically bumps the patch version in plugin.json + marketplace.json — if you want to bump the minor/major version, modify it manually first before running the script; the script only increments the patch version
- If the remote md branch is newer than the local one (e.g., pushed from another machine), the script will attempt to reapply changes if fails — this will discard unpushed local commits on the md branch. The script will prompt before doing this
- Migration Record: The repo was previously located at
~/.claude.backup-20260502/ljg-skills-repo/
(the 'backup' in the path is a historical legacy), and was moved to on 2026-05-02