Tooluck logoTooluck
SKILL.md

ljg-push

Agent skill fromlijigang/ljg-skills

把 ~/.agents/skills/ljg-* 里所有更新过的 skills 同步到 github repo (ljg-skills),先推 master 分支(org-mode 输出风格),再切 md 分支(markdown 输出风格)做基础 markdown 化后推。Use when user says '/ljg-push', 'push skills', '推送 skills', '同步 skills', 'sync ljg', or whenever ljg-* skills get updated and need shipping. NOT FOR pushing non-ljg skills or arbitrary git repos.

How to install ljg-push

install ljg-push
# install the ljg-skills pack with the skills CLI
npx skills add lijigang/ljg-skills

# or add only this skill to Claude Code: copy the folder

skills/ljg-push/

# into

~/.claude/skills/ljg-push/ (all projects)

.claude/skills/ljg-push/ (one project)

skills/ljg-push/SKILL.md

MITFull file
1# ljg-push: 推送 ljg-* skills
2
3把本地 `~/.agents/skills/ljg-*` 里改过的 skills,一键同步到 github repo,覆盖 master 和 md 两个分支。
4
5## 仓库路径(硬编码)
6
7```
8SKILLS_REPO="$HOME/code/ljg-skills" # 本地工作 repo
9SKILLS_LOCAL="$HOME/.agents/skills" # 本地 skill 源
10REPO_URL="git@github.com:lijigang/ljg-skills.git"
11```
12
13如果 `$SKILLS_REPO` 不存在,脚本会自动 clone。如果它存在但不是 ljg-skills 的 git repo,脚本会报错退出(不破坏现有目录)。
14
15## 两条分支的差异
16
17| 分支 | 输出格式 | 文件扩展 | 加粗 | 文件头 |
18|------|---------|---------|------|--------|
19| `master`(默认) | org-mode | `.org` | `*bold*` | `#+title:` 等 |
20| `md` | markdown | `.md` | `**bold**` | YAML frontmatter |
21
22`~/.agents/skills/` 里的 skill 是 *master 风格*(源版本)。md 分支的差异由脚本自动转换 + 必要时手工补。
23
24脚本推完 `md` 后会自动切回 `master`。本地 `$HOME/code/ljg-skills` 应该始终停在源分支,方便下次查看和安装。
25
26## 工作流
27
28按 `Workflows/Push.md` 步骤执行 → 调用 `Tools/Push.sh`。
29
30## README 一致性(硬 gate)
31
32每次 push 前,脚本强制做一件事:*把 README 跟 local skills 对一遍*。
33
34- 列出 `~/.agents/skills/ljg-*` 全部 skill 名
35- grep `$SKILLS_REPO/README.md` 里出现的 `ljg-xxx`
36- 找出 local 有但 README 没有的——*几乎肯定意味着 README 漏更新*
37- 命中 → push 中止,报告差异
38
39每次 push 都是检视 README 的机会。问自己:
40
411. *新增 skill 了吗*?README 的 skill 清单 / 安装命令需要加一行
422. *删了 skill 吗*?README 对应行要删
433. *某个 skill 的描述大改了吗*?README 的简介可能要同步
44
45确认 README 已审、确实不需要更新时,绕过 gate:
46
47```bash
48/ljg-push --skip-readme-check
49```
50
51## 自动转换的范围
52
53md 分支同步时自动转换(2026-06-12 起含 org 文件本体):
54
55Org 文件中的 `#+begin_example` / `#+end_example` 图块转为 `text` 围栏,保留块内文字,不将其中的星号或井号误当标题和注释。标记兼容大小写。
56…

Excerpt shown under the repository's MIT license.

More skills in ljg-skills

Keep exploring

Similar skill repositories

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates