版本 1.008。
頁面文字轉提示詞
目的
這些腳本讀取一個網頁,並將其文案拆分為候選區塊。您撰寫一個簡短的判斷文件;建置過程會將其轉換為每個區塊的提示詞和一個可衡量的範例。僅處理文字:一個公開頁面、桌面版、無需登入、無需繞過驗證碼、不處理圖片中的文字。
需求
- Node 22 或更新版本。無需安裝,無需 API 金鑰。從此技能資料夾中的
dist/執行腳本。 - 從 Shell 具有網路存取權。
規則
- R1. 不要先詢問使用者任何問題。一個網址就足夠了。
- R2. 自己的話語。 您撰寫的任何一行都不能連續重複頁面中的 6 個單詞,忽略大小寫和標點符號(
overlap)。這涵蓋每個欄位和每個範例。 - R3. 不要提及網站品牌:網域名稱、
og:site_name(brand)。不要使用頁面中的任何名稱。 - R4. 使用檔案寫入工具來撰寫
analysis.md和每個輸入檔案,切勿使用 shell 的 heredoc。如果工具拒絕(某些工具會拒絕子代理寫入.md檔案),則以其他名稱撰寫該檔案,然後使用cp複製。 - R5. 切勿手動重製腳本的工作。不要計算單詞或字元數。不要撰寫提示詞。
- R6. 切勿捏造事實。切勿撰寫俄語文字。腳本不會呼叫任何模型。
程序
下列每個路徑都可以指向任何可寫入的位置;work/ 是預設值,而非規則。
- 讀取(腳本)。
node dist/read.mjs <url> --out work/page.json- 選項:
--no-render(僅原始 HTML)、--lang <code>(草稿語言)。 - 結果:在
work/中,會產生brief.md(請閱讀此檔案)、analysis.md(草稿,每個候選區塊有一個標題,並帶有推測的類型)和page.json(供建置使用;請勿開啟)。如果analysis.md已存在,則草稿會寫入analysis.draft.md。 brief.md每個元素一行:類型、字數、狀態(js_only、collapsed、not_in_a11y,或無狀態則為ok)、文字,並按候選區塊bNN分組。[g3#2]表示第g3組的第 2 張卡片。- 時間:5 到 30 秒。渲染會在 45 秒後停止,讀取會繼續從 HTML 進行。
- 失敗時:
REFUSED <code>(退出碼 2):停止並告訴使用者(請參閱拒絕碼)。如果腳本無法執行(沒有 Node 22、沒有 Shell、沒有網路),請用一行告訴使用者,並提供已儲存頁面的替代方案。
- 選項:
- 填寫
work/analysis.md(判斷)。 請參閱下一節。以英文或使用者要求的語言撰寫,並在language:中標示語言代碼。 - 建置(腳本)。
node dist/build.mjs work/page.json work/analysis.md --html work/report.html --md work/page-prompts.md --json work/page-prompts.json- 結果:會產生上述 3 個檔案,並顯示
checks: 5 of 5 passed。範例超出其範圍僅為警告。 - 失敗時:
REFUSED會列出每個問題及其檢查項目:overlap(R2)、brand(R3)、volume(無字數範圍)、variables(未宣告的{name})、blocks(候選區塊缺失、未知或使用了兩次)、schema(缺少欄位或不允許的值),或無法讀取的行。僅修正所列出的行,然後重新執行建置。
- 結果:會產生上述 3 個檔案,並顯示
analysis.md
從 brief.md 取得字數,並在其周圍寫入範圍。省略字元範圍。
language: en
example_product: a fictional booking app for small pilates studios
page_type: SaaS landing
audience: owners of small studios who take bookings by chat
awareness: comparing_solutions
tone: businesslike, warm; formality 2; you
promise: {product} gives {audience} {main_benefit} without {pain}.
logic: result and first step first, proof next, the steps before the prices
threads:
- the promise of no more calls returns in the hero, the steps and the closing call
## p01 hero | Hero | b01
role: say within five seconds what changes for the reader, and offer the first step
- eyebrow | 3-5 | the main change for the reader | No more booking calls
- h1 "Headline" | 7-11 | the result for {audience}, without the product's name | Clients reserve a reformer, and you stay with the class
- button | 2-4 | verb + object, the action {cta_action} | Set up bookings
- risk_line | 5-8 | {risk_remover} | Free to start, cancel at any time
techniques:
- Keep {product}'s name out of the headline; it first appears in the subheadline.
tone: businesslike, warm; you
avoid: "innovative"; a question as the headline
## p07 pricing | Pricing | b07
role: help the reader pick a plan and see the price fits the studio's size
- h2 | 4-8 | the price tied to the reader's size | Pay for the size you are
- 3 x plan "Plan":
- h3 | 1-3 | the studio's size | Single room
- price | 1-3 | {plan_n} | [price] / mo
- items 3 | 2-6 | what is included, most important first | Self-service reservations / Client reminders / Card checkout
techniques:
- Name the plans after the studio's size, not after levels such as basic or pro.
允許的值(建置腳本會拒絕其他值):
awareness:unaware、problem_aware、comparing_solutions、product_aware、ready_to_buy。- 區塊類型:
hero、social_proof_logos、problem、solution、features、benefits、how_it_works、use_cases、testimonials、case_study、stats、comparison、pricing、faq、guarantee、about、team、cta、lead_form、newsletter、other。other需要reason:行。 formality:1 位數字,1 到 5(報告會顯示「N of 5」;不會被拒絕)。language:ISO 代碼;uk會產生烏克蘭語提示詞,其他代碼則產生英語提示詞。page_type:自由文字。- 變數:
product、category、audience、language、pain、pain_n、main_benefit、benefit_n、feature_n、step_n、use_case_n、alternative、objection_n、cta_action;事實risk_remover、outcome_number、customer_count、customer_n、testimonial_n、plan_n、guarantee、deadline。使用vars:作為- name: what goes in來宣告新的變數,並為事實加上[fact]。
必要項目: language、example_product、page_type、audience、awareness、promise、logic;每個區塊需要一個類型、一個名稱、role、1 個或多個元素、1 個或多個技巧。
行格式:
- 元素:
code "Label" | words | must | example。must會成為提示詞的那一行。 - 群組:
N x code "Label":帶有縮排的子項目;範例為 1 張卡片。群組不能嵌套。 - 列表:
items N;使用/分隔範例項目。 - 合併候選區塊:在標題中使用
| b03 b04。捨棄一個:在頂部附近使用drop: b10 <reason>。
最常違反的規則:
- 1 個區塊,1 個任務。省略裝飾性文字(小工具標籤、計數器)。
- 每個候選區塊恰好屬於 1 個區塊或被捨棄。候選區塊不能被拆分。
- 一個非常大的候選區塊(例如一篇 1,400 字的文章,包含許多小節)應保持為 1 個區塊:將其重複的子節撰寫為 1 個群組,例如
5 x section "Section":包含h3和text。使用最接近的類型,或使用other。 - 技巧是指令,而非標籤:不是「使用 PAS」,而是「在第一句指出問題,第二句指出其代價,第三句指出 {product}」。僅描述文字做了什麼。
- 範例是針對 1 個虛構產品的區塊。接近範圍即可。
驗證
- 每個候選區塊都屬於 1 個區塊或被捨棄。
- 最終建置沒有輸出
REFUSED。 -
work/report.html已存在。
顯示報告
- 如果使用者或呼叫者要求不要發布或開啟任何內容,則在
report.html存在時停止,並提供其路徑。 - 否則,如果此會話可以發布 HTML,則發布
report.html;如果不能,則提供其絕對路徑。 - 報告以英文開啟,並提供 EN / UK 切換;
#lang=uk會以烏克蘭語開啟。
聊天摘要
- 區塊數量、骨架、1 或 2 個有用的技巧。
- 重要的可視性注意事項:僅在 JavaScript 之後的文字、折疊的常見問題解答。
- 不要貼出每個提示詞。如果使用者詢問某個區塊,請顯示其提示詞和範例。
- 說一次:區塊和措辭是您的解讀;層次、計數和檢查是腳本的。
拒絕碼
已儲存頁面方案:node dist/read.mjs --file saved.html --url <address> --out work/page.json
| 代碼 | 告訴使用者 |
|---|---|
invalid_url、blocked_scheme、blocked_host、blocked_address | 不是公開的網路地址。 |
unreachable、http_error、blocked | 網站未回應或拒絕自動化讀取工具(blocked:HTTP 401、403 或 429)。提供已儲存頁面方案。 |
challenge | 驗證碼或機器人檢查。不要嘗試繞過;提供已儲存頁面方案。 |
not_html、too_large、empty | 不是可讀取的網頁,或沒有文字(可能是圖片)。 |
refused_ru_domain、refused_ru_hosting、refused_ru_audience、refused_language_ru | 不分析:俄語頁面,或位於俄羅斯域名區域、託管在俄羅斯或具有俄語版本的網站。發行者的決定。 |
參考資料
| 檔案 | 何時閱讀 |
|---|---|
references/block-types.md | 當您不確定區塊類型時。 |
references/variables.md | 當您需要 {variable} 或新增一個時。 |
references/analysis-schema.md | 當您需要完整格式或 JSON 形式時。 |