fechar-sessao

fechar-sessao is a command for Claude Code from JoaoEquer/Oficina. It costs 23 tokens per session (844 once invoked), scanned A, original, MIT.

A session-closing command for projects using Oficina, a harness that stores shared instructions and project memory. It updates the current-status section in AGENTS.md and adds a dated session record.

In plain words
What is it for?
Use it at the end of a coding session to record completed work, decisions, unfinished items, and the next concrete step.
Why use it?
It leaves a factual handoff for the next work session instead of relying on memory. It separates the project's current state from its append-only history.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

Part of the oficina plugin — 44 skills, 8 commands shipped together

Good fit Use it at the end of a coding session to record completed work, decisions, unfinished items, and the next concrete step.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/joaoequer/oficina/fechar-sessao
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/JoaoEquer/Oficina

Made for: Claude Code.

Or install oficina, the plugin that ships this one along with the rest of its 44 skills, 8 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fechar-sessao

README.md
[![agentmods](https://agentmods.dev/badge/commands/joaoequer/oficina/fechar-sessao/github.svg)](https://agentmods.dev/commands/joaoequer/oficina/fechar-sessao)
Your own site
<a href="https://agentmods.dev/commands/joaoequer/oficina/fechar-sessao"><img src="https://agentmods.dev/badge/commands/joaoequer/oficina/fechar-sessao/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fechar-sessao

Your own site · 80×15
<a href="https://agentmods.dev/commands/joaoequer/oficina/fechar-sessao"><img src="https://agentmods.dev/badge/commands/joaoequer/oficina/fechar-sessao.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 844 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.00844
Opus 5.5 $0.00009 $0.00338
Sonnet 5.5 $0.00005 $0.00169
Haiku 4.5 $0.00002 $0.00084

Measured 2mo ago against content hash 26d62c65bd49, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

fechar-sessao scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/fechar-sessao.md · 22 lines

What it actually says

This is opt-in bookkeeping, never a gate. Run it only when you land on a natural stopping point and want to leave a marker — never as a required step before starting the next task, and never to "catch up" a session that ended without it. A session that runs until it hits a token/quota limit won't get a clean close, and that's fine: a stale or missing Estado Atual costs nothing by itself. If the user is here to start new work, start it — don't spend a turn closing out the last one first unless they specifically asked for that.

Close the current session on this project. Optional argument: $ARGUMENTS — a note steering the summary, if the user wants to point at something specific; otherwise derive it entirely from the conversation.

AGENTS.md is read in full, every turn, by every tool that opens this project (@AGENTS.md from CLAUDE.md/GEMINI.md). Nothing written into it is ever "cheap" — it is a permanent per-turn tax, not a notebook. This project does not keep a separate session-history log — Oficina used to write one to .oficina/memory/log.md, but that duplicated what Claude Code's own native memory (~/.claude/projects/<path>/memory/, loaded on demand, not every turn) already does better, for no audience that needed the duplicate. So there is exactly one durable record now: your own memory, if you're Claude Code.

  1. Confirm this project has an AGENTS.md at its root. If not, stop and say /oficina:init needs to run first.
  2. Summarize this session in 3-5 factual bullets: what changed, decisions made, what's in progress, the next concrete step. No hype, no invented progress — if something is still broken or unverified, say so.
  3. Before you overwrite anything: if you are Claude Code and the current ## Estado Atual content (or this session) holds a decision, gotcha, or fact worth keeping past today — something a future session would want and shouldn't have to rediscover — save it to your own memory now. Once you replace the section below, that wording is gone; nothing else will have it.
  4. Rewrite the ## Estado Atual section of AGENTS.md with today's summary — this section is the current state, never a history. Replace the entire section body, don't append below what's there. If you find more than one dated entry already in the section (a past session appended instead of replacing), that's the bug this step exists to stop: fold anything from the stale entries that's still true into today's summary, then delete the rest — don't carry the pile forward.
  5. Verify mechanically — don't trust your own edit. Re-read the ## Estado Atual section you just wrote. Count the dated headers in it (**YYYY-MM-DD** or similar). If there's more than one, the replace didn't take: collapse it to a single current-state block before moving on. This check exists because step 4's instruction — replace, don't append — already existed in this exact wording before and still got violated for weeks; don't assume the prose alone is enough this time either.
  6. Never touch OPEN_DECISIONS.md — that file is hand-edited only when a decision is actually confirmed, never AI-summarized.
  7. Never write credentials, tokens, connection strings, or client contract terms into AGENTS.md or your own memory, per the security-baseline rule. If the summary would include any, redact it and flag it to the user instead of writing it.
  8. Do not commit — show the diff of AGENTS.md and let the user review before committing.

Report: the updated ## Estado Atual block, and whatever you saved to memory in step 3, nothing else.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +5 lines · -7 tokens per session 26d62c65bd49
  2. 3mo ago First seen · 17 lines · 30 tokens per session scan A 6a7d480ce138

Subscribe to this mod's changes

fechar-sessao is a command published in the GitHub repository JoaoEquer/Oficina (2 stars, last pushed 7d ago), licensed MIT. It adds 23 tokens to every session and 844 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

fechar-sessao compared with commands from other repositories

fechar-sessao next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
fechar-sessaoJoaoEquer/OficinaCommand27d agoMITA23Claude Code
context-statstravisjneuman/.claudeCommand1152d agoMITA7Claude Code
save-sessionloulanyue/awesome-claude-notesCommand2711mo agoMITA28Claude Code
handoff-contextTechNickAI/ai-coding-configCommand232mo agoMITA22Claude Code
contextsamibs/skillfoundryCommand132mo agoMITA0Claude Code
context-healthdoncheli/don-cheli-sddCommand593mo agoApache-2.0A77Claude Code
capturardoncheli/don-cheli-sddCommand593mo agoApache-2.0A74Claude Code