Community程式設計與開發github.com

知識修正

根據使用者要求修正或撤回特定已儲存的知識聲明、明確關係或頁面,保留出處並檢查受影響的知識。用於「那是錯的」、「撤回那個」或知識聊天引用。

知識修正 是什麼?

此技能允許 AI 代理在收到明確使用者指示(例如「那是錯的」或「撤回那個」)時,精確修正或撤回已儲存的知識記錄。它透過結構化工具(如 `knowledge_correct`、`knowledge_withdraw` 和 `knowledge_merge`)運作,而非手動編輯或非標準操作。該技能強調保留出處、支援版本控制,並僅在使用者直接授權時才進行修改,從而防止自動矛盾解決或未經授權的替換。它支援各種知識類型,包括聲明、明確關係和頁面,並能處理頁面合併等複雜案例。它還會檢查傳播情況,並誠實報告已修復的依賴項與未解決的依賴項,確保知識庫在代理工作流程(例如 Claude Code 或類似工具)中的完整性和可審計性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/extensions/knowledge/skills/knowledge-correct

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

透過代理工具修正已儲存的知識

在寫入前,請先閱讀共享慣例和發佈說明。

識別所屬記錄

使用提供的結構化記錄/聲明 ID 和修訂版本作為主要目標,而非僅使用其顯示標籤。讀取 knowledge_record 及其元資料和證據;確認其當前的修訂版本/雜湊值。如果引用的修訂版本已變更,則需要重新讀取並協調請求,而不能在未經通知的情況下對新的斷言採取行動。若無確切參考,請使用查詢/搜尋、檢查候選項,並且僅在請求的目標或修正仍存在重大模糊時才提問。

區分錯誤的已儲存斷言與無法支援的答案、互相矛盾的來源陳述,以及隨時間變更的事實。矛盾本身並不授權取代;唯一非使用者的情況是,其持有者明確替換了某項常設陳述(根據發佈說明)。當沒有記錄存在時,請勿製造儲存的「防護事實」,也不應將撤回視為其相反命題的證據。

應用正確的操作

  • 聲明或明確關係修正: 使用確切的 ID、觀察到的 expectedRevision 和 expectedHash、原因、觀察到的儲存庫 UUID 和本體指紋,以及一個完整的、相同 kind 的 replacement 來呼叫 knowledge_correct。取代欄位使用建立聲明/建立關係的合約;只有一個外部請求 ID,而非第二個替代請求。保留支援的上下文、歸因、精確日期和證據;移除或修改修正實際變更的內容。此操作會同時發佈替代內容並取代舊的斷言,兩者之間有雙向連結。
  • 無替代的撤回: 使用確切的 ID、修訂版本/雜湊值、原因和儲存庫 UUID 來呼叫 knowledge_withdraw。它接受頁面、聲明和明確關係。邊是透過其自身的 ID 來識別,而非其端點配對。它會保留原始證據/歷史記錄,並非檔案刪除。
  • 頁面散文修正: 使用常規的、受修訂版本保護的 knowledge_save_page,保留不相關的作者內容和來源。頁面修正是修訂版本,而非取代實體身份。
  • 一個實體的兩個頁面: 使用存活頁面、重複頁面、兩個頁面的當前修訂版本/雜湊值和一個原因來呼叫 knowledge_merge。保留具有更完整身份(真實姓名、更多關聯)的頁面作為存活者;傳遞 title 以重新命名,當合併後的頁面應包含比存活者當前散文更多的內容時傳遞 body。然後,重複頁面的 ID、標題、別名、聲明、關係和連結將解析到存活者;無需逐一修正。使用 knowledge_unmerge 來撤銷錯誤的合併。

使用者的明確修正可以提供證據:使用 knowledge_attach 保留其確切陳述,將其歸因於使用者,並引用其驗證過的定位器。使用 assertion_origin: user_belief 來區分使用者的斷言與獨立來源的陳述;請勿聲稱文件驗證。代理推論仍需要保留的前提證據,而非虛構的引用。

解析代號或身份誤認

使用 knowledge-entities 來尋找並讀取代號設定檔、已建立的人物及其關聯記錄。保留使用者確切的識別資訊作為證據。在現有頁面上更新支援的別名和身份上下文;保留不相關的內容,並描述與已建立人物的關聯。使用該人物的現有 ID 進行後續的豐富化。當代號本身已有頁面時,使用 knowledge_merge 將其合併到已建立人物的頁面,而不是撰寫指標頁面、撤回該頁面,或逐一修正其聲明。僅在存在身份證據(使用者的陳述、自我介紹、共享的穩定帳戶 ID)時才進行合併,絕不能僅因名稱相似而合併;knowledge_diagnostics 的 mergeCandidates 會列出需要檢查的頁面,而非需要合併的頁面。使用 knowledge_attach 保留身份證據,並將其傳遞為 evidence。

檢查修正範圍內受影響的散文、聲明、時間線和關係。在新證據支援的情況下,使用上述頁面/斷言操作來修正錯誤歸因和未解決的身份;保留來源標籤、逐字引述、事件日期和修正出處。已確認的作者身份並不能獨立驗證該作者事實陳述的真實性。

變更需透過這些工具進行,而非手動 Markdown 編輯、瀏覽器表單、SQL 或分開的「建立然後撤回」呼叫。對於明確的使用者授權修正,無需額外的批准程序。遵循發佈重試/衝突處理;處於 accepted/conflict 狀態的回執並非已完成的修復。

檢查傳播並誠實報告

回執的 impact.items 會識別接受時已知的範圍內直接/傳遞依賴項。它不會更新它們。透過確切的 ID 讀取受影響的記錄,並檢查其證據。僅修復請求範圍內有支援的變更;請勿盲目地使用新聲明取代依賴項 ID 或來源引用。依賴於非活躍斷言的記錄將被保留在當前發現之外,直到修復為止;但確切的記錄/歷史記錄檢查仍可使用。

作為補充檢查,搜尋可能的散文副本。搜尋遺漏、無連結的散文、隱藏範圍和不完整的索引,使得無法保證「所有副本都已修復」。請勿將知識修正的自動後果延伸至修改不相關的記憶或身份系統。

重新讀取原始內容和替代內容(或撤回的目標),驗證生命週期和證據,並驗證當前查詢是否排除了舊的斷言。回覆時需包含回執/請求 ID、受影響的記錄 ID、修正/撤回原因,以及已修復與未解決的依賴項。僅在相關時提及其保留的歷史記錄;絕不能承諾從原始資料、匯出資料或備份中刪除。

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 when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相關技能