Session wrap-up: commit pending changes, push, write structured state for the next session to resume from.

AGPL-3.0Auto-check passed

Install Wrap

skills CLI
$ npx skills add UniClipboard/UniClipboard --skill wrap -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install UniClipboard/UniClipboard wrap --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/UniClipboard/UniClipboard.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/wrap .claude/skills/wrap && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
wrap
GitHub stars
1.8k
Token cost
~1.9k tokens
SKILL.md length
569 words
Files
1
Skills in repo
24
Repo updated
First seen
Licence
AGPL-3.0

At a glance

Session wrap-up: commit pending changes, push, write structured state for the next session to resume from.

  • Works in 5 steps: Take stock (parallel) → Commit pending changes → Push → …
  • SKILL.md covers Purpose, When to trigger, State file location and Workflow, plus 5 more sections
  • Calls git and gh; needs PROJECT_KEY

What it does

Wrap is an agent skill from UniClipboard/UniClipboard. Session wrap-up: commit pending changes, push, write structured state for the next session to resume from. Eliminates 'glue sessions' that exist only to commit/push, and preserves debug context across sessions.

Its SKILL.md is about 1.9k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

The repository describes itself as: Real-time clipboard sync across all your devices — local-first, peer-to-peer, and end-to-end encrypted. No account. No cloud dependency. No central server. The licence is AGPL-3.0.

Example prompts

  • “glue sessions”
  • “/wrap”

Requirements

  • A credential in PROJECT_KEY

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Take stock (parallel)
  2. Commit pending changes
  3. Push
  4. Write state file
  5. Report

What it can do on your machine

Read from SKILL.md and the folder at commit 9c76e0f. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • git
    • gh

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git and gh, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • PROJECT_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Wrap loads about 1.9k tokens when it runs. Until then it costs about 54 tokens; SKILL.md has 569 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~54
When it runs · the whole SKILL.md, loaded when a task matches
~1.9k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from UniClipboard/UniClipboard at commit 9c76e0f, republished under its AGPL-3.0 licence (© UniClipboard). 569 words, ~1,868 tokens.

Download SKILL.mdSave it as .claude/skills/wrap/SKILL.md (or your agent's skills folder).
name
wrap
description
Session wrap-up: commit pending changes, push, write structured state for the next session to resume from. Eliminates 'glue sessions' that exist only to commit/push, and preserves debug context across sessions.

wrap

Purpose

A session-ending skill that wraps up the current work into a clean state for the next session. It replaces the pattern of opening a new "glue session" just to commit and push, and it replaces ad-hoc $handoff prose with a structured, machine-readable state file that $continue-task can consume.

Before (observed in 29 of 50 recent sessions):

text
Session N: [does the work] → ends without committing
Session N+1: "commit and push" → 1 prompt, done   ← wasted session
Session N+2: "继续" → spends 3-8 min rebuilding context

After:

text
Session N: [does the work] → $wrap → committed, pushed, state saved
Session N+1: $continue-task → full context in 10 seconds

When to trigger

  • $wrap — full wrap-up: commit + push + state file
  • $wrap --no-push — commit + state file, skip push
  • $wrap --no-commit — state file only (for when changes aren't ready to commit)
  • User says "收工", "wrap up", "结束今天的工作", "保存进度"
  • End of a long session where context will be lost

State file location

bash
PROJECT_KEY=$(pwd | sed 's|^/||; s|/|-|g')
STATE_FILE="${CODEX_HOME:-$HOME/.codex}/project-state/${PROJECT_KEY}/active-task.json"

This stores task state under the user's Codex home, outside the tracked repository.

Workflow

Step 1 — Take stock (parallel)
bash
git status --short
git rev-parse --abbrev-ref HEAD
git log --oneline -5
git diff --stat                        # unstaged changes
git diff --cached --stat               # staged changes
gh pr list --head $(git rev-parse --abbrev-ref HEAD) --json number,url,title --jq '.[0]' 2>/dev/null
Step 2 — Commit pending changes

Skip if --no-commit or if working tree is clean.

If there are changes:

  1. Show the user what will be committed:

    Uncommitted changes:
      M  crates/uc-core/src/types.rs
      M  crates/uc-daemon/src/api.rs
      A  crates/uc-core/src/new_module.rs
  2. Ask the user:

    Commit these changes?
    A) Yes, commit all
    B) Let me pick which files
    C) Skip commit (just save state)
  3. On commit, draft a message from the diff context:

    bash
    git add <files>
    git commit -m "$(cat <<'EOF'
    <type>(<scope>): <message>
    EOF
    )"
Step 3 — Push

Skip if --no-push or if no remote tracking branch.

bash
git push

If a PR exists for this branch, note the PR URL in the state file.

Step 4 — Write state file

Build a structured state file. The state file has two parts:

  • JSON (active-task.json) — machine-readable, consumed by $continue-task
  • Markdown (active-task-context.md) — human-readable handoff detail
