Community程式設計與開發github.com

getedgehq/opendraft

將一個主題轉化為一份具有真實文獻基礎的完整論文,包含18個階段的智能體管道。

opendraft 是什麼?

opendraft 是一個開源的 AI 智能體技能,可將單一主題轉化為完整、具備真實文獻基礎的學術論文。該專案由 OpenDraft (github.com/federicodeponte/opendraft, MIT 授權) 移植而來,原專案以託管引擎運行,而此版本則將您自身作為「模型」——無需 API 密鑰、無需服務、無需帳戶。唯一的外部網路呼叫是 Crossref、OpenAlex 和 DataCite 等開放端點。 該管道包含 18 個階段(每個階段對應 `agents/` 中的一個提示),以及 5 個處理語言模型無法處理之工作的腳本。工作流程從單一指令 `Write a paper on <topic>` 開始,但在此之前,系統會詢問四個關鍵問題:目標期刊、總字數限制、引文風格和文件類型。這些問題在第五階段之前提出,因為錯誤的假設會在後期造成難以修復的問題。 opendraft 的關鍵設計原則包括:禁止手動撰寫渲染的引文標記(使用 `{cite_<doi>}` 佔位符,由 `citations.py compile` 處理)、禁止發明無法支援的來源(使用 `{cite_MISSING}` 誠實標記)、禁止手動合併章節(由 `assemble.py` 處理),以及禁止憑視覺判斷論文內部一致性(由 `integrity.py` 檢查)。這些規則確保了品質。 該技能支援多種規模:從 1,500-3,000 字的短文(10-15 個來源,僅使用部分階段)到完整的論文(18 個階段,25-50 個來源)再到論文章節或長篇綜述(50個以上來源)。系統還包含一個可選的語音匹配階段(第13階段),可將論文風格與作者先前的作品對齊。所有腳本均僅依賴 Python 標準庫,無需安裝步驟。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/getedgehq/skills/tree/main/opendraft

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

在你喜歡的 AI 中提問

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

說明文件

opendraft 是做什麼的?

將一個主題轉化為一份具有真實文獻基礎的完整論文。

從 OpenDraft (github.com/federicodeponte/opendraft, MIT 授權) 移植而來,原專案以託管引擎運行。在此版本中,引擎就是您:十八個階段,每個階段對應 agents/ 中的一個提示,外加五個腳本,用於處理語言模型不應手動執行的部分。

您就是模型。 無需密鑰、無需服務、無需帳戶。唯一的網路呼叫是 Crossref、OpenAlex 和 DataCite,這些均為開放端點。

單一指令

撰寫一篇關於 <主題> 的論文

以下所有步驟均由此指令衍生。請勿要求使用者自行運行各階段;由您來執行。

事先詢問四件事

在第五階段之前,如果使用者尚未提供,請詢問:

  1. 目標期刊,或「無,一般學術」。
  2. 總字數限制。
  3. 引文風格,從 references/citation-styles.md 中的六種風格中選擇一種。
  4. 文件類型,從 references/paper-types.md 中的類型中選擇一種。

這四個問題應在一則訊息中提出,而非進行面試,並且這些是管道會詢問的唯一問題。其他所有事項均由管道自行決定。

之所以詢問,是因為猜測的成本會在最後階段顯現,且無法在該處補救。一個字數上限嚴格(例如 150 字摘要)的期刊,其規則必須在第六階段或更早執行:到了第 17 階段撰寫摘要時,每個章節所依據的字數預算已無法更改。在起始階段而非第六階段選擇引文風格,意味著整個草稿是在錯誤的標記密度下撰寫的。

如果使用者拒絕回答,或表示「你選」,則使用 references/paper-types.md 中的預設值,將其寫入第六階段的期刊格式區塊,並用一行文字說明使用了哪些預設值。切勿基於未告知使用者的假設繼續進行。

腳本擁有的四件事,您不得插手

語言模型擅長判斷,但不擅長記帳。這種分工是刻意設計的,偏離此分工將導致輸出錯誤。以下每一項都由一個腳本強制執行,若不符合則會以非零退出碼終止,因此這些都不是主觀判斷。

