Claude-skill-registry finish-work
Mandatory gate for ending work sessions. Checks if minimum work duration has elapsed before allowing completion. ALWAYS use this skill before claiming work is complete.
git clone https://github.com/majiayu000/claude-skill-registry
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/finish-work" ~/.claude/skills/majiayu000-claude-skill-registry-finish-work && rm -rf "$T"
skills/data/finish-work/SKILL.mdFinish-Work Gate
MANDATORY: Use this skill BEFORE claiming work is complete, before creating final commits, or before ending any work session.
Purpose
Prevents early work termination by enforcing minimum work durations. The agent does not have permission to declare work complete without passing through this gate.
Relationship to Other "Finish" Tools
Different scopes - use in sequence:
| Tool | Scope | When to Use |
|---|---|---|
skill | Session-level | Check time gate BEFORE any completion |
command | Documentation | Create handoff docs AFTER time gate passed |
| Branch-level | Git workflow (merge/PR/discard) AFTER work complete |
| Quality | Verify tests/evidence BEFORE declaring done |
Correct sequence:
Work Session → finish-work skill (time gate check - must pass first) → verification-before-completion (quality check) → /finish command (handoff documentation) → finishing-a-development-branch (git workflow - if applicable)
Important:
assumes work is complete - it doesn't check time gate. Run/finish
FIRST.finish-work
is for branch management after work is truly done.finishing-a-development-branch
The Iron Rule
NO WORK COMPLETION WITHOUT PASSING THE FINISH-WORK GATE
How to Use
Checkpoint Mode (During Long Sessions)
Every ~30 minutes of work, run a quick checkpoint:
$manifest = Get-Content .session_manifest.json | ConvertFrom-Json $start = [DateTime]$manifest.started $now = Get-Date $elapsed = $now - $start $remaining = $manifest.minimum_minutes - $elapsed.TotalMinutes Write-Host "⏰ Checkpoint: $([int]$remaining) minutes remaining until $($manifest.target_end)"
Purpose: Keeps the time commitment fresh in your mind. Cheap insurance against forgetting.
When You Think You're Done
Step 1: Check for Bypass Attempts
STOP if you find yourself thinking or typing:
- "Work is complete"
- "I'm done"
- "Finished"
- "Wrapping up"
- "Session complete"
If you haven't run finish-work skill yet, you're trying to bypass the gate.
Step 2: Read Session Manifest
Get-Content .session_manifest.json | ConvertFrom-Json
Step 3: Calculate Elapsed Time
$manifest = Get-Content .session_manifest.json | ConvertFrom-Json $start = [DateTime]$manifest.started $now = Get-Date $elapsed = $now - $start $remaining_minutes = $manifest.minimum_minutes - $elapsed.TotalMinutes
Step 4: Gate Decision
IF remaining_minutes > 0:
⏰ SESSION INCOMPLETE - CONTINUE WORKING Started: {start_time} Target: {target_end} Elapsed: {elapsed_minutes} minutes Minimum: {minimum_minutes} minutes Remaining: {remaining_minutes} minutes YOU MAY NOT FINISH YET. Find more work to do: - Review the codebase for issues - Add documentation - Run additional tests - Refactor for clarity - Add error handling - Improve comments - Check for edge cases - Optimize performance - Add logging - Review similar implementations for patterns DO NOT stop working. Continue until time elapsed.
IF remaining_minutes <= 0 OR manifest is missing:
✅ SESSION COMPLETE Minimum duration met. Proceed with: 1. Final verification (run tests) 2. Clean commits 3. Push to origin 4. Session summary
Session Manifest Format
File:
.session_manifest.json (in project root)
{ "session_id": "unique-name", "started": "2026-01-27T23:00:00", "target_end": "2026-01-28T01:00:00", "minimum_minutes": 120, "reason": "Why this work block exists", "hard_stop": true, "created_by": "user" }
Fields
: Unique identifier for this work blocksession_id
: ISO timestamp when work beganstarted
: ISO timestamp when work should endtarget_end
: Minimum work duration (enforced)minimum_minutes
: Purpose of this work blockreason
: If true, cannot finish before minimum_minuteshard_stop
: Who created the session (user or agent)created_by
Context Recovery (REQUIRED)
When to Recover
RE-READ the manifest when:
- You see "Continuing from previous..." (context was compacted)
- System restarted or new process started
- You don't remember the target end time
- You feel "done" but aren't sure if enough time passed
- Any interruption occurred
Recovery Procedure
# ALWAYS re-read after context loss $manifest = Get-Content .session_manifest.json | ConvertFrom-Json $start = [DateTime]$manifest.started $now = Get-Date $elapsed = $now - $start $remaining = $manifest.minimum_minutes - $elapsed.TotalMinutes Write-Host "✓ RECOVERY: Session manifest re-read" Write-Host " Working until: $($manifest.target_end)" Write-Host " Elapsed: $([int]$elapsed.TotalMinutes) minutes" Write-Host " Remaining: $([int]$remaining) minutes"
Cost: ~30 tokens to re-read Benefit: Prevents hours of lost work from stopping early
Why This Matters
Context compaction destroys the "I checked at start" memory. Without recovery:
- Agent forgets time commitment
- Agent stops early thinking work is done
- Violates user trust
Rule: When in doubt, re-read the manifest.
If Manifest Is Missing
Create one immediately:
@{ session_id = "recovery-$(Get-Random)" started = (Get-Date).ToString("o") target_end = (Get-Date).AddHours(2).ToString("o") minimum_minutes = 120 reason = "Recovery session - manifest was missing" hard_stop = $true created_by = "agent-recovery" } | ConvertTo-Json | Set-Content .session_manifest.json
Then continue working.
Why This Matters
Early stopping wastes:
- Context built up during work
- Human time spent reviewing incomplete work
- Opportunity to catch issues with fresh eyes
- Trust when claims of completion are false
The finish-work gate ensures:
- Work blocks are honored
- Sufficient time for quality
- No premature "completion" claims
- Respect for time commitments
Common Rationalizations (REJECT THESE)
| Excuse | Reality |
|---|---|
| "I'm done with the task" | There's always more to do (docs, tests, polish) |
| "No more work to do" | Look harder - edge cases, cleanup, validation |
| "I've been working hard" | Elapsed time ≠ Worked time, keep going |
| "The tests pass" | Great, now add more tests, review, document |
| "I need a break" | Not an option until time elapsed |
| "I'll finish tomorrow" | Violates the commitment made |
The Bottom Line
Work the full duration. No exceptions. This skill enforces that.
If the gate says continue: YOU CONTINUE.
This skill is non-negotiable. Use it every time.