$npx -y skills add gtrabanco/agentic-workflow --skill log-sessionAppend a structured entry to the project's session log (docs/LOGS.md): what was done this session, files touched, decisions taken, and the next step — so the next session (or another person) can pick up the thread without re-reading git history. Run it before /clear, before c
| 1 | # Log Session |
| 2 | |
| 3 | Capture the *why* and the *what-next* of a working session — the context that |
| 4 | git history alone never records. A commit says what changed; a session log says |
| 5 | what you were trying to do, what you decided, and where to resume. |
| 6 | |
| 7 | Deliberately cheap (`sonnet`/`medium`): this is structured summarization, not |
| 8 | judgment. It must never reach for an expensive model. |
| 9 | |
| 10 | ## Turn contract — verify before ending the turn |
| 11 | |
| 12 | ``` |
| 13 | ✓ The entry was APPENDED to docs/LOGS.md (file edited, not just drafted) with accurate git facts |
| 14 | ✓ No past entry was edited |
| 15 | ✓ Artifact language: explicit user instruction > the project's declared docs language > English. The CONVERSATION language never decides — a Spanish prompt still produces English PRs/issues/commits/SPECs unless one of the first two says otherwise |
| 16 | ✓ The closing `→ Next:` block is printed as the ABSOLUTE last output |
| 17 | ``` |
| 18 | |
| 19 | About to end the turn with any box unchecked? The turn is NOT done — complete |
| 20 | the missing box first (weak models drop end-of-document duties; this list is |
| 21 | first on purpose). |
| 22 | |
| 23 | ## When to use |
| 24 | |
| 25 | - **Before `/clear`** (or your agent's context-reset equivalent) — you're about |
| 26 | to wipe context; capture it first. |
| 27 | - **Before closing your agent** for the day. |
| 28 | - **At a natural stopping point** — a feature paused mid-way, a thread you want |
| 29 | to be able to resume cold. |
| 30 | - **After a long session** with several decisions worth remembering. |
| 31 | |
| 32 | This is the *manual, rich* counterpart to the lightweight auto-logging hooks |
| 33 | the `template/` ships (see `template/.claude/`). The hooks capture the |
| 34 | mechanical facts for free on every exit; this skill writes the thoughtful |
| 35 | entry when you want one. |
| 36 | |
| 37 | ## Step 0 — Discover the project (always first) |
| 38 | |
| 39 | Per the agent guide's **Workflow conventions** + **documentation map**, locate |
| 40 | the session log. Default path: `docs/LOGS.md`. If the documentation map names a |
| 41 | different location, use that. If no log file exists yet, create it from the |
| 42 | shape in `template/docs/LOGS.md` (a short header + the entry format below) and |
| 43 | say so. |
| 44 | |
| 45 | If a session-start marker exists (`.claude/.session-*.start`, written by the |
| 46 | template's SessionStart hook), read it to bound the session precisely — it holds |
| 47 | the HEAD sha and start time at session open. |
| 48 | |
| 49 | ## Process |
| 50 | |
| 51 | 1. **Establish the session boundary.** |
| 52 | - If a marker is present, the session spans `marker_sha..HEAD` plus any |
| 53 | uncommitted work. |
| 54 | - Otherwise, use your own conversation context as the source of truth for |
| 55 | what happened this session, and corroborate with `git log` of the recent |
| 56 | commits and `git status` / `git diff --stat` for uncommitted changes. |
| 57 | |
| 58 | 2. **Gather the mechanical facts** (cheaply, with git): |
| 59 | - branch (`git branch --show-current`), |
| 60 | - commits this session (`git log --oneline <since>..HEAD`), |
| 61 | - files touched (`git diff --stat <since>..HEAD` + uncommitted). |
| 62 | |
| 63 | 3. **Write the narrative** — the part only you can add: |
| 64 | - **Summary:** 1–3 sentences on what this session set out to do and what |
| 65 | actually got done. |
| 66 | - **Decisions:** the non-obvious choices made and *why* (the rationale that |
| 67 | would otherwise be lost). Link related docs/issues. |
| 68 | - **Next:** the concrete next step(s) — the command to run, the unfinished |
| 69 | thread, the open question. Write it so a cold reader knows exactly where to |
| 70 | resume. |
| 71 | |
| 72 | 4. **Append the entry** to `docs/LOGS.md`, newest at the bottom (append-only, |
| 73 | chronological). Use this format so the auto-hook entries and these stay |
| 74 | compatible: |
| 75 | |
| 76 | ```markdown |
| 77 | ## <ISO-8601 timestamp> — <branch> — manual |
| 78 | - **Commits:** <n> (`<short-sha>…<short-sha>`) |
| 79 | - **Files:** <comma-separated paths, or a count if many> |
| 80 | - **Summary:** <what this session did> |
| 81 | - **Decisions:** <key choices + why; omit the line if none> |
| 82 | - **Next:** <the concrete next step> |
| 83 | ``` |
| 84 | |
| 85 | If the user passed a note as an argument, prepend it to the Summary. |
| 86 | |
| 87 | 5. **Commit policy.** `docs/LOGS.md` is documentation — keep it coherent, but do |
| 88 | **not** open a PR just for a log entry. If you'r |