Token导航 LogoToken导航

Agent Skill · 研究检索

session-management(会话管理)

session-management 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

session-management 是研究检索类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为调用外部服务;许可证信息还不明确,第三方扫描已通过,按安装量在研究检索类的 73,675 个 Skill 里排第 55,255。

总安装 489周安装 21GitHub Stars 315下载 171核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:session-management(会话管理)
来源仓库:https://github.com/codewithmukesh/dotnet-claude-kit
仓库路径:skills/session-management
安装命令:
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill session-management
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill session-management

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

用于会话上下文加载与知识延续机制设计。适用于 handoff.md、MEMORY.md 与 instincts.md 文件协同。可协助检测 .NET 解决方案并连接 MCP 工具链。强调会话结束必须捕获已完成、待办与所学三项内容。建议避免跨会话丢失关键上下文信息。

session-management 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/session-management

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill sessi…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要调用外部服务,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

session-management 怎么安装?

在终端执行 npx skills add https://github.com/codewithmukesh/dotnet-claude-kit --skill session-managem…。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

session-management 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

session-management 需要什么权限?

权限级别是调用外部服务。该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

session-management 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

session-management 用的人多吗?

公开数据是累计安装 489 次,近一周安装 21 次,下载 171 次,GitHub 315 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

session-management 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
session-management

会话管理 · 本页

489315调用外部服务未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Session Management

Core Principles

  1. Sessions start with context, not from scratch — Every session begins by loading three files: .claude/handoff.md (pending work), MEMORY.md (permanent rules), and .claude/instincts.md (learned patterns). Then detect the.NET solution so MCP tools are connected. A session that starts blind wastes the first 10 minutes re-discovering what was already known.
  2. Sessions end with capture, never abruptly — When a session ends, three things are captured: what was DONE, what is PENDING, and what was LEARNED. This is non-negotiable. Context lost between sessions is context the user must re-provide, which wastes their time.
  3. Context preservation is a chain — Handoff files pass state session-to-session. MEMORY.md accumulates permanent rules. Instincts track emerging patterns. Git commits preserve code state. Together, these four mechanisms create continuity that no single mechanism can provide alone.
  4. Solution detection enables tooling —.NET MCP tools (get_diagnostics, find_symbol, get_project_graph) require a loaded solution. Detecting the .slnx/.sln file on session start ensures these tools are available from the first prompt, not discovered mid-conversation.
  5. Graceful degradation over hard failure — If no handoff file exists, start clean. If no MEMORY.md exists, offer to create one on first learning. If no solution file is found, work without MCP tools. Never block a session because a context file is missing.

Patterns

Session Start Protocol

Execute this sequence at the beginning of every session:

STEP 1: Load Handoff
  → Check for .claude/handoff.md
  → If found: read and summarize pending work
  → If not found: note "No handoff file — starting fresh"

STEP 2: Load Memory
  → Check for MEMORY.md (project root or .claude/)
  → If found: scan for rules relevant to the likely task
  → If not found: note "No memory file — will create on first learning"

STEP 3: Load Instincts
  → Check for .claude/instincts.md
  → If found: load instincts at 0.7+ into active context
  → If not found: note "No instincts file — will create on first observation"

STEP 4: Detect .NET Solution
  → Search for .slnx files in current directory
  → If not found, search for .sln files
  → If not found, search parent directories (up to 3 levels)
  → If not found, search child directories (1 level)
  → If found: confirm MCP tools are connected
  → If not found: warn "No solution detected — MCP tools unavailable"

STEP 5: Present Summary
  "Session context loaded:
   - Last session: [summary from handoff or 'no previous session']
   - Pending tasks: [list from handoff or 'none']
   - Active rules: [count from MEMORY.md]
   - Active instincts: [count at 0.7+]
   - Solution: [solution name and path, or 'not detected']
   Ready to continue. What would you like to work on?"

Session End Protocol

Execute this sequence when the session is ending:

STEP 1: Review Accomplishments
  → List everything completed this session with file paths
  → Include line numbers for significant changes

STEP 2: Check for Uncommitted Changes
  → Run git status
  → If uncommitted changes exist:
    "You have uncommitted changes. Want me to commit before wrapping up?"
  → If clean: note "All changes committed"

STEP 3: Write Handoff
  → Write .claude/handoff.md using the Handoff File Template (see below)

STEP 4: Extract Learnings
  → Review session for corrections from the user
  → Generalize corrections into rules (via self-correction-loop)
  → Write to MEMORY.md under appropriate category