切勿手動撰寫已渲染的引文標記。 不是 [3],也不是 (Smith, 2020)。在起草過程中,您應在提出主張的準確位置內聯寫入 {cite_<doi>}。scripts/citations.py compile 會將這些標記轉換為實際引用,並透過字典查詢生成參考文獻。這是確定性的,因此散文與參考文獻之間的映射是機械性的,而非憑記憶。

切勿為無法支持的論點發明來源。 如果一個論點是真實的,但您找不到來源,請寫下 {cite_MISSING: 對該論點的簡短描述} 並繼續進行。compile 會拒絕渲染此標記,將其命名,並以非零退出碼終止,而 integrity.py 會將其視為嚴重問題,因此它無法出現在完成的論文中。這就是重點:這不是為了讓您將未經證實的論點交付出去,而是為了在起草過程中保持誠實,而不是悄悄刪除該論點或將其附在一個虛構的 DOI 上。在閘門檢查之前,透過使用 sources.py find 找到真實來源,或故意刪除該論點,來清除每個此類標記。

切勿手動將章節合併到草稿中。 scripts/assemble.py 會執行此操作,按數字順序合併,並拒絕將任何非編號章節的內容拼接到論文中。手動合併若遺漏某個章節,這種失敗在讀者發現之前不會被注意到。

切勿憑視覺判斷論文內部是否一致。 scripts/integrity.py 會進行檢查並以非零退出碼終止。請運行它並讀取退出碼。

設定

mkdir -p research sections review

無需 API 密鑰、無需帳戶、無需安裝步驟:這些腳本僅依賴 Python 標準庫。有一個可選的環境變數,並且這是此處任何腳本唯一會讀取的變數。將 OPENDRAFT_CONTACT_EMAIL 設置為您自己的電子郵件地址,sources.py 會將其附加到 User-Agent 中,這會將 Crossref 請求移至禮貌池,並獲得更好的速率限制。如果不設置,每個階段仍可正常運行;沒有內置地址,因為發貨的預設值會將所有安裝者合併為一個身份,並將其速率限制問題路由到陌生人的收件箱。

管道會寫入固定路徑,每個階段會讀取之前階段寫入的內容。這些路徑是階段之間的契約:

