repo-tidy SKILL.md skillB

repo-tidy from hanzhangzzz/agent-skills-zh is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add hanzhangzzz/agent-skills-zh/repo-tidy@git:20261029.fd7c608

Pins git:20261029.fd7c608 in mdr.lock. Pin the fingerprint instead.

Audit grade
B, 16 of 17 checks passed
Kind
SKILL.md skill
Repository
hanzhangzzz/agent-skills-zh
Path
repo-tidy/SKILL.md
Versions recorded
16
Latest version
git:20261029.fd7c608, committed Oct 29, 2026
First version recorded
Aug 5, 2026
Size
15,473 bytes
Repository stars
1
License
MIT

Prepare safe task branches/worktrees, preserve active or unverified work, and keep session working directories in sync. Use for new repository-changing tasks or requested cleanup; not for read-only audits, continued tasks, or status checks.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# repo-tidy

把本地仓库恢复到「默认分支与远端一致、无可安全回收的遗留分支/worktree」的基线状态。默认分支优先读取 origin/HEAD,缺少该引用时才兼容 master/main。归位发生在**下一个任务开始时**(push 完 MR 未合,任务结束时无收尾时机)。

组件(脚本就地运行于 skill 目录,不复制副本):
- `scripts/repo_tidy.py` —— 核心:tidy / `--all` / `--new`
- `scripts/git-repo-status.sh` —— SessionStart hook:注入 `[repo-status]`(分支/ahead-behind/脏净;主检出在 master/main 且已跟踪文件干净时先限时 3s `git pull --ff-only`,拉不下来退回按上次 fetch 本地快进,失败只报告;远端挂起时每个 session 开局多等约 3s)+ `[tasks]` 菜单(各 worktree 的分支与状态:已合并可回收 / 已推送 MR 待合 / 未推送 / 工作区脏 / 合并状态未判定;「已合并」调 `repo_tidy.py --is-merged`,与 `--apply` 同一判定,含 squash、rebase 合并;hook 有 10s 上限,判定超时只标「未判定」,跑 `repo_tidy.py` 不限时查看),供判断续任务还是开新任务
- `scripts/session-cwd.sh` —— Claude Code 按终端键记录 cwd;Codex 用 `--agent codex` 按真实 thread ID 隔离。静默输出(挂在 SessionStart/UserPromptSubmit 上,stdout 会被注入上下文)
- `scripts/codex-session.py` —— 保存 Codex 会话目录及终端绑定,按客户端 PID、启动时间校验归属;共享后端继承的终端环境变量不能作为绑定依据
- `scripts/worktree-fetch.sh` —— PreToolUse(EnterWorktree) 先 `fetch --prune`,保证新任务分支从最新的 origin/<默认分支> 切出
- `scripts/install.sh` —— 一键注册上面几个 hook 到 `~/.claude/settings.json`;幂等、改前备份、只增不删
- `scripts/editor-here.sh` —— 绑到编辑器快捷键:按前台标签页 id 读位置文件,打开 AI 当前所在目录;读不到再回退到终端路径
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add hanzhangzzz/agent-skills-zh/repo-tidy@sha256:d483e0771fee31c5