4a — active-task.json
json
{
  "version": 1,
  "created_at": "2026-06-21T14:30:00Z",
  "project": "/Users/mark/MyProjects/uniclipboard",
  "branch": "active-clipboard-state",
  "pr": {
    "number": 1117,
    "url": "https://github.com/UniClipboard/UniClipboard/pulls/1117"
  },
  "task": {
    "summary": "Implement ActiveClipboardState for cross-device LWW register",
    "status": "in_progress",
    "done": [
      "PR1-PR6: core state machine, reconcile, sync",
      "PR7: mobile cutover"
    ],
    "next": [
      "PR8: pull store-only LWW starvation workaround",
      "Add dual-node e2e test for PR8"
    ],
    "blocked_on": null
  },
  "debug": {
    "active": false,
    "symptom": null,
    "hypotheses_tried": [],
    "hypotheses_ruled_out": [],
    "evidence": [],
    "current_hypothesis": null
  },
  "pending_actions": {
    "needs_push": false,
    "needs_pr": false,
    "needs_rebase": false,
    "uncommitted_files": []
  },
  "context_refs": [
    ".planning/2026-06-19-issue-1017-active-clipboard.md",
    "docs/architecture/active-clipboard-state.md"
  ]
}
4b — active-task-context.md

This replaces the freeform $handoff document. Written to the same directory.

markdown
# Active Task: <summary>

**Branch:** `<branch>`
**PR:** #<number> (<url>)
**Last updated:** <timestamp>

## What's done
<bulleted list from task.done>

## What's next
<bulleted list from task.next>

## Key decisions made
<non-obvious decisions from this session that the next agent needs to know>

## Debug state (if active)
### Symptom
<what's broken>

### Hypotheses tried
| # | Hypothesis | Result | Evidence |
|---|-----------|--------|----------|
| 1 | ... | Ruled out | ... |
| 2 | ... | Partially confirmed | ... |

### Current hypothesis
<what to test next>

## Files changed this session
<git diff --stat output>

## Suggested skills
<relevant skills for the next session>
Step 5 — Report
text
✅ Session wrapped.
  Branch: active-clipboard-state
  Committed: 3 files (feat(core): add ActiveClipboardState reconcile)
  Pushed: ✓
  PR: #1117
  State saved: ~/.codex/project-state/<project-key>/active-task.json
  
  Next session: $continue-task to pick up where you left off.

Populating the state file

Task information

Derive from the conversation context:

  • summary: One line describing the overall task (not just the last thing done)
  • done: What was accomplished in this session AND prior sessions (cumulative)
  • next: Specific next steps, not vague ("implement X" not "continue working")
  • blocked_on: If waiting on something external (CI, user decision, another PR)
Debug state

Only populate if the session involved debugging:

  • hypotheses_tried: Each hypothesis with its result and evidence
  • hypotheses_ruled_out: Explicitly mark what was disproven (prevents next session from retrying)
  • evidence: Key observations (log snippets, test results, measurements)
  • current_hypothesis: What to test next
Show full SKILL.md (232 more words)Show less
Context references

List files that the next session should read for context:

  • Planning docs in .planning/
  • Architecture docs in docs/
  • Relevant issue URLs
  • Do NOT duplicate content from these files — just reference them

Interaction with existing $handoff

  • $wrap supersedes $handoff for the common case (end of session)
  • $handoff remains available for when you want a standalone document without committing/pushing
  • If $wrap is called, it creates both the structured state AND the markdown context (no need for separate $handoff)

Cleanup

The state file is overwritten by each $wrap call. $continue-task clears it after successful resume. Old state files are not cleaned up automatically — they're small (< 5KB) and serve as history.

Safety guardrails

  • Never force-push
  • Never amend already-pushed commits
  • Ask before committing if there are unstaged changes (user might not want all of them)
  • Redact passwords, API keys, and PII from the state file and context document
  • Do NOT write the state file into the git-tracked repo
  • Do NOT commit the state file
  • If the working tree has merge conflicts, warn and skip commit

