H繁中版
文件教學與最佳實踐use soul with hermes
<!-- Source: https://hermesbible.com/docs/guides/use-soul-with-hermes -->

SOUL.md 是你的 Hermes 實例的主要身份識別。它是系統提示中的第一個內容——定義了代理人的身份、說話方式以及避免的事項。

如果你希望每次與 Hermes 對話時都感覺像同一個助理,或者你想要用自己的角色完全取代 Hermes 的預設形象,這個檔案就是你要用的。

SOUL.md 的用途

使用 SOUL.md 來設定:

  • 語氣
  • 個性
  • 溝通風格
  • Hermes 應該多直接或多溫和
  • Hermes 在風格上應該避免什麼
  • Hermes 如何面對不確定性、分歧和模糊地帶

簡而言之:

  • SOUL.md 關乎 Hermes 是誰以及 Hermes 如何說話

SOUL.md 不適合用來做什麼

不要用它來設定:

  • 儲存庫特定的編碼規範
  • 檔案路徑
  • 指令
  • 服務連接埠
  • 架構說明
  • 專案工作流程指示

這些內容應該放在 AGENTS.md 中。

一個好的判斷準則:

  • 如果它應該在所有地方通用,就放在 SOUL.md
  • 如果它只屬於某個專案,就放在 AGENTS.md

檔案位置

Hermes 目前只使用全域的 SOUL 檔案:

~/.hermes/SOUL.md

如果你使用自訂的 Hermes 主目錄執行,路徑會變成:

$HERMES_HOME/SOUL.md

首次執行行為

如果尚不存在 SOUL.md,Hermes 會自動為你建立一個預設的入門檔案。

這意味著大多數使用者現在都能從一個真實可讀可編輯的檔案開始。

重要事項:

  • 如果你已經有 SOUL.md,Hermes 不會覆蓋它
  • 如果檔案存在但為空,Hermes 不會從中提取任何內容加入提示

Hermes 如何使用它

當 Hermes 啟動一個會話時,它會從 HERMES_HOME 讀取 SOUL.md,掃描其中的提示注入模式,必要時進行截斷,然後將其作為代理人身份——系統提示中的第一個位置使用。這意味著 SOUL.md 會完全取代內建的預設身份文字。

如果 SOUL.md 缺失、為空或無法載入,Hermes 會回退到內建的預設身份。

檔案周圍不會加入任何包裝文字。內容本身才是重要的——用你希望代理人思考和說話的方式來撰寫。

好的首次編輯

如果你什麼都不想改,至少打開檔案修改幾行,讓它感覺像你自己。

例如:

You are direct, calm, and technically precise.
Prefer substance over politeness theater.
Push back clearly when an idea is weak.
Keep answers compact unless deeper detail is useful.

僅僅這些就能明顯改變 Hermes 的感覺。

風格範例

1. 務實工程師

You are a pragmatic senior engineer.
You care more about correctness and operational reality than sounding impressive.

## Style
- Be direct
- Be concise unless complexity requires depth
- Say when something is a bad idea
- Prefer practical tradeoffs over idealized abstractions

## Avoid
- Sycophancy
- Hype language
- Overexplaining obvious things

2. 研究夥伴

You are a thoughtful research collaborator.
You are curious, honest about uncertainty, and excited by unusual ideas.

## Style
- Explore possibilities without pretending certainty
- Distinguish speculation from evidence
- Ask clarifying questions when the idea space is underspecified
- Prefer conceptual depth over shallow completeness

3. 教師 / 解說者

You are a patient technical teacher.
You care about understanding, not performance.

## Style
- Explain clearly
- Use examples when they help
- Do not assume prior knowledge unless the user signals it
- Build from intuition to details

4. 嚴格審查者

You are a rigorous reviewer.
You are fair, but you do not soften important criticism.

## Style
- Point out weak assumptions directly
- Prioritize correctness over harmony
- Be explicit about risks and tradeoffs
- Prefer blunt clarity to vague diplomacy

什麼是好的 SOUL.md?

好的 SOUL.md 應該是:

  • 穩定的
  • 適用範圍廣泛的
  • 聲音語調明確的
  • 不會用時效性指令過度堆砌的

不好的 SOUL.md 是:

  • 充滿專案細節的
  • 自相矛盾的
  • 試圖微觀管理每個回應形式的
  • 大多是泛泛的填充文字,如「要有幫助」和「要清楚」

Hermes 本來就試著要有幫助且清楚。SOUL.md 應該增添真正的個性和風格,而不是重述顯而易見的預設值。

建議的結構

你不需要標題,但它們會有幫助。

一個簡單有效的結構:

# Identity
Who Hermes is.

# Style
How Hermes should sound.

# Avoid
What Hermes should not do.

# Defaults
How Hermes should behave when ambiguity appears.

SOUL.md vs /personality

這兩者是互補的。

使用 SOUL.md 作為你的持久基底。 使用 /personality 進行臨時的模式切換。

例如:

  • 你的預設 SOUL 是務實且直接的
  • 然後在某個會話中使用 /personality teacher
  • 之後再切換回來,而不需要更改你的基礎語音檔案

SOUL.md vs AGENTS.md

這是最常見的錯誤。

放在 SOUL.md 中

  • 「要直接。」
  • 「避免誇飾用語。」
  • 「除非需要深入說明,否則偏好簡短回答。」
  • 「當使用者說錯時要提出異議。」

放在 AGENTS.md 中

  • 「使用 pytest,不要用 unittest。」
  • 「前端程式碼放在 frontend/。」
  • 「永遠不要直接編輯資料庫遷移檔案。」
  • 「API 運行在連接埠 8000 上。」

如何編輯

nano ~/.hermes/SOUL.md

vim ~/.hermes/SOUL.md

然後重新啟動 Hermes 或開始新的會話。

實用工作流程

  1. 從預設的入門檔案開始
  2. 刪除任何不符合你想要的語音風格的內容
  3. 加入 4-8 行清楚定義語氣和預設行為的文字
  4. 與 Hermes 對話一段時間
  5. 根據仍然感覺不對的地方進行調整

這種迭代方式比試圖一次設計出完美的個性更有效。

故障排除

我編輯了 SOUL.md 但 Hermes 聽起來還是一樣

請檢查:

  • 你編輯的是 ~/.hermes/SOUL.md$HERMES_HOME/SOUL.md
  • 而不是某個儲存庫本地的 SOUL.md
  • 檔案不是空的
  • 編輯後你的會話已重新啟動
  • 沒有 /personality 覆蓋層在主導結果

Hermes 忽略了我 SOUL.md 中的部分內容

可能原因:

  • 更高優先級的指令正在覆蓋它
  • 檔案中包含相互衝突的指引
  • 檔案太長而被截斷
  • 某些文字類似提示注入內容,可能被掃描器攔截或修改

我的 SOUL.md 變得太專案導向了

將專案指令移到 AGENTS.md,讓 SOUL.md 專注於身份和風格。

相關文件



建立 Hermes 外掛