Skip to content
Back to skills

Wrap

ASecurity

In-session memory extraction at the end of a Codex session — review the conversation, then call the wrap_session tool once so memories, MEMORY.md lines, SESSION.md sections and feedback drafts are written through the same writer the background auto-wrap uses. Use during $agenticos:wrap, when SESSION.md shows "not wrapped — run $agenticos:wrap", or when the user says "wrap up", "save what we learned", "close the session".

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 25, 2026
ai-agentsgobash

Works with

  • cli
  • mcp

Security analysis

A100/100

Scanned September 25, 2026

npx -y skills add zzoretich/AgenticOS-Workbench --skill wrap --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Wrap?

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

Security grade badge for Wrap
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zzoretich-wrap/badge)](https://www.skillsdirectory.com/skills/zzoretich-wrap)

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: wrap
description: In-session memory extraction at the end of a Codex session — review the conversation, then call the wrap_session tool once so memories, MEMORY.md lines, SESSION.md sections and feedback drafts are written through the same writer the background auto-wrap uses. Use during $agenticos:wrap, when SESSION.md shows "not wrapped — run $agenticos:wrap", or when the user says "wrap up", "save what we learned", "close the session".
---
<!-- generated by tools/build-codex-plugin.js from plugin/; edit the source there, not this file -->

> Host: Codex CLI, through the `agenticos` plugin. Invoke as `$agenticos:wrap`. `<plugin root>` is the plugin's folder, two levels above the folder that holds this SKILL.md; the `aos` launcher is `<plugin root>/bin/aos`. The tools of the `agenticos` MCP server are named `mcp__agenticos__<tool>`.

# Wrap — in-session extraction

The background `auto-wrap` hook extracts memories with the configured provider. When
there is no provider (or the user prefers it), this skill does the same extraction in
the session and hands the result to the one write tool of the `agenticos` MCP server:
`wrap_session` (`mcp__agenticos__wrap_session`). Everything downstream — noise gate,
memory writer, `MEMORY.md` index line, promote trail, `SESSION.md` sections, feedback
drafts — is identical to the hook path.

## Steps

1. Skim the whole conversation once. Ignore tool noise; keep what a future session would need.
2. Build the extraction:
   - `facts`: durable statements learned this session (paths, versions, how a thing works). ≤ 8, one sentence each.
   - `decisions`: choices made and why. ≤ 5.
   - `feedback`: how the user wants you to work, in their words. ≤ 5.
   - `threads`: open items and next steps. ≤ 5.
   - `candidates`: memories worth a file. ≤ 3, each `{ type, title, description, body }` with `type` ∈ `user | feedback | projects | reference`, `title` ≤ 60 chars, `description` ≤ 90 chars, `body` at least three sentences of self-contained markdown. No secrets, no tokens, no credentials, nothing the user marked private. (These caps are the same ones the background `auto-wrap` prompt and the `wrap_session` schema state.)
   - `corrections`: every place the user corrected you: `{ quote, rule, why }` (`quote` verbatim, `rule` as an imperative, `why` one line). These become drafts under `brain/memory/feedback/_drafts/` for the `feedback-review` skill, never live rules.
3. Call `wrap_session` **once** with that object (add `sessionId` when the injected context shows it).
4. Read the result `{ written, skipped, reasons, drafts }`. Report one line: `wrap_session: N written, M skipped (reasons…), K drafts`. A skip with reason "duplicate title" or "junk summary" is the noise gate doing its job — do not retry with a reworded candidate.
5. Then continue the `$agenticos:wrap` command's remaining steps (daily-note summary, BRAIN.md `## Last Session`).

## Boundaries

- Never write memory files or `MEMORY.md` lines directly during a wrap; the tool keeps the index and the trail consistent.
- Never call `wrap_session` twice for the same session; a second call duplicates `SESSION.md` sections.
- Do not turn a `feedback` line into a `candidates` entry of type `feedback` unless the user explicitly asked for a permanent rule — corrections go through `corrections` and the review skill.


## The `$agenticos:wrap` procedure

Run the session wrap. Vault: the `vault` value in `${CLAUDE_CONFIG_DIR:-~/.claude}/agenticos.json`.

1. **Mechanical wrap.** Bash: `aos wrap-session` (fallback: `sh "<plugin root>/bin/aos" wrap-session`). This promotes `#promote`-tagged items from `SESSION.md` into permanent memory, appends a "Session Wrap" block to today's daily note, clears any `## Wrap Status` banner, and resets `SESSION.md`.
2. **In-session extraction.** Use the `wrap` skill: review this conversation and call the `wrap_session` tool of the `agenticos` MCP server (`mcp__agenticos__wrap_session`) exactly once with `facts`, `decisions`, `feedback`, `threads`, `candidates` (durable memories only), and `corrections` (quotes where the user corrected you). Report its `{written, skipped, reasons, drafts}`.
3. **Daily note summary.** The note path is `<vault>/` + `dailyNote.layout` from `<vault>/brain/config.json` (default `{yyyy}/{yyyy}-{MM}-{MMMM}/{yyyy}-{MM}-{dd}.md`, `{MMMM}` = full month name) for today. Write what was built or changed, key decisions, and open threads under `## Summary` and `## What Happened`. **Append, never overwrite**: if those sections already hold an earlier session's text for today, add a new paragraph under `## Summary` and a new `### <what you did> (HH:MM–HH:MM)` subsection at the end of `## What Happened`.
4. **BRAIN.md.** Only the `## Last Session` block of `<vault>/brain/_index/BRAIN.md` is hand-editable (today's date + one line). Everything else is compiled from memory frontmatter; if a project became active or complete this session, flip its `status/…` tag in `brain/memory/projects/*.md` and run `aos build-brain-md`.
5. **Cost (optional).** Only when `cost.enabled` is true in `agenticos.json`: run `aos auto-cost --backfill` non-blocking and mention the headline. Never fail the wrap over costing.
6. Terse recap: files changed, items promoted, memories written by `wrap_session`, open threads.

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.