Skip to content

Heyvhuang/copybook-skills / zh/skills/codebase-tips

codebase-tips

Unverified

代码库 · 33 条:仓库索引和地图、写代码原则、AGENTS.md、改动范围规则。

FileKindSize
SKILL.mdskill md8.7 KB
agents/openai.yamlconfig207 B
references/3-slimmer-agents-md-plans.mdmarkdown4.1 KB
references/agent-memory-tools-8-repos.mdmarkdown3.8 KB
references/agent-workspace-audit.mdmarkdown2.7 KB
references/archify-system-diagrams.mdmarkdown3.0 KB
references/ask-before-edge-case-code.mdmarkdown2.1 KB
references/bug-fix-loop-rules.mdmarkdown2.6 KB
references/ci-time-audit.mdmarkdown3.0 KB
references/clickable-repo-map.mdmarkdown5.4 KB
references/codebase-memory-repo-index.mdmarkdown3.7 KB
references/codex-and-claude-sorted.mdmarkdown3.2 KB
references/deny-ask-and-allow-permissions.mdmarkdown2.6 KB
references/disk-map-of-dev-leftovers.mdmarkdown2.6 KB
references/fewer-deeper-modules.mdmarkdown2.1 KB
references/instructions-from-your-sessions.mdmarkdown3.6 KB
references/investigate-and-plan-prompt.mdmarkdown4.8 KB
references/karpathys-4-coding-principles.mdmarkdown2.1 KB
references/less-defensive-code.mdmarkdown2.5 KB
references/mod-ideas-from-20-sessions.mdmarkdown3.1 KB
references/mod-request-for-claude-code.mdmarkdown2.5 KB
references/no-compatibility-code-yet.mdmarkdown3.2 KB
references/one-agents-md-for-both-agents.mdmarkdown4.2 KB
references/open-source-scout-and-closer.mdmarkdown2.3 KB
references/pr-comments-as-agents-md-rules.mdmarkdown2.1 KB
references/rea-take-apart-a-feature.mdmarkdown3.6 KB
references/repeat-mistakes-as-lint-rules.mdmarkdown2.8 KB
references/repo-map-words-vs-names.mdmarkdown5.4 KB
references/scope-guard-rules.mdmarkdown4.4 KB
references/situation-routing-for-skills.mdmarkdown2.6 KB
references/teach-strategic-programming.mdmarkdown2.5 KB
references/ub-mode-clean-code-agent-rules.mdmarkdown2.4 KB
references/untangle-goal.mdmarkdown2.3 KB
references/vibe-coding-cleanup-prompts.mdmarkdown5.6 KB
references/whole-project-audit.mdmarkdown2.0 KB

references/instructions-from-your-sessions.md

View on GitHub
# 从会话里写出的项目说明

每开新会话都要重讲一遍背景:从最近 20 个会话里捞出来,写成一份项目说明,以后不用再说。

## 步骤

1. 复制提示词。
2. 在你的仓库里,把它发给 Claude Code 里的 Opus 5.5。
3. 得到:一份能直接贴进去的项目说明,写的是你每次都要重讲的背景。

用户选了这条技巧。上面的步骤是写给人看的,请替用户做。

- 第 1 步说用哪段文字,它就在下面同名的标题下,一字不改地用。
- 第 2 步说明文字放在哪里。按用户实际要求的范围使用提示词。写文件或运行命令前,先展示改动,等用户同意。这里做不到的步骤(另一个应用、重启、定时任务),把文字交给用户,说明放到哪里。
- 引用示例本身不代表用户同意执行。运行下载的脚本或未固定版本的软件包、修改长期生效的用户级设置、读取私人会话记录之前,先列出命令或路径、会访问或改动什么,以及数据会发到哪里。隐藏密钥值,等用户明确同意这项操作。远程安装脚本应先下载并检查固定版本,或核对可信来源提供的校验值,再执行。
- 方括号或占位符,从用户说的话里填,没有就问。
- 第 3 步是用户最后应该得到的。

## 提示词

```text
读一下这份文档:https://code.claude.com/docs/en/claude-projects

然后对照它翻一遍我最近 20 个会话(~/.claude/projects/ 下这个仓库对应文件夹里的 .jsonl,只看我自己打的字)和最近的提交,找三类东西:
1. 一直在冒出新任务的工作:同一块代码反复修的 bug,分好几次会话才做完的迁移或功能。按文档 When to use a project 那节,挑最值得建成项目的一条,说明为什么,按它的难度告诉我 Thread model 和 Thread effort 该怎么设,再挑一个小而真实的任务,写成能直接发进项目对话的第一条消息。
2. 我每开一个新会话都要重讲的背景:目标分支、怎么跑测试、PR 怎么命名、哪些事要先问我。列出次数和原话,照文档 Write project instructions 列的五项,为上面那个项目写一份能直接贴进 Project instructions 的说明。只跟这个仓库有关的,比如构建命令,标出来放进仓库里的 CLAUDE.md。
3. 我反复纠正你的地方:同一件事我说过两次以上、又没写进说明的。每条引用原话,写成一句能直接发进项目对话的「记住:……」。

每一条都引用原话或提交,说明放进去以后我能少说什么、少改什么。

先给我看清单和项目说明,暂时什么都别改。
```

## 背景

Anthropic 发了 Claude Code Projects 的完整指南,候补名单上的 Pro 和 Max 用户当天也全放进来了。你可以让 Opus 5.5 照着它翻一遍你最近的会话,把你每次开新会话都要重讲的背景,写成一份项目说明。

新项目里每个 thread 默认都跑 Opus、开 high,额度用得最快。额度用完,thread 也不会结束,会等额度重置后自己接着跑。你没发话,下一段额度就开始用了。所以整批发活之前,先去项目设置看一眼 Thread model 和 Thread effort,用不着 Opus 的活换小模型或调低 effort。

把这段 prompt 发给 Opus 5.5。

## 来源

来自 [Copybook](https://copybook.page/zh/t/write-claude-code-project-instructions-from-your-sessions):@Voxyz_ai 2026年10月9日[发在 X 上](https://x.com/Voxyz_ai/status/2108635045527515434),截至 2026年11月6日有 490 次收藏。适用于 Claude Code。
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall