Skip to content
Back to skills

End Session

BSecurity

Session closeout — canonicalize, verify, commit, produce handoff artifacts

  • 57 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
ai-agentstypescriptbashnodegitapi

Works with

  • cli
  • api
  • mcp

Security analysis

B84/100
  • mediumUses curl or wget to download content
  • criticalExfiltrates credentials via HTTP — exact pattern from Snyk ToxicSkills study

Pro shows the line behind each finding and how to fix it

Scanned May 31, 2026

npx -y skills add diegosouzapw/awesome-omni-skill --skill end-session --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of End Session?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for End Session
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/diegosouzapw-end-session/badge)](https://www.skillsdirectory.com/skills/diegosouzapw-end-session)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: end-session
description: Session closeout — canonicalize, verify, commit, produce handoff artifacts
user-invocable: true
---

# /end-session

You are closing a working session on **The Long Walk**. This skill is **write-heavy and procedural**. Execute all steps in order. Do not skip steps. Only ask questions if execution is impossible without clarification.

---

## Step 1: Canonicalize state

Reconcile everything from this session into durable artifacts.

### 1a. Update MEMORY.md
- Update `~/.claude/projects/-Volumes-Queen-Amara-The-Long-Walk/memory/MEMORY.md`
- Add any new patterns, lessons learned, or architecture changes discovered this session
- Remove or correct any entries that are now outdated
- Keep it under 200 lines

### 1b. Update CHANGELOG.md
- If significant features were added, add a new version entry at the top of `docs/CHANGELOG.md`
- Follow semver: MAJOR (breaking), MINOR (new feature), PATCH (fix)

### 1c. Mark deferred items explicitly
If anything was discussed but intentionally not done, record it. "We chose not to do X" is valuable.

---

## Step 2: Verify builds

Both stacks must pass before committing.

### Client (Vite + TypeScript)
```bash
cd "/Volumes/Queen Amara/The Long Walk" && npx tsc --noEmit
```
**Gate:** If this fails, fix the type errors before proceeding.

### Server (if server/ exists)
```bash
cd "/Volumes/Queen Amara/The Long Walk" && npx tsc --noEmit -p server/tsconfig.json
```
**Gate:** Fix errors before proceeding.

### Build check
```bash
cd "/Volumes/Queen Amara/The Long Walk" && npx vite build
```
**Gate:** Must succeed.

If any gate fails and you cannot fix it, **stop and tell the user what's broken**.

---

## Step 3: Commit and push

### 3a. Stage changes
Review all modified files with `git status` and `git diff`. Stage files intentionally.

**Never stage:**
- `.env`, `.env.local`, credentials files
- `node_modules/`, `dist/`

### 3b. Commit
Use atomic commits — one logical change per commit.

Commit message format: `type(scope): description`
- Types: `feat`, `fix`, `docs`, `refactor`, `chore`, `test`
- Scope: `client`, `server`, `viz`, `agents`, `docs`, `skills`

```bash
git commit -m "$(cat <<'EOF'
type(scope): description

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
EOF
)"
```

### 3c. Push
```bash
git push origin main
```

### 3d. Deploy to Railway
After pushing, deploy the latest code to Railway production:
```
Use the Railway MCP deploy tool with workspacePath="/Volumes/Queen Amara/The Long Walk"
```
Wait for deployment to complete. Verify the health endpoint responds:
```bash
curl -s https://the-long-walk-production.up.railway.app/api/health
```
**Gate:** Health check must return `{"status":"ok"}`. If it fails, check Railway logs via the MCP `get-logs` tool.

---

## Step 4: Generate session ledger (YAML)

Save to `docs/sessions/SESSION_LEDGER_{date}_{slug}.yaml`

```yaml
session_id: "{date}-{slug}"
date: "{YYYY-MM-DD}"
branch: "main"
version: "{from CHANGELOG}"
prior_session: "{session_id from the last ledger}"

build_verification:
  client_typescript: "pass | fail"
  server_typescript: "pass | fail | n/a"
  vite_build: "pass | fail"

commits:
  - hash: "{short hash}"
    message: "{commit message}"

artifacts_updated:
  - path: "{file path}"
    change: "{what changed and why}"

decisions_made:
  - decision: "{what was decided}"
    rationale: "{why}"

open_questions:
  - "{question that needs future resolution}"

known_risks:
  - "{risk that exists}"

explicitly_deferred:
  - "{thing we chose not to do and why}"

next_actions:
  - "{ordered, executable step 1}"
  - "{ordered, executable step 2}"
  - "{ordered, executable step 3}"
```

---

## Step 5: Write human-readable handoff

Save to `docs/sessions/HANDOFF_{date}_{slug}.md`

This file must be **self-contained** — sufficient to resume work without prior conversation history.

### Required sections:

```markdown
# Session Handoff: {Session Title}

**Date:** {YYYY-MM-DD}
**Session ID:** {from ledger}
**Version:** {from ledger}
**Branch:** main

---

## Where We Are
{2-3 paragraphs: Current state of the project. What works. What the user sees.}

## What Changed This Session
{Bullet list of every meaningful change, organized by area:}
### Client
- {change}
### Server
- {change}
### Infrastructure
- {change}

## Why These Changes Were Made
{Brief context — what prompted this work, what problem it solves}

## What Must Happen Next
{Ordered list of immediate next steps}

## Decisions Made (Do Not Re-Debate)
{List of decisions with rationale}

## Explicitly Deferred
{Things we discussed but chose not to do, and why}

## Known Risks
{Anything that could bite us}

## Key Files Modified
{Table of files touched and what changed}
```

---

## Step 6: Final integrity check

Run through this checklist:

- [ ] All durable knowledge persisted (MEMORY.md, CHANGELOG updated as needed)
- [ ] Working tree clean (`git status` shows nothing)
- [ ] Pushed to remote (`git log origin/main..HEAD` shows nothing)
- [ ] Deployed to Railway (health check passes)
- [ ] Session ledger saved to `docs/sessions/`
- [ ] Session handoff saved to `docs/sessions/`
- [ ] MEMORY.md is under 200 lines

Report the checklist results. If anything is blocked, state what, why, and what input is needed.

---

## Rules

1. Execute steps in order. Do not skip steps.
2. Do not ask exploratory or preference questions. Only ask if execution is impossible without clarification.
3. If a step can't be completed, explicitly state what's blocked and why.
4. Atomic commits — one logical change per commit, clear messages.
5. Never commit secrets, credentials, or `.env` files.
6. The handoff must be self-contained — no "see our conversation" references.
7. If nothing meaningful changed this session (just research/conversation), produce a minimal ledger noting "research-only session, no code changes" and skip build/commit steps.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.