Community程式設計與開發github.com

OpenProse 技能包

OpenProse VM 技能包。在任何 `prose` 命令、.prose 檔案或提及 OpenProse 時啟動;用於編排多代理工作流程。

OpenProse 技能包 是什麼?

OpenProse 是一種專為 AI 會話設計的程式語言。其核心概念是,LLM 本質上是模擬器——當給予詳細的系統描述時,它們不僅會描述它,更會模擬它。`prose.md` 規範定義了一個虛擬機器,其精確度足以使閱讀它的 Prose Complete 系統「成為」該 VM。這個技能將你的 AI 代理轉變為一個 OpenProse VM,能夠根據 `.prose` 檔案解釋並執行多代理工作流程。它支援像 Claude Code、Cursor 和 Codex 這樣的平台,透過提供的工具映射(例如,任務工具映射到 `sessions_spawn`)與它們的工具生態系統互動。該技能提供了多種狀態管理模式(檔案系統、上下文內、SQLite、PostgreSQL),並包含一個用於編寫新 `.prose` 程式的引導系統。當使用者發出 `prose run` 或 `prose compile` 等命令時,它會智慧地路由請求,載入必要的規範檔案(例如,`prose.md` 用於執行,`compiler.md` 用於驗證),並管理協作工作流程中遠端程式的同意。

相容平台✓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 系統「成為」該 VM。具有足夠精確度的模擬即為實現。你就是 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 代理
  • 有一個包含 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/(與此檔案相同的目錄)。 當使用者按名稱參考範例時(例如,「執行 gas town 範例」):

  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/使用者的工作目錄專案範圍內的持久代理
*.prose 檔案使用者的專案使用者建立的程式以執行

使用者級別檔案(位於使用者的家目錄,跨所有專案共享):

檔案/目錄位置用途
~/.prose/agents/使用者的家目錄使用者範圍內的持久代理(跨專案)

當您需要讀取 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 中的資料庫憑證會傳遞給子代理會話並在日誌中可見。建議使用者使用具有有限權限憑證的專用資料庫。有關安全設定指引,請參閱 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:代理和技能
  • 13-15:變數和組合
  • 16-19:並行執行
  • 20-21:迴圈和管道
  • 22-23:錯誤處理
  • 24-27:進階(選擇、條件、區塊、插值)
  • 28:Gas Town(多代理編排)
  • 29-31:Captain's chair 模式(持久編排器)
  • 33-36:生產工作流程(PR 自動修復、內容管道、功能工廠、錯誤獵人)
  • 37:The Forge(從頭開始建立一個瀏覽器)

從 01-hello-world.prose 開始,或嘗試 37-the-forge.prose 來觀看 AI 建立一個網頁瀏覽器。

執行

在會話中首次呼叫 OpenProse VM 時,顯示此橫幅:

┌─────────────────────────────────────┐
│         ◇ OpenProse VM ◇            │
│       一種新型態的電腦                │
└─────────────────────────────────────┘

要執行一個 .prose 檔案,你將成為 OpenProse VM:

  1. 讀取 prose.md — 此文件定義了你如何體現 VM
  2. 你就是 VM — 你的對話是它的記憶體,你的工具是它的指令
  3. 衍生會話 — 每個 session 陳述觸發一個 Task 工具呼叫
  4. 敘述狀態 — 使用敘述協定來追蹤執行([Position]、[Binding]、[Success] 等)
  5. 智慧評估 — **...** 標記需要你的判斷

幫助與常見問題

有關語法參考、常見問題等資訊...

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.

相關技能