Community寫作與編輯github.com

magnus919/agent-skills

精選的 AI 代理技能集合,適用於 Hermes 及其他代理框架

agent-skills 是什麼?

此技能集提供一個專為 AI 代理設計的 HubSpot CRM 操作介面,透過 `crm-cli` 命令列工具安全地讀取與更新聯絡人、交易與管線資料。其核心合約強調「先讀後寫」:在進行任何變更前,必須先進行唯讀探索,取得明確的人工指令,並使用 `--dry-run` 預覽與 `--yes` 確認。支援的代理平台包括 Hermes、Claude Code、Cursor 及 Codex 等,只要它們能執行本機 Shell 命令並設定正確的 `HUBSPOT_TOKEN` 環境變數即可。技能內建完整的驗證邊界與硬性限制,防止不當的資料傾倒或未經授權的變更,確保 AI 代理在高風險的 CRM 操作中保持謹慎與可靠。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add magnus919/agent-skills

Installed? Explore more 寫作與編輯 skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

在你喜歡的 AI 中提問

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

說明文件

HubSpot CRM 操作

使用此技能,透過 HubSpot CRM v3 API 讀取,並在取得明確確認後更新 HubSpot CRM 資料:聯絡人記錄、聯絡人搜尋、交易管線檢視以及交易階段變更。這是一個針對單一 CRM 供應商 (HubSpot) 的工具技能。構建 HubSpot 應用程式或工作流程屬於應用程式開發;此技能負責日常代理工作流程:回答「此聯絡人是誰?」、「管線中有什麼?」以及執行已確認的階段變更。

操作合約

  1. 任何變更前必須先進行唯讀探索。 可自由列出與搜尋聯絡人、檢視交易與管線。隨附的 crm-cli 指令碼僅進行讀取,不會寫入任何資料。
  2. 在執行前確認目標、範圍與復原路徑。 將交易移至新階段會更改共用管線,影響收入報表讀取:這需要明確的人員指令,指明交易名稱與目標階段,並透過 crm-cli 執行 --dry-run 預覽與 --yes 確認。階段移動是可逆的,但會留下稽核歷史記錄 — 請在執行前確認。
  3. 尊重有邊界的讀取。 HubSpot 會對頁面施加 limit 限制;切勿翻頁超過任務所需的範圍。crm-cli --limit 會限制所有列出與搜尋操作。
  4. 保持證據簡潔。 引用簡短的名稱、電子郵件、金額與階段標籤;切勿將完整記錄、權杖或原始負載傾倒至聊天中。
  5. 了解物件模型。 聯絡人與交易是具有屬性對應的獨立物件;階段轉換必須使用交易管線中的階段 ID(來自 pipelines list),而非階段標籤。

crm-cli 指令碼

scripts/crm-cli 是一個以代理為優先、僅使用標準程式庫的命令列介面,適用於 HubSpot CRM v3 API。它涵蓋完整的問題範圍:記錄、搜尋與管線檢視。

crm/scripts/crm-cli --help                                # 不需要 token 或網路連線
crm/scripts/crm-cli --json --limit 20 contacts list
crm/scripts/crm-cli --json contacts get --id 51
crm/scripts/crm-cli --json contacts search --query "ada"
crm/scripts/crm-cli --json --limit 20 deals list
crm/scripts/crm-cli --json deals list --pipeline default --stage appointmentscheduled
crm/scripts/crm-cli --json pipelines list
crm/scripts/crm-cli deals update-stage --id 901 --stage closedwon --dry-run   # 預覽
crm/scripts/crm-cli deals update-stage --id 901 --stage closedwon --yes       # 已確認

結束代碼:0 成功,1 API 錯誤或檢查失敗,2 使用錯誤。階段變更有保護機制:若未使用 --dry-run 或 --yes,指令碼會以結束代碼 1 拒絕執行,且絕不呼叫 API。讀取操作受 --limit 限制(預設 20,最大 100)。

操作迴圈

  1. 界定問題範圍:這是查詢(CRM 中的人是誰/有什麼)還是變更(移動交易)?使用 contacts search/contacts list 或 deals list 定位物件。
  2. 有邊界地讀取:使用 contacts get 取得單一記錄,使用 deals list 取得管線檢視(可選地按管線與階段篩選),使用 pipelines list 將階段標籤解析為 ID。
  3. 分類答案:將問題對應到證據(聯絡人詳細資料、交易金額/階段、管線分佈)。
  4. 經確認後執行:僅在人員指示進行變更時,先以 --dry-run 預覽,再以 --yes 確認。
  5. 驗證:重新讀取交易(deals list --stage <target>)並確認階段已移動。

記錄、搜尋、管線檢視

  • 聯絡人記錄 (/objects/contacts):列出(GET)或擷取單一記錄(GET by ID);CLI 會摘要顯示名字/姓氏、電子郵件、公司與建立日期。搜尋(POST /objects/contacts/search)依查詢文字尋找聯絡人,受 --limit 限制。
  • 交易管線檢視 (/objects/deals):列出交易,包含金額、管線與階段,可選擇性地篩選至單一管線或階段。pipelines list (/pipelines/deals) 回傳管線及其階段 ID 與標籤 — 篩選或更新時請使用階段 ID。
  • 階段變更 (PATCH /objects/deals/{id}):一個受保護的變更操作,用於設定 dealstage 屬性。使用 --dry-run 預覽目標階段,使用 --yes 確認,並透過後續讀取驗證。僅階段移動在範圍內;其他交易屬性編輯屬於應用程式工作。