Anti-patterns

  • Writing a 500-line handoff document that duplicates the planning doc
  • Using vague next steps ("continue the work" — useless for $continue-task)
  • Including raw log output in the context file (summarize, don't paste)
  • Forgetting to populate debug state when the session was a debugging session
  • Overwriting state without checking if there's important state from a parallel session on a different branch

© UniClipboard, AGPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/wrap of UniClipboard/UniClipboard.

Open the folder on GitHubat commit 9c76e0f

Compare with similar skills

Wrap next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Wrap compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Wrap this skillUniClipboard/UniClipboard1.8k—~1.9kAutomated safety check: PassAGPL-3.0
Commit, Push, and PREveryInc/compound-engineering-plugin25k—~2kAutomated safety check: PassMIT
Commitsickn33/agentic-awesome-skills47k2 repos~1.3kAutomated safety check: PassMIT
Git Commit Pushfarm-fe/farm5.6k—~325Automated safety check: PassMIT
Commitdavila7/claude-code-templates32k3 repos~730Automated safety check: PassMIT
Commitwindmill-labs/windmill18k—~447Automated safety check: PassCustom licence

Similar skills

  • Commit, Push, and PR

    EveryInc/compound-engineering-plugin

    Commits staged changes, pushes a branch, and opens or updates a GitHub pull request, including writing its description.

    25k GitHub stars~2k tokensUpdated today
    DevelopmentAuto-check passed
  • Commit

    sickn33/agentic-awesome-skills

    ALWAYS use this skill when committing code changes — never commit directly without it.

    47k GitHub starsUsed in 2 repos~1.3k tokens
    DevelopmentAuto-check passed
  • Git Commit Push

    farm-fe/farm

    Commit and push repository changes safely. An agent skill from farm-fe/farm.

    5.6k GitHub stars~325 tokensUpdated 15 days ago
    DevelopmentAuto-check passed
  • Commit

    davila7/claude-code-templates

    Create commit messages following Sentry conventions. An agent skill from davila7/claude-code-templates.

    32k GitHub starsUsed in 3 repos~730 tokens
    DevelopmentAuto-check passed
  • Commit

    windmill-labs/windmill

    Create a git commit with conventional commit format. An agent skill from windmill-labs/windmill.

    18k GitHub stars~447 tokensUpdated today
    DevelopmentAuto-check passed
  • Commit

    ccusage/ccusage

    Creates atomic Conventional Commits. An agent skill from ccusage/ccusage.

    19k GitHub stars~722 tokensUpdated today
    DevelopmentAuto-check passed

More from UniClipboard/UniClipboard

All 24 skills in this repo
  • Beui

    UniClipboard/UniClipboard

    Pick and install beUI (@beui) animated React components from the shadcn registry.

    1.8k GitHub stars~1.8k tokensUpdated today
    Auto-check passed
  • Create PR

    UniClipboard/UniClipboard

    Push the current branch and open a GitHub pull request against main.

    1.8k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Design Audit

    UniClipboard/UniClipboard

    定期审计代码库的工程设计问题(高心智复杂度、单一真相源被破坏、catch-all 胖接口、死代码、散落魔法字面量、泄漏抽象、资源生命周期靠环形缓冲)与可优化点,范围限定为自上次审计以来的 git churn,每条发现都落到 file:line 并对照本项目自己的 VISION.md / 各级 AGENTS.md / memory…

    1.8k GitHub stars~554 tokensUpdated today
    Auto-check passed
  • Dual Side Debug

    UniClipboard/UniClipboard

    Inspect uniclipboard logs from BOTH the macOS host and the mounted Windows peer when debugging cross-platform sync, pairing, transfer, or daemon issues.

    1.8k GitHub stars~2.6k tokensUpdated today
    Auto-check passed
  • E2E Test Thinker

    UniClipboard/UniClipboard

    Analyze the current branch's diff against main and determine which changes are testable via CLI-based end-to-end tests.

    1.8k GitHub stars~1.7k tokensUpdated today
    Auto-check passed
  • iOS Log Diagnose

    UniClipboard/UniClipboard

    Drive the UniClipboard iOS app in a simulator and read its OSLog yourself to diagnose a mobile-sync bug, instead of asking the user to paste logs.

    1.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed

Questions about Wrap

What does Wrap do?

Session wrap-up: commit pending changes, push, write structured state for the next session to resume from. Wrap is an agent skill from UniClipboard/UniClipboard. Session wrap-up: commit pending changes, push, write structured state for the next session to resume from.

How do I install Wrap in Claude Code?

Run `npx skills add UniClipboard/UniClipboard --skill wrap -a claude-code`. Or copy the skill folder (.agents/skills/wrap in UniClipboard/UniClipboard) into .claude/skills/wrap in your project. Claude Code loads it when a task matches its description.

How do I install Wrap in Codex?

Run `npx skills add UniClipboard/UniClipboard --skill wrap -a codex`. Or copy the skill folder (.agents/skills/wrap in UniClipboard/UniClipboard) into .agents/skills/wrap in your project. Codex loads it when a task matches its description.

Can I use Wrap in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add UniClipboard/UniClipboard --skill wrap -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/wrap, .gemini/skills/wrap, .github/skills/wrap and .opencode/skills/wrap in your project.

What does Wrap need to run?

Going by SKILL.md and its folder, Wrap needs the command-line tools its instructions call (git and gh) and credentials named PROJECT_KEY. Our summary lists: A credential in PROJECT_KEY.

Does Wrap access the network?

SKILL.md contains no URLs. Its commands use git and gh, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Wrap safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Wrap use?

Wrap is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Wrap use?

About 1.9k tokens (SKILL.md is roughly 7.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Wrap?

Skills that share tags, products or a category with Wrap: Commit, Push, and PR (EveryInc/compound-engineering-plugin, 25k stars), Commit (sickn33/agentic-awesome-skills, 47k stars), Git Commit Push (farm-fe/farm, 5.6k stars) and Commit (davila7/claude-code-templates, 32k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Wrap?

UniClipboard (a GitHub organization) maintains it in UniClipboard/UniClipboard, which has 1,847 GitHub stars. The repository holds 24 skills in this directory. The repository was last updated on October 7, 2026.

Source: UniClipboard/UniClipboard on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.