/jiachen:lifting-loopsfrom Jiachen's MCode Stack
Identifies repetitive manual steps users perform for AI agents (retrying, judging, approving, carrying context) and proposes automation improvements like rule changes, scripts, or skills. Scans local sessions and Obsidian vault.
Ships in Jiachen's MCode Stack. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
| Role | What the user does | Typical words |
|---|---|---|
| Retry | Asks the agent to go again after it stalls or fails | "Try again", "continue", 继续 |
| Judge | Says whether output is good, because the agent cannot tell | "Too long", "Is this OK?", "Too forced" |
| Approve | Gives the go-ahead the agent waits for | "Show me the commit plan first" |
| Carry | Hands over context the agent should have found itself | "See that other session", "We fetched this before" |
| Trigger | Starts the same kind of task by hand | The same opening prompt across sessions |
| Stand in | Does something the agent could have done | Logging in, clicking a button, copying files, running a command |
private/ledger.md, the evidence, status and metric for every loop.private/proposals/P-NNN.md, a draft change to a git-tracked file or to the user's habits.File formats and status transitions are in references/ledger.md.
private/ in this skill's directory without asking.~/.codex/memories/; Codex maintains it.session for session mode, batch for batch mode, batch --since YYYY-MM-DD to scan from that date.private/ledger.md does not exist, create it from the template in references/ledger.md.private/config.json does not exist:
Write the ledger, proposals and reports in the user's language. If a file already exists, keep its language and field names.
private/ledger.md. If an intervention belongs to an existing loop, append the evidence and update the counts; otherwise add a new loop as observed.Run every command from this skill's directory.
python3 scripts/digest.py scan. It sets the time window from the cursors, compresses each source into digest-<source>.md, and prints the run directory.## sections.file: points to and read only the relevant turns. For MiniMax Code, file: points to manifest.json; the history is in messages.jsonl and snapshots/ in the same directory.report.md in the run directory, using the template.python3 scripts/digest.py mark <run-dir> to advance the cursors. Do not run it if any earlier step failed.private/proposals/P-NNN.md.status to rejected, write the reason and date under "Decision", and update the loop as references/ledger.md says. Stop here.MEMORY.md in the same directory.status to applied. Mark the loop graduated, record the artifact path, and log the average weekly intervention count of the 4 weeks before graduation in "Metric log".Answer three questions first and put the answers in the proposal:
Pick the exit in this order, taking the first one that can hold the loop:
~/.claude/CLAUDE.md and ~/.codex/AGENTS.md. If they are symlinks, propose the change to the file they point to. Use this exit only when all of these hold: the evidence comes from 2 or more repositories, the rule holds for both Claude Code and Codex, and none of the first five exits fits. For every line you propose to add, find a stale line that can go.Common pairings of role and exit:
Text a proposal would put into a git-tracked file must meet every rule below:
~, relative paths or environment variables.Evidence and quotes go only under private/.
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/making-contentContent production in three modes: rewrite, Xiaohongshu (小红书) image post, short video. Rewrite (default): turns an AI-sounding Chinese or mixed Chinese-English draft (post, newsletter, engineering blog, commentary) into the author's restrained style: few emoji, short paragraphs, hedged claims, neutral wording, English terms split by spaces. Triggers: 按我的风格改, 去 AI 味, 润色, 改改这篇, or a vague 帮我改改 when the context is a structured draft. Also for a Xiaohongshu image post from scratch (title, cover, cards, body, hooks); read references/xhs-post.md first. Also turns a document, research, notes or an article into a 60-180 s vertical video (抖音, 小红书, 视频号, B站: real sources, voice-over, captions, cover). Triggers: 做成视频, 做个短视频, 剪个 90 秒版本, 配音, 换成我的声音, or complaints of 字太密, AI 味太重, 容易走神; read references/video-pipeline.md first./pr-descriptionDraft or check a pull request description in a fixed format (background, changes, behavior changes, out of scope, verification, rollback, not done, related) for GitHub or GitLab. Use when opening a PR, when the MCode Review summary reports missing description sections, or when the user asks for a PR description./pr-quizWrite multiple-choice questions that check whether a PR's author understands their change. Use only when the MCode Review pipeline asks for an author quiz./pr-reviewReview a pull request or the current branch with the MCode Review rules (severity, evidence ladder, lens checklists, review principles) and the repository's own .mcode-review.json and .mcode-review.md. Works with GitHub pull requests and GitLab merge requests. Use when the MCode Review CI pipeline starts a review pass, or when a developer asks to review their PR or branch before asking a person to review it./pr-review-ciConnects a GitHub or GitLab repository to the MCode Review CI and keeps the setup current. Use when someone adds MCode Review to a repository on GitHub Actions or GitLab CI, upgrades or rolls back the pinned plugin commit, changes the repository's rule pack, language, models, shadow or enforce phase, author quiz or Feishu card, checks the security setup, or troubleshoots a review run that failed./pr-review-tuningThe weekly self-tuning loop for the MCode Review bot on GitHub or GitLab. Measures the bot on a repository's recent PRs (threads per PR, which kinds people answer or dismiss, what was unanswered at merge, cost per round, time to merge, follow-up fixes), finds noise and misses, proposes at most three rule changes with their expected effect on each goal, backtests them on past PRs with known outcomes within an agreed token budget, has an independent check recompute the numbers, and changes rules only after a person approves. The first run only measures. Use for requests to run pr-review-tuning or to measure or tune the review bot, for the weekly scheduled run, and for settling a proposal (approve or reject P1).npx claudepluginhub minimax-ai/mcode-stack --plugin jiachenOther plugins' skills for the same job