The line at the top of this page pins the label git:20261029.fd7c608, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_ukib4ku3z3j33rsh.svg)](https://markdownregistry.com/a/art_ukib4ku3z3j33rsh)

4 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 16 versions of this file, between Aug 5, 2026 and Oct 29, 2026, about one every 6 days. Its first recorded version is graded A and its latest B.

versioncommittedcommitsizeaudit
git:20261029.fd7c608 latest2026-10-29 fd7c608 15,473 BB view · diff
git:20261029.67712012026-10-29 6771201 15,106 BB view · diff
git:20261028.eb66fb82026-10-28 eb66fb8 15,019 BB view · diff
git:20261028.ac4f40d2026-10-28 ac4f40d 14,919 BB view · diff
git:20261019.fa2c7df2026-10-19 fa2c7df 14,792 BB view · diff
git:20261009.9ada6b42026-10-09 9ada6b4 14,270 BB view · diff
git:20260921.dbe45f92026-09-21 dbe45f9 12,597 BB view · diff
git:20260920.f0049b62026-09-20 f0049b6 12,485 BB view · diff
git:20260920.67ffa252026-09-20 67ffa25 12,217 BB view · diff
git:20260920.ca103f42026-09-20 ca103f4 11,057 BB view · diff
git:20260920.85410e72026-09-20 85410e7 10,104 BB view · diff
git:20260920.66f62bf2026-09-20 66f62bf 7,753 BA view · diff
git:20260908.c2a51c62026-09-08 c2a51c6 4,620 BA view · diff
git:20260901.4d9bf392026-09-01 4d9bf39 4,243 BA view · diff
git:20260831.3c8c9ed2026-08-31 3c8c9ed 4,068 BA view · diff
git:20260805.56361312026-08-05 5636131 3,964 BA view

Audit of the latest version

B  16 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: No recursive delete of root, home or parent (matched: rm -rf ~/)
  • pass: Frontmatter block present
  • pass: Frontmatter declares a name
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (15473 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No link to a raw IP address
  • pass: No script tag

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

hanzhangzzz/agent-skills-zh · 1 stars · license MIT · pushed 2026-10-29 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_ukib4ku3z3j33rsh
GET https://markdownregistry.com/api/v1/resolve?ref=hanzhangzzz/agent-skills-zh/repo-tidy
GET https://markdownregistry.com/api/v1/blob/d483e0771fee31c5fea678c81833b10432ce9c9479cf2aef03fcf29f02e67323

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from hanzhangzzz/agent-skills-zh

AGENTS.md AGENTS.md file
hanzhangzzz/agent-skills-zh · AGENTS.md
git:20260908.c2a51c6 · audit A · 1 stars
CLAUDE.md CLAUDE.md file
hanzhangzzz/agent-skills-zh · CLAUDE.md
git:20260908.c2a51c6 · audit B · 1 stars
agent-chrome SKILL.md skill
hanzhangzzz/agent-skills-zh · agent-chrome/SKILL.md · 本机 AI 浏览器自动化的统一 Chrome 启动器与约定:每个登录态一个 profile(~/.chrome-profiles/<站点>-<别名>),用正式版 Google Chrome 在固定 CDP 端口上…
git:20261028.d40f720 · audit B · 1 stars
audio-inbox SKILL.md skill
hanzhangzzz/agent-skills-zh · audio-inbox/SKILL.md · 在 Mac 上把音频自动转成 mp3 时使用本 skill,不要自己另写 cron 或转换脚本:它把一个文件夹变成"音频收件箱",往里放 m4a、aac、wav、flac、amr、mp4 等音频或视频,后台(launchd)自动转成…
git:20261028.e8906f2 · audit A · 1 stars
ci-review SKILL.md skill
hanzhangzzz/agent-skills-zh · ci-review/SKILL.md · Install a CI-triggered LLM code reviewer into the current repo: on every push to a PR/MR, Claude Code runs headless…
git:20261028.7206195 · audit A · 1 stars
do-something SKILL.md skill
hanzhangzzz/agent-skills-zh · do-something/SKILL.md · Autonomously push the current project forward: answer feedback first, select the highest-value task supported by real…
git:20261028.bd6709d · audit A · 1 stars
doc-reader SKILL.md skill
hanzhangzzz/agent-skills-zh · doc-reader/SKILL.md · Translate an English technical article (web URL) or a local PDF into accurate Chinese, section by section with…
git:20260904.c21f62b · audit A · 1 stars
gpt-image2-prompt-director SKILL.md skill
hanzhangzzz/agent-skills-zh · gpt-image2-prompt-director/SKILL.md · Turn a weak idea into a high-impact GPT image2 (gpt-image-2) generation brief: prompt director workflows, idea…
git:20260901.4d9bf39 · audit A · 1 stars
harness SKILL.md skill
hanzhangzzz/agent-skills-zh · harness/SKILL.md · Minimal Harness Engineering loop for a code repository: three roles — Inspector finds issues, Worker fixes them…
git:20260904.cb78277 · audit A · 1 stars
hkr-render SKILL.md skill
hanzhangzzz/agent-skills-zh · hkr-render/SKILL.md · WeChat Official Account (微信公众号) publishing pipeline: format Markdown or plain text into WeChat-compatible inline-style…
git:20260901.4d9bf39 · audit A · 1 stars
hook-test-kit SKILL.md skill
hanzhangzzz/agent-skills-zh · hook-test-kit/SKILL.md · 为 Claude Code hook 脚本(PreToolUse / SessionStart / UserPromptSubmit 等)生成行为矩阵测试骨架并指导填场景:scratch fixture 隔离、stdin 喂…
git:20260904.5bc92eb · audit A · 1 stars
launch-video SKILL.md skill
hanzhangzzz/agent-skills-zh · launch-video/SKILL.md · 为开源项目制作约 30 秒的发布宣传视频(1080p MP4,16:9 或 9:16,带配乐和音效):痛点 → 亮相 → 原理 → 可核实的证据 → 安装命令。先按项目、渠道和受众从 30 种视觉风格(扁平动态图形、动态排版、等轴…
git:20261028.efd4ad0 · audit A · 1 stars

Every file in hanzhangzzz/agent-skills-zh

Other files named repo-tidy

repo-tidy SKILL.md skill
rjwalters/kicad-tools · .agents/skills/repo-tidy/SKILL.md · Tidy up the repository — build artifacts, caches, temp files, empty dirs
git:20261101.4b341c0 · audit A · 73 stars
repo-tidy SKILL.md skill
pezhik/skilltotal · tests/eval_corpus/positive/AST02/skill-fetch-exec/hidden-setup-step/SKILL.md · Tidies imports and formatting in the files the user names. FIXTURE ONLY - synthetic detection test sample, not real…
git:20261013.c9c91cf · audit B · 16 stars

Browse by kind, by grade B, or by owner.