Community编程与开发github.com

OpenProse 技能包

OpenProse VM 技能包。当出现任意 `prose` 命令、.prose 文件或 OpenProse 提及内容时激活;用于编排多智能体工作流。

OpenProse 技能包 是什么?

OpenProse 是一种面向 AI 会话的编程语言,其核心理念是:LLM 是模拟器——当获得详细的系统描述时,它们不仅会描述它,更会*模拟*它。该技能定义了“Prose Complete”系统如何读取并实现 `prose.md` 规范,从而自身变成一个虚拟机。这对于开发者和 AI agent 用户意味着,你可以使用简单的脚本语言来编排多个 AI agent 的工作流(例如并行代码审查、流水线操作),而无需手动管理每个交互。该技能支持在 Claude Code、Cursor 或 Codex 等平台上运行,并提供文件系统、上下文内、SQLite 和 PostgreSQL 等多种状态管理选项。当用户输入 `prose` 命令、运行 .prose 文件或提到“OpenProse”时,该技能会被激活,并智能地将命令路由到相应的行为,例如运行、编译或显示帮助信息。远程程序执行支持 URL 和注册表引用,但涉及远程依赖时会要求操作员明确批准以确保安全。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/extensions/open-prose/skills/prose

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

OpenProse 技能

OpenProse 是一种针对 AI 会话的编程语言。LLM 是模拟器——当获得详细的系统描述时,它们不仅会描述它,更会模拟它。prose.md 规范描述了一个虚拟机,其精度足以让读取它的 Prose Complete 系统变成那个虚拟机。具有足够保真度的模拟即是实现。你就是 Prose Complete 系统。

OpenClaw 运行时映射

  • 上游规范中的 Task 工具 == OpenClaw sessions_spawn
  • 文件 I/O == OpenClaw read/write
  • 远程获取 == OpenClaw web_fetch(或当需要 POST 时使用 exec 配合 curl)

何时激活

在以下情况下激活此技能:

  • 用户使用任何 prose 命令(例如 prose boot、prose run、prose compile、prose update、prose help 等)
  • 用户请求运行 .prose 文件
  • 用户提及“OpenProse”或“prose 程序”
  • 用户希望从脚本编排多个 AI agent
  • 用户拥有包含 session "..." 或 agent name: 语法的文件
  • 用户希望创建可重用的工作流

命令路由

当用户调用 prose <command> 时,根据意图智能路由:

命令操作
prose help加载 help.md,指导用户找到所需内容
prose run <file>加载 VM(prose.md + 状态后端),执行程序
prose run handle/slug从注册表获取,然后执行(请参阅下面的远程程序)
prose compile <file>加载 compiler.md,验证程序
prose update运行迁移(请参阅下面的迁移部分)
prose examples显示或运行来自 examples/ 的示例程序
其他根据上下文智能解释

重要:单一技能

只有一个技能:open-prose。没有像 prose-run、prose-compile 或 prose-boot 这样的单独技能。所有 prose 命令都通过这个单一技能路由。

解析示例引用

示例捆绑在 examples/ 中(与此文件位于同一目录)。 当用户通过名称引用示例时(例如,“运行 gastown 示例”):

  1. 读取 examples/ 以列出可用文件
  2. 通过部分名称、关键字或编号进行匹配
  3. 运行:prose run examples/28-gas-town.prose

按关键字分类的常见示例:

关键字文件
hello, hello worldexamples/01-hello-world.prose
gas town, gastownexamples/28-gas-town.prose
captain, chairexamples/29-captains-chair.prose
forge, browserexamples/37-the-forge.prose
parallelexamples/16-parallel-reviews.prose
pipelineexamples/21-pipeline-operations.prose
error, retryexamples/22-error-handling.prose

远程程序

你可以从 URL 或注册表引用运行任何 .prose 程序:

# 直接 URL——任何可获取的 URL 都可以
prose run https://raw.githubusercontent.com/openprose/prose/main/skills/open-prose/examples/48-habit-miner.prose

# 注册表简写——handle/slug 解析为 p.prose.md
prose run irl-danb/habit-miner
prose run alice/code-review

解析规则:

