跟讀練習: Can Cursor's HARDCORE Review Skill Stop The Slop? - 通過影片學習英語口語
選擇練習模式
每種模式都會開啟全屏練習室。
230 句
如果句子過短或過長,請點選 Edit 進行調整。
1
Automated code review is one of the most impactful ways that you can improve the code quality coming out of your agent.
2
I've known this for a while, but it's taking me a while to kind of implement it
3
and figure out a reusable skill that I can give to people to review their code.
4
I've got this review skill here in my skills repo, which is currently sitting at 109,000 stars,
5
and it is currently marked as in progress.
6
I'm sort of okay with it, but I'm not terribly happy with it.
7
So I've been looking around for inspiration in other skills that I can copy from, steal ideas from, and one crossed my path that I want to show you.
8
It is this one from the Cursed team.
9
It is the Thermonuclear Code Quality Review.
10
Use this skill for an unusually strict review focused on implementation quality, maintainability, abstraction quality and codebase health.
11
And one thing I think is notable about this skill is how ambitious it asks the reviewer to be.
12
asking it to be very ambitious and look for code judo moves throughout the review.
13
The skill itself is simply one file.
14
It's just a skill.md up here.
15
And what I thought I'd do is I would copy it to my local system, try it out on some actual code of mine, and see what it comes up with.
16
Yesterday, I spent a lot of time working on Sandcastle, my open source software factory.
17
And so I figure I would review the last X number of commits and see what it thought about them.
18
So I'm going to be pretty loose here.
19
I'm just going to say thermonuclear code quality review.
20
Review the last five PRs that made it to main.
21
I'm going to stick it on auto mode and
22
while it's doing this let's go and actually read the skill because that should explain the skill a bit more.
23
So it starts from this baseline.
24
Perform a deep code quality audit of the current branch's changes.
25
Rethink how to structure implement the changes to meaningfully improve code quality without impacting behavior.
26
Work to improve abstractions, modularity, reduce spaghetti code.
27
Improve succinctness and legibility. Be ambitious.
28
If there is a clear path to improving the implementation that involves restructuring some of the code base, go for it.
29
Be extremely thorough and rigorous.
30
Measure twice, cut once.
31
What I've often found with review skills like this is that the agent is not ambitious enough.
32
If you pass an agent a diff, then it will usually treat that diff as its bounds within which it can work.
33
Whereas this prompt appears to be going beyond that.
34
It's essentially saying look throughout the entire code base for opportunities, but starting from this current branch's changes.
35
It also goes on to add a bunch of non-negotiable additional standards.
36
Be ambitious about structural simplification.
37
Again, the ambition.
38
Do not let a PR push a file from under 1K lines to over 1K lines without a very strong reason.
39
This is really interesting.
40
I've actually reached this conclusion myself as well large files are just quite hard for agents to navigate
41
because they need to ingest the entire file into their context
42
window in order to find the thing that's actually useful within it.
43
A much better way to structure that is to split them into multiple files
44
and let the file name of the file be the context pointer
45
that tells it what's in that file and whether it might need to open it.
46
This ends up being a lot more context efficient.
47
I have generally split my files if if they go over 5K tokens, but this 1K lines is sort of, I guess, a similar rubric.
48
Do not allow random spaghetti growth in existing code.
49
Okay, I see, It's sort of arguing against nesting here.
50
If a change adds weird if statements in random places, treat that as a design problem, not a stylistic knit.
51
Prefer pushing the logic into a dedicated abstraction helper state machine policy object or separate module instead of tangling an existing path.
52
Interesting.
53
This is another way of telling it to be aggressive about, you know, if there's a bunch of nested if statements and weird conditionals,
54
maybe abstract that into a cleaner abstraction or a helper or something.
55
It's arguable whether I prefer that.
56
I suppose sometimes I do, sometimes I don't.
57
But let's assume it's a good thing for now.
58
Bias towards cleaning the design, not just accepting working code.
59
Again, pushing it to be ambitious.
60
Prefer direct, boring, maintainable code of a hacky and magical code.
61
This is like a classic one in these prompts.
62
This comes from, I think, Simplify in Claude Code.
63
Not the same wording, I think, but a similar idea that you want simple, direct code that's easy to read.
64
I really like this one, actually.
65
Push hard on type and boundary cleanliness when they affect maintainability.
66
So we're specifically talking about types here.
67
Question unnecessary optionality, unknown, any, or cast heavy code when a clearer type boundary could exist.
68
This is kind of TypeScript focused here.
69
Unknown and any are specifically TypeScript terms.
70
And the unnecessary optionality is one that always gets me.
71
Whenever an agent adds a prop onto a React component, let's say, it always adds it as optional.
72
I don't know why.
73
I don't know why.
74
It's so stupid.
75
Even when it's always required, it will add it as optional just to make it backwards compatible or something, or to lessen the blast radius of the change.
76
So yeah, question unnecessary optionality is a great one.
77
Keep logic in the canonical layer and reuse existing helpers.
78
Prefer existing canonical utilities and helpers over bespoke one-offs.
79
Yes, I suppose it's basically just telling it to look for
80
places where this has already been solved in the code base and use those instead.
81
Makes sense.
82
Treat unnecessary sequential orchestration and non-atomic updates as design smells when the cleaner structure is obvious.
83
If independent work is serialized for no good reason, ask whether the flow should run in parallel instead.
84
I see.
85
This is about performance, essentially.
86
Obviously, when two things that are independent, if they run in parallel, then it's going to be faster than if they run sequentially.
87
So that's kind of what it's going for here.
88
But it's also saying do not over-index on micro-optimizations.
89
Okay, so it's basically telling it don't go too far.
90
I think if this was my skill, I would definitely rewrite this to be a lot more direct.
91
Treat unnecessary sequential orchestration, non-atomic updates as design smells.
92
That's just word salad to me.
93
I don't know what that means.
94
So this is really cool.
95
Primer review questions.
96
For every meaningful change, ask, is there a code judo move that would make this dramatically simpler?
97
That's great.
98
I love that.
99
Can this be reframed so that fewer concepts, branch or helper layers are needed?
100
Lovely.
101
I don't love this.
102
Does this improve or worsen the local architecture?
103
You've got to say exactly what good
104
and bad looks like to an agent in order for improve or worsen to mean anything.
105
Overall, this set of questions, along with the kind of rules above, give the agent a nice kind of way in to talking about the code, which is what you need.
106
And now it talks about really bad stuff.
107
Escalate findings when you see a complicated implementation where a cleaner reframing could delete whole categories of complexity.
108
Refactors that move code around but fail to reduce the number of concepts a reader must hold in their head.
109
Yeah, there's a bit of repetition going on here unnecessary casts, any unknown or optional params.
110
What sort of scares me about these big review-based prompts is
111
that this is a huge ball of mud for the agent to read.
112
Like, there's a lot of instructions in here, and it's hard to know what to prioritize for the agent.
113
So I don't know.
114
This makes me a little bit nervous.
115
I do like this, though.
116
When you identify a code quality problem, perverse suggestions like delete a whole layer of indirection rather than polishing it.
117
Again, ambition.
118
Split a large file into smaller focused modules.
119
Again, you know, making things easier to navigate for the agent.
120
Again, duplication.
121
Make type boundaries more explicit so the control flow gets simpler.
122
There's a lot of duplication throughout a lot of this.
123
This could be cut down, I think, quite a lot.
124
Review tone.
125
I don't know why this is here.
126
This is just sort of saying choose your tone, I suppose.
127
Be direct, serious, and demanding about quality.
128
Do not be rude.
129
This seems like a crazy thing to add to a skill.
130
I don't know why that's here.
131
What this does do is it does really punch the language that the agent should be using.
132
So we're really emphasizing code judo, saying decompose, pushes the file past, makes the surrounding code more spaghetti.
133
I like that.
134
But the down we can say output expectations.
135
Right.
136
This is nice.
137
It's saying to prioritize findings in this order.
138
It's saying to float the important stuff to the top and legibility and maintainability concerns are at the bottom.
139
Structural code quality regressions right at the top.
140
Right.
141
And it is asking for an approval here.
142
So it's approving or rejecting the PR.
143
And again, tons and tons of repetition here.
144
This skill could be a lot shorter.
145
So what we have is a large block of text that basically says be more ambitious.
146
Here are some specific things that you can focus on in your review.
147
Really go nuts here and propose a ton of structural changes.
148
Make sure that you prioritize your findings in a certain order so you don't flood it with useless crap.
149
And then approve or reject based on these conditions.
150
What I don't like here is there's no mention of testing.
151
There's no mention of scenes.
152
There's no mention of any kind of improving the feedback loops to make future runs better,
153
which in my view is the entire point now of having a good code base
154
or having a code base that's easy to change and modular and easy to navigate.
155
All of this appears to be focused on actual source code, none of it on tests.
156
Interesting.
157
But okay, let's read what it said here.
158
So it's taken the last five PRs to main and it has found some blocker class structural issues.
159
Okay, it's found that an init service is now a big file, so it's over 1,000 lines and it mixes a bunch of stuff here
160
and it should have been preceded by a split and it's proposed a nice split there.
161
Oh, it's also trying to create an abstraction here,
162
a little make registry generic function returning this would delete 20 lines of duplicated boilerplate at the same time.
163
Feels good.
164
That's nice.
165
So we now go to the next one, the feature specific if issue tracker name custom scattered across three layers.
166
Interesting.
167
It's basically saying that instead of this being a special case if statement here, we should instead do a bit of code judo
168
and push the custom tracker variations into a type itself and then it can be read later.
169
I think in terms of suggestions here, I happen to know this code quite well.
170
I think we are at two out of two here.
171
That seems like two really good suggestions.
172
Down here we have an inconsistent contract.
173
Template args carries both shell commands and prose markers.
174
It's basically saying that some of these are runnable but some of these are not runnable here.
175
And it's saying that maybe we should widen the type to either a command
176
or a to-do marker discriminated union or use a different field entirely for unfilled markers.
177
So basically, it's basically trying to strengthen the type boundary here
178
so that we don't later pass in a prose marker into something else.
179
That's interesting.
180
I think that this comes from an inaccurate understanding of the whole system, which is okay.
181
You're going to get some false positives, I suppose, to the false positive in any review prompt.
182
So this is the kind of thing, if it came up in a PR, I would say, this is fine.
183
Don't worry about it.
184
So two out of three, not bad.
185
Let's look at the strong code quality issues.
186
Aha, we do have a weird bug here that it's, well not a bug, just a weird bit of code design.
187
We essentially have different templates in Sandcastle that each declare the dependencies that they need.
188
And mostly they declare Zod as their dependency.
189
So we have this weird code path in here that looks like it just hardcodes Zod.
190
And then, interesting.
191
Yeah, overall this is quite hard to explain, but it's definitely pulled up something weird here.
192
So I think we're at three out of four, which is good.
193
Oh, it's found some swallowed errors here.
194
Exact sync inside effect.sync with swallowed errors.
195
Interesting.
196
We can see it's trying something inside here.
197
And if it fails, then it just like returns false inside here.
198
So yeah, this is definitely another thing that I would like the reviewer to look at.
199
Looks like we started decomposing a large file into small files, but only half finished.
200
So this again is a good one.
201
This is five out of six so far.
202
And it's now saying there is a bit of prompt duplication within some prompts that were changed here.
203
So the change is byte identical for two different prompts here.
204
It's saying that we should refactor those into an issue list preamble.
205
I don't think that's right.
206
I think that prompts should just be independently changeable.
207
So not bad though.
208
Five out of seven.
209
Then it's got a list of smaller items worth fixing here.
210
I've done a quick scan and I would say most of those look pretty good and interesting.
211
I'm kind of intrigued by the approval bar here.
212
Under the skills stated bar, a couple of the PRs should not have landed in their current shape.
213
The behaviour is correct in all three substantive PRs, but the code base is meaningfully messier than it was a week ago.
214
Well, cool.
215
I mean, we got some really good feedback from this skill, I think.
216
I think what this is teaching me is
217
that actually getting the review to be super ambitious and getting it to push a lot of different options
218
will give you more false positives, but those false positives are pretty easy just to say no to, right?
219
It's the ones that you miss that you never know about, the opportunities for improvement that you never see, those are the dangerous ones.
220
Overall, I will clean up this skill so it's not quite so duplicative, so there's a bit more dry.
221
And I would also just get it to focus a lot more on tests as well.
222
Think about the seams in your codebase, kind of like what my improved codebase architecture does.
223
But overall, I think this is worth pulling down, experimenting with, and just seeing what comes out of it.
224
Now, if you dig this stuff, then I'm running a cohort starting next week, starting June 1st, on AI coding for real engineers.
225
This has been my most subscribed to course ever.
226
People are going nuts for this.
227
We're going to have, I think, around 4,000, 4,500 people in there.
228
So yeah, it's absolutely wild.
229
But if you're enjoying this stuff, if there's a skill that you want me to review, I really like making that content because it lets me steal ideas from other people's great skills, then let me know.
230
Nice work, and I'll see you very soon.
同頻道
FOR YOU
推薦影片
為什麼要通過這個影片練習口語?
在學習英語的過程中,口語練習是不可或缺的一部分。通過本影片中的內容,學習者能夠接觸到軟體開發領域的專業術語和表達方式,從而提升自身的領域知識和口語能力。在複習程式碼審查時,講者展示了一些重要的審查標準以及提升程式碼質量的技巧,這為學習者提供了紮實的實用背景,有助於提升其在專業環境中的交際能力。通過英語影子跟讀的方式,學生可以逐步模仿講者的語調和語速,達到更好的發音和表達效果。
語法與表達在上下文中的分析
- 被動語態: 講者多次使用被動語態(如“程式碼質量審查被認為是...”),這在描述過程和結果時非常常見。通過這樣的表達,學習者可以學習如何在英語中強調結果而不是行動者。
- 條件句: 例如,講者提到“如果有明顯的改進路徑,就去做”,這種條件句結構幫助學習者理解如何表達可能性和條件關係,是構建複雜句子的基礎。
- 較高的情態動詞使用頻率: 講者多次使用情態動詞“應該”(should)和“可能”(might)來表達建議和可能性。這種表達方式使得語氣更加柔和,有助於學習者在日常交流中採用。
常見發音陷阱
在這個影片中,講者面臨幾個發音挑戰,學習者應特別注意:
- 術語發音: 比如“審查”(review)和“質量”(quality),在不同的口音中可能發音略有不同,學習者需要通過雅思口語練習提高對這些詞彙的熟練掌握。
- 連音和弱讀: 講者的講話節奏較快,在某些詞彙之間存在連音現象(例如“code quality audit”),學習者可以通過shadowspeaks的方式反覆模仿,以提高流利度。
- 詞彙重音: 當講者強調“ambitious”一詞時,重音的準確把握會影響理解,學習者可以通過shadow speak練習來增強對重音模式的敏感度。
影片中的語法
說話人最常用的結構,並附上影片中的原話:
| 結構 | 影片中的用法 |
|---|---|
| 條件句 if + 從句,will/would + 動詞 — 條件及其結果 | if this was my skill, I would definitely |
| 現在完成時 have/has + 過去分詞 — 過去發生但與現在仍有關聯的事 | I've known · I've often found · I've actually reached |
| 被動語態 be + 過去分詞 — 強調發生了什麼,而不是誰做的 | been solved · is serialized · be reframed |
| 定語從句 who / which + 從句 — 補充說明人或事物 | repo, which is · code, which is · system, which is |
什麼是跟讀法?
跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。























