Logo Mpm Session Management

Mpm Session Management

Cộng đồng
bobmatnyc
mpm-session-management

Khung quản lý phiên PM để xử lý giới hạn ngữ cảnh và tiếp tục phiên

Add to TypingMind

Tổng quan

Nhà phát hànhbobmatnyc
Kho mãclaude-mpm
Tên kỹ năngmpm-session-management
Sao
152
Bản fork
34
Tệp đi kèm
Chỉ có hướng dẫn
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • Hướng dẫn có đủ mọi thứ cần thiết

    Mọi thứ mô hình cần đều nằm trong hướng dẫn — không có tệp bổ sung cần đồng bộ.

  • Mã nguồn mở

    Được bobmatnyc công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Mpm Session Management trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/bobmatnyc/claude-mpm/tree/main/plugin/skills/mpm-session-management
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/bobmatnyc/claude-mpm.git /tmp/claude-mpm
mkdir -p .claude/skills
cp -r /tmp/claude-mpm/plugin/skills/mpm-session-management .claude/skills/mpm-session-management
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Mpm Session Management trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Mpm Session Management ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Mpm Session Management với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

PM Session Management

Type: Framework Applies To: Project Manager Agent Load Priority: On-demand (context limit or session resume)

Umbrella skill. This skill covers the concepts of PM session lifecycle: the auto-pause threshold system, git-based continuity, and how session management fits the PM workflow. The concrete, user-invocable procedures live in two dedicated skills — use them for the actual steps:

  • mpm-session-pause — pause and persist current work state.
  • mpm-session-resume — load context from a paused session.

Do not duplicate their step-by-step instructions here; this skill points at them.

Purpose

This skill provides the conceptual model for PM session pause/resume when context limits are approaching or when resuming from a previous session. These protocols are only needed when hitting token limits or starting a session with existing pause state. For the operational steps, invoke mpm-session-pause / mpm-session-resume.

When This Skill Is Loaded

  • Context usage reaches 70%+ thresholds (informational warnings only)
  • Session starts with .claude-mpm/sessions/LATEST-SESSION.txt
  • User runs /mpm-session-resume

Context Usage Monitoring

