A skill for reading and sending KakaoTalk messages via CLI on macOS.
Trigger
- "KakaoTalk message", "read KakaoTalk", "send a message to ~"
Script Structure
| File | Purpose |
|---|---|
kakao_read.py |
Search chat rooms, open, read messages |
kakao_send.py |
Send messages |
Message Sending Workflow
Step 1: Open chat room and read conversation history
Open the chat room by the target name and read the conversation history:
uv run python .claude/skills/kakaotalk/scripts/kakao_read.py "대상이름" --json
Example output:
{
"chat_name": "구봉",
"messages": [
{"sender": "나", "text": "오늘 저녁 뭐 먹을까?", "time": "오후 3:24"},
{"sender": "구봉", "text": "파스타 어때?", "time": "오후 3:45"}
]
}
When analyzing messages, note:
- The end of the array is the most recent message (more recent = higher value)
- Content older than 1 week may have changed circumstances
- Compose a message that naturally continues the recent conversation topic
Step 2: Understand context and compose message
Based on the read conversation history:
- Identify the recent conversation flow
- Draft a message that matches the user's request
- Compose natural and contextually appropriate content
Step 3: User confirmation (required)
First show the message content as text, then Confirm with AskUserQuestion:
[텍스트 출력]
**최근 대화 요약:**
- {최근 대화 내용 요약}
**보낼 메시지:**
받는 사람: {채팅방}
---
{메시지 내용}
sent with claude code
---
[AskUserQuestion]
질문: "이 메시지를 보낼까요?"
옵션: ["보내기", "수정 필요"]
Step 4: Send
Send the message after user confirmation:
uv run python .claude/skills/kakaotalk/scripts/kakao_send.py "채팅방이름" "메시지"
Message Reading-Only Workflow
When simply checking the conversation history:
uv run python .claude/skills/kakaotalk/scripts/kakao_read.py "대상이름" --json
After reading, provide a summary to the user:
- Summarize the 2-3 most recent conversations
- Current ongoing conversation topics
- Whether there is anything that needs a reply
CLI Options Reference
kakao_read.py
# 기본: 채팅방 열고 메시지 읽기
kakao_read.py "채팅방이름" [--limit N] [--json]
# 채팅 목록
kakao_read.py --list [--json]
# 검색
kakao_read.py --search "검색어" [--json]
# 읽고 창 닫기
kakao_read.py "채팅방이름" --close
kakao_send.py
# 기본 (서명 포함)
kakao_send.py "채팅방" "메시지"
# → "메시지\n\nsent with claude code"
# 서명 없이
kakao_send.py "채팅방" "메시지" --no-signature
# 보내고 창 닫기
kakao_send.py "채팅방" "메시지" --close
Example Scenarios
"Suggest a message to send to 구봉"
[Step 1] 채팅방 열고 읽기
uv run python .../kakao_read.py "구봉" --json
[Step 2] 맥락 파악
최근 대화: 저녁 메뉴 논의 중
[Step 3] 메시지 제안
"파스타 좋아! 오늘 7시에 만날까?"
[Step 4] 사용자 확인 후 발송
Requirements
- Install atomacos:
uv add atomacos - Accessibility permission: Allow Terminal in System Settings > Privacy & Security > Accessibility
- KakaoTalk running: KakaoTalk app for macOS is running