← Về thư mục
📄 / / root / ceo-project / skills / operate / email / SKILL.md

name: email description: Làm việc với email thật (Gmail) cho CEO/đội ngũ — tóm tắt hộp thư, phân loại (triage), tìm thư, soạn thư trả lời, gửi. Trigger khi user nói "tóm tắt hộp thư", "đọc/triage email", "có thư nào gấp", "soạn thư trả lời", "gửi mail giúp". Cần Google đã nối.


email — triage / summarize / draft / send (on real Gmail)

Operate skill: does the CEO/team's email work on their real Gmail (via the connected Google engine). Talk to the user in Vietnamese; human-in-the-loop on every send.

Precondition — Google connected

Reading mail = run the GAPI command directly (AGENTS rule 8). If a gmail command returns NOT_AUTHENTICATED / No client secret → hand to the connect-google skill (run python3 lib/connect_next.py, relay its message). Offer connecting once; if declined, stop.

Pull the mailbox — ONE full command, fresh shell each call

Never set a $GAPI var then reuse it; never explore/find; always the full path:

Cần Lệnh
inbox gần đây python3 ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py gmail search "in:inbox" --max 10
chưa đọc python3 ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py gmail search "is:unread" --max 10
tìm theo từ khoá python3 ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py gmail search "<kw>" --max 10
1 thư chi tiết python3 ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py gmail get <id>
gửi python3 ~/.hermes/skills/productivity/google-workspace/scripts/google_api.py gmail send --to <a> --subject <s> --body <b>

TRIAGE / tóm tắt hộp thư (read JSON → produce 1-screen Vietnamese)

  1. Nhóm email theo chủ đề.
  2. Gắn nhãn mỗi thư: [Trả lời gấp] / [Cần quyết] / [Để được] / [Bỏ qua].
  3. Tối đa 3 việc CẦN quyết hôm nay + lý do 1 dòng mỗi việc.
  4. Việc tồn đọng đang chờ user.

Ngắn gọn, đúng trọng tâm. Bảng thư gấp: người – việc – hạn. Kết bằng 1 dòng "nếu chỉ làm 1 việc".

DRAFT — soạn thư trả lời

Cho 1 thread (id/ngữ cảnh): soạn theo giọng user chọn (mặc định lịch sự–chuyên nghiệp), ngắn, rõ, có 1 lời kêu gọi hành động. Đánh dấu [CHỖ CẦN KIỂM TRA] ở mọi thông tin user phải xác nhận (số liệu, cam kết, tên người, hạn). Hiện bản nháp cho user xem/sửa. 🚫 CHƯA gửi.

SEND — chỉ sau khi user duyệt rõ ràng

User đồng ý → chạy gmail send … → báo đã gửi. Nếu user còn sửa → cập nhật nháp, hỏi lại. Sau khi gửi (hoặc tóm tắt hộp thư xong): python3 lib/activity.py log email sent (hoặc triage) — im lặng, lỗi bỏ qua. KHÔNG ghi địa chỉ/nội dung email vào meta (chỉ ghi hành động).

Guardrails