The MPM framework continuously tracks context usage and provides informational warnings as usage approaches limits. Context-usage auto-pause (which used to abort sessions at 90% usage) was disabled in commit da5166603 (PR #646) to preserve legitimate active work.

Threshold Levels and Warnings

LevelUsageBehavior
Caution70%Informational warning: "Context usage at 70%. Consider wrapping up current work."
Warning85%Informational warning: "Context usage at 85%. Session nearing capacity."
Auto-Pause Disabled90%Informational warning: "Context usage at 90%. Consider wrapping up or running /compact (auto-pause is disabled)."
Critical95%Informational warning: "Context usage at 95%. Consider wrapping up or running /compact (auto-pause is disabled)."

Crossing these thresholds only produces informational warnings. No session pause is triggered, no ACTIVE-PAUSE.jsonl file is created. Sessions continue normally.

Manual Session Pause

To save session state before context limits:

  1. Use the /mpm-session-pause skill to explicitly create a session snapshot
  2. This captures git state, todos, task list, and accomplishments into .claude-mpm/sessions/session-{timestamp}.* files
  3. Sessions are stored in project-local .claude-mpm/sessions/ directory (not synced across machines)

Session Resume Protocol

Procedure. The step-by-step resume flow now lives in mpm-session-resume. Invoke that skill to load and display context from a paused session.

When resuming work:

  1. Use /mpm-session-resume to load the most recent paused session
  2. The skill detects .claude-mpm/sessions/LATEST-SESSION.txt and loads the associated snapshot
  3. Session accomplishments, pending tasks, and git context are displayed
  4. PM can continue work with full prior context

PM Response to Context Warnings

When PM sees context warnings (70%+), follow this protocol:

Immediate Actions

  1. Wrap up current work phase

    • Complete the current delegation cycle
    • Don't start new major tasks
  2. Document all in-progress tasks

    • Ensure all todos are updated with current status
    • Mark BLOCKED todos with specific blockers
    • Add context to in_progress todos
  3. Delegate remaining work with clear handoff

    • Provide detailed context to agents
    • Include acceptance criteria
    • Reference relevant files and commits
  4. Create summary

    • What was completed
    • What remains to be done
    • Any blockers or important context

Example Wrap-Up Sequence

Context at 85% - wrapping up current phase

Completed:
- ✅ OAuth2 implementation (commit abc123)
- ✅ Staging deployment verified

In Progress:
- 🔄 QA verification (api-qa testing login flow)

Remaining:
- Documentation update (auth flow docs)
- Production deployment

Creating session snapshot for clean resume...

Git-Based Session Continuity

Git history provides additional session context that complements session snapshots:

Useful Git Commands

bash
# Recent commits (what was delivered)
git log --oneline -10

# Uncommitted changes (work in progress)
git status

# Recent work (last 24 hours)
git log --since="24 hours ago" --pretty=format:"%h %s"

# Files changed recently
git log --name-status --since="24 hours ago"

Integration with Session Resume

When resuming a session, PM should:

  1. Load session snapshot (if available)
  2. Check git log for additional context
  3. Verify git status for uncommitted work
  4. Reconcile session state with git state

Example:

Resuming session...

Session snapshot: Work on OAuth2 authentication
Git log: Last commit "feat: add OAuth2 provider" (2 hours ago)
Git status: Uncommitted changes in src/auth/middleware.js

Context: Implementation complete, middleware updates in progress

Session Files Structure

Sessions are stored project-locally in .claude-mpm/sessions/:

.claude-mpm/sessions/
├── LATEST-SESSION.txt       # Pointer to most recent paused session
├── session-YYYYMMDD-HHMMSS.json   # Machine-readable session snapshots
└── session-YYYYMMDD-HHMMSS.md     # Human-readable markdown summary

File Purposes

  • LATEST-SESSION.txt: Points to most recent finalized session file
  • session-*.json: Complete session state (todos, git status, accomplishments, next steps)
  • session-*.md: Human-readable summary for quick review

Sessions are created manually via /mpm-session-pause skill. The ACTIVE-PAUSE.jsonl file (used during auto-pause) is no longer created since auto-pause is disabled.

Best Practices

When Context Limits Approach

  1. Monitor warnings: When you see context warnings (70%+), begin wrapping up
  2. Finish current phase: Complete the delegation in progress
  3. Update todos: Ensure all todos reflect current status
  4. Create session snapshot: Invoke /mpm-session-pause to save state for later resume
  5. Create handoff context: Document what's completed and what remains

When Resuming Sessions

  1. Review session snapshot: Understand what was accomplished
  2. Check git history: Verify actual state matches snapshot
  3. Validate uncommitted work: Any WIP that wasn't tracked?
  4. Continue from clear state: Don't duplicate completed work

Avoiding Session Bloat

  • Keep delegations focused and atomic
  • Don't load unnecessary context (use skills on-demand)
  • Complete and close todos regularly
  • Commit work incrementally (easier to resume)

Common Scenarios

Session pause/resume scenarios reduce to two procedures:

  • Approaching context limits / wrapping up → Follow the "PM Response to Context Warnings" protocol above, then invoke /mpm-session-pause to create a session snapshot that persists your work state.
  • Returning to work → Invoke /mpm-session-resume, which loads the most recent paused session snapshot and displays prior accomplishments, pending tasks, and git context.

Keep delegations atomic and commit incrementally so either procedure resumes from a clean point.

Integration with PM Workflow

Session management integrates with standard PM workflow:

User Request
    ↓
[Check for session resume state]
    ↓
Research (if needed)
    ↓
[Monitor context usage — watch for warnings]
    ↓
Implementation
    ↓
[Approaching limit? → /mpm-session-pause]
    ↓
Deployment
    ↓
QA
    ↓
Documentation
    ↓
[Save session snapshot if context is high]
    ↓
Report Results

Trigger Keywords

  • "context", "pause", "resume", "session"
  • "token", "limit", "usage"
  • "continue", "previous session"
  • Auto-loaded at 70%+ context usage
  • Auto-loaded when session files exist

Related Skills

  • mpm-session-pause - Procedure: pause and persist current work state
  • mpm-session-resume - Procedure: load context from a paused session
  • mpm-git-file-tracking - File tracking during pause/resume
  • mpm-verification-protocols - Verification state during pause
  • mpm-delegation-patterns - Resuming delegations mid-workflow

Câu hỏi thường gặp

Kỹ năng AI Mpm Session Management làm được gì?

Khung quản lý phiên PM để xử lý giới hạn ngữ cảnh và tiếp tục phiên

Vì sao nên dùng Mpm Session Management trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Mpm Session Management là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Mpm Session Management trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/bobmatnyc/claude-mpm/tree/main/plugin/skills/mpm-session-management. TypingMind đọc tệp SKILL.md rồi cài đặt kỹ năng để bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Mpm Session Management?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Mpm Session Management với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Mpm Session Management với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Mpm Session Management có miễn phí không?

Kỹ năng này được bobmatnyc phát hành trên GitHub. Hãy xem điều khoản giấy phép trong kho mã. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