chat-archive
Skill4 starsChanged 4 months agoMITView on GitHub
Archive messages from a Telegram business chat. Saves each message to daily markdown, classifies (DECISION/TASK/OPEN_QUESTION), makes daily summary, pushes decisions and summaries to storage. Use when: (1) a message is received from the monitored chat, (2) @mention of the monitor agent in this chat, (3) request for flush/day summary, (4) request for data from chat history of a partnership. NOT for: messages from other chats, direct user commands outside partnership context.
- Reads credentials
In this repository43 other files it gives its agents.
- agent-browserSkill
- agent-introspectionSkill
- agentos-contentSkill
- carousel-instagramSkill
- codex-imageSkill
- content-engineSkill
- cross-reviewSkill
- datawrapperSkill
- dev-pipelineSkill
- excalidrawSkill
- fast-loop-codingSkill
- groq-voiceSkill
- higgsfield-generateSkill
- higgsfield-marketplace-cardsSkill
- higgsfield-product-photoshootSkill
- higgsfield-soul-idSkill
- instagram-superpowerSkill
- learningsSkill
- loop-codingSkill
- markdown-newSkill
- mcp-api-buildSkill
- mcp-builderSkill
- memory-auditSkill
- miro-boardSkill
- perplexity-researchSkill
- presentSkill
- reel-radarSkill
- reels-analytics-for-brokersSkill
- reelsSkill
- remote-agent-desktopSkill
- security-auditSkill
- senior-brainstormSkill
- seo-tuneSkill
- server-doctorSkill
- telegram-chipSkill
- threads-contentSkill
- topic-monitorSkill
- transcriptSkill
- twitterSkill
- workshopSkill
- youtube-producerSkill
- youtube-thumbnailSkill
- yt-researchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
16 rules. About 0 are common, 14 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈14
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
All paths are relative to the agent workspace.
- Distinctive: line 36
Create directories on first use:
- Very specific: line 47
Use the message timestamp.
- Distinctive: line 54
If file does not exist -- create with header:
- Distinctive: line 68
If message contains media, add tag before text:
- Distinctive: line 90
If both media and text (caption) -- record both.
- Distinctive: line 91
If no text -- record only the media tag in parentheses.
- Distinctive: line 108
do, need, task, to-do, deadline
- Distinctive: line 119
No direct answer in the following 2-3 messages
- Very specific: line 122
If unclear -- mark [QUESTION].
- Distinctive: line 236
When the monitor agent is mentioned in the monitored chat:
- Distinctive: line 257
Append-only: Never delete or overwrite chat-history.
- Distinctive: line 261
Timezone: all timestamps in your local timezone.
- Distinctive: line 263
Privacy: do not forward or display chat contents outside the context of tasks.
- Distinctive: line 306
Write to chat-history with [voice] tag AND transcription:
- Distinctive: line 312
If transcription failed -- write:
≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Chat Archive
Skill for archiving business chat correspondence.
- Chat ID:
<your-chat-id> - Workspace:
<your-workspace> - Storage CLI:
your-storage-cli
1. File structure
partnerships/<partner-name>/
├── chat-history/
│ └── YYYY-MM-DD.md # daily log (append-only)
├── chat-summary/
│ └── YYYY-MM-DD-summary.md # daily summary
├── documents/ # partnership documents
└── questionnaire/ # questionnaires etc.All paths are relative to the agent workspace. Create directories on first use:
mkdir -p partnerships/<partner-name>/chat-history partnerships/<partner-name>/chat-summary2. On receiving a message from the monitored chat
2.1 Determine date and time
Use the message timestamp. File date format: YYYY-MM-DD.
Time format in record: HH:MM (your local timezone).
2.2 Append to daily log
File: partnerships/<partner-name>/chat-history/YYYY-MM-DD.md
If file does not exist -- create with header:
# Chat Log -- YYYY-MM-DD
Append each message in format:
[HH:MM] @username: message textMedia messages
If message contains media, add tag before text:
| Type | Tag |
| Photo | [photo] |
| Voice | [voice] |
| Video | [video] |
| Document/file | [document] |
| Sticker | [sticker] |
| Video note | [video_note] |
| Audio | [audio] |
| Location | [location] |
| Contact | [contact] |
| Forwarded | [forwarded] |
Format with media:
[HH:MM] @username: [photo] photo caption
[HH:MM] @username: [voice] (voice message)
[HH:MM] @username: [document] filename.pdfIf both media and text (caption) -- record both. If no text -- record only the media tag in parentheses.
2.3 Message classification
Analyze text and add tag at end of line when matched:
[DECISION] -- decision/agreement
Keywords/phrases:
- agreed, decided, plan, ok let's do it, confirmed
- accepted, approved, done deal
[14:30] @partner: ok let's do 70/30 [DECISION][TASK] -- a task
Keywords/phrases:
- do, need, task, to-do, deadline
- prepare, by tomorrow, by Monday
- your responsibility
[15:10] @user: need to prepare presentation by Friday [TASK][OPEN_QUESTION] -- unanswered question
Criteria:
- Message contains a question mark
? - No direct answer in the following 2-3 messages
- Message asks a question requiring a decision (not rhetorical)
If unclear -- mark [QUESTION].
At daily summary review: if still unanswered, reclassify to [OPEN_QUESTION].
[16:00] @partner: what about the legal entity, decided? [OPEN_QUESTION]Regular message -- no tag
[16:05] @user: hi, how are things?2.4 Push decisions to storage
On detecting [DECISION] -- push immediately:
your-storage-cli push partnerships/<partner-name>/decisions << 'EOF'
{
"date": "YYYY-MM-DD",
"time": "HH:MM",
"author": "@username",
"text": "decision text",
"chat_message_id": MESSAGE_ID
}
EOF2.5 Push tasks to storage
On detecting [TASK] -- push:
your-storage-cli push partnerships/<partner-name>/tasks << 'EOF'
{
"date": "YYYY-MM-DD",
"time": "HH:MM",
"author": "@username",
"text": "task text",
"status": "open",
"chat_message_id": MESSAGE_ID
}
EOF3. Daily Summary
Runs once per day (via cron, on flush, or on context compaction).
3.1 Generate summary
Read file partnerships/<partner-name>/chat-history/YYYY-MM-DD.md.
Create file: partnerships/<partner-name>/chat-summary/YYYY-MM-DD-summary.md
Format:
# Summary -- YYYY-MM-DD
## Stats
- Total messages: N
- Participants: @user1 (X messages), @user2 (Y messages)
## Key topics
- Topic 1: brief description
- Topic 2: brief description
## Decisions [DECISION]
1. "decision text" -- @author, HH:MM
2. ...
(If no decisions: "No decisions recorded for the day.")
## Tasks [TASK]
1. "task text" -- @author, HH:MM, status: open
2. ...
(If no tasks: "No tasks recorded for the day.")
## Open questions [OPEN_QUESTION]
1. "question text" -- @author, HH:MM
2. ...
(If no questions: "All questions for the day received answers.")
## Context
Brief description of the overall tone and flow of conversation (2-3 sentences).3.2 Push summary to storage
your-storage-cli push partnerships/<partner-name>/chat-summaries << 'EOF'
{
"date": "YYYY-MM-DD",
"total_messages": N,
"decisions_count": N,
"tasks_count": N,
"open_questions_count": N,
"topics": ["topic1", "topic2"],
"decisions": ["text1", "text2"],
"tasks": ["text1", "text2"],
"open_questions": ["text1"],
"summary_file": "partnerships/<partner-name>/chat-summary/YYYY-MM-DD-summary.md"
}
EOF4. On @mention of the monitor agent in the chat
When the monitor agent is mentioned in the monitored chat:
- Read context -- last 20-30 messages from current chat-history
- Identify question/request from the mention message
- Pull data as needed:
- Chat history:
partnerships/<partner-name>/chat-history/ - Summaries:
partnerships/<partner-name>/chat-summary/ - Documents:
partnerships/<partner-name>/documents/ - Stored decisions:
your-storage-cli get partnerships/<partner-name>/decisions - Stored tasks:
your-storage-cli get partnerships/<partner-name>/tasks
- Chat history:
- Reply in chat -- briefly, to the point, citing sources
Example responses:
- "What did we agree on regarding X?" → find in decisions, quote
- "What tasks are open?" → collect from tasks with status open
- "What did we discuss last week?" → collect summaries for period
5. Rules
- Append-only. Never delete or overwrite chat-history. Only append.
- Do not reply to regular messages. Only archive silently.
- Reply only on @mention.
- Do not reveal technical information (paths, storage internals) in chat -- internal mechanics only.
- Timezone: all timestamps in your local timezone.
- Encoding: UTF-8.
- Privacy: do not forward or display chat contents outside the context of tasks.
6. Environment check (first run)
# Check storage CLI
your-storage-cli get partnerships/<partner-name>
# Create directory structure
mkdir -p partnerships/<partner-name>/chat-history
mkdir -p partnerships/<partner-name>/chat-summary
mkdir -p partnerships/<partner-name>/documents
# Check storage credentials
ls -la ~/.secrets/storage/credentials.json7. Fallbacks
| Situation | Action |
| Storage unavailable | Write to file, mark [storage-pending]. Push when restored |
| No chat-history file for today | Create with header # Chat Log -- YYYY-MM-DD |
| Cannot determine message type | Record as regular (no tag) |
| Message in English | Archive as-is, classification works in both languages |
| Edited message | Append line: [HH:MM] @username: [edited] new text |
| Deleted message | Ignore (do not record deletion) |
8. Voice messages (voice/audio)
On receiving a voice message from the monitored chat:
- Extract the .ogg file path from
[media attached: /path/to/file.ogg ...] - Transcribe via Groq Whisper:
bash ~/.claude/skills/groq-voice/transcribe.sh "/path/to/file.ogg"- Write to chat-history with [voice] tag AND transcription:
[HH:MM] @username: [voice] «transcription of voice message»- Classify transcribed text by normal rules ([DECISION], [TASK], [OPEN_QUESTION])
If transcription failed -- write:
[HH:MM] @username: [voice] (could not transcribe)Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