STEP 5: Update Instincts
  → Review any new patterns observed during the session
  → Update confidence scores in .claude/instincts.md
  → Promote any instincts that reached 0.9 (via instinct-system)

STEP 6: Confirm
  "Session wrapped up:
   - Handoff written to .claude/handoff.md
   - [N] learnings added to MEMORY.md
   - [N] instincts updated
   Next session will pick up right where we left off."

Solution Detection Strategy

Find the.NET solution for MCP tool connectivity:

SEARCH ORDER:
1. Current directory: *.slnx, *.sln
2. Parent directory: *.slnx, *.sln (common in src/ subdirectory layouts)
3. Grandparent directory: *.slnx, *.sln (up to 3 levels)
4. Child directories: */**.slnx, */**.sln (1 level deep)

PREFERENCE:
- .slnx over .sln (modern format)
- If multiple solutions found, prefer the one matching the directory name
- If still ambiguous, list all and ask the user

AFTER DETECTION:
- Confirm MCP connection by running get_project_graph
- If MCP returns "loading", wait briefly and retry (solution may be initializing)
- Cache the solution path for the session — don't re-detect on every tool call

Context Preservation Architecture

Four mechanisms work together to prevent context loss:

FILE                    SCOPE       LIFETIME        PURPOSE
.claude/handoff.md      Session     Overwritten      Pass state between sessions
MEMORY.md               Project     Permanent        Store confirmed rules
.claude/instincts.md    Project     Evolving         Track emerging patterns
Git commits             Code        Permanent        Preserve code state

FLOW:
  Session N ends → writes handoff.md, updates MEMORY.md, updates instincts.md
  Session N+1 starts → reads handoff.md, MEMORY.md, instincts.md
  Result: zero context loss between sessions

Handoff File Template

The standard format for .claude/handoff.md:

# Session Handoff

> Generated: 2025-07-15 | Branch: feature/order-validation

## Completed
- [x] Added FluentValidation to CreateOrder command
  - File: `src/Orders/Features/CreateOrder.cs` (lines 15-35)
  - Validator: non-empty CustomerId, at least 1 item, positive quantities
- [x] Fixed N+1 query in GetOrderDetails
  - File: `src/Orders/Features/GetOrderDetails.cs` (line 28)
  - Added `.Include(o => o.Items)` to the query

## Pending
- [ ] Add validation to UpdateOrder command (same pattern as CreateOrder)
  - Start from: `src/Orders/Features/UpdateOrder.cs`
  - Reference: CreateOrder validator for the established pattern
- [ ] Run full test suite — last run had 2 unrelated failures in Catalog module

## Learned
- FluentValidation validators must be registered in the module's DI setup
- The N+1 in GetOrderDetails was hidden because test data seeds only 1 item per order

## Context
- Branch: feature/order-validation
- Last commit: "Add CreateOrder validation + tests"
- Uncommitted changes: no
- Solution: src/MyApp.slnx

Resuming from Handoff

When a handoff file exists, present a clear summary and let the user decide:

SESSION RESUME FLOW:
1. Read .claude/handoff.md
2. Summarize concisely:
   "Last session (2025-07-15) on branch feature/order-validation:
    - Completed: CreateOrder validation, N+1 fix in GetOrderDetails
    - Pending: UpdateOrder validation, test suite failures
    Shall I continue with the UpdateOrder validation?"
3. Wait for user direction — never auto-start pending work
4. If the user wants something different, acknowledge and proceed
   "Got it, setting aside the pending tasks. What would you like to work on?"

First Session Bootstrap

When no context files exist (brand new project or first Claude session):

BOOTSTRAP PROTOCOL:
1. No handoff.md → "No previous session found. Starting fresh."
2. No MEMORY.md → "No project memory found. I'll create one when we discover
   project-specific rules."
3. No instincts.md → "No instincts file. I'll start tracking patterns
   as we work together."
4. Detect solution → Run full detection, report findings
5. Offer convention scan:
   "This is our first session. Want me to scan the codebase to learn
    the project's conventions? (Uses the convention-learner skill)"

Multi-Developer Handoff

When the handoff might be read by a different developer or Claude session:

ENHANCED HANDOFF (add when multiple developers use Claude on the project):

## Decisions Made
| Decision | Choice | Rationale |
|----------|--------|-----------|
| Validation library | FluentValidation | Already used in Catalog module |
| Error format | ProblemDetails | RFC 7807, consistent with API standard |

