trellis-finish-work
Skill này làm gì
Skill kết thúc một phiên code bằng các việc dọn dẹp. Dành cho lập trình viên muốn tác vụ đã xong được lưu trữ và tiến độ được ghi lại.
Khi nào nên dùng
- ✓Khi bạn đã code xong và sẵn sàng kết thúc phiên.
- ✓Khi tác vụ hiện tại đã xong và nên được lưu trữ.
- ✓Khi bạn muốn tiến độ phiên được ghi vào nhật ký phát triển.
Liên kết skill
https://github.com/mindfold-ai/Trellis/blob/main/.agents/skills/trellis-finish-work/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hôm nay tôi xong rồi. Hãy lưu trữ các tác vụ đã xong và ghi lại những gì chúng ta đã làm vào nhật ký của tôi.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent kiểm tra tác vụ hiện tại và trạng thái git, tách công việc của bạn khỏi các thay đổi không liên quan, lưu trữ các tác vụ đã xong sau khi bạn xác nhận, và ghi phiên vào nhật ký. Commit được thực hiện trước đó trong quy trình, không phải ở bước này.
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.
Finish Work
Wrap up the current session: archive the active task (and any other completed-but-unarchived tasks the user wants to clean up) and record the session journal. Code commits are NOT done here — those happen in workflow Phase 3.4 before you invoke this command.
Step 1: Survey current state
python3 ./.trellis/scripts/get_context.py --mode record
This prints:
- My active tasks — review whether any besides the current one are actually done (code merged, AC met) and should be archived this round.
- Git status — quick visual on what's dirty.
- Recent commits — you'll need their hashes in Step 4 for
--commit.
If --mode record surfaces other completed tasks not tied to the current session, surface them to the user with a one-shot confirmation: "These N tasks look done — archive them too in this round? [y/N]". Default is no; the current active task is always archived in Step 3 regardless.
Step 2: Sanity check — classify dirty paths
Run:
git status --porcelain
Filter out paths under .trellis/workspace/ and .trellis/tasks/ — those are managed by add_session.py and task.py archive auto-commits and will appear dirty as part of this skill's own work.
For each remaining dirty path, decide whether it belongs to the current task or to other parallel work (e.g., another terminal window editing the same repo). Heuristics:
- Paths referenced in the current task's
prd.md/implement.jsonl/check.jsonl→ current task - Paths in code areas matching the task's stated scope, or that you remember editing this session → current task
- Paths in unrelated areas you have no recollection of touching this session → other parallel work
Then route:
Any remaining path looks like current-task work — bail out with:
"Working tree has uncommitted code changes from this task:
<list>. Return to workflow Phase 3.4 to commit them before running ``finish-work(Trellis command)."Do NOT run
git commithere. Do NOT prompt the user to commit. The user goes back to Phase 3.4 and the AI drives the batched commit there.All remaining paths look unrelated (other parallel-window work) — report them once and continue to Step 3:
"FYI, dirty files outside this task's scope — leaving them for the other window:
<list>."Genuinely unsure — ask the user once: "Are
<list>this task's work I forgot to commit, or another window's? (commit / ignore)" — then route per their answer.
Step 3: Archive task(s)
python3 ./.trellis/scripts/task.py archive <task-name>
At minimum: the current active task (if any). Plus any extra tasks the user confirmed in Step 1. Each archive produces a chore(task): archive ... commit via the script's auto-commit.
If there is no active task and the user did not confirm any cleanup archives, skip this step.
Step 4: Record session journal
python3 ./.trellis/scripts/add_session.py \
--title "Session Title" \
--commit "hash1,hash2" \
--summary "Brief summary"
Use the work-commit hashes produced in Phase 3.4 (visible in Step 1's Recent commits list, or via git log --oneline) for --commit. Do not include the archive commit hashes from Step 3. This produces a chore: record journal commit.
Final git log order: <work commits from 3.4> → chore(task): archive ... (one or more) → chore: record journal.
Câu hỏi thường gặp
Nó có commit code của tôi không?
Không. Commit diễn ra sớm hơn trong quy trình, còn bước này chỉ kết thúc phiên.
Nó có lưu trữ các tác vụ tôi chưa hoàn thành không?
Không. Các tác vụ đã xong khác chỉ được lưu trữ nếu bạn xác nhận, và câu trả lời mặc định là không.
Phiên được ghi ở đâu?
Trong nhật ký phát triển được giữ trong thư mục workspace Trellis.
Chi tiết
Mô tả gốc của tác giả
Wrap up the current session: verify quality gate passed, remind user to commit, archive completed tasks, and record session progress to the developer journal. Use when done coding and ready to end the session.
repo: mindfold-ai/Trellis
Độ phổ biến
- Sao GitHub
- 15k
- Vị trí xếp hạng
- #11030
- Giấy phép
- AGPL-3.0
- Cập nhật
- 29/9/2026
Bình luận
- …
Thêm skill từ kho mã này
first-principles-thinking
15kGiúp agent kiểm tra kế hoạch hoặc thiết kế bằng cách chia nó thành sự thật cơ bản và suy luận từ đó, thay vì dựa vào thói quen hay quy ước.
python-design
15kGiúp agent viết và review script dòng lệnh Python với module rõ ràng, giao diện đơn giản và ít sự phức tạp ẩn.
trellis-before-dev
15kGiúp agent đọc các hướng dẫn viết code và ghi chú công việc của dự án trước khi bắt đầu viết code, để nó làm theo quy ước của nhóm.
trellis-brainstorm
15kGiúp agent làm rõ một tính năng mới hoặc tác vụ chưa rõ bằng cách hỏi một câu hữu ích mỗi lần, kiểm tra code và thống nhất phạm vi hẹp.
Skill tương tự
knowledge-capture
394kDạy agent của bạn lưu các quyết định, sở thích và sự kiện quan trọng vào kho Knowledge dưới dạng ghi chú ngắn có ghi nguồn.
knowledge-claim-consolidation
394kGiúp agent của bạn dọn gọn kho Knowledge bằng cách gộp các khẳng định trùng lặp, chuyển chúng đến đúng trang chủ đề và loại bỏ những cái lỗi thời.
knowledge-correct
394kCho phép agent của bạn sửa hoặc rút lại một khẳng định hoặc trang Knowledge cụ thể theo yêu cầu của bạn, và giữ nhật ký những gì đã thay đổi.