refactor: 合并 claude-marketplace,重构目录结构为单一仓库
- 重命名 plugins/ → skills/,个人插件迁移到 skills-personal/(gitignore) - 更新 generate-marketplace.py 支持 config 读取和 skills-personal 扫描 - 新增 claude-config.yaml(技能启用/禁用 + MCP 配置) - 新增 init.sh(交互式 MCP 初始化,支持 stdio/SSE 模式) - 新增 CLAUDE.md 项目说明 - 重写 README.md 反映新结构 - 删除过时脚本:PUSH.sh、generate-marketplace.sh、convert-skills.sh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
8
skills/read-session-plugin/.claude-plugin/plugin.json
Normal file
8
skills/read-session-plugin/.claude-plugin/plugin.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"name": "read-session-plugin",
|
||||
"description": "Plugin for read-session",
|
||||
"version": "1.0.0",
|
||||
"author": {
|
||||
"name": "qiudl"
|
||||
}
|
||||
}
|
||||
211
skills/read-session-plugin/skills/SKILL.md
Normal file
211
skills/read-session-plugin/skills/SKILL.md
Normal file
@@ -0,0 +1,211 @@
|
||||
---
|
||||
name: read-session
|
||||
description: View a saved Claude session without reloading it for continuation
|
||||
---
|
||||
|
||||
# Read Session Skill
|
||||
|
||||
You are now in session read mode. Your task is to display a previously saved conversation for review without loading it as active context for continuation.
|
||||
|
||||
## Instructions
|
||||
|
||||
1. **Get Session ID**: Extract the session ID from user's request
|
||||
- Format: `YYYY-MM-DD_HHmm` (e.g., "2026-01-20_1430")
|
||||
- User might provide:
|
||||
- Exact ID: "2026-01-20_1430"
|
||||
- Partial ID: "0120" or "1430"
|
||||
- Title keywords: "read the authentication session"
|
||||
- Description: "show me the JWT session from yesterday"
|
||||
- If ambiguous, search `~/.claude/sessions/index.json` and ask for clarification
|
||||
|
||||
2. **Find Session File**:
|
||||
- First check index.json to find the exact filename
|
||||
- Load `~/.claude/sessions/<session-id>_<sanitized-title>.json`
|
||||
- If file not found, inform user and offer similar sessions
|
||||
|
||||
3. **Load and Parse**: Read the JSON file and extract:
|
||||
- Metadata (id, title, date, tags)
|
||||
- Summary (context, approach, changes, outcome, next steps)
|
||||
- Conversation history (all messages)
|
||||
- File modifications
|
||||
|
||||
4. **Display Session**: Show a comprehensive read-only view:
|
||||
```
|
||||
📖 Session: [Title]
|
||||
|
||||
📅 Date: YYYY-MM-DD HH:mm (X days ago)
|
||||
🏷️ Tags: tag1, tag2, tag3
|
||||
💬 Messages: X messages
|
||||
📝 Files Modified: file1, file2, file3
|
||||
|
||||
## Summary
|
||||
|
||||
**Context**: [summary.context]
|
||||
|
||||
**Approach**: [summary.approach]
|
||||
|
||||
**Key Changes**: [summary.keyChanges]
|
||||
|
||||
**Outcome**: [summary.outcome]
|
||||
|
||||
**Next Steps**: [summary.nextSteps]
|
||||
|
||||
## Conversation History
|
||||
|
||||
[Display the full conversation in a readable format]
|
||||
|
||||
---
|
||||
|
||||
To reload and continue this session: /reload-session <id>
|
||||
To search for similar sessions: /search-sessions <keywords>
|
||||
```
|
||||
|
||||
5. **Display Options**:
|
||||
- View full conversation (show all messages)
|
||||
- View summary only (already shown)
|
||||
- View specific messages (by index or search)
|
||||
- Export to different format
|
||||
- Reload to continue working
|
||||
|
||||
## Display Modes
|
||||
|
||||
**Summary Mode (default):**
|
||||
- Show metadata and summary only
|
||||
- Don't display full conversation unless requested
|
||||
|
||||
**Full Mode:**
|
||||
- Show metadata, summary, AND full conversation history
|
||||
- Use when user says "read full session" or "show everything"
|
||||
|
||||
**Conversation-only Mode:**
|
||||
- Skip summary, just show the conversation
|
||||
- Use when user says "show me the conversation" or "messages only"
|
||||
|
||||
## Usage Examples
|
||||
|
||||
**Read summary:**
|
||||
```
|
||||
/read-session 2026-01-20_1430
|
||||
read session 2026-01-20_1430
|
||||
show me the authentication session
|
||||
```
|
||||
|
||||
**Read full conversation:**
|
||||
```
|
||||
/read-session 2026-01-20_1430 --full
|
||||
read full session about authentication
|
||||
show me everything from the JWT session
|
||||
```
|
||||
|
||||
**Read specific messages:**
|
||||
```
|
||||
/read-session 2026-01-20_1430 --messages 5-10
|
||||
show messages 5-10 from session 2026-01-20_1430
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
- This is a READ-ONLY view - don't load context for continuation
|
||||
- Default to showing summary unless user asks for full conversation
|
||||
- Format conversation messages clearly with role labels (User/Assistant)
|
||||
- Show timestamps for each message if in full mode
|
||||
- Provide options at the end to reload or search
|
||||
- If session file not found, search index.json for similar titles
|
||||
|
||||
## Example Output
|
||||
|
||||
**Summary view (default):**
|
||||
```
|
||||
📖 Session: Implement User Authentication with JWT
|
||||
|
||||
📅 Date: Jan 18, 2026 16:00 (2 days ago)
|
||||
🏷️ Tags: authentication, jwt, security, api
|
||||
💬 Messages: 45 messages
|
||||
📝 Files Modified: src/auth/jwt.ts, src/middleware/auth.ts, tests/auth.test.ts
|
||||
|
||||
## Summary
|
||||
|
||||
**Context**: User needed to implement JWT-based authentication for their REST API
|
||||
|
||||
**Approach**: Created JWT service with access/refresh tokens, added middleware for route protection
|
||||
|
||||
**Key Changes**:
|
||||
- Implemented JWT token generation and validation
|
||||
- Added authentication middleware
|
||||
- Created login/logout endpoints
|
||||
- Added comprehensive tests
|
||||
|
||||
**Outcome**: Authentication system fully implemented and tested with 95% coverage
|
||||
|
||||
**Next Steps**: Consider adding password reset functionality and rate limiting
|
||||
|
||||
---
|
||||
|
||||
**Actions:**
|
||||
- View full conversation: /read-session 2026-01-20_1430 --full
|
||||
- Reload to continue: /reload-session 2026-01-20_1430
|
||||
- Search similar: /search-sessions authentication jwt
|
||||
```
|
||||
|
||||
**Full view (with --full flag):**
|
||||
```
|
||||
📖 Session: Implement User Authentication with JWT
|
||||
|
||||
📅 Date: Jan 18, 2026 16:00 (2 days ago)
|
||||
🏷️ Tags: authentication, jwt, security, api
|
||||
💬 Messages: 45 messages
|
||||
📝 Files Modified: src/auth/jwt.ts, src/middleware/auth.ts, tests/auth.test.ts
|
||||
|
||||
## Summary
|
||||
|
||||
[Summary content as above]
|
||||
|
||||
## Conversation
|
||||
|
||||
**[User - 16:00:00]**
|
||||
I need to implement JWT authentication for my REST API
|
||||
|
||||
**[Assistant - 16:00:15]**
|
||||
I'll help you implement JWT authentication. Let me first explore your existing codebase...
|
||||
|
||||
**[User - 16:02:30]**
|
||||
The API is in src/api/ and uses Express
|
||||
|
||||
**[Assistant - 16:02:45]**
|
||||
Perfect! I can see your Express setup. Let me create the JWT service...
|
||||
|
||||
[... full conversation continues ...]
|
||||
|
||||
---
|
||||
|
||||
**Actions:**
|
||||
- Reload to continue: /reload-session 2026-01-20_1430
|
||||
- Search similar: /search-sessions authentication jwt
|
||||
```
|
||||
|
||||
**Session not found:**
|
||||
```
|
||||
❌ Session "2026-01-99_9999" not found.
|
||||
|
||||
Did you mean one of these?
|
||||
|
||||
1. [2026-01-20_1430] Implement User Authentication with JWT
|
||||
📅 Jan 20, 14:30 | 🏷️ authentication, jwt, security
|
||||
|
||||
2. [2026-01-18_1600] Setup OAuth2 Integration
|
||||
📅 Jan 18, 16:00 | 🏷️ oauth, authentication, api
|
||||
|
||||
To read: /read-session <id>
|
||||
To search: /search-sessions <keywords>
|
||||
```
|
||||
|
||||
## Formatting Guidelines
|
||||
|
||||
When displaying conversation messages:
|
||||
- Use clear role labels: **[User]** and **[Assistant]**
|
||||
- Include timestamps in full mode
|
||||
- Preserve code blocks and formatting
|
||||
- Show system messages if present
|
||||
- Use horizontal rules to separate messages
|
||||
- Limit very long messages (offer to show full text)
|
||||
- Number messages for easy reference
|
||||
Reference in New Issue
Block a user