Initial commit
This commit is contained in:
11
.claude-plugin/plugin.json
Normal file
11
.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "context-manager",
|
||||||
|
"description": "Efficient context management with chunked conversation summarization",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"author": {
|
||||||
|
"name": "Sceleratis"
|
||||||
|
},
|
||||||
|
"commands": [
|
||||||
|
"./commands"
|
||||||
|
]
|
||||||
|
}
|
||||||
3
README.md
Normal file
3
README.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# context-manager
|
||||||
|
|
||||||
|
Efficient context management with chunked conversation summarization
|
||||||
60
commands/restore-context.md
Normal file
60
commands/restore-context.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
You are being asked to restore (load and display) a previously saved context summary.
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
1. **List available contexts (if needed)**
|
||||||
|
- Use Glob tool to find files: `.claude/context/*.md`
|
||||||
|
- Sort by filename (which includes timestamp) to show newest first
|
||||||
|
- Display list with dates and descriptions extracted from filenames
|
||||||
|
|
||||||
|
2. **Load the context file**
|
||||||
|
- If user specified a filename, load that file
|
||||||
|
- Otherwise, load the most recent (alphabetically last) file
|
||||||
|
- Use Read tool to load the content
|
||||||
|
|
||||||
|
3. **Display the summary**
|
||||||
|
- Present the full context summary in a clear, readable format
|
||||||
|
- Optionally highlight key sections for easier reading
|
||||||
|
- Explain what the summary contains and when it was created
|
||||||
|
|
||||||
|
4. **Offer to continue work**
|
||||||
|
- Ask if they want to continue where that context left off
|
||||||
|
- Reference any "Next Steps" from the summary
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
- Context files are in `.claude/context/` with format: `yyyyMMDD-HHmm - description.md`
|
||||||
|
- Filename timestamps are sortable (newest = largest number)
|
||||||
|
- No external scripts needed - you can directly read the files
|
||||||
|
|
||||||
|
## Example Workflow
|
||||||
|
|
||||||
|
**Restore most recent:**
|
||||||
|
```
|
||||||
|
User: /restore-context
|
||||||
|
You: [Uses Glob to find .claude/context/*.md files]
|
||||||
|
You: [Sorts and picks the newest]
|
||||||
|
You: [Reads with Read tool]
|
||||||
|
You: "Here's your most recent context from 2025-10-28 11:45 (Plugin development work):"
|
||||||
|
You: [Displays the summary]
|
||||||
|
You: "Would you like to continue where we left off?"
|
||||||
|
```
|
||||||
|
|
||||||
|
**List first:**
|
||||||
|
```
|
||||||
|
User: /restore-context
|
||||||
|
You: "I found 3 saved contexts:"
|
||||||
|
You: "1. 20251028-1145 - Plugin development work.md (Oct 28, 11:45 AM)"
|
||||||
|
You: "2. 20251027-1630 - Bug fixes and testing.md (Oct 27, 4:30 PM)"
|
||||||
|
You: "3. 20251026-0920 - Initial setup.md (Oct 26, 9:20 AM)"
|
||||||
|
You: "Which would you like to restore? (or I can show the most recent)"
|
||||||
|
User: "Show #1"
|
||||||
|
You: [Reads and displays that file]
|
||||||
|
```
|
||||||
|
|
||||||
|
**Restore specific:**
|
||||||
|
```
|
||||||
|
User: /restore-context 20251028-1145 - Plugin development work.md
|
||||||
|
You: [Reads that specific file with Read tool]
|
||||||
|
You: [Displays the summary]
|
||||||
|
```
|
||||||
87
commands/save-context.md
Normal file
87
commands/save-context.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
You are being asked to save the current conversation context to a compressed summary file by directly summarizing your own context.
|
||||||
|
|
||||||
|
## Your Task
|
||||||
|
|
||||||
|
1. **Prompt user for description**
|
||||||
|
- Ask the user for a brief description of this conversation (e.g., "Feature implementation", "Bug fixes", "Refactoring work")
|
||||||
|
- This will be used in the filename
|
||||||
|
|
||||||
|
2. **Analyze your conversation context**
|
||||||
|
- Review the full conversation history available in your context
|
||||||
|
- Identify key topics, decisions, code changes, and outcomes
|
||||||
|
- Count approximate number of messages/exchanges
|
||||||
|
|
||||||
|
3. **Create progressive summary**
|
||||||
|
- Since you can't process everything at once, work in logical sections:
|
||||||
|
- Early conversation: Initial requests and setup
|
||||||
|
- Middle sections: Main work and implementations
|
||||||
|
- Recent exchanges: Final changes and current state
|
||||||
|
- For each section, extract:
|
||||||
|
- Key decisions made
|
||||||
|
- Code changes and their purposes
|
||||||
|
- Problems solved
|
||||||
|
- Important discoveries
|
||||||
|
- Ongoing work or next steps
|
||||||
|
|
||||||
|
4. **Synthesize final summary**
|
||||||
|
- Combine section summaries into one coherent document
|
||||||
|
- Use this markdown format:
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
# Context Summary - [Description]
|
||||||
|
|
||||||
|
**Date**: YYYY-MM-DD HH:mm
|
||||||
|
**Messages**: Approximately N exchanges
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
[High-level summary of the conversation]
|
||||||
|
|
||||||
|
## Key Topics
|
||||||
|
- Topic 1
|
||||||
|
- Topic 2
|
||||||
|
- ...
|
||||||
|
|
||||||
|
## Work Completed
|
||||||
|
### [Feature/Area 1]
|
||||||
|
- Changes made
|
||||||
|
- Files affected
|
||||||
|
|
||||||
|
### [Feature/Area 2]
|
||||||
|
- Changes made
|
||||||
|
- Files affected
|
||||||
|
|
||||||
|
## Decisions Made
|
||||||
|
1. Decision 1 and rationale
|
||||||
|
2. Decision 2 and rationale
|
||||||
|
|
||||||
|
## Problems Solved
|
||||||
|
- Problem 1: Solution
|
||||||
|
- Problem 2: Solution
|
||||||
|
|
||||||
|
## Next Steps
|
||||||
|
- [ ] Task 1
|
||||||
|
- [ ] Task 2
|
||||||
|
```
|
||||||
|
|
||||||
|
5. **Save the summary**
|
||||||
|
- Create filename: `yyyyMMDD-HHmm - <description>.md`
|
||||||
|
- Write to `.claude/context/` using Write tool
|
||||||
|
- Report success with file path
|
||||||
|
|
||||||
|
## Important Notes
|
||||||
|
|
||||||
|
- You have direct access to your conversation context - no external API needed
|
||||||
|
- Focus on technical substance, omit pleasantries
|
||||||
|
- Be comprehensive but concise
|
||||||
|
- Preserve critical technical details and decisions
|
||||||
|
- Group related changes together
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```
|
||||||
|
User: /save-context
|
||||||
|
You: "What would you like to call this context summary? (e.g., 'Feature implementation', 'Bug fixes')"
|
||||||
|
User: "Plugin development work"
|
||||||
|
You: [Analyzes conversation, creates structured summary, saves to .claude/context/20251028-1145 - Plugin development work.md]
|
||||||
|
You: "✅ Context saved to .claude/context/20251028-1145 - Plugin development work.md"
|
||||||
|
```
|
||||||
49
plugin.lock.json
Normal file
49
plugin.lock.json
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
{
|
||||||
|
"$schema": "internal://schemas/plugin.lock.v1.json",
|
||||||
|
"pluginId": "gh:Sceleratis/claude-code-stuff:plugins/context-manager/plugin",
|
||||||
|
"normalized": {
|
||||||
|
"repo": null,
|
||||||
|
"ref": "refs/tags/v20251128.0",
|
||||||
|
"commit": "57aec7bf44e10c74b7a7c41fb352d1de68d524a9",
|
||||||
|
"treeHash": "7a075d997d4148ad72919d0e73f4ac4c4344aeda2e00e3b4ba5fcbe22864cc33",
|
||||||
|
"generatedAt": "2025-11-28T10:12:45.198679Z",
|
||||||
|
"toolVersion": "publish_plugins.py@0.2.0"
|
||||||
|
},
|
||||||
|
"origin": {
|
||||||
|
"remote": "git@github.com:zhongweili/42plugin-data.git",
|
||||||
|
"branch": "master",
|
||||||
|
"commit": "aa1497ed0949fd50e99e70d6324a29c5b34f9390",
|
||||||
|
"repoRoot": "/Users/zhongweili/projects/openmind/42plugin-data"
|
||||||
|
},
|
||||||
|
"manifest": {
|
||||||
|
"name": "context-manager",
|
||||||
|
"description": "Efficient context management with chunked conversation summarization",
|
||||||
|
"version": "1.0.0"
|
||||||
|
},
|
||||||
|
"content": {
|
||||||
|
"files": [
|
||||||
|
{
|
||||||
|
"path": "README.md",
|
||||||
|
"sha256": "f1021a665f254d67be4c1db2ada5c3c27a982789d9a6d2498e99952b3ed467dc"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": ".claude-plugin/plugin.json",
|
||||||
|
"sha256": "f6b9a44f8245e7711245d859775cb9fbe0acac0e2b0bdebd1efcb604c2870503"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/save-context.md",
|
||||||
|
"sha256": "85195008934946d3aa27cf9fbcc01921e53a298194278bf10b48b974bf9dcb0f"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "commands/restore-context.md",
|
||||||
|
"sha256": "82d6811f07677ac7c1a79d67228c51b09c943a74a9cc8b92494d435eb1583ddf"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dirSha256": "7a075d997d4148ad72919d0e73f4ac4c4344aeda2e00e3b4ba5fcbe22864cc33"
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"scannedAt": null,
|
||||||
|
"scannerVersion": null,
|
||||||
|
"flags": []
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user