ClawInboxRAG (Community Skill)
Parse and execute mail ... commands for a local mailbox retrieval backend.
What this skill does
- - Parses chat commands with
scripts/parse_mail.py. - Routes allowed actions to
scripts/run_cli.sh. - Keeps output concise and citation-friendly.
- Enforces safety constraints (read-only posture, limited command surface, bounded result counts).
Prerequisites
- - Local backend checkout.
- Working Python environment and
uv runner. - Gmail OAuth read-only scope.
- Environment variables:
-
GMAIL_RAG_REPO (required)
-
GMAIL_RAG_UV_BIN (optional, default
uv)
-
MAIL_DEFAULT_MODE (
hybrid default)
-
MAIL_DEFAULT_LIMIT (
5 default)
-
MAIL_MAX_LIMIT (
25 default)
Supported input
Trigger: input starts with mail (case-insensitive).
Actions recognized by parser:
- -
mail help -> INLINECODE15 - INLINECODE16 /
mail stat -> INLINECODE18 - INLINECODE19 /
mail label -> INLINECODE21 - INLINECODE22 -> INLINECODE23
- INLINECODE24 -> INLINECODE25
- everything else ->
search (if non-empty query remains)
Search options recognized by parser:
- - Mode:
keyword, semantic, hybrid (plus localized aliases in parser) - Limit:
max N, top N, limit N, INLINECODE33 - Label prefix:
label <prefix> or INLINECODE35 - Date filters:
after <date>, before <date>, INLINECODE38 - Summary flag:
resume (also résume, résumé, summary)
Command mapping
Use scripts/run_cli.sh for execution.
- -
help -> return usage guidance (no CLI call required). - INLINECODE45 -> INLINECODE46
- INLINECODE47 -> INLINECODE48
- INLINECODE49 -> INLINECODE50
- INLINECODE51 -> INLINECODE52
- INLINECODE53 -> run in order:
1.
ingest-primary --limit 50
2.
embed --limit 200
3. INLINECODE56
Safety constraints
- - Read-only Gmail posture.
- No credential/token disclosure.
- No full raw body dumping by default.
- Clamp numeric limits to configured max.
- Validate date parsing before CLI options.
- Use safe argument passing; do not interpolate untrusted shell strings.
ClawInboxRAG(社区技能)
解析并执行本地邮箱检索后端的 mail ... 命令。
该技能的功能
- - 通过 scripts/parsemail.py 解析聊天命令。
- 将允许的操作路由至 scripts/runcli.sh。
- 保持输出简洁且便于引用。
- 强制执行安全约束(只读模式、有限命令集、结果数量上限)。
前置条件
- - 本地后端代码检出。
- 可用的 Python 环境及 uv 运行器。
- Gmail OAuth 只读权限。
- 环境变量:
- GMAIL
RAGREPO(必需)
- GMAIL
RAGUV_BIN(可选,默认 uv)
- MAIL
DEFAULTMODE(默认 hybrid)
- MAIL
DEFAULTLIMIT(默认 5)
- MAIL
MAXLIMIT(默认 25)
支持的输入
触发条件:输入以 mail 开头(不区分大小写)。
解析器识别的操作:
- - mail help -> help
- mail status / mail stat -> status
- mail labels / mail label -> labels
- mail sync -> sync
- mail recents [max|top|limit N] -> recents
- 其他所有内容 -> search(若剩余非空查询)
解析器识别的搜索选项:
- - 模式:keyword、semantic、hybrid(以及解析器中的本地化别名)
- 限制:max N、top N、limit N、limite N
- 标签前缀:label 或 tag
- 日期筛选:after 、before 、between and
- 摘要标志:resume(也支持 résume、résumé、summary)
命令映射
使用 scripts/run_cli.sh 执行。
- - help -> 返回使用指南(无需 CLI 调用)。
- search -> search [--keyword|--semantic|--hybrid] --limit N [--label-prefix X] [--after ISO] [--before ISO]
- recents -> recents --limit N
- status -> status
- labels -> labels
- sync -> 按顺序执行:
1. ingest-primary --limit 50
2. embed --limit 200
3. refresh-labels
安全约束
- - Gmail 只读模式。
- 不泄露凭据/令牌。
- 默认不输出完整原始正文。
- 将数值限制限制在配置的最大值内。
- 在 CLI 选项前验证日期解析。
- 使用安全的参数传递方式;不插入不可信的 shell 字符串。