SuperAPI AI Directory

ljg-push

Agents & models

View repository

Updated 10-15 21:08

About this skill

ljg-push: push ljg-* skills

Sync the local ~/.agents/skills/ljg-* modified skills to the github repo with one click, covering both the master and md branches.

Repository path (hardcoded)

SKILLS_REPO="$HOME/code/ljg-skills"     # 本地工作 repo
SKILLS_LOCAL="$HOME/.agents/skills"      # 本地 skill 源
REPO_URL="git@github.com:lijigang/ljg-skills.git"

If $SKILLS_REPO does not exist, the script will automatically clone it. If it exists but is not the ljg-skills git repo, the script will error out and exit (without damaging the existing directory).

Differences between the two branches

Branch Output format File extension Bold File header
master(default) org-mode .org *bold* #+title: etc.
md markdown .md **bold** YAML frontmatter

~/.agents/skills/ The skills in master style(source version). The md branch differences are automatically converted by the script + manually supplemented when necessary.

After the script pushes md it will automatically switch back to master. The local $HOME/code/ljg-skills should always stay on the source branch, for easy viewing and installation next time.

Workflow

Execute according to the Workflows/Push.md steps → call Tools/Push.sh。

README consistency (hard gate)

Before every push, the script enforces one thing:Check the README against the local skills。

  • List all skill names in ~/.agents/skills/ljg-* The
  • grep $SKILLS_REPO/README.md appearing in ljg-xxx
  • Find those that exist locally but not in the README—almost certainly means the README was not updated
  • Hit → push aborts, reports the differences

Every push is an opportunity to review the README. Ask yourself:

  1. Did you add a new skill? The README's skill list / install command needs a line added
  2. Did you delete a skill? The corresponding line in the README should be deleted
  3. Did a skill's description change significantly? The README's summary may need to be synced

When you confirm the README has been reviewed and truly does not need updating, bypass the gate:

/ljg-push --skip-readme-check

Scope of automatic conversion

Automatically converted when syncing the md branch (since 2026-06-12 including the org files themselves):

