session-init
Skill42 starsChanged 6 days agoMITView on GitHub
Internal sub-skill for session startup checks, Plans.md status, git state, and harness-mem resume pack. Invoked by session/startup workflows only. Do NOT load for: implementation, reviews, or mid-session tasks.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- harness-mini/harness-minitheir own version, first seen Nov 8, 2026
- matshoppenbrouwers/session-flowtheir own version, first seen Nov 1, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- harness-mini/harness-mini★ 6same name
- matshoppenbrouwers/session-flow★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository32 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- agent-browserSkill
- authSkill
- ciSkill
- crudSkill
- deploySkill
- harness-acceptSkill
- harness-loopSkill
- harness-plan-briefSkill
- harness-planSkill
- harness-progressSkill
- harness-releaseSkill
- harness-reviewSkill
- harness-setupSkill
- harness-syncSkill
- harness-workSkill
- maintenanceSkill
- memorySkill
- principlesSkill
- research-harness-auditSkill
- research-harness-cleanSkill
- research-harness-planSkill
- research-harness-releaseSkill
- research-harness-reviewSkill
- research-harness-setupSkill
- research-harness-workSkill
- session-controlSkill
- session-memorySkill
- sessionSkill
- session-stateSkill
- uiSkill
- workflow-guideSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 49
Check file sizes before session start:
- Very specific: line 89
Always specify current project name for project
- Very specific: line 91
Use of the first result from harness_mem_sessions_list(project, limit=1) is limited to read-only (resume check).
- Distinctive: line 98
Run the following in parallel:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Session Init Skill
A skill for checking the environment and understanding the current task status at session start.
Invocation Conditions
This skill is called internally from session / SessionStart-type flows.
The user-facing entry point is /session or the normal session start flow.
Legacy trigger phrases:
- "Start session"
- "Begin work"
- "Start today's work"
- "Check status"
- "What should I do?"
- "start session"
- "what should I work on?"
Overview
The Session Init skill automatically checks the following at Claude Code session start:
- Git state: Current branch, uncommitted changes
- Plans.md: In-progress tasks, requested tasks
- AGENTS.md: Role assignments, review of prohibitions
- Previous session: Review of carry-over items
- Latest snapshot: Summary of progress snapshot and diff from previous session
Execution Steps
Step 0: File State Check (Automatic Cleanup)
Check file sizes before session start:
# Check Plans.md line count
if [ -f "Plans.md" ]; then
lines=$(wc -l < Plans.md)
if [ "$lines" -gt 200 ]; then
echo "⚠️ Plans.md has ${lines} lines. Recommend organizing with 'organize it'"
fi
fi
# Check session-log.md line count
if [ -f ".claude/memory/session-log.md" ]; then
lines=$(wc -l < .claude/memory/session-log.md)
if [ "$lines" -gt 500 ]; then
echo "⚠️ session-log.md has ${lines} lines. Recommend organizing with 'organize session log'"
fi
fiDisplay a suggestion if cleanup is needed (does not affect work).
Step 0.5: Legacy Local Memory Compatibility Handling (Optional)
The current standard is the Unified Harness Memory in Step 0.7. Checking legacy local memory compatibility is generally unnecessary; reference it individually only for special migration checks.
Note: In normal operation, skip this step and treat the common DB Resume Pack as the sole resume entry point.
Step 0.7: Unified Harness Memory Resume Pack (Required)
Retrieve resume context from the Codex / Claude / OpenCode shared DB (~/.harness-mem/harness-mem.db).
Required call:
harness_mem_resume_pack(project, session_id?, limit=5, include_private=false)Operational rules:
- Always specify current project name for
project - Obtain
session_idin order:$CLAUDE_SESSION_ID→.session_idin.claude/state/session.json - Use of the first result from
harness_mem_sessions_list(project, limit=1)is limited to read-only (resume check); do not use for writes viarecord_checkpoint/finalize_session - Inject retrieval results into session start context
- On retrieval failure, check daemon state with
harness_mem_health(), note the failure, and continue - Recovery order:
scripts/harness-memd doctor→scripts/harness-memd cleanup-stale→scripts/harness-memd start
Step 1: Environment Check
Run the following in parallel:
# Git state
git status -sb
git log --oneline -3# Plans.md
cat Plans.md 2>/dev/null || echo "Plans.md not found"# AGENTS.md key points
head -50 AGENTS.md 2>/dev/null || echo "AGENTS.md not found"Step 2: Understand Task Status
Extract from Plans.md:
cc:WIP- Tasks continuing from previous sessionpm:requested- Tasks newly requested by PM (compatible: cursor:requested)cc:TODO- Unstarted but assigned tasks
Step 3: Output Status Report
## 🚀 Session Started
**Date/Time**: {{YYYY-MM-DD HH:MM}}
**Branch**: {{branch}}
**Session ID**: ${CLAUDE_SESSION_ID}
---
### 📋 Today's Tasks
**Priority tasks**:
- {{pm:requested (compatible: cursor:requested) or cc:WIP tasks}}
**Other tasks**:
- {{List of cc:TODO tasks}}
---
### ⚠️ Notes
{{Key constraints/prohibitions from AGENTS.md}}
---
**Ready to start work?**Output Format
At session start, present the following information concisely:
| Item | Content |
| Current branch | e.g., staging |
| Priority tasks | Most important 1–2 items |
| Notes | Summary of prohibitions |
| Next action | Specific suggestion |
Related Commands
/work- Task execution (parallel execution supported)/sync-status- Plans.md progress summary/maintenance- Automatic file cleanup
Notes
- Always check AGENTS.md: Understand role assignments before starting work
- If Plans.md is missing: Guide to
/harness-init - If previous work was interrupted: Confirm whether to continue
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

