Chuyển đến nội dung
Skillpedia
Khác10k · #11903

quarter-clone

Skill này làm gì

Skill này tạo một bản sao mới của phần cuối một phần tư cuộc trò chuyện hiện tại và bỏ bối cảnh trước đó. Nó dành cho người có cuộc trò chuyện dài và chỉ muốn giữ công việc mới nhất.

Khi nào nên dùng

  • ✓Khi cuộc trò chuyện của bạn rất dài và chỉ công việc mới nhất mới quan trọng ngay lúc này.
  • ✓Khi bạn muốn một bản sao cuộc trò chuyện còn ngắn hơn cả skill half-clone.
  • ✓Khi bạn cần một phiên ngắn hơn, dùng ít token hơn cho mỗi tin nhắn mới.

Liên kết skill

https://github.com/ykdojo/claude-code-tips/blob/main/skills/quarter-clone/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/ykdojo/claude-code-tips/blob/main/skills/quarter-clone/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Tạo một quarter-clone của cuộc trò chuyện này để tôi tiếp tục làm việc với ít ngữ cảnh hơn.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Skill tìm phiên hiện tại, xem trước bản sao để xác nhận các tin nhắn khớp, rồi chạy một script để tạo phiên mới từ phần tư cuối. Sau đó nó đưa cho bạn một lệnh để mở phiên đó.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.

Steps:

  1. Get the current session ID and project path: tail -1 ~/.claude/history.jsonl | jq -r '[.sessionId, .project] | @tsv'
  2. Find half-clone-conversation.sh with bash: find ~/.claude -name "half-clone-conversation.sh" 2>/dev/null | sort -V | tail -1
    • This finds the script whether installed via plugin or manual symlink
    • Uses version sort to prefer the latest version if multiple exist
    • The same script handles both half and quarter cloning; --quarter selects quarter mode
  3. Preview the conversation to verify the session ID: <script-path> --preview <session-id> <project-path>
    • Check that the first and last messages match the current conversation
  4. Run the clone: <script-path> --quarter <session-id> <project-path>
    • Always pass the project path from the history entry, not the current working directory
  5. The script prints the new session ID (the New session: <id> line). Give the user the exact command to resume it directly, no picker needed:
    claude --resume <new-session-id>
    
    The script automatically appends a reference to the original conversation at the end of the cloned file. (The new session is also marked [QUARTER-CLONE <timestamp>], e.g. [QUARTER-CLONE Jan 7 14:30], so claude -r and picking it works as a fallback.)
Câu hỏi thường gặp

Nó khác half-clone thế nào?

Nó chỉ giữ phần tư cuối của cuộc trò chuyện, nên bản sao ngắn hơn bản half-clone.

Tôi có mất các tin nhắn mới nhất không?

Không. Bản sao giữ phần gần đây nhất của cuộc trò chuyện.

Làm sao mở phiên mới?

Skill đưa cho bạn một lệnh có ID phiên mới để bạn tiếp tục trực tiếp.

Chi tiết

Mô tả gốc của tác giả

Clone the last quarter of the current conversation, discarding earlier context to reduce token usage while preserving recent work.

repo: ykdojo/claude-code-tips

Độ phổ biến

Sao GitHub
10k
Vị trí xếp hạng
#11903
Giấy phép
—
Cập nhật
25/9/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự