跟讀練習: Spec Driven Workflow with Claude Code #1 - Making a /spec Command - 通過影片學習英語口語

選擇練習模式

每種模式都會開啟全屏練習室。

144 句
如果句子過短或過長,請點選 Edit 進行調整。
1
All right then gang, so I just recently released a new Claude Code masterclass on netninja.dev
2
which is a deep dive into Claude Code and how I use it within my own projects.
3
And I wanted to upload a small preview of that course here on YouTube.
4
So I decided to release a small chapter of it all about setting up
5
and using a custom spec-driven workflow because I think this small chapter sits well on its own.
6
And I also think it's a good way of working with any agentic coding tools, not just Claude Code.
7
And I wanted to share it.
8
So if you do like this small free chapter
9
and you want to learn more about the process and dive much deeper into Claude Code and Agentec workflows, then definitely grab the full masterclass from the netninja.dev website.
10
It's $15, but you can still get it half price using the promo code ClaudeNinja at the checkout.
11
So I'll leave this link down below the video and now I'll just cut straight into the content.
12
All right then, my friends, welcome to a brand new chapter
13
and in this one I'm going to share with you one of the workflows I like to use
14
when I'm working with Cloud Code in a project and
15
that is a spec driven development workflow whereby we create a
16
high level non-technical specification for any new feature then we create a detailed technical development plan based on
17
that spec and then finally we use that plan to implement the feature
18
and by using a workflow like this I find it keeps the model more focused on the task
19
and makes any guesswork or incorrect assumptions about any features it's working on to a minimum.
20
Now the inspiration for this kind of spec first workflow came from a tool by GitHub called SpecKit
21
which goes heavy on the philosophy of having a high level spec at the heart of AI driven development.
22
But personally as a developer who likes to be very hands-on
23
and stay firmly within the development loop myself I think
24
that SpecKit makes me feel a little bit too detached from the whole process of adding new features.
25
So I've stripped that process back and I've come up with my own lightweight and much simpler approach, which makes it easier for me to add my own input and manage the process.
26
And therefore it hands a lot of that agency back to me, the developer.
27
So throughout this chapter then, we'll be putting everything together to implement this spec driven workflow.
28
To begin with, we'll make a new custom slash command to help us automate the process of generating high level
29
and non-technical specs for new features.
30
After that, we'll be using Claude Codes built in planning mode to make detailed technical plans for implementing those specs.
31
And then finally, we'll be using Claude Codes extending thinking mode along with the Opus model to implement those plans.
32
And they're the three core steps involved in this workflow
33
that we're going to be focusing on in this chapter spec
34
out a new feature plan the feature then implement the plan
35
now you could also add a review step at the end
36
of this cycle to review the code once the feature has been implemented
37
but that's something we're going to look at in a later chapter
38
and we'll just focus on the first three steps for now
39
i'll also be integrating git into the workflow as well so
40
that every time we start a new specification
41
or feature cloud code switches us to a new branch and
42
that way if things do go south we can just delete the branch
43
and our main code base remains untouched again i would strongly advise using git
44
and github if you ever use ai to touch your code
45
because without it things can get really messy really quickly believe me now
46
if you're new to version control
47
and you do want to learn about it then i've got a big git
48
and github masterclass course that you can check out and i will leave a link to that below the video.
49
Anyway, let's crack on with this workflow by first of all, creating a new custom slash command to generate specs.
50
All right, so now we know about the general process of this spec-driven workflow, let's start off by making a new spec command.
51
And this spec command is going to do a few things for us.
52
First, it's going to generate a feature name
53
and a branch name based on the input or arguments that we provide to the command.
54
Second, it's going to switch to a new branch with the name it comes up with
55
and then it's going to make a high level feature specification based on our import
56
and write that spec to a file inside a specs folder
57
and this specification like I mentioned before is going to be
58
a high level one meaning it shouldn't go into too much
59
detail about how the feature should be implemented from a technical viewpoint
60
but rather focus on the bigger picture and how the feature should behave from a user's perspective I guess, including any edge cases and wider implications.
61
So then let's make this new spec command by opening the commands folder in the .cloud directory
62
and then making a new file called spec.md, which means to run the command later, we're going to type out forward slash spec.
63
Okay, so now we can start to flesh out this file.
64
And the first thing I want to do, like in all the other commands we've made, is make some front matter for the command description and allowed tools at the top,
65
and also to add an argument hint as well.
66
So then let's start with the three dashes to go either side of this front matter section.
67
And then inside those dashes, I'm just going to paste in three different keys and values.
68
The description, which says create a feature spec file and branch from a short idea.
69
An argument hint, which is the short feature description, and the allowed tools, which are read, write, glob, and bash to switch to a new branch.
70
So that's the front matter sorted.
71
And now we just need to write out the actual command itself.
72
And rather than me type all of this out from scratch, I'm just going to paste this in and walk through it all with you step by step.
73
And by the way, like I mentioned before, you can get this entire command yourself from the GitHub repo for the course files.
74
All you need to do is select the Claude Snippets branch from the drop down up here, then go into the commands folder where you're going to see this spec command plus any other command
75
that we make as well.
76
So if you click on that command, you're going to see all the content for that file, which you can just copy and paste into your own file.
77
So then let me just paste all of this in
78
and then we'll walk through it slowly it first of all then we have this summary at the top
79
which tells the model it's going to be making a new
80
feature spec for the application using the user input below
81
which we say down here is from the arguments so
82
when we run the spec command later we'll be adding a sentence
83
or two about the new feature we want to spec
84
so the model can use
85
that input we also tell the model to respect anything inside
86
the clawed md file next down here we go into a
87
little bit more detail outlining the steps the model needs to take using
88
that user input starting with creating a feature title in kebab
89
case then making a safe branch name for the feature
90
and finally writing a detail markdown spec in the specs directory
91
which we don't have yet but we will make shortly below
92
that outline we go into each step in more detail starting with the step one
93
which is to check the current branch for uncommitted or unstaged changes
94
if we have any of those we tell the model to abort the whole process
95
and instruct the user to either stash or commit the changes first.
96
After that, we tell the model to parse the input arguments to extract or come up with the following values.
97
A feature title, a feature slug which follows the below criteria, like lowercase letters, kebab case, only letters and numbers, replace spaces with dashes, and so on.
98
Then finally, a safe Git branch name with the following format, claude forward slash feature forward slash then whatever the slug value is.
99
And we give an example of that down below.
100
So then once the model has extracted those values, the next step down here is for Claude code to switch
101
us to the new feature branch using the branch name the model just came up with.
102
After that, we asked the model to create the actual spec markdown file
103
and save it in the specs folder using the feature slug it just came up with.
104
We also mentioned here that we'll be using plan mode later to plan the spec
105
and we're going to talk about plan mode later in this chapter
106
but as well as
107
that we tell the model to use the same structure for
108
the spec file as the spec template file right here using the at symbol to manually add that template file as context.
109
Now we don't have that template file created yet but again we will make it shortly.
110
We also tell the model not to add any technical implementation details such as code examples
111
because that's what the planning step is for later.
112
Finally, once that spec's been created, we ask the model to respond with a short summary of what it's done,
113
including the branch name, the spec file location, and the feature title.
114
So that is the spec band done now.
115
We're going to be using this in the next lesson to spec out a new feature, but for now, all we need to do is create that underscore specs folder,
116
which is going to create all the new spec files in
117
and we also need to create the template file
118
because it's going to use that file to create those specs right
119
so let's cross this off
120
and then we'll create a new folder in the root directory called underscore specs
121
and the only reason i'm using an underscore right here is
122
so that this folder sits at the top of the tree there's no deeper meaning than
123
that but inside that now we're going to create a new file called template.md
124
and i'm just going to paste in this template it's very very simple
125
but i'll go through it so we have the feature name at the top
126
then the branch name it chooses and then down here we say figma component
127
if used now don't worry about this too much for now later in the course we'll be using figma
128
and we're going to integrate that into the spec command
129
so we'll come back to
130
that later for now we're not using figma anyway we have these different sections
131
that we want cloud code to fill in
132
when it's creating this spec file so we have a summary of the spec
133
or feature any functional requirements the figma design reference only have referenced again.
134
Don't worry about that too much for now.
135
We'll come back to it later.
136
And then down here, any possible edge cases, the acceptance criteria, open questions.
137
So if it has any questions it wants to ask us, put them there and then we can go in and answer those questions.
138
And then any testing guidelines at the bottom.
139
And I've also said here, create a test file in the test folder for any new feature
140
and create meaningful tests for the following cases without going too heavy.
141
So obviously I don't know the test cases.
142
That's for Claude Co to decide when we're speccing out the new feature.
143
All right, so now we have the new command, this spec command, and we have this template so that when it's creating specs, it uses this template.
144
In the next lesson, let's create a new spec for a brand new feature.

下載應用

流利口語所需的一切

AI 發音評分逐句打分
音標練習掌握每個音
詞彙學習建立你的詞庫
詞彙遊戲邊玩邊學

同頻道

FOR YOU

推薦影片

你能學到什麼

這段影片能幫你提升兩項關鍵的英語口語技能。首先是影子跟讀(shadow speak)的實戰應用,通過模仿說話者的節奏和邏輯,快速掌握自然的表達流程。其次是學會在對話中清晰傳遞複雜資訊,比如像影片中講解技術 workflow 那樣,用簡潔的結構組織內容。此外,還能瞭解如何在口語中自然融入專業術語(如“spec-driven workflow”),讓表達更具說服力。

注意這些語音現象

影片中的口語有不少連讀和弱讀現象,值得關注。比如“all right then”中“right”和“then”的連讀,以及“it's a good way”中“it's a”弱讀成“it's uh”。另外,“I think that”中的“that”常常被輕讀,幾乎聽不到“t”的發音。這些細節能讓你的口語更接近母語者水平,也是英語影子跟讀練習的重點。

像母語者一樣表達

要模仿影片中說話者的語氣,關鍵在於節奏和重音。比如在“spec out a new feature, plan the feature, then implement the plan”這句話中,“spec”“plan”“implement”需要重讀,突出步驟的重要性。同時,注意句子間的停頓,比如講解 workflow 時,每個步驟後稍作停頓,讓聽眾有時間理解。練習時可以用英語口語練習中的“影子法”,即播放一句、暫停、立刻跟讀,反覆訓練直至流暢。此外,要學習用自然的語調傳遞資訊,比如提到“git 的重要性”時,適當提高音量強調,增強表達的感染力。通過這些方法,既能提高英語發音,又能讓口語更流暢自然。

影片中的語法

說話人最常用的結構,並附上影片中的原話:

結構影片中的用法
現在完成時 have/has + 過去分詞 — 過去發生但與現在仍有關聯的事I've stripped · has been implemented · we've made
被動語態 be + 過去分詞 — 強調發生了什麼,而不是誰做的has been implemented · should be implemented · are read
定語從句 who / which + 從句 — 補充說明人或事物approach, which makes · hint, which is

什麼是跟讀法?

跟讀法 (Shadowing) 是一種有科學依據的語言學習技巧,最初開發用於專業口譯員的培訓,並由多語言者Alexander Arguelles博士普及。這個方法簡單而強大:您在聽英語母語原聲的同時立即大聲重複——就像是一個延遲1-2秒緊跟說話者的影子。與被動聽力或語法練習不同,跟讀法強迫您的大腦和口腔肌肉同時處理並模模擬實的講話模式。研究表明它能顯著提高發音準確性,語調,節奏,連讀,聽力理解和口語流利度——使其成為雅思口語備考和真實英語交流最有效的方法之一。

影子跟讀法: 閱讀完整分步指南 →