agentleFS
pobstetapobsteta/aigora/.claude/skills/email-digest/SKILL.md

email-digest

Skill0 starsChanged 45 days agoMITView on GitHub

Process the kSuite (Infomaniak) inbox to identify high-risk emails, analyze sentiment and urgency, recommend actions, prepare draft replies in kSuite Mail, and optionally post an executive briefing to kChat. Run with /email-digest or ask to process emails.

  • Reads credentials

4 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

8 rules. 0 are common, 1 is distinctive, and 7 are very specific to this project.

  • 0

    Common

    Most of the 4 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If mcp__ksuite-mail__* tools are available you may use them instead of step 1.

    line 21
  2. Very specific:

    If nothing is configured, say so in one line and offer either ksuite-setup or the manual email-assistant skill (the user pastes emails).

    line 23
  3. Very specific:

    Read .tmp/email-digest/emails.json, context/my-voice.md and context/my-business.md.

    line 36
  4. Very specific:

    Write the result to .tmp/email-digest/analysis.json.

    line 50
  5. Very specific:

    Write .tmp/email-digest/briefing.md (Markdown, language from config/preferences.yaml):

    line 54
  6. Very specific:

    Write .tmp/email-digest/drafts.json as a list of {"to", "subject", "body", "in_reply_to"} (use the original message_id for in_reply_to, …

    line 75
  7. Very specific:

    Use the scheduler skill (Claude Code /schedule), for example every weekday at 7:00: "run /email-digest and post the briefing to kChat".

    line 87
  8. Distinctive:

    No urgent email: still produce the briefing with counts.

    line 92

“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Email Digest (kSuite)

Inbox processing: fetch (script) -> analyze (you) -> brief (kChat or chat) -> drafts (kSuite Mail).

The analysis is done by you, inside the Claude Code session: no OpenAI key, no email content leaves the machine except to Infomaniak (where it already lives).

Prerequisites

  • KSUITE_MAIL_USER and KSUITE_MAIL_PASSWORD in .env (see ksuite-setup).
  • Optional: KCHAT_WEBHOOK_URL for the kChat briefing.
  • If mcp__ksuite-mail__* tools are available you may use them instead of step 1.

If nothing is configured, say so in one line and offer either ksuite-setup or the manual email-assistant skill (the user pastes emails).

Step 1: Fetch

python3 .claude/skills/ksuite-setup/scripts/mail_fetch.py --hours 24 --output .tmp/email-digest/emails.json

Options: --hours N, --unread-only, --folder INBOX, --limit 100. Read-only.

Step 2: Analyze (you)

Read .tmp/email-digest/emails.json, context/my-voice.md and context/my-business.md. For each email produce:

  • category: urgent / respond / delegate / archive / irate
  • sentiment: positive / neutral / negative / irate
  • urgency: high / medium / low
  • summary: one sentence
  • recommendation: what to do and why
  • draft: reply text, only for urgent / respond / irate

Irate client: highest priority, de-escalation draft, recommend a same-day personal follow-up, note it in today's log. Flag anything about money, contracts or legal matters. Summarize long threads once instead of message by message.

Write the result to .tmp/email-digest/analysis.json.

Step 3: Briefing

Write .tmp/email-digest/briefing.md (Markdown, language from config/preferences.yaml):

### Synthèse mails, [date]
**🔴 Urgent (2)**
- [Expéditeur], [Objet]: [recommandation]
**🟡 À répondre (5)**
- [Expéditeur], [Objet]: [résumé]
**🟢 Faible priorité (12)**
- [n] archivables, [n] newsletters

Show it in the chat. Post it to kChat only if the user confirms (or asked for it explicitly in a scheduled run):

python3 .claude/skills/ksuite-setup/scripts/kchat_post.py --file .tmp/email-digest/briefing.md

Step 4: Drafts (optional, after confirmation)

Write .tmp/email-digest/drafts.json as a list of {"to", "subject", "body", "in_reply_to"} (use the original message_id for in_reply_to, prefix subjects with "Re: "), then:

python3 .claude/skills/ksuite-setup/scripts/mail_draft.py --from-json .tmp/email-digest/drafts.json

Drafts appear in kSuite Mail > Drafts. Nothing is ever sent by AIGORA.

Automation

Use the scheduler skill (Claude Code /schedule), for example every weekday at 7:00: "run /email-digest and post the briefing to kChat".

Edge cases

  • No urgent email: still produce the briefing with counts.
  • IMAP login fails: the mailbox needs an application password, not the account password.
  • Very large inbox: lower --hours or use --unread-only.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.