close-day — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited close-day (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
You are closing the user's working day. This is NOT just "dump today into a file". This is the audit moment where you inspect what the day produced, compare it against accumulated memory, and propose what should grow into the user's knowledge base or rules.
People forget to run /close-day every day — that's expected and fine. So this skill also catches up: before synthesizing today, it finds working days that have no daily log yet and offers to backfill them in the same pass. One call recovers the whole layer.
Before anything else, work out which days are missing a daily log. A "working day" = a day with at least one commit. A "missed day" = a working day in the recent window that has no daily/YYYY-MM-DD.md file yet.
TODAY=$(date +%Y-%m-%d)
WINDOW=14 # default look-back; widen only if the user asks
# Working days = dates with non-merge commits in the window
WORKING_DAYS=$(git log --no-merges --since="$WINDOW days ago" --until="tomorrow" \
--pretty=format:"%cd" --date=short 2>/dev/null | sort -u)
# Days that already have a daily file
EXISTING=$(ls daily/*.md 2>/dev/null | xargs -n1 basename 2>/dev/null \
| sed 's/.md$//' | grep -E '^[0-9]{4}-[0-9]{2}-[0-9]{2}$' | sort -u)
# Missed = working days with no daily file
MISSED=$(comm -23 <(echo "$WORKING_DAYS") <(echo "$EXISTING"))Detection rules:
daily/$TODAY.md yet.If the gap set is non-empty, show it and ask for one batch approval before backfilling:
Found 3 working days with no daily log yet:
- 2026-05-29 — 4 commits
- 2026-05-30 — 2 commits
- 2026-06-02 — 6 commits
Plus today (2026-06-03).
I'll reconstruct a daily for each from that day's commits + memory date-tags, then
synthesize today in full. Backfill all? (or name days to skip)One "yes" → loop through Phase 1 for each approved day, then today. No per-day pauses unless the user asked.
Create daily/YYYY-MM-DD.md (today's date in ISO format). Include:
projects/<name>/ were active today.Format: concise, structured markdown (follow daily/TEMPLATE.md). This file is the chronological record. Target 200-500 words.
For today, use the live conversation as your source, and also update context/next-session-prompt.md (NSP) with the immediate-action handoff: "Tomorrow: continue X. Open questions: Y, Z."
For a backfilled (missed) day, you don't have the conversation — reconstruct from what git remembers:
DATE=2026-05-29 # the missed day
git log --no-merges --since="$DATE 00:00" --until="$DATE 23:59" --pretty=format:"%h %s" # what shipped
git log --no-merges --since="$DATE 00:00" --until="$DATE 23:59" --name-only --pretty=format: | sort -u # files touched
grep -E "\[$DATE\]" .claude/memory/MEMORY.md # patterns captured that dayThen:
[$DATE] MEMORY entry — don't write it. A terse commit stays terse.> Backfilled on YYYY-MM-DD from git history — lower detail than a same-day log; the commits are the source of truth.daily/$DATE.md already exists, skip it.Now the ritual. Read:
[YYYY-MM-DD] prefixes — they are how you detect repetition)knowledge/concepts/*.md (check updated: frontmatter to see freshness).claude/rules/*.md (check last-reviewed: frontmatter to spot stale rules)experiments/*/ folder names; parse the -YYYYMMDD suffix to find any older than 30 daysDate-arithmetic queries you should run mentally (or with grep):
last-reviewed been more than 90 days ago?" → ask user if it still appliesCompare. Look for four kinds of signals:
#### Signal A: Cross-session repetition A pattern you noticed today matches MEMORY entries on multiple distinct prior dates. Quote the dates back to the user — that's the evidence.
What to do: Propose codifying it.
"Noticed: you rejected em-dashes in short copy on [2026-04-21], [2026-04-23], [2026-04-27]. Three distinct days, no contradiction. Codify as a rule in.claude/rules/copy-style.md(frontmattercreated: 2026-04-27): 'em-dash forbidden in UI copy ≤20 words'? Or as a section inknowledge/concepts/copy-style.mdif you want the rationale alongside? I can write it — confirm."
#### Signal B: New strong preference User expressed a clear preference today, even once, but it was emphatic. Example: "I hate blurry previews — never do that".
What to do: Propose adding it. If emphatic enough, propose a rule directly. Otherwise add to MEMORY.md and wait for repetition.
"You said clearly that blurry previews are unacceptable. Even though it's the first time in this project — should we lock it in .claude/rules/visual-quality.md now, or save to MEMORY and wait for a repeat?"#### Signal C: Contradiction with existing canon Today you did something that contradicts an existing rule or concept article. Example: concepts/design-tokens.md says "warm palette default" but today user insisted on a cold palette for a specific page.
What to do: Surface the tension. Don't silently update — ask.
"Today we built page X in a cold palette. concepts/design-tokens.md says 'warm palette default for editorial pages'. Is this an exception or should the rule be updated?"#### Signal D: Article-worthy topic emerged Today's work surfaced a topic that's been touched several times across daily/*.md with accumulating detail (5+ times) and the facts are stable.
What to do: Propose writing a knowledge/concepts/<topic>.md article (you write it directly on the user's "yes" — pull the rationale together from those daily logs yourself).
"Topic 'Stripe webhook patterns' came up on [2026-04-08], [2026-04-15], [2026-04-22], [2026-04-25], [2026-04-27] — 5 distinct days across 3 weeks. Want me to write a knowledge/concepts/stripe-webhooks.md article that pulls together the rationale from those daily logs?"#### Signal E: Experiment hygiene Folders in experiments/<name>-YYYYMMDD/ older than 30 days that haven't been closed are stale.
What to do: Surface them. Don't auto-close — ask.
"experiments/payment-provider-selection-20260322 has been open 36 days. Still active, or ready to distill and close?"If user says close → run the distill ritual:
knowledge/concepts/<topic>.mdprojects/<name>/Status: field to closed-success | closed-failed | inconclusiverm -rf experiments/<name>-YYYYMMDD/ (git history retains)If experiment patterns repeated across days but the experiment is still open — note them in MEMORY but do NOT propose promotion to rules yet. Experiments are sandbox; promotion happens after distillation, not from raw experiment notes.
For each signal user approved verbally:
knowledge/concepts/<topic>.md (which can be edited later) or a longer wait in MEMORY./close-day user said "not now" to adding X — don't propose X again unless there's new evidence (another repetition, related pattern, etc.).A "session" is one Claude context window. As you accumulate context (~300-500k tokens of 1M), you ask user to save state and start fresh. A day can have 3-10 sessions.
When synthesizing today's daily log, include ALL sessions of the day, not just the current one. You may need to read prior NSP states or session-start hook snapshots to know what earlier sessions contained. If uncertain, ask user: "how many times did we restart today? What was in the morning session?".
When the user types /close-day, respond in this shape:
Gap check: 2 missed working days found (2026-04-22, 2026-04-23) + today. Backfill all? yes
Backfilled daily/2026-04-22.md (from 4 commits).
Backfilled daily/2026-04-23.md (from 2 commits).
Synthesizing today...
[brief note: X sessions, projects Y, Z, key decisions]
daily/2026-04-24.md written.
NSP updated.
Audit:
1. [Signal description]
Proposal: [what to add where]
Add? [yes/no]
2. [Signal description]
...
(Waits for user response to each item)After user confirms each, execute patches and confirm briefly.
Memory Kit's invariant: user only talks, agent writes. Prior versions tried to automate promotion detection with background scripts — unreliable + violated the invariant by implicitly pushing users to edit files. /close-day replaces that with an agent-in-the-loop ritual: the agent has full conversational context at end of day, can spot patterns a script would miss, and does the writing itself.
The user's job is to notice what they notice during the day's work. Yours is to catch it and structure it.
Auto-backfill (Phase 0) exists because the honest reality is that people skip /close-day on busy days — the README even says that's fine. Rather than lose those days, the ritual reconstructs them from git history on the next run, so the daily layer stays complete enough for the cross-session audit to work. Backfilled days are lower-fidelity by nature (git remembers commits, not conversations), which is why they're marked as reconstructed and never invented.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.