## Open Questions
- Should we validate product existence at command level or handler level?
  - Current: handler level (after DB lookup)
  - Trade-off: invalid product IDs return 500 instead of 400

## Dependencies
- Requires FluentValidation 11.x NuGet package (already referenced)
- No new infrastructure dependencies

Anti-patterns

Starting Blind

# BAD — ignoring existing context
*Session starts*
Claude: "How can I help you today?"
*User: "Continue the order validation work"*
Claude: "What order validation work? Can you tell me what files to look at?"
*User wastes 5 minutes re-explaining*

# GOOD — loading context automatically
*Session starts*
Claude: "Last session completed CreateOrder validation. Pending: UpdateOrder
         validation (start from src/Orders/Features/UpdateOrder.cs).
         Shall I continue with that?"

Ending Without Capture

# BAD — session ends, context evaporates
User: "Thanks, that's all for today!"
Claude: "You're welcome! Happy to help anytime."
*Next session starts from scratch*

# GOOD — capture before closing
User: "Thanks, that's all for today!"
Claude: "Before we wrap up, let me save our progress to .claude/handoff.md
         so the next session picks up right where we left off."
*Writes handoff, extracts learnings, updates instincts*

Overwriting Without Consent

# BAD — silently overwriting an existing handoff with different pending tasks
*Previous handoff has 3 pending tasks from another developer*
*This session worked on something different*
*Overwrites handoff, losing the other developer's pending tasks*

# GOOD — check before overwriting
"There's an existing handoff from [date] with pending tasks:
 - [task 1], [task 2], [task 3]
 These appear unrelated to our session. Should I:
 a) Merge our session with existing pending tasks
 b) Overwrite (their tasks are done or no longer relevant)
 c) Skip writing handoff this time"

Skipping Solution Detection

# BAD — trying to use MCP tools without a loaded solution
Claude: "Let me check diagnostics..." *tool fails*
Claude: "Let me find the symbol..." *tool fails*
Claude: "I'll just read the files manually" *misses project-wide context*

# GOOD — detect solution on start, verify MCP connectivity
*Session start*
Claude: "Detected solution at src/MyApp.slnx. MCP tools connected.
         Project graph shows 5 projects with 3 test projects."
*All MCP tools work throughout the session*

Bloated Handoffs

# BAD — handoff file is 500 lines with every detail
## Completed
- Changed line 15 in file A from X to Y because Z and also considered W...
*So long that the next session's context window is wasted on the handoff*

# GOOD — concise, actionable handoff
## Completed
- [x] Added CreateOrder validation (src/Orders/Features/CreateOrder.cs:15-35)
*Reference the diff or commit for full details, don't duplicate them*

Context File Sprawl

# BAD — multiple context files with overlapping purposes
.claude/
  handoff.md
  handoff-backup.md
  session-notes-july.md
  session-notes-august.md
  todo.md
  context.md
*6 files, unclear which is authoritative*

# GOOD — exactly 3 context files, each with a clear purpose
.claude/
  handoff.md       ← session-to-session state (overwritten each time)
  instincts.md     ← emerging patterns (evolving)
MEMORY.md          ← permanent rules (append-only, audited)

Decision Guide

ScenarioAction
Starting a new sessionRun full Session Start Protocol (5 steps)
User says "wrap up" / "done" / "that's all"Run full Session End Protocol (6 steps)
No handoff.md existsStart clean, create on first session end
No MEMORY.md existsOffer to create on first correction or learning
No solution file foundWarn user, work without MCP tools, suggest creating one
Multiple solution files foundList all, ask user which to use
Handoff has pending tasks from another devAsk before overwriting: merge, overwrite, or skip
User wants to resume pending workSummarize and confirm before starting
User wants something different from handoffAcknowledge, proceed with new task, update handoff at end
Session had user correctionsExtract to MEMORY.md before ending
Session discovered new patternsUpdate instincts.md before ending
First-ever session on a projectRun bootstrap protocol, offer convention scan
Solution is still loading (MCP returns "loading")Wait 5 seconds, retry once, then proceed without MCP
Mid-session context getting largeOffload research to subagents, keep main context focused
User asks "what were we working on?"Read handoff.md and summarize

平台分布

Codex

33.29%
按下载量换算57

Claude

30.83%
按下载量换算53

Cursor

18.93%
按下载量换算32

Gemini CLI

10.24%
按下载量换算18

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

调用外部服务

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills