fourli-skills 是一组给 AI agent 使用的 reusable skills(可复用技能)。它不是单一 checkpoint 插件,而是把我常用的几类工作方式拆成独立 skill:先想清楚、做技术讲解、简化代码、创建 checkpoint、维护 checkpoint。
| Skill | 什么时候用 | 作用 |
|---|---|---|
think |
用户显式要求先想清楚、问透、grill 或澄清需求时 | 通过一问一答澄清需求,最后输出简短的需求共识摘要 |
teacher |
用户显式调用 $teacher、teacher,或要求用 teacher 调研/讲解技术问题时 |
联网查事实,用中文讲解技术、AI、项目、框架、架构概念和工程社区内容 |
handoff |
需要跨 agent 接力、保留当前对话的可继续上下文时 | 把当前对话压缩成 handoff 文档,默认写入 docs/handoffs/ |
fourli-research |
用户显式要求做资料调研、并希望把结果沉淀到仓库时 | 只查一手资料,并把结论写成带引用的 Markdown,默认写入 docs/research/ |
code-opt |
代码已经能工作,但结构、命名、重复或嵌套让它难读难维护时 | 在不改变行为的前提下简化代码 |
code-audit |
发布前、合并前或修完 bug 后,用户显式要求审核已改动代码风险时 | 审核行为、业务语义、安全和发布兼容风险,只报告不修改 |
checkpoint |
用户明确要求创建、查看或切换 checkpoint 时 | 创建或切换一个轻量 checkpoint,用来记录大任务的接力状态 |
checkpoint-maintenance |
已有 active checkpoint,且进入阶段边界、方向变更、上下文接力风险或任务收尾时 | 维护 checkpoint 内容,保证接力信息短、准、可继续 |
公开使用时,优先把这个仓库作为 Git marketplace 加入:
终端执行命令
# 添加插件
codex plugin marketplace add four-li/skills
# 如需更新
codex plugin marketplace upgrade fourli在 Codex App 里启用插件.(或codex cli中执行/plugins选择)后 ~/.codex/config.toml 通常会出现:
[plugins."fourli-skills@fourli"]
enabled = true例如,把这些 skills 全局安装给 trae-cn:
npx skills add four-li/skills --agent trae-cn -g -y如果你是全局安装,后续只更新这个仓库安装出来的 skills,可以执行更新指定skills:
npx skills update -g think teacher handoff fourli-research code-opt code-audit checkpoint checkpoint-maintenance优先读取仓库根目录下的 skills/。这个仓库的核心能力都在这里。新增的 handoff、fourli-research 也都在这里。
如果目标 agent 不支持 hooks,也可以只使用 skills/。其中 checkpoint-maintenance 会更依赖目标项目里的 AGENTS.md 约束来提醒 agent 何时触发。
Codex hooks 是增强层,用来减少 agent 漏掉 checkpoint 维护的概率:
SessionStart:注入 active checkpoint 的定界文本块,先给 agent 一个短摘要。PreCompact:通过 JSONsystemMessage做非阻断提醒。Stop:通过 JSONsystemMessage做非阻断提醒。
没有 hooks 时,skills 仍然可以工作,只是 checkpoint 维护更依赖目标项目里的使用约定。
如果agent没有加Hooks, 应把以下提示词加到AGENTS.md
## Fourli Checkpoint
If `docs/checkpoints/.active_checkpoint` exists, use `checkpoint-maintenance` only at session start/resume, phase boundaries, context handoff risk, direction changes, or task closeout.
For orientation, read only the delimited checkpoint inject block first. Read the full `checkpoint.md` only when updating direction changes, key evidence, closeout notes, closing the checkpoint, or repairing the checkpoint file.
Do not use checkpoint content as an implementation plan. The primary workflow owns requirements design, implementation planning, execution, and verification.checkpoint 只负责记录大任务接力状态,不负责替代主工作流。具体来说:
- checkpoint 不是需求设计。
- checkpoint 不是 implementation plan(实施计划,也就是拆解怎么做)。
- checkpoint 不是执行日志。
- checkpoint 不是验证记录。
如果你需要的是“定义要做什么”“拆解怎么做”“记录每一步执行结果”,这些内容应该留在主工作流自己的 spec、plan 和验证产物里,而不是堆进 checkpoint。