Get the FREE Ultimate OpenClaw Setup Guide →

today

Scanned
npx machina-cli add skill cyrus-cai/claude-cobrain/today --openclaw
Files (1)
SKILL.md
5.2 KB

today

Generate an actionable daily insight briefing — not a logbook.

Phase 1: Locate and Profile the Data

  1. Resolve output directory (direct python mode):
OUTPUT_DIR="${OUTPUT_DIR:-$HOME/.claude/cobrain}"
echo "$OUTPUT_DIR"
  1. Build today's file path and check existence:
OUTPUT_DIR="${OUTPUT_DIR:-$HOME/.claude/cobrain}"
TODAY_FILE="$OUTPUT_DIR/$(date +%Y%m%d)-raw.md"
test -f "$TODAY_FILE" && echo "exists" || echo "missing"
  1. If the file does not exist or is empty, report:
    • "No cobrain entries captured today. The daemon may not be running — check with status."
    • Stop here.

Phase 2: Efficient Metadata Extraction (bash-first)

CRITICAL: Do NOT read the raw file yet. Use bash/grep to extract structured metadata first. This avoids wasting tokens on repetitive VLM output and <think> blocks.

  1. Extract entry count, time range, and per-app frequency:
# Entry count and time range
echo "=== ENTRY COUNT ==="
grep -c '^### ' "$TODAY_FILE"
echo "=== FIRST ENTRY ==="
grep -m1 '^### ' "$TODAY_FILE"
echo "=== LAST ENTRY ==="
grep '^### ' "$TODAY_FILE" | tail -1
echo "=== APP FREQUENCY ==="
grep '^### ' "$TODAY_FILE" | sed 's/^### [0-9:]\+ · //' | sort | uniq -c | sort -rn
  1. Identify distinct activity blocks — consecutive runs of the same app represent a single work session:
# Show app transitions (block boundaries) with timestamps
grep '^### ' "$TODAY_FILE" | awk -F ' · ' '{app=$2} app!=prev {print NR, $0; prev=app}'

This gives you the session structure: how many blocks, what sequence of activities, and approximate durations.

Phase 3: Intelligent Content Sampling

  1. For each distinct activity block (consecutive same-app entries), read ONLY the first and last entry to understand what that session was about. This achieves full activity coverage at ~10% token cost.

    • Use grep -n to find line numbers of block boundaries
    • Use Read tool with offset/limit to read only those specific entries (typically 5-10 lines each)
    • For very short blocks (1-2 entries), reading the single entry is sufficient
    • Never read the entire file
  2. Classify each activity block into one of these work categories:

    • Deep Work: focused productive tasks (coding, writing, spreadsheet analysis, design work)
    • Communication: work messaging (WeCom, Slack, email), meetings
    • Research/Browsing: web research, documentation reading, learning
    • Personal/Other: personal chat (WeChat non-work), system settings, activity monitor, idle time

Phase 4: Generate Insight Report

Produce a report with these four sections. Total output should be under 40 lines — dense and scannable. Write in a professional tone, like a personal executive assistant's daily brief.

Output Format

## Daily Brief — <date>

### Work Accomplished
- <concrete deliverable or task completed, in past tense>
- <another deliverable>
- ...
(Focus on WHAT was produced/achieved, not what apps were open)

### Time Allocation
- Deep Work: X hrs (XX%) — <primary activities>
- Communication: X hrs (XX%) — <work vs personal breakdown>
- Research: X hrs (XX%) — <topics>
- Other: X hrs (XX%)
(Total tracked: X hrs, from HH:MM to HH:MM)

### Workflow Observations
- <actionable pattern insight with specific numbers>
- <another observation>
(2-3 observations max. Focus on context-switching frequency, longest focus blocks, communication fragmentation, or late-night work patterns)

### Suggestions
- <1 concrete, constructive suggestion tied to today's data, with potential impact>
(1-2 suggestions max. Must reference specific numbers from today. Must have plausible economic or productivity value.)

---
**Headline:** <single sentence summarizing the day, suitable for a weekly digest>

Rules for Each Section

Work Accomplished:

  • Derive from the CONTENT of sampled entries, not app names
  • "Edited Q4 financial spreadsheet" not "Used wpsoffice"
  • "Reviewed PR #142 and left feedback" not "Used Chrome for GitHub"
  • If entry content is too vague to determine deliverables, note what was worked on at a category level

Time Allocation:

  • Calculate durations from timestamps between block transitions
  • Distinguish productive communication (WeCom work discussions, Slack) from personal/ambient (WeChat personal chat, social media)
  • Round to nearest 15 minutes

Workflow Observations:

  • Count actual app transitions from the block boundary data — each transition is a context switch
  • Identify the longest uninterrupted work session (largest consecutive same-app block)
  • Note if communication was batched (clustered) or scattered (spread across the day)
  • Flag unusual patterns: late-night work, very short focus blocks (<10 min average), excessive context-switching

Suggestions:

  • Must reference specific data from today (e.g., "your 47 WeCom transitions suggest...")
  • Must propose a concrete change (e.g., "batch responses into 3 windows: morning, post-lunch, end-of-day")
  • Must articulate the benefit (e.g., "could recover ~45 minutes of fragmented time")
  • Never give generic advice like "take more breaks" without tying it to today's numbers

Source

git clone https://github.com/cyrus-cai/claude-cobrain/blob/main/plugin/skills/today/SKILL.mdView on GitHub

Overview

This skill scans today's cobrain memory file, extracts key metadata without loading full text, and samples each activity block. It supports quick decisions by summarizing work and focus patterns in a concise Daily Brief.

How This Skill Works

Geared to a shell oriented workflow, it locates the daily file in OUTPUT_DIR, builds TODAY_FILE from the current date, and uses bash and grep to harvest entry counts, first and last entries per block, without reading the entire file. It then classifies each block into Deep Work, Communication, Research/Browsing, or Personal/Other, and formats a four section Daily Brief within a 40 line limit.

When to Use It

  • End-of-day recap to understand today's focus and output.
  • Before a standup or report to quickly summarize progress.
  • When you want to identify time spent on Deep Work versus meetings.
  • During onboarding to share a compact daily digest with teammates.
  • When diagnosing interruptions or fragmentation in your workflow.

Quick Start

  1. Step 1: Ensure the cobrain today file exists at OUTPUT_DIR with today's date.
  2. Step 2: Run the today skill to generate the Daily Brief.
  3. Step 3: Review, refine if needed, and export or share the briefing.

Best Practices

  • Keep OUTPUT_DIR consistent to ensure today’s file is found.
  • Always verify TODAY_FILE exists before running the briefing; handle “missing” case.
  • Extract metadata first (entry count, time range, app frequency) before reading content.
  • Limit reads to the first/last entry per block; never pull the whole file.
  • Keep the Daily Brief under 40 lines and focus on concrete deliverables.

Example Use Cases

  • Deep Work sprint: a 2.5 hour coding block followed by a brief planning note.
  • Fragmented day: multiple short blocks with frequent context switches and a mid day meeting.
  • Research heavy: several web/docs reads with a summarizing note for each block.
  • Balanced day: three blocks (Deep Work, Communication, light Research) with minimal idle time.
  • Idle warning: metadata flags long idle periods and a lack of new entries.

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers