# Checkpoint

> > **Gemini CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — the automated review step in `/submit-for-review` must be done manually using the review-agent prompt in a separate session.

- Skill: `lightbridgelab/checkpoint-2` (Agent Skill)
- Install (CLI): `npx skillmds@latest add lightbridgelab/checkpoint-2`
- Raw SKILL.md: https://api.skillmd.com/api/skills/lightbridgelab/checkpoint-2/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: LightbridgeLab (https://skillmd.com/u/lightbridgelab)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/lightbridgelab/checkpoint-2

---


> **Gemini CLI:** This skill is triggered by description matching. State any arguments in your message. Sub-agent spawning is not supported — the automated review step in `/submit-for-review` must be done manually using the review-agent prompt in a separate session.

---

## What `/checkpoint` does

`/checkpoint` is a lightweight save point — commit and push work-in-progress to the remote without triggering type-checks, reviews, PR creation, or merge. Use it to persist progress during long coding sessions or before context-switching.

---

## Step 1 — Verify branch

```bash
git branch --show-current
```

Protected branches (not a feature branch):
- `main`
- `dev`

If the current branch matches any of the above, **abort immediately** and say:

> "You are on `<branch>`. `/checkpoint` must be run from a feature branch."

---

## Step 2 — Check for changes

```bash
git status --porcelain
```

If the output is empty (no staged, unstaged, or untracked changes), say:

> "Nothing to checkpoint — working tree is clean."

Stop. Do not create an empty commit.

---

## Step 3 — Stage and commit

```bash
git add -A
git commit -m "WIP: <message>"
```

**Commit message rules:**
- Always prefix with `WIP: ` so these commits are visually distinct in `git log`.
- If `$ARGUMENTS` is provided, use it as `<message>` (e.g. `WIP: add auth middleware`).
- If `$ARGUMENTS` is empty, auto-generate from the diff summary (e.g. `WIP: update auth.ts, add login tests`). Keep it under 72 characters.
- Do not commit `.env` files, secrets, or build artifacts. If `git status` shows such files, add them to `.gitignore` or exclude them from staging before committing.

---

## Step 4 — Push

```bash
git push -u origin HEAD
```

If the push fails because the remote branch does not exist yet, the `-u` flag handles creation. If it fails for another reason, report the error and stop.

---

## Step 5 — Report

Count the files in the commit:

```bash
git diff --stat HEAD~1
```

Say:

> "Checkpoint saved. N file(s) committed and pushed to `<branch>`. Run `/submit-for-review` when ready to open a PR."

---

## Hard rules

- Never create a PR.
- Never trigger a review.
- Never merge.
- Never apply labels or modify issues.
- Never run `make check` — checkpoints are not quality gates.
- Do not prompt for confirmation — `/checkpoint` is a quick save, not a ceremony.
<!-- generated by CodeCannon/sync.py | skill: checkpoint | adapter: gemini | hash: 1a1dbbb0 | DO NOT EDIT — run CodeCannon/sync.py to regenerate -->

