Claude Code 專案記憶檔 CLAUDE.md 產生器:用一次設定省下每次重講
讓 Claude Code 掃描你的 repo,產出一份精煉、可驗證、200 行內的 CLAUDE.md 專案記憶檔——含 build/test/lint 指令、目錄結構、慣例、禁止事項,並把不該塞進來的東西改放到 skills 或 path-scoped rules。
每次開新 session 都要重講一次 build 指令、目錄在哪、什麼不能碰?這支 meta-prompt 讓 Claude Code 自己掃 repo,產出一份精煉到 200 行內、每一條都能驗證的 CLAUDE.md,從此 Claude 一進來就懂你的專案。
[ Log in to see the full prompt ]Sign up free to see the full prompt, copy it, save it, and join the discussion. Free content unlocks on login; Pro content is a separate subscription.
【何時用】導入 Claude Code 到一個既有 repo 的第一件事,或你發現每次開新 session 都在重講同樣的 build 指令/目錄/禁區時。【為何有效】(1) 它逼模型先「掃 repo 找真實指令」再下筆,避免它憑記憶寫 npm test 結果你專案是 pnpm;(2) 三段式 DISCOVER→TRIAGE→WRITE 把『該進 CLAUDE.md vs 該進 rules/ vs 該進 skill』分清楚,這正是官方建議——CLAUDE.md 只放每次都要的事實,多步驟流程放 skill,只對某類檔案生效的規則放 .claude/rules/ 並用 paths frontmatter 限定;(3) 強制 200 行上限與『每條都可驗證』,因為 CLAUDE.md 越長、adherence 越差。【技巧】跑完先別急著用,翻一遍 Do NOT 段落確認它沒幻想出不存在的禁區;之後可隨時用 /init 做互動式重整、用 /memory 確認檔案有被載入。若已有 AGENTS.md,prompt 會自動改用 @AGENTS.md import 而非重複寫一份。
# CLAUDE.md — LUVAI 股票分析後端 ## Commands - Install: `pnpm install` - Dev: `pnpm dev` - Typecheck (run before declaring done): `pnpm tsc --noEmit` - Test: `pnpm vitest run` # CI uses this exact command - Deploy: `pnpm run deploy` # wrangler; ask before running ## Project layout - `src/routes/` — API route handlers - `src/lib/` — shared logic (credits, entitlements) - `migrations/` — D1 SQL, append-only, numbered ## Do NOT - Never edit files under `.open-next/` (generated) - Never run a migration without confirming with the user first - Never use `POWER()` in D1 SQL — use `EXP(LN(x)*y)` ## Workflow 1. Make the change 2. `pnpm tsc --noEmit` must pass 3. Summarize what changed before committing --- not placed in CLAUDE.md --- - Multi-step deploy verification → move to .claude/skills/deploy/ - API input-validation rules → .claude/rules/api.md (paths: src/routes/**)
Suno Engineer's Mindset: 4 Steps to a Song That Doesn't Sound Like AI
A studio engineer's breakdown of Suno's fatal weaknesses (fried vocals, high-frequency artifacts), plus a 4-step DAW workflow and a Suno Studio cleanup prompt.
5 Claude Weekly Workflows That Stuck After 6 Months
Proposal generator / meeting processor / content repurposer / Friday review / shutdown reset — out of 40 I tried, only these 5 survived, each saving 30+ minutes per run.