存取模型

  • HubSpot 私有應用程式存取權杖 (pat_...) 按物件與讀寫範圍區分。讀取需要 crm.objects.contacts.read 與 crm.objects.deals.read;階段更新需要 crm.objects.deals.write。
  • 記錄攜帶一個 properties 對應,其鍵為屬性名稱(例如 dealstage、dealname、amount)。屬性值為字串;CLI 會摘要顯示此技能使用的欄位。
  • 權杖是憑證:請儲存在 HUBSPOT_TOKEN 中,絕不可寫入程式碼、聊天記錄或提交記錄。若權杖外洩,請在私有應用程式設定中輪換。

參考資料路由

載入時機參考資料
來源、範圍表格、重新整理程序references/00-source-index.md
端點、分頁、物件模型、階段更新、錯誤references/01-hubspot-crm-operations.md

內含的成品

  • scripts/crm-cli:有邊界的、僅使用標準程式庫的 CLI(聯絡人列出/取得/搜尋、交易列出/更新階段、管線列出;--json;--limit;變更操作由 --dry-run/--yes 保護)。
  • tests/test_crm_cli.py:13 個針對 HubSpot API 樁的確定性測試,包括變更保護與唯讀合約。
  • references/:包含日期的來源索引 + HubSpot CRM 操作參考資料。
  • evals/evals.json:六個針對代理執行的輸出品質評估案例。

驗證邊界

宣稱最低證據
聯絡人存在crm-cli contacts search --query ... --json 或 contacts get 回傳記錄
管線檢視準確crm-cli deals list --json 回傳含階段 ID 與已套用篩選條件的交易
階段標籤對應到 IDcrm-cli pipelines list --json 回傳管線階段對應
階段變更已生效crm-cli deals update-stage --yes 結束代碼為 0,且後續 deals list --stage 顯示該交易
變更操作可安全執行crm-cli deals update-stage --dry-run 列印出確切的交易 + 目標階段

硬性邊界

  • 未經人員指示、--dry-run 預覽與 --yes 確認,絕不移動交易 — 管線變更會影響收入報表與稽核歷史記錄。
  • 當權杖可能缺乏物件範圍時,絕不能宣稱記錄不存在;請先檢查存取模型。
  • 絕不翻頁超過 --limit;絕不將完整記錄、權杖或原始負載傾倒至聊天中。
  • 此技能操作 HubSpot CRM API。它不會構建 HubSpot 應用程式,也不涵蓋其他 CRM。

不應使用的情境

  • 構建 HubSpot 應用程式、工作流程自動化或自訂物件 — 這是 HubSpot 應用程式開發;請參閱 backend-engineering 了解服務設計。
  • HubSpot 中的行銷、序列與電子郵件自動化 — 這是 HubSpot 行銷表面,不屬於此技能涵蓋的 CRM API。
  • 其他 CRM (Salesforce、Pipedrive、Zoho) — 每個都有各自的 API 與工具;此技能僅涵蓋 HubSpot。
  • CRM 策略、銷售流程設計或管線方法論 — 這是組織/策略工作,非 API 操作。

Individual skills in this repo

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

magnus919/agent-skills

>- Use this skill to run BMad (Breakthrough Method of Agile AI-Driven Development) as a harness-agnostic control-plane protocol that turns human intent into bounded, inspectable, resumable agent work. Compress intent into a five-field contract (Why, Capabilities, Constraints, Non-goals, Success signal); classify work as direct/bounded/initiative and route to the smallest safe path; carry decisions in durable artifacts; review as triage; route failure to the layer where ambiguity entered; and gate autonomy on observable acceptance with machine-readable status (draft/ready-for-dev/in-progress/in-review/done/blocked). Use when a change request, feature, delegated build, or multi-agent epic needs intent capture, bounded implementation, review, and resumability in any agent harness. Do not use for validating whether a problem is real (product-discovery), shaping bets before planning (product-shaping), formal spec/gate pipelines (spec-driven-development), or the issue-to-PR delivery flow (neckbeard).

magnus919/agent-skills

>- Design and build waiting-list portals for anticipated goods or services: classify whether the experience needs interest capture, verified early access, referral growth, a virtual waiting room, appointment backfill, or scarce-item allocation; choose a reversible architecture; and define the state machine, abuse controls, consent and email lifecycle, fairness, observability, and release gates. Optionally validate supplied email and phone contacts with expiring magic links or provider-managed verification, then feed eligible, consented records to a runtime-configured CRM adapter. Use for prelaunch signups, beta access, launches, bookings, reservations, traffic-spike queues, and premium or cinematic campaign experiences. Do not use for generic landing-page copy, ordinary CRM or email operations, or checkout and inventory systems in isolation; route those parts to the appropriate specialist skill.

相關技能