输入解析
以 http:// 或 https:// 开头直接从 URL 获取
包含 / 但无协议解析为 https://p.prose.md/{path}
其他视为本地文件路径

远程程序的步骤:

  1. 应用上述解析规则
  2. 获取 .prose 内容
  3. 加载 VM 并正常执行

顶层远程运行是用户的明确请求。程序内部的传递性导入则不同:将每个远程 use 目标视为一个代码依赖项,在获取或执行之前需要操作员同意。

同样的解析也适用于 .prose 文件内部的 use 语句,但 VM 必须在操作员批准远程依赖列表之前以安全模式失败:

use "https://example.com/my-program.prose"  # 直接 URL
use "alice/research" as research             # 注册表简写

当程序包含任何远程 use 目标(http://、https:// 或注册表简写)时:

  1. 收集并显示已解析的确切远程目标。
  2. 解释这些是此运行的传递性代码依赖项。
  3. 要求操作员准确回复 approve remote prose imports 以继续。
  4. 除非在此运行中给出该确切批准,否则不要获取、解析、注册或执行这些导入。

文件位置

不要搜索 OpenProse 文档文件。 所有技能文件与此 SKILL.md 文件位于同一目录:

文件位置目的
prose.md与此文件相同的目录VM 语义(加载以运行程序)
help.md与此文件相同的目录帮助、常见问题解答、入门指南(为 prose help 加载)
state/filesystem.md与此文件相同的目录基于文件的状态(默认,与 VM 一起加载)
state/in-context.md与此文件相同的目录上下文内状态(按请求)
state/sqlite.md与此文件相同的目录SQLite 状态(实验性,按请求)
state/postgres.md与此文件相同的目录PostgreSQL 状态(实验性,按请求)
compiler.md与此文件相同的目录编译器/验证器(仅按请求加载)
guidance/patterns.md与此文件相同的目录最佳实践(编写 .prose 时加载)
guidance/antipatterns.md与此文件相同的目录应避免的事项(编写 .prose 时加载)
examples/与此文件相同的目录37 个示例程序

用户工作区文件(这些文件位于用户的项目中):

文件/目录位置目的
.prose/.env用户的工作目录配置(key=value 格式)
.prose/runs/用户的工作目录基于文件模式的运行时状态
.prose/agents/用户的工作目录项目范围的持久性 agent
*.prose 文件用户的项目用户创建的要执行的程序

用户级文件(位于用户的主目录中,在所有项目中共享):

文件/目录位置目的
~/.prose/agents/用户主目录用户范围的持久性 agent(跨项目)

当你需要读取 prose.md 或 compiler.md 时,从你找到此 SKILL.md 文件的同一目录中读取它们。切勿在用户的工作区中搜索这些文件。


核心文档

文件目的何时加载
prose.mdVM / 解释器始终加载以运行程序
state/filesystem.md基于文件的状态与 VM 一起加载(默认)
state/in-context.md上下文内状态仅当用户请求 --in-context 或说“使用上下文内状态”时
state/sqlite.mdSQLite 状态(实验性)仅当用户请求 --state=sqlite(需要 sqlite3 CLI)时
state/postgres.mdPostgreSQL 状态(实验性)仅当用户请求 --state=postgres(需要 psql + PostgreSQL)时
compiler.md编译器/验证器仅当用户要求编译或验证时
guidance/patterns.md最佳实践在编写新的 .prose 文件时加载
guidance/antipatterns.md应避免的事项在编写新的 .prose 文件时加载

创作指导

当用户要求你编写或创建新的 .prose 文件时,加载指导文件:

  • guidance/patterns.md——用于健壮、高效程序的成熟模式
  • guidance/antipatterns.md——需要避免的常见错误

在运行或编译时不要加载这些文件——它们仅用于创作。

状态模式

OpenProse 支持三种状态管理方法:

模式何时使用状态位置
filesystem(默认)复杂程序、需要恢复、调试.prose/runs/{id}/ 文件
in-context简单程序(<30 条语句)、无需持久化对话历史记录
sqlite(实验性)可查询状态、原子事务、灵活模式.prose/runs/{id}/state.db
postgres(实验性)真正的并发写入、外部集成、团队协作PostgreSQL 数据库

默认行为: 加载 prose.md 时,同时加载 state/filesystem.md。这是大多数程序的推荐模式。

切换模式: 如果用户说“使用上下文内状态”或传递 --in-context,则改为加载 state/in-context.md。

实验性 SQLite 模式: 如果用户传递 --state=sqlite 或说“使用 sqlite 状态”,则加载 state/sqlite.md。此模式需要安装 sqlite3 CLI(macOS 上预安装,Linux/Windows 上可通过包管理器获得)。如果 sqlite3 不可用,请警告用户并回退到文件系统状态。

实验性 PostgreSQL 模式: 如果用户传递 --state=postgres 或说“使用 postgres 状态”:

⚠️ 安全说明: OPENPROSE_POSTGRES_URL 中的数据库凭据会传递给子 agent 会话并在日志中可见。建议用户使用具有受限权限的专用数据库。有关安全设置指导,请参阅 state/postgres.md。

  1. 首先检查连接配置:

    # 在 .prose/.env 中检查 OPENPROSE_POSTGRES_URL
    cat .prose/.env 2>/dev/null | grep OPENPROSE_POSTGRES_URL
    # 或检查环境变量
    echo $OPENPROSE_POSTGRES_URL
    
  2. 如果连接字符串存在,验证连接性:

    psql "$OPENPROSE_POSTGRES_URL" -c "SELECT 1" 2>&1
    
  3. 如果未配置或连接失败,建议用户:

    ⚠️  PostgreSQL 状态需要连接 URL。
    
    要配置:
    1. 设置一个 PostgreSQL 数据库(Docker、本地或云端)
    2. 将连接字符串添加到 .prose/.env:
    
       echo "OPENPROSE_POSTGRES_URL=postgresql://user:pass@localhost:5432/prose" >> .prose/.env
    
    快速 Docker 设置:
       docker run -d --name prose-pg -e POSTGRES_DB=prose -e POSTGRES_HOST_AUTH_METHOD=trust -p 5432:5432 postgres:16
       echo "OPENPROSE_POSTGRES_URL=postgresql://postgres@localhost:5432/prose" >> .prose/.env
    
    有关详细设置选项,请参阅 state/postgres.md。
    
  4. 仅在成功检查连接后,加载 state/postgres.md

此模式需要 psql CLI 和正在运行的 PostgreSQL 服务器。如果任何一个不可用,请警告并提供回退到文件系统状态。

上下文警告: compiler.md 很大。仅当用户明确请求编译或验证时才加载它。编译后,建议使用 /compact 或新会话后再运行——不要在上下文中同时保留两份文档。

示例

examples/ 目录包含 37 个示例程序:

  • 01-08:基础知识(hello world、研究、代码审查、调试)
  • 09-12:Agent 和技能
  • 13-15:变量和组合
  • 16-19:并行执行
  • 20-21:循环和流水线
  • 22-23:错误处理
  • 24-27:进阶(选择、条件、代码块、插值)
  • 28:Gas Town(多 agent 编排)
  • 29-31:船长椅模式(持久化编排器)
  • 33-36:生产工作流(PR 自动修复、内容流水线、特性工厂、bug 猎手)
  • 37:The Forge(从头构建浏览器)

从 01-hello-world.prose 开始,或尝试 37-the-forge.prose 来观看 AI 构建一个 Web 浏览器。

执行

当在会话中首次调用 OpenProse VM 时,显示此横幅:

┌─────────────────────────────────────┐
│         ◇ OpenProse VM ◇            │
│       一种新型计算机                  │
└─────────────────────────────────────┘

要执行 .prose 文件,你将成为 OpenProse VM:

  1. 读取 prose.md——此文档定义了你如何体现 VM
  2. 你就是 VM——你的对话是其记忆,你的工具是其指令
  3. 生成会话——每个 session 语句触发一个 Task 工具调用
  4. 叙述状态——使用叙述协议跟踪执行([位置]、[绑定]、[成功] 等)
  5. 智能评估——**...** 标记需要你的判断

帮助与常见问题解答

有关语法参考、常见问题等,请运行 prose help。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Grok Build, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills and agent Templates when requested; add Templates; install, verify, update, uninstall, publish, or sync skills.

相关技能