In Org files, #+begin_example / #+end_example blocks are converted to text fences, preserving the text inside the block, without mistaking the asterisks or hashes within for headings and comments. Markers are case-compatible.

  • the org files themselves: each .org file within a skill (excluding assets/) is converted to a same-named .md and the original is deleted—org header block→YAML frontmatter (including --- fences,filetags→tags)、* headings→# headings (hierarchy preserved),#+ATTR_* lines deleted,[[file:x]]→![](x)、#+begin_src→``` fences. References in Markdown and runtime text files (such as .ts / .js / .json / .sh) to files that were actually renamed are rewritten accordingly
  • Complete Org examples embedded in Markdown:```org templates, as well as language-less fenced templates whose first line is #+key: , are all converted to ```markdown; consecutive header blocks become YAML frontmatter with --- , and headings, links, emphasis, monospaced text, and horizontal rules are converted along with the template; if the original file uses pure CRLF, its line-ending style is preserved
  • File extension references:__qa.org → __qa.md、__paper.org → __paper.md etc. (denote naming convention)
  • Keywords:org-mode → markdown、Org-mode → Markdown
  • Org-style formatting directives:加粗用 *bold*(单星号)… → 加粗用 **bold**(双星号)、标题层级从 * 开始 → 从 # 开始、Org 文件头 → Markdown 文件头, line-start #+title: and 8 other example keys → YAML key lines
  • Structured emphasis tags: line-start - *标签*: → - **标签**:; the org immediately adjacent to such tags has its fence changed in sync to markdown
  • Output contract and runtime defaults:evals/*.json explicitly requires preserving Org prompts and expectations changed to Markdown;stdin__*.org default value changed to .md, while retaining explicit Org input and test fixtures
  • ljg-is generation contract: output title, default file extension, path terminology, metadata names, tags, and the dual-format acceptance sentence are all switched to Markdown/YAML + Denote, and Org-specific lint blocking statements are removed; the pre-commit residual audit rejects any unconverted Org output directives

Detection and sync share the same file boundary: contents are compared by checksum, reliably identifying file additions, deletions, content and executable-bit changes; pure timestamps, directory metadata, and empty directories do not trigger a release on their own, and at any level .git/、node_modules/、.DS_Store does not enter sync. The ignore list contains only these three clearly defined junk categories,.bak、.backup and other real backups will still trigger sync and release review.

still not automatically converted(manual as needed):

  • In the body text, the *bold* marker: in markdown *x* is italic, and blind replacement would break the document's own formatting; only the "line-start bullet + full-width colon" tag is safely converted

Voice Notification

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
→ 检测 ~/.agents/skills/ljg-* 中跟 repo 有差异的 skills
→ master: rsync + bump version + commit + push
→ md: rsync + mdize + bump version + commit + push
→ 切回 master
→ 报告:哪些 skills 推了,新版本号,剩余手工差异

Example 2: See what would be pushed without actually pushing

User: /ljg-push --dry-run
→ 列出会被同步的 skills
→ 列出会做的 markdown 化转换
→ 不执行 rsync / commit / push

Gotchas

  • README drift is the easiest thing to overlook—after adding a new skill, push directly, and the README is still stuck on the old list. The script now has a hard gate blocking this cut; when it is blocked, do not blindly add --skip-readme-check, first go check the README
  • The script assumes git credentials are already configured(ssh key or PAT)—ljg-push does not handle authentication, and reports an error directly on authentication failure
  • master must be pushed first—the markdownization of the md branch is converted based on the org version of master. Pushing in reverse would break the order
  • untracked junk (such as assets/measure.js) will be synced to the repo by rsync—if you do not want to push it, delete it locally first, or add it to .gitignore
  • Sync ignore items must be narrow and consistent——.git/、node_modules/、.DS_Store does not enter sync; pure timestamps, directory metadata, and empty directories do not trigger a release on their own, nor do they enter Git results. Ordinary backup files are not in the ignore list and will still be detected, avoiding hiding real content that may become public
  • org files themselves are now automatically converted (since 2026-06-12)—template.org etc. will be converted to .md and the original deleted, regenerated on every push (harmless if wiped by rsync --delete, idempotent). The only remaining manual item is the *bold* marker in the body text. After adding an org reference file with complex constructs, first --dry-run or run mdize in a sandbox to see the conversion result
  • Renamed references may be hidden in runtime code—for example, tests use new URL("../Template.org", import.meta.url) to read templates; changing only the Markdown documentation would leave the md branch missing files. The converter precisely rewrites text consumers such as .ts / .js / .json / .sh according to the basename actually converted this time, while retaining Org test fixture strings that have no corresponding entity file
  • Structured tags cannot rely on enumerating example words——x、f(x) real tags such as "subject/boundary" and "substitution" will also appear; the converter identifies them by the structure of - *标签*: and after publishing it must still scan md files for leftover single-asterisk tags
  • Markdown conversion cannot only match lowercase org—skill bodies often write Org, inline #+description, and the Org template's # 注释 will also become a heading in Markdown; the converter handles these forms uniformly and, before the md commit, scans for output directives, Org markup, and leftover .org files
  • The whole-document template cannot only change fence tags——```org or the #+title, asterisk headings, and Org links inside a language-less fence must be converted as a single semantic unit; the converter generates YAML with --- , Markdown headings, and links, while preserving the original file's pure CRLF/LF line-ending style to avoid a meaningless whole-file diff
  • Output-format residue cannot only scan verb phrases—after "when writing Org files" is converted, "all generated Org files" in the same paragraph may still remain, causing the md branch to continue requiring Org generation. Both the converter and the pre-commit audit must cover this save-path phrasing; otherwise one successful push will bring the old format contract back to the remote
  • The output contract is not only in Markdown documents——evals/*.json 's prompt / expected_output will directly require the skill to generate a certain format, and the stdin__*.org in runtime code will also select the default parser. mdize and the pre-commit audit must cover these two kinds of consumers while preserving explicit Org input compatibility tests
  • Mutually exclusive format sentences cannot only replace the format name—when a sentence simultaneously declares "must use the source format" and "forbid the target format", word-by-word replacement will make the affirmative item and the prohibited item coincide. mdize must swap the target and excluded items for the whole sentence, and the residue audit must also reject sentences where both ends are the same
  • A changed format name does not mean the syntax rules have also changed——org-mode is replaced with markdown , single-asterisk bold,~code~ and "do not use backticks" will still command the model to output Org. The converter must change this set of mutually exclusive rules as a whole into Markdown rules, and the audit must also treat the old rules as blocking
  • The script will automatically bump the patch version in plugin.json + marketplace.json—if you want to bump minor / major, change it manually first and then run the script; the script only appends patch
  • If the md branch's remote is newer than local (just pushed from another machine), the script will pull --rebase on failure attempt one reset --hard origin/md reapply—this will discard local unpushed md branch commits. Before the script it will prompt
  • Current paths: the skill source is fixed at ~/.agents/skills/, and the working repo is fixed at ~/code/ljg-skills/; do not read from or push to historical backup directories