Session memory for PR reviews and integration work. Use when resuming reviews, tracking releases, or persisting context across sessions. Trigger with session resumption.
npx claudepluginhub emasoft/emasoft-plugins --plugin emasoft-integrator-agentThis skill uses the workspace's default tool permissions.
This skill teaches how to **persist and retrieve session context** so that integration work can continue seamlessly across session boundaries.
references/handoff-documents.mdreferences/memory-architecture.mdreferences/memory-file-templates.mdreferences/memory-retrieval.mdreferences/memory-types.mdreferences/memory-updates.mdreferences/op-archive-stale-memory.mdreferences/op-create-handoff-doc.mdreferences/op-detect-state-triggers.mdreferences/op-load-handoff-docs.mdreferences/op-load-pr-memory.mdreferences/op-load-release-history.mdreferences/op-log-release-decision.mdreferences/op-save-pr-state-comment.mdreferences/op-verify-memory-freshness.mdreferences/retrieval-patterns.mdreferences/update-patterns.mdSaves session progress by committing changes, pushing to remote, creating/updating pull requests, persisting decisions/patterns to memory layers, compiling briefings, and archiving features. Use for checkpointing work or PRs.
Manages cross-session handoff, durable learning, and memory persistence by storing session logs, decisions, patterns, and project context in .claude/memory/. Internal for session/memory workflows only.
Manages persistent memory across sessions with .claude/memory/ for state and .ai/ for architecture/patterns. Guides scratchpad updates, session workflows, and live docs.
Share bugs, ideas, or general feedback.
This skill teaches how to persist and retrieve session context so that integration work can continue seamlessly across session boundaries.
The Core Problem: Claude Code sessions have limited context. When context compacts or sessions restart, all knowledge of ongoing reviews, patterns observed, and integration states is lost.
The Solution: Store memory in persistent locations (GitHub PR comments, issue comments, handoff documents) and retrieve it based on state-based triggers.
Before using this skill, ensure:
gh CLI is configured and authenticated$CLAUDE_PROJECT_DIR is set and writableWhen Starting a Session: Detect State-Based Triggers
When Starting a Session: Load Relevant Memory
$CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration/When Starting a Session: Verify Memory Freshness
When Starting a Session: Proceed with Task
When Ending a Session: Identify State to Persist
When Ending a Session: Write Memory
When Ending a Session: Verify Persistence
Copy this checklist and track your progress:
Session Start Checklist:
Session End Checklist:
Memory outputs take these forms:
| Memory Type | Storage Location | Format |
|---|---|---|
| PR Review State | GitHub PR comment | Markdown with HTML state marker |
| Integration Patterns | Handoff document | Markdown with timestamped entries |
| Release History | Handoff document | Markdown table with release metadata |
| CI/CD State | Issue comment or handoff | Markdown with workflow run links |
Example PR State Comment:
<!-- EIA-SESSION-STATE {"pr": 123, "status": "review_in_progress", "timestamp": "2025-02-04T15:42:00Z"} -->
## EIA Review State
**Status**: Review in progress
**Patterns Observed**: Error handling inconsistent in middleware
**Blockers**: None
**Next Steps**: Request changes for error handling
If no memory found: Start fresh. Do NOT assume prior context exists.
If partial memory found: Use what exists, but verify against GitHub state before trusting it.
If timestamps > 7 days old: Re-validate against current GitHub state. PR may have been updated.
If PR merged but memory still active: Archive the state, remove from active reviews.
If PR comment fails: Fallback to handoff document in thoughts/shared/handoffs/eia-integration/.
If handoff write fails: Check directory exists and is writable. Create if needed.
User says: "Continue reviewing PR #42"
Actions:
gh pr view 42 --comments --json comments | jq -r '.comments[] | select(.body | contains("EIA-SESSION-STATE"))'Scenario: Session ending mid-integration
Actions:
$CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration/current.mdScenario: Release approved and deployed
Actions:
cat $CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration/release-history.mdSee references/memory-architecture.md for:
See references/memory-types.md for:
See references/memory-retrieval.md for:
See references/memory-updates.md for:
See references/handoff-documents.md for:
| Skill | Memory Interaction |
|---|---|
| eia-code-review-patterns | Stores review state in PR comments |
| eia-github-pr-workflow | Tracks PR lifecycle state |
| eia-ci-failure-patterns | Records failure diagnoses |
| eia-release-management | Logs release history |
| eia-quality-gates | Tracks gate pass/fail states |
Symptom: Starting fresh when continuation expected
Diagnosis:
ls -la $CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration/gh pr view <PR> --commentsResolution:
Symptom: Memory contains outdated information
Diagnosis:
Resolution:
Symptom: PR comment state differs from handoff document
Diagnosis:
Resolution:
# Load all EIA memory
HANDOFF_DIR="$CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration"
cat "$HANDOFF_DIR/current.md"
cat "$HANDOFF_DIR/patterns-learned.md"
cat "$HANDOFF_DIR/release-history.md"
# Load PR-specific state
gh pr view <PR_NUMBER> --comments --json comments \
| jq -r '.comments[] | select(.body | contains("EIA-SESSION-STATE"))'
# Save session state
mkdir -p "$CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration"
cat > "$CLAUDE_PROJECT_DIR/thoughts/shared/handoffs/eia-integration/current.md" << 'HANDOFF'
[Content here]
HANDOFF
# Update PR state comment
gh pr comment <PR_NUMBER> --body "[State content]"
Use these HTML comments for machine-readable state:
<!-- EIA-SESSION-STATE ... --> # PR review state
<!-- EIA-INTEGRATION-STATE ... --> # Integration issue state
<!-- EIA-RELEASE-STATE ... --> # Release state
Version: 1.0.0 Last Updated: 2025-02-04 Skill Type: Session Memory Management Difficulty: Intermediate Required Knowledge: EIA role responsibilities, GitHub PR/Issue workflows