async-runtime
需要未来唤醒、后台等待、跨 channel 通知或长期订阅时的调度选择;覆盖 cron、后台 subagent、notification、channel_subscribe、wake_channel。
Skill by maxesisn
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maxesisn-async-runtime
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/async-runtime
What's inside
- Skill name
async-runtime- Description
- 需要未来唤醒、后台等待、跨 channel 通知或长期订阅时的调度选择;覆盖 cron、后台 subagent、notification、channel_subscribe、wake_channel。
- License
- MIT
- Instructions
- 66 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Async Runtime / Future Wakeup
任何依赖未来时点或未来事件的承诺,都必须同时安排可唤醒机制。原则:**能回来继续处理**,而不是依赖 Max 手动重启对话。
## 选择表
| 场景 | 机制 | 说明 |
|---|---|---|
| 固定时间执行一次 | `cron_add` with `at` + `owner:"session"` | 例如今晚 21:00 提醒/检查 |
| 周期性执行(守护类) | `cron_add` with `cron` / `every` | 例如每日扫描、每小时巡检,owner 默认 system |
| 会话自调度闹钟("10 分钟后看结果") | `cron_add` + `owner:"session"` | 随目的消亡,完成后必须主动 `cron_remove`;不进健康审计 |
| 静态提醒,无需 agent 推理 | `cron_add` payload `notification` | 直接写通知,不进 agent loop |
| 纯轮询/比对,结果结构化 | `cron_add` payload `script` | 脚本放 `data/cron-tasks/`(自编写)或 `cron-tasks/`(repo),stdout JSON 行写通知,零 token |
| 轮询发现异常后要 agent 接力判断 | `script` + stdout 打 wake 行 | gate→enrich 的 script 形态:门零 token,只在异常路径叫醒 agent;无需发布/重启。两种口味:`{"wake":{"subagent":"任务文本","model":"palette:light"}}` 派一次性隔离 agent(机械诊断/体力活,主口味,告警由脚本自己的 notification 行写出);`{"wake":{"channel":"web:chat-x","text":"..."}}` 借宿已有 channel(需要上下文连续性或 Max 在场交互) |
| 到点后需要带上下文继续推理 | `cron_add` payload `channel-message` | 注入目标 channel,由 agent 串行处理 |
| 独立长流程,完成后回来处理 | `spawn_subagent` with `run_in_background: true` | 完成时以 framework 消息唤醒发起 channel,不轮询 |
| 长期追踪主题事件 | `channel_subscribe` + producer `notification_create` | 事件发生时按 topic fan-out |
| 跨 channel 通知另一 agent | `wake_channel` | 只传状态层指针和极短摘要;具体内容在 issue/task/memory 等 state layer |
## script 任务协议要点
- **状态文件锚定**:两个合法根目录(`cron-tasks/` 与 `data/cron-tasks/`)相对 `data/` 的几何不同,脚本内写 `../data/x.json` 只对 repo 根成立。一律读 runner 注入的 `MAXCLAW_DATA_DIR`,未注入 fail-loud。`data/cron-tasks/` 自编写脚本复制这 4 行(不要跨根 import repo 的 `cron-tasks/lib/`):
```ts
const DATA_DIR = process.env.MAXCLAW_DATA_DIR
if (!DATA_DIR) throw new Error('MAXCLAW_DATA_DIR 未设置(直接调试:MAXCLAW_DATA_DIR=$PWD/data bun <script>)')
const STATE_PATH = `${DATA_DIR}/my-state.json`
```
- **timeoutMs 上限 30min**:payload `timeoutMs` 和 wake 行 `timeoutMs` 超限直接报错,不会被静默压缩——需要更长执行时间说明任务该拆,不该硬撑。
- **`cron_run_now` 防重入**:撞上该 job 正在运行的实例会 throw「正在运行中」,等它跑完再触发。脚本的 read-modify-write 状态文件靠这把锁保护。
- 通知行与 wake 行协议全文见 `src/cron/script-runner.ts` 头注释。
## owner 归属纪律
- **会话给自己设的闹钟**(等构建、等回复、定期检查某个进行中的事)→ `owner:"session"`。它是当前任务的附属物:目的达成后**主动 `cron_remove`**,不留孤儿闹钟。
- **与会话无关的常驻任务**(巡检、订阅、提醒 Max 的长期安排)→ 默认 `owner:"system"`,进健康审计。
- 拿不准时问一句:这个任务是"我这个对话要继续处理的事",还是"系统该一直做的事"?
## 操作纪律
- 说“稍后/完成后/到时候”之前,先决定唤醒机制并执行。
- 长期服务进程不算唤醒机制;启动 dev server 前先确认并精确清理旧进程。
- 异步任务派发后等待对应机制的通知,不轮询日志;失败通知再读完整日志。
- `notification_create` 用已有 topic;创建新 topic 前先 `topic_list` 避免重复命名。
- `wake_channel` 是门铃,不是跨频道对话;消息只放 pointer + 极短摘要。
## 最小模板
### 固定时间继续处理
1. 计算/确认 ISO 时间。
2. `cron_add({ kind: "at" }, { kind: "channel-message", text: "到点后要执行的具体任务" })`。
3. 告诉 Max 已安排什么时间、会做什么。
### 长流程后台执行
1. 任务可自包含描述且预计耗时长,`spawn_subagent({ ..., run_in_background: true })`。
2. `task` 写清楚目标、数据源、期望产出(子 agent 看不到你的对话上下文)。
3. 完成时框架自动唤醒当前 channel,不轮询;状态核对用 `check_subagents`。详见 skills/subagent/SKILL.md。
### 事件流订阅
1. `topic_list` 查已有 topic。
2. `channel_subscribe` 当前 channel。
3. producer 在事件发生时 `notification_create(topic=...)`。From maxesisn/maxclaw-oss, MIT.
More from maxesisn/maxclaw-oss
- 0.526score
knowledge-base
maxesisn
通用知识库构建 & 查询工具。给定一个包含 PDF/Sphinx-HTML 的原始文档文件夹,批量转成可 grep 的 Markdown、抽符号倒排、生成 LLM 摘要 sidecar 和 manifest 聚合索引。Agent 进入陌生领域时先 `ls ~/.maxclaw/kb/` 看有无相关知识库,再按"L3…
SkillBFreshness: BClaude Code +9 - 0.521score
web-search
maxesisn
搜索互联网获取实时信息,通过自建 search-proxy 聚合 Tavily/Brave/Jina 三家付费 provider(带配额管理 + 失败 fallback 到 SearXNG)。适用于:查询新闻、实时价格、技术文档、不在训练数据中的信息。
SkillBFreshness: BClaude Code +9 - 0.521score
seek-advice
maxesisn
跨家 LLM 顾问 panel——给一个最小化 scenario,并行 dispatch 给 3-5 个不同 vendor 的模型,每个模型同时跑联网+离线两份,对抗单家族 prior 高度相关导致的 anchoring 偏差。用于复杂诊断、重要技术决策、自己推理 ≥2 小时未收敛兜底。
SkillBFreshness: BClaude Code +9 - 0.521score
pinned-notes
maxesisn
显式标记当前对话中需要永久保留的关键事实(必要开支、风险偏好、核心约束等),让它在 session compact/rollover 后仍存活。Agent 主动判断"哪些信息长期重要"调用,跨 session 通过 6 字符短 pin_id 引用。单 session 上限 25 条。
SkillBFreshness: BClaude Code +9 - 0.521score
code-intelligence
maxesisn
代码仓库智能问答工具(repo_symbol_answer v1)。Tree-sitter AST 召回 function/class/method/interface/variable 定义 + ripgrep 词法搜索 + reranker 精排 + palette:mid LLM 综合,输出含…
SkillBFreshness: BClaude Code +9 - 0.520score
reflection
maxesisn
自主反思与行动——静默处理能处理的,把该 Max 决策的记上面板
SkillBFreshness: BClaude Code +9 - 0.519score
channel-notes
maxesisn
Channel-scoped working notes — a short Markdown document per channel for decisions, deferred items, open questions, and next steps.
SkillBFreshness: BClaude Code +9 - 0.518score
workdir
maxesisn
声明当前 channel 正在使用的工作目录(可多个),显示在右侧 Workspace 卡并在压缩后可查回。多文件任务时用 set_workdirs 钉下工作目录,避免文件散落 /tmp 或每次重说。仅记录+展示,不改进程 cwd。
SkillBFreshness: BClaude Code +9 - 0.518score
wake-channel
maxesisn
跨 channel agent 通信原语——通过 wake_channel "按门铃"通知另一个 channel 的 agent 有新状态变化
SkillBFreshness: BClaude Code +9 - 0.517score
notifications
maxesisn
持久化事件通知层 + topic-based pub-sub。所有 cron / sub-agent / mail / 价格异动等事件写入 SQLite 并按 channel 订阅 fan-out。channel 通过 channel_subscribe 声明关心哪些 topic;同时所有事件无条件 union…
SkillBFreshness: BClaude Code +9 - 0.515score
browser
maxesisn
浏览器控制能力,通过 CDP 连接系统 Brave,支持导航、截图、快照、点击、输入等操作
SkillBFreshness: BClaude Code +9 - 0.515score
cron
maxesisn
管理定时任务(cron jobs),支持添加、删除、列出、立即执行
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 9, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maxesisn/maxclaw-oss
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maxesisn
- 0.526score
knowledge-base
maxesisn
通用知识库构建 & 查询工具。给定一个包含 PDF/Sphinx-HTML 的原始文档文件夹,批量转成可 grep 的 Markdown、抽符号倒排、生成 LLM 摘要 sidecar 和 manifest 聚合索引。Agent 进入陌生领域时先 `ls ~/.maxclaw/kb/` 看有无相关知识库,再按"L3…
SkillBFreshness: BClaude Code +9 - 0.521score
seek-advice
maxesisn
跨家 LLM 顾问 panel——给一个最小化 scenario,并行 dispatch 给 3-5 个不同 vendor 的模型,每个模型同时跑联网+离线两份,对抗单家族 prior 高度相关导致的 anchoring 偏差。用于复杂诊断、重要技术决策、自己推理 ≥2 小时未收敛兜底。
SkillBFreshness: BClaude Code +9 - 0.521score
pinned-notes
maxesisn
显式标记当前对话中需要永久保留的关键事实(必要开支、风险偏好、核心约束等),让它在 session compact/rollover 后仍存活。Agent 主动判断"哪些信息长期重要"调用,跨 session 通过 6 字符短 pin_id 引用。单 session 上限 25 条。
SkillBFreshness: BClaude Code +9 - 0.521score
web-search
maxesisn
搜索互联网获取实时信息,通过自建 search-proxy 聚合 Tavily/Brave/Jina 三家付费 provider(带配额管理 + 失败 fallback 到 SearXNG)。适用于:查询新闻、实时价格、技术文档、不在训练数据中的信息。
SkillBFreshness: BClaude Code +9 - 0.521score
code-intelligence
maxesisn
代码仓库智能问答工具(repo_symbol_answer v1)。Tree-sitter AST 召回 function/class/method/interface/variable 定义 + ripgrep 词法搜索 + reranker 精排 + palette:mid LLM 综合,输出含…
SkillBFreshness: BClaude Code +9 - 0.520score
reflection
maxesisn
自主反思与行动——静默处理能处理的,把该 Max 决策的记上面板
SkillBFreshness: BClaude Code +9
Cite this page
async-runtime skill. Agent Mart. https://agentmart.dev/skills/maxesisn-async-runtime (last updated 2026-10-24)