首頁 / Skills / 開發提效 / Caveman 簡潔回答
開發提效

Caveman 簡潔回答

Julius BrusseeApache-2.0Skill 語言: 英文
授權已核對不含腳本
演示真實執行紀錄 · claude-opus-5-5 · 2026年10月
Talk like caveman from now on. My Node.js API returns `Error: connect ECONNREFUSED 127.0.0.1:5432` on startup inside Docker Compose, but Postgres runs fine and I can connect to it from my laptop with psql. What is wrong and how do I fix it?
Skill: caveman

127.0.0.1 inside API container means the API container itself, not Postgres. Postgres runs in its own container. From inside Docker Compose, reach it by its service name. Your laptop works because the port is published to the host's localhost.

Fix: point the host at the Compose service name.

services:
  db:
    image: postgres:16
    environment:
      POSTGRES_PASSWORD: secret
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 2s
      retries: 15
  api:
    build: .
    environment:
      DATABASE_URL: postgres://postgres:secret@db:5432/postgres
    depends_on:
      db:
        condition: service_healthy

Use db (your service name) as the host, in DATABASE_URL or PGHOST. Don't hardcode localhost in code.

The healthcheck plus condition: service_healthy is a second fix. Plain depends_on only waits for the container to start, not for Postgres to accept connections. Without the healthcheck you can still get ECONNREFUSED on cold start, even with the right host.

Other causes to check:

  • API runs on the host, not in Compose: localhost:5432 is correct there. Make sure ports: ["5432:5432"] is set on db.
  • API in a different Compose project or network: put both on a shared network, or use host.docker.internal:5432.
  • Postgres listening only on a unix socket: the official image already listens on *. Only custom configs need listen_addresses = '*'.

Check the connection from inside the API container: docker compose exec api sh -c 'nc -zv db 5432'.

Real run recorded with claude-code / claude-opus-5-5. Output is shown verbatim, unmodified.

它做什麼

為程式設計代理設定精簡的回答風格:開門見山先給答案,省去寒暄、含糊措辭、重述與結尾的客套。程式碼、指令、檔案路徑、數字與錯誤訊息原文一律不改。

運作方式

  1. 輸入 /caveman,或說 "talk like caveman"、"be brief"、"less tokens" 時啟用,直到你說 "stop caveman" 或 "normal mode" 才關閉。
  2. 遵循九條規則:先答後述、不講客套、用短詞、冠詞可省但否定詞絕不省、一句只說一件事、技術內容逐字保留、呼叫工具時少說話、使用使用者的語言回答、不刻意扮演「原始人」。
  3. 遇到安全警告、無法復原的操作、分步驟說明、使用者感到困惑,以及要寫進程式碼、提交訊息、文件等對話以外的內容時,自動切回一般表達。

適合情境

在終端機裡日常寫程式,希望回答更短、更直接。

需要了解

作者自己的測量(單次執行、10 個問題)顯示,回答長度的中位數只比直接要求模型「簡潔回答」短約 3%。請把它當成讓回答更直接的風格,而不是大幅節省 token 的工具。/ultracave、/megacave 模式與狀態列標示屬於完整的 Caveman 外掛,不在此壓縮檔內。

說明與風險

純指令檔:沒有腳本、不連網、不寫入檔案。 壓縮檔中另附原始儲存庫的 README、LICENSE 與 NOTICE。 指令中提到的 /caveman ultra、/caveman wenyan、/caveman status 依賴 Caveman 的其他 Skill 或 hook,本套件未包含。

SKILL.md 原文套件內共 4 個檔案