qq-email

qq-email is a skill for Claude Code from HK-hub/AgentSkills. It costs 53 tokens per session (1,093 once invoked), scanned A, original, MIT.

A set of Node.js scripts for receiving and sending messages through QQ Mail, a Chinese email service, using IMAP for incoming mail and SMTP for outgoing mail.

In plain words
What is it for?
Use it to send messages, check recent mail, retrieve full message bodies, or configure QQ Mail access with environment variables.
Why use it?
It removes the need to manually connect to QQ Mail or handle mailbox credentials in application code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Use it to send messages, check recent mail, retrieve full message bodies, or configure QQ Mail access with environment variables.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hk-hub/agentskills/qq-email
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HK-hub/AgentSkills --skill qq-email
Clone the repo
git clone --depth 1 https://github.com/HK-hub/AgentSkills

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for qq-email

README.md
[![agentmods](https://agentmods.dev/badge/skills/hk-hub/agentskills/qq-email/github.svg)](https://agentmods.dev/skills/hk-hub/agentskills/qq-email)
Your own site
<a href="https://agentmods.dev/skills/hk-hub/agentskills/qq-email"><img src="https://agentmods.dev/badge/skills/hk-hub/agentskills/qq-email/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for qq-email

Your own site · 80×15
<a href="https://agentmods.dev/skills/hk-hub/agentskills/qq-email"><img src="https://agentmods.dev/badge/skills/hk-hub/agentskills/qq-email.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 53 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,093 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00053 $0.01093
Opus 5 $0.00026 $0.00547
Sonnet 5 $0.00011 $0.00219
Haiku 4.5 $0.00005 $0.00109

Measured 9d ago against content hash ca5a048aaa77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

qq-email scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/get-body.js, scripts/receive.js, scripts/send.js), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • qq-email — 88% identical, 8 lines differ
qq-email/SKILL.md · 93 lines

What it actually says

何时使用

用户要使用 QQ 邮箱 发邮件收邮件查邮件代发邮件配置 QQ 邮箱时使用本 skill。

QQ 邮箱收发

面向 QQ 邮箱:通过 IMAP 收取邮件、SMTP 发送邮件。账号与授权码仅从环境变量读取,不在代码或配置中硬编码。

凭证(环境变量)

变量 说明
QQ_EMAIL_ACCOUNT QQ 邮箱账号(完整地址,如 [email protected]
QQ_EMAIL_AUTH_CODE QQ 邮箱授权码(在 QQ 邮箱「设置 → 账户与安全 → 安全设置」中开启 IMAP/SMTP 后生成,非 QQ 登录密码;勿提交到仓库)

脚本会校验,缺失时报错并退出;请勿在终端用 echo 等方式检查,以免泄露授权码。

QQ 邮箱服务器

  • IMAPimap.qq.com,端口 993(SSL)
  • SMTPsmtp.qq.com,端口 465(SSL)

脚本

脚本 作用
scripts/send.js 从环境变量读凭证,用 nodemailer 连接 QQ 邮箱 SMTP 发信;支持收件人、主题、正文(CLI 参数)。
scripts/receive.js 从环境变量读凭证,用 imap + mailparser 连接 QQ 邮箱 IMAP 收信;支持「最近 N 条」或「最近 N 天」,输出主题、发件人、日期、UID、正文摘要。
scripts/get-body.js UID 获取指定邮件的完整正文(纯文本,无摘要截断)。必须传入 --uid(值为收信列表中的 UID)。

发信流程

在 skill 根目录下执行(需已 npm install):

node scripts/send.js <收件人> <主题> <正文>

正文若含空格,请用引号包裹;或只传收件人和主题,正文从 stdin 读入(见脚本 --stdin)。

示例

node scripts/send.js "[email protected]" "测试主题" "邮件正文内容"

收信流程

# 收取最近 10 条(默认)
node scripts/receive.js

# 收取最近 N 条
node scripts/receive.js --limit 20

# 收取最近 N 天的邮件(如 7、30、90)
node scripts/receive.js --days 7

输出:每封邮件的主题、发件人、日期、UID(收件箱内唯一标识,用于按 UID 取正文)、正文摘要(前约 200 字),便于查看。

获取邮件正文

需要某封邮件的完整正文时,使用 get-body.js,传入收信列表中该邮件的 UID

node scripts/get-body.js --uid 12345

未传 --uid 时会提示并退出。UID 与收件箱绑定,邮件移动或删除后可能失效。

  • 输出:完整正文输出到 stdout(纯文本;若原邮件仅有 HTML,会做简单去标签后输出)。可重定向到文件或管道给其它命令。
  • 环境变量:与收信相同,需 QQ_EMAIL_ACCOUNTQQ_EMAIL_AUTH_CODE

可选能力(与「收取选项」对应)

  • 收取时间范围:通过 --days 7 / --days 30 / --days 90 使用 IMAP SINCE 条件。
  • 收取「我的文件夹」:当前脚本默认 INBOX;若需自定义文件夹,可扩展脚本中的 openBox(如 openBox('我的文件夹', ...))。

安全提醒

  • QQ 邮箱授权码需在「设置 → 账户」中开启 IMAP/SMTP 服务后生成,与 QQ 登录密码不同,不要混淆。
  • 不要将 QQ_EMAIL_ACCOUNTQQ_EMAIL_AUTH_CODE 的真实值写入代码或提交到仓库;仅通过环境变量或本地 .env 配置。
Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 93 lines · 53 tokens per session scan A ca5a048aaa77

Subscribe to this mod's changes

qq-email is a skill published in the GitHub repository HK-hub/AgentSkills (6 stars, last pushed 25d ago), licensed MIT. It adds 53 tokens to every session and 1,093 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.