research/sources.md        research/sources.json     research/summaries.md
research/gaps.md           research/citations.json   research/citation-notes.md
outline.md                 outline_formatted.md
sections/*.md              full_draft.md             final.md
review/thread.md           review/narrator.md        review/skeptic.md
review/verifier.md         review/referee.md         review/voice.md
review/entropy.md          review/polish.md

關於這些路徑的四條規則,每一條都曾被違反過:

  • sections/ 僅存放論文章節,不存放其他內容。 其中的每個檔案都會被 scripts/assemble.py 拼接到完成的論文中。若將階段報告存放在此處,最終會出現在某人的論文中。報告應放在 review/ 中。
  • research/sources.json 是機器輸入,research/sources.md 是人類閱讀。 第一階段會同時寫入這兩個檔案。citations.py build 讀取的是 JSON 檔案。
  • 切勿手動寫入 research/citations.json。 它由 citations.py build 構建,並且只能透過重新運行 build 來更改。那些腳本無法處理的判斷(例如沒有 DOI 的來源、需要審查的條目、無法轉換為佔位符的提及)應放入 research/citation-notes.md,這是散文格式,永遠不會被腳本讀取。手動編輯資料庫會導致 verified 標誌被翻轉以通過閘門,這會使未解析的 DOI 看起來像已檢查過,最終出現在參考文獻中。
  • 在 9.5 階段之後,full_draft.md 是唯一的草稿。 下游的任何內容都不會再讀取 sections/*.md,因此在組裝後編輯章節檔案不會產生任何效果,並會悄悄丟失編輯內容。

管道

按順序運行。除一個階段外,每個階段都是 agents/ 中的一個檔案:讀取該檔案,執行其指示,寫入其指定的輸出,然後繼續。例外是 9.5 階段,這是一個需要您運行的腳本。即使主題看起來很簡單,也不得跳過任何階段。

#階段代理檔案或腳本寫入內容
1尋找來源agents/01-scout.mdresearch/sources.md, research/sources.json
2閱讀並總結agents/02-scribe.mdresearch/summaries.md
3尋找值得撰寫的知識缺口agents/03-signal.mdresearch/gaps.md
4建立引文資料庫agents/04-citation-manager.mdresearch/citations.json, research/citation-notes.md
5大綱論證agents/05-architect.mdoutline.md
6應用期刊格式與字數預算agents/06-formatter.mdoutline_formatted.md
7撰寫每個章節agents/07-crafter.mdsections/*.md, 附加到 research/gaps.md
8檢查跨章節一致性agents/08-thread.md修正 sections/*.md, review/thread.md
9統一語調agents/09-narrator.md修正 sections/*.md, review/narrator.md
9.5將章節組裝成一份草稿scripts/assemble.pyfull_draft.md
10攻擊論證agents/10-skeptic.mdreview/skeptic.md, 然後修正
11根據來源檢查論點agents/11-verifier.mdreview/verifier.md, 然後修正
12模擬同儕審查agents/12-referee.mdreview/referee.md, 然後修正
13匹配作者語調(可選)agents/13-voice.md修正 full_draft.md, review/voice.md
14變化散文節奏agents/14-entropy.md修正 full_draft.md, review/entropy.md
15語法與最終潤飾agents/15-polish.mdfull_draft.md, review/polish.md
16添加附錄(可選)agents/16-enhancer.mdfull_draft.md
17撰寫摘要agents/17-abstract.md預先附加到 full_draft.md
18撰寫標題agents/18-titlemaker.md預先附加到 full_draft.md

第 7 階段針對每個章節運行一次,而非整個論文。第 10 到 12 階段會產生問題列表;無人應用的問題列表等同於無操作,因此請應用修正並重新運行該階段,直到不再有嚴重問題為止。

第 12 階段有數字依據,而非感覺。當一次新的運行報告零個嚴重問題且總體平均分數至少達到 3.0 分(滿分 5 分),且沒有任何單一維度低於 3 分(除非您在 review/referee.md 中記錄原因)時,即可停止。"足夠好可以寄出"並非停止條件,因為要求模型判斷自己的草稿時,它總會在第三次迭代時認為足夠好。

第 13 階段是唯一一個輸入內容永遠不會由管道產生的階段。它會將草稿與作者自己的散文進行匹配,並從工作目錄中的 samples/ 目錄讀取該散文:兩到三篇先前的論文、章節或長篇文章,格式為 .md 或 .txt。沒有內容會創建該目錄,也沒有內容會要求您提供它,因此從未創建該目錄的運行會乾淨地跳過第 13 階段,這是正常結果而非失敗。如果您希望論文看起來像自己寫的,請在運行前將自己的作品放入該目錄。

第 9.5 階段被編號為半個步驟,因為它是一個腳本而非代理提示,並且為了使十八個代理階段的編號保持不變。它不是可選的。第 1 到 9 階段作用於 sections/*.md;第 10 到 18 階段作用於 full_draft.md;除了以下指令外,沒有其他內容會產生該檔案:

python3 scripts/assemble.py sections -o full_draft.md

它會按數字順序合併章節檔案,拒絕包含任何非編號章節的檔案,並在出現編號間隙、重複編號或空目錄時以非零退出碼終止。使用 --check 可以報告它將執行的操作而不實際寫入。

它還會跳過名稱中包含 report、review、notes、checklist 或 log 的任何編號檔案,這是防止過時的階段報告最終出現在論文中的機制。這是一個檔案名稱啟發式規則,因此有一個明顯的邊緣情況:名為 "Review of the literature" 的真實章節會被跳過,您只會在標準輸出中看到一行 "Skipped",而不是錯誤。請將該章節命名為 related-work 或 literature。請閱讀跳過行;一個在此處消失的章節會靜默消失。 在 full_draft.md 已存在的情況下重新運行需要使用 --force,而 --force 會丟棄第 10 階段及之後對草稿所做的所有編輯,因此僅在您有意從章節重新開始時才重新組裝。

規模

根據要求匹配管道。階段相同;深度不同。

  • 短文,1,500 到 3,000 字。 第 1 到 7 階段,然後是 9.5、10、11、15 階段。十到十五個來源。
  • 完整論文,預設值。 所有十八個階段,加上 9.5。二十五到五十個來源,或者當論文是文獻綜述時,五十個或更多來源,此時其自身的下限(references/paper-types.md)適用。
  • 論文章節或長篇綜述。 所有十八個階段,加上 9.5,來源數量在五十個或更多,並且第 7 階段針對每個子章節而非每個章節運行一次。

第 9.5 階段出現在上述每個列表中。沒有任何規模的論文可以自行組裝。

兩個參考檔案

  • references/paper-types.md 包含每種文件類型的章節骨架、字數預算和來源數量。請在第 5 階段閱讀。
  • references/citation-styles.md 展示所有六種風格的實際編譯輸出,包括文內標記和參考文獻條目,以便您可以根據期刊選擇一種風格並知道其外觀。請在第 6 階段閱讀,並在閘門檢查之前再次閱讀,如果引文渲染方式不符預期。它還說明了編譯器不支援的內容:無卷號、期號或頁碼,無期刊縮寫。如果指導教授要求這些,此處會誠實說明,而不是讓您在事後才發現。

這兩個檔案並非偽裝成參考資料的可選讀物。未閱讀第二個檔案而選擇的風格是憑記憶選擇的風格,而編譯器並未實作您記憶中的 APA 格式。

腳本

python3 scripts/sources.py find "<查詢>" --n 15        # Crossref 加 OpenAlex
python3 scripts/sources.py find "<查詢>" --json        # 機器可讀
python3 scripts/sources.py verify <doi> <doi> ...       # Crossref 加 DataCite

python3 scripts/citations.py build research/sources.json -o research/citations.json
python3 scripts/citations.py verify -d research/citations.json
python3 scripts/citations.py compile full_draft.md -d research/citations.json --style apa -o final.md
python3 scripts/citations.py bibtex -d research/citations.json -o refs.bib

python3 scripts/assemble.py sections -o full_draft.md
python3 scripts/assemble.py sections -o full_draft.md --check

python3 scripts/integrity.py final.md -d research/citations.json --target 8000
python3 scripts/integrity.py final.md -c research/summaries.md   # 建議性數字檢查
python3 scripts/export.py final.md --format docx -o final.docx

每個腳本在失敗時都會以非零退出碼終止。該退出碼就是信號;請讀取它,而不是粗略瀏覽輸出。

sources.py find 在完全無法連接到任何 API 時會以退出碼 1 終止,這與成功連接但未獲得結果不同。agents/01-scout.md 是關於如何讀取該退出碼以及在第一階段停止而非繼續進行的來源下限的權威來源;請在那裡閱讀,而不是信任空結果。

citations.py build 接受第一階段寫入 research/sources.json 的 JSON 陣列,而非 research/sources.md 中的 markdown。將 markdown 檔案作為輸入是錯誤的,它會明確指出。

如果第一輪搜尋結果稀少,請同時搜尋兩三個更具體的子查詢。一份只有五個來源的論文讀起來就像只有五個來源。

驗證,及其證明與未證明的內容

citations.py verify 將每個 DOI 分為四種狀態之一,unknown 永遠不會被靜默地轉換為 absent:

  • resolved. Crossref 或 DataCite 傳回了記錄。引用它。
  • absent. 兩者都返回了 404。刪除它。不要修復它,不要猜測替代 DOI,返回去

…

[此處為截斷內容]

...

Individual skills in this repo

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

getedgehq/agent-evals

Build evals for an AI agent that already does real work. Use when someone asks "how do I know my agent is right", wants to test an agent before trusting it, compare models on cost versus quality, or turn production failures into tests. Walks from first tasks and yes/no verifiers, to isolated environments, to a trace-driven improvement loop.

getedgehq/cli-ux-review

Audit a command-line tool for user-friendliness — clear situation / next-step / options in every output, colour-highlighted runnable commands, no raw jargon, no silent hangs. Invoke for "CLI UX audit", "review my CLI", "is this CLI intuitive", or before any CLI release.

getedgehq/generate-image

Generate images with OpenAI GPT Image 2 via the Codex CLI, billed through the user's ChatGPT Plus subscription (no OpenAI API key, no per-image API cost). Use when the user asks to create, generate, or make an image, picture, illustration, icon, hero graphic, or concept art from a text prompt.

getedgehq/harness-first

Diagnose and fix an unreliable, expensive, or unsafe LLM agent by auditing its harness (golden set, judge, cost caps, data layer, action approvals, tracing) before blaming or swapping the model. Use when someone says an agent is "burning tokens", "hallucinating", "brittle", gives inconsistent answers, asks whether to switch to a cheaper/better model, or wants to ship an agent or prompt change to customers.

getedgehq/http-error-triage

Run before concluding anything from an HTTP error on a third-party API. Separates a real credential/entitlement problem from a CDN or WAF block, a wrong endpoint, or a client-signature ban. Use whenever an API returns 401/403/402/429 and you are about to say "the key is dead", "credits are exhausted", "the plan lacks access", or "we are rate limited".

getedgehq/linkedin-media-prep

Convert, crop, resize, and compress images and videos for optimal LinkedIn upload quality and file size. Use when the user wants to prepare a photo, image, or video for LinkedIn (profile picture, cover photo, post image, article featured image, post video, or video ad), optimize file size for LinkedIn, crop and resize for LinkedIn dimensions, convert HEIC/RAW/PNG/MOV to LinkedIn-ready JPEG or MP4, or mentions LinkedIn media requirements, specs, or limits.

getedgehq/monid

>-

getedgehq/people-search

Find and rank professional people for recruiting, partnerships, sales, or research from user-provided data, public web sources, an authenticated search session, or a connected provider. Use for people discovery, LinkedIn or Sales Navigator search design, profile-list ranking, or provider filter translation.

getedgehq/rocketlist

Turn a CV into a shortlist of live startup roles from Rocketlist's public job board, including adjacent job titles the person would never have searched for, each with its published salary, the evidence for the fit, and a direct apply link. Use for "find roles I would be a strong fit for", career pivots, remote or VC-backed job hunts, and salary-visible role discovery.

getedgehq/security-audit-checklist

Run a comprehensive security audit across application code, cloud infrastructure, containers, CI/CD pipelines, and infrastructure-as-code. Covers privacy compliance, OWASP basics, secret leakage, API security, IAM misconfigurations, storage exposure, Kubernetes hardening, and network security. Use when the user asks to audit, review, or harden app or cloud security, check for secrets, scan for XSS/SQLi, verify security headers, review Terraform/CloudFormation, audit AWS/GCP/Azure configs, or perform any security-focused review.

getedgehq/shadcn-first

>-

getedgehq/skills

Develop or review a branded long-form YouTube channel using Simon Kaiser's public creator-led approach: audience fit, recurring formats, natural brand integration, Time with Brand, and an organic, paid, and Shorts strategy. Use for channel strategy, format briefs, and pilots.

getedgehq/skills

Build a YouTube strategy, evidence-backed idea slate, and title plus thumbnail package using Paddy Galloway's public method. Use when planning a channel, choosing concepts, or preparing a video before filming.

getedgehq/skills

Build or review a buyer-centered strategic narrative using Andy Raskin's public method. Use for sales or investor deck stories, homepage positioning, keynotes, launch narratives, and why-now messaging.

getedgehq/skills

Turn a product URL, launch brief, or approved script into a production-ready launch video. Use for product reveals, feature announcements, SaaS launches, and narrated product films; not for generic explainers or editing existing footage.

getedgehq/strip-image-ai-metadata

Strip C2PA and AI-generation metadata from images (PNG, JPEG, WebP) to remove "Generated by AI" / "ChatGPT" / "DALL-E" labels that platforms like LinkedIn, Instagram, and X display. Use when the user wants to clean AI-generated images before posting, remove AI attribution from photos, strip C2PA manifests, sanitize image metadata for professional use, or verify whether an image contains C2PA data.

getedgehq/top-down-comms

>-

getedgehq/workplan

Create, update, or close work plans for multi-step tasks. Use when starting refactors, bug lists, feature work, migrations, or any task with 2+ steps. Also use after auto-compaction to re-orient. Triggers: "workplan", "work plan", "create a plan", "what's the plan", "where was I", or when Claude detects

相關技能