# Close Loop

> End-of-session workflow for shipping changes, consolidating memory, applying self-improvements, and preparing publishable outputs with safety gates.

- Skill: `fei2-labs/close-loop` (Agent Skill, multi-file: 8 files)
- Install (CLI): `npx skillmds@latest add fei2-labs/close-loop`
- Raw SKILL.md: https://api.skillmd.com/api/skills/fei2-labs/close-loop/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- License: MIT
- Author: Fei2-Labs (https://skillmd.com/u/fei2-labs)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/fei2-labs/close-loop

---


# Close Loop

Use this skill when the user says "close loop", "close-loop", "wrap up the session", "close session", "end session", "end of day", or invokes `/close-loop`. This is the full end-of-session controller (ship + memory + self-improve + publish); for archiving a single Trellis task use `finish-work` instead.

Run four phases in order and return one consolidated inline report.

## Modular structure

This skill is split into components for maintainability:

1. `components/01-design-principles.md`
2. `components/02-phase-1-ship-state.md`
3. `components/03-phase-2-memory.md`
4. `components/04-phase-3-4-and-output.md`

Follow these components in order.

## Quick run order

1. Apply execution policy and action gates (`01-design-principles.md`)
2. Execute Ship State (`02-phase-1-ship-state.md`)
3. Consolidate Memory (`03-phase-2-memory.md`)
4. Run improvements + publish queue + output contract (`04-phase-3-4-and-output.md`)

## Required output

Return:
- Artifact A: human-readable report sections exactly as defined in component 04
- Artifact B: machine-readable JSON block exactly as defined in component 04

## Resources

- `references/memory-frameworks.md`
- `assets/templates/wrap-report-template.md`

