checkout-health
Check a Git checkout's health by reporting whether the working tree is clean and what the recent commits are; use when asked to assess, summarize, or sanity-check the current repo state before or after work.
- License 许可
- MIT
- 所属仓库
- thrashr888/shift
- 最近更新
- 2026-09-25
- Stars
- ★ 1
- Forks
- 0
01 前言 Front Matter
- name
- checkout-health
- description
- Check a Git checkout's health by reporting whether the working tree is clean and what the recent commits are; use when asked to assess, summarize, or sanity-check the current repo state before or after work.
02 资源文件 1
- 参考文档reference.md2.6 KB
03 SKILL.md 正文
checkout-health
Report a Git checkout's health in one or two sentences: whether the working tree is clean (no uncommitted changes) and what the last commit was.
When to use
- User asks to "check the checkout", "is the tree clean", "what did we last commit", or to summarize repo state before/after a change.
- Pre-flight before a risky task or before reporting work done.
- Triage: distinguish a dirty tree (needs attention) from a clean one.
Steps
- Run
git status --shortandgit log --oneline -3in parallel (independent reads). In this runtime, use theruntool with an argv list:["git","status","--short"]and["git","log","--oneline","-3"]. - Read the status output:
- No output lines → tree is clean.
- Any line (
M,A,D,??,R, etc.) → tree is dirty; list the paths.
- Read the log output: the first line is the last commit. Take its short SHA and subject.
- Summarize in two sentences:
- Sentence 1: clean vs. dirty, naming the dirty paths (if any).
- Sentence 2: "The last commit was
<sha>—<subject>."
Commands that worked
git status --short # porcelain, one line per changed path; empty = clean
git log --oneline -3 # last 3 commits: "<sha> <subject>"
Both returned exit 0 and are safe read-only commands.
Pitfalls
- Not clean ≠ broken. A dirty tree just means uncommitted changes; report it, don't fix.
- Read the paths, don't guess. Quote the exact paths from
git status --short. - Bare SHA + subject.
--onelinegives<sha> <subject>; use that, not full hashes. - Not a repo / no commits. If a command exits non-zero, report the error instead of a clean/dirty verdict. See reference.md for edge cases.
- argv, not shell. Prefer the
runtool with an argv list so--and paths are not mangled by shell parsing.
What to verify
- Confirm exit code 0 for both commands (or report the real error).
- Confirm the two-sentence summary matches: status output → clean/dirty verdict, and first log line → last commit SHA + subject.
- No secrets or machine-specific paths in the report.
See reference.md for the full status-code table, edge cases, and examples.
04 同仓库更多 Skills
tauri-browser
暂无简介
ripwire
Answer "who calls this", "is it safe to change", "which tests cover it" and "where do I start in this repo" from a call graph instead of grepping and reading files. Use before editing a symbol, when a test fails with a trace, and when landing in an unfamiliar codebase; not for Scheme, which it cannot parse.
onepassword
Work with the user's 1Password through the op CLI for non-secret operations (which vaults and items exist, whether a session is signed in) and know how Shift gets secrets from it. Use when a server or command needs a credential, or the user asks about their vaults.
kanban
Keep and change this project's board — read the columns, move a card, add or retire one. Use when asked what is in progress, what to pick up next, or to move a card between columns.
cortex
暂无简介
cider
Read and act on macOS Apple apps (Calendar, Reminders, Contacts, Notes, Mail, Music, Safari, Home and 30 more) with the cider CLI, which prints JSON. Use when the user asks about their calendar, reminders, contacts, notes, mail or Mac state, or wants one of those changed.