Session git lifecycle en
agent skill library for ai agents using skills
npx -y skills add roebi/agent-skills --skill session-git-lifecycle-enAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
- 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Defines the git-based lifecycle for agent chat sessions: CREATE for new projects (git init with explicit main branch) and RESUME for continuing work from a delivered tar.gz containing a .git folder. Use this skill whenever an agent starts a new software project from scratch, or whenever a user provides a versioned tar.gz to continue work in a new or resumed session. Also covers the handover tag namespace convention (handover/vN) that keeps session delivery tags safely separated from software version tags (vX.Y.Z) used by GitHub Actions release workflows. Trigger phrases: "start new project", "new session", "resume project", "continue from tar", "here is myproject_vN.tar.gz", "untar and continue", "pick up where we left off", "add github actions release workflow".
The file declares its own license as CC BY-NC-SA 4.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
7.6 KB, ~1.8k tokens by cl100k_base, as published. Nobody here has run it
Session Git Lifecycle
Defines two procedures - CREATE and RESUME - that together form the git-based state management protocol for agent chat sessions.
Every software project an agent works on MUST live in a git repository from the first commit. Every delivered tar.gz MUST include the full .git folder so that any future session can reconstitute the complete project state, history, and intent without additional explanation from the user.
Why git inside the tar.gz
A tar.gz with .git contains four layers of context for a resuming agent:
git log-> what was built, in order, with intent encoded in commit messagesgit diff-> exact state of every file at every point in historyHandover-State.md-> known bugs, deferred items, explicit next steps- conversation history -> decisions and constraints in natural language
This makes every tar.gz a self-contained, agent-resumable project capsule usable in any session, on any day, without re-explanation.
C - CREATE procedure (new session, new project)
Use when: the user starts a new project from scratch with no prior tar.gz.
# 1. Create project folder
mkdir <projectname>
cd <projectname>
# 2. Init git repo with explicit main branch
# Required: git 2.x does NOT default to main.
# git 3.x will default to main, but we declare it explicitly
# so the skill works correctly on any git version.
git init -b main
# 3. Create Handover-State.md immediately
cat > Handover-State.md << 'EOF'
# Handover State
## Project
<projectname>
## Status
Session started. No deliveries yet.
## Known issues
None.
## Deferred items
None.
## Next steps
- Define requirements
- Write openapi.json if HTTP endpoints are involved
- Begin TDD cycle
EOF
# 4. Initial commit - repo is now tracked from zero
git add Handover-State.md
git commit -m "init: project start, main branch, Handover-State.md"
After this: every file created, every test written, every feature added gets committed with a meaningful message. The git log becomes the project diary.
Commit message convention
init: project start or scaffold
feat: new feature or endpoint
fix: bug fix
test: test additions or changes
refactor: code restructure, no behavior change
docs: documentation only
chore: build, config, CI changes
Handover tag at every delivery
Before packaging the tar.gz for delivery, tag the current commit.
Tag namespace rule - two tag families, never mixed:
Software version tags: v1.0.0 v1.2.3 v2.0.0
Handover delivery tags: handover/v1 handover/v2 handover/v3
The slash prefix puts handover tags in a separate Git ref namespace:
refs/tags/v1.0.0 <- software release, triggers GitHub Actions
refs/tags/handover/v1 <- session delivery snapshot, never triggers release
git tag handover/v<N>
git gc --aggressive
cd ..
tar -czf <projectname>_v<N>.tar.gz <projectname>/
The tag anchors the delivery version in git history. handover/v2 maps
1:1 to <projectname>_v2.tar.gz.
R - RESUME procedure (any session, from tar.gz)
Use when: the user provides a versioned tar.gz from a prior delivery.
# 1. Untar - restores full file tree including .git
tar -xzf <projectname>_v<N>.tar.gz
cd <projectname>
# 2. Read project history - understand what was built and why
git log --oneline
# 3. Read branch structure
git branch -a
# 4. Read explicit handover state
cat Handover-State.md
# 5. Confirm working tree is clean before starting new work
git status
After these five commands the agent has complete project context and can continue work - fix bug, add feature, refactor - as if no interruption occurred.
Resume continuation commit
After completing the requested work in a resume session:
git add .
git commit -m "feat: <what was done in this resume session>"
git tag handover/v<N+1>
git gc --aggressive
cd ..
tar -czf <projectname>_v<N+1>.tar.gz <projectname>/
Deliver <projectname>_v<N+1>.tar.gz. The version increments. The
history is continuous. The next session can resume again from v(N+1).
GitHub push convention
When the project is promoted to a GitHub repo, push tag namespaces separately to make intent explicit:
# push code and handover tags only
git push origin main
git push origin 'refs/tags/handover/*'
# push software release tag separately (triggers GitHub Actions release)
git tag v1.0.0
git push origin 'refs/tags/v*'
Never push all tags with git push origin --tags - this would push both
namespaces at once and could trigger unintended release workflows.
GitHub Actions release workflow rule
Every GitHub Actions release workflow in a project that uses this skill MUST restrict its trigger to software version tags only, using an explicit positive pattern match:
# .github/workflows/release.yml
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
This pattern matches: v1.0.0, v2.3.1, v10.0.0 This pattern does NOT match: handover/v1, handover/v2, handover/v3
The handover tag namespace handover/* never matches v[0-9]+.[0-9]+.[0-9]+
so no explicit exclude is needed. The positive pattern is the complete guard.
Document this intent in the workflow file with a comment:
on:
push:
tags:
# Software version releases only.
# Handover delivery tags (handover/vN) intentionally excluded
# by this positive pattern - they never match vX.Y.Z format.
- 'v[0-9]+.[0-9]+.[0-9]+'
CRUD mapping
| CRUD | Trigger | Agent first action |
|---|---|---|
| C | new project, no tar.gz | git init -b main + empty commit |
| R | user provides vN.tar.gz | untar + git log + git branch -a + cat Handover-State.md |
| U | "fix bug / add feature" | resume procedure, then work, then deliver v(N+1) |
| D | retire project | user-side action, archive or drop the tar.gz |
U (update) is always a resume followed by a new delivery. D (delete) is never an agent action.
Constraints
- NEVER start working in an untracked folder.
git init -b mainis the first action on every new project, before any code is written. - NEVER deliver a tar.gz without the .git folder included.
- NEVER deliver a tar.gz without a handover tag on the delivery commit.
- ALWAYS use
handover/vNtag format - never barehandover-vNorvN. - NEVER use
git push origin --tags- push tag namespaces separately. - ALWAYS run
git gc --aggressivebefore packaging to minimize tar size. - ALWAYS update Handover-State.md before the delivery commit to reflect current known issues and next steps.
- The
-b mainflag is mandatory ongit init. Do not rely on git default branch configuration - it differs between git 2.x and git 3.x. - EVERY GitHub Actions release workflow MUST trigger only on
v[0-9]+.[0-9]+.[0-9]+pattern. Never onhandover/*.
Gives 0 of the 12 instructions most pr commit review skills give in ~1.8k tokens
Counted across 888 of the 1,342 authors here whose files we hold, read 2026-08-06
- use conventional commits formatin 123 of 888, across 110 files
- keep subject line under 72 charactersin 60 of 888, across 46 files
- delete branches after mergein 50 of 888, across 37 files
- use imperative mood in subject linein 50 of 888, across 41 files
- use imperative mood in commit messagesin 45 of 888
- generate a conventional commit messagein 42 of 888
- make atomic commitsin 37 of 888, across 25 files
- run tests before committingin 36 of 888, across 24 files
- run project test suite to verify clean baselinein 35 of 888, across 7 files
- run detected project setup commandsin 34 of 888, across 6 files
- wrap commit body at 72 charactersin 32 of 888, across 25 files
- split unrelated changes into separate commitsin 32 of 888, across 27 files
Said here and by no other author read
- initialize git with explicit main branch
- create handover state file immediately
- commit every file with a meaningful message
- tag deliveries with handover namespace
- run aggressive garbage collection before packaging
- update handover state before delivery commit
Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.