Claude Code 从 0 到 1 全攻略 —— MCP / SubAgent / Agent Skill / Hook / 图片 / 上下文处理/ 后台任务 / 权限 ......
2 Video Views·Mar 22, 2026
Cloud Code has been extremely popular lately Those who
follow programming agents are
surely already familiar with it
However moving this tool from
initial setup to actual production
use requires more than just knowing a few basic commands
It's nowhere near
enough So in this
video let's skip the fluff and walk
through the entire
practical workflow
of Cloud Code from start to finish
This video is divided into the following four parts
First environment setup and basic interaction
Second handling complex tasks and terminal control
Third multimodal and online document management
Finally advanced features for expansion and customization
As everyone can see on the screen densely packed
knowledge points and timestamps
The value of this video is absolutely maximized
As long as you spend a
little time watching this
video I guarantee you'll fully master Cloud Code
and turn it into the most intuitive productivity tool
in your hands Also I know the market has
There are other similar programming
agents
such as Codex OpenCode but in terms of
functionality and
usage they don't differ
significantly from
Cloud Code so I believe
After watching this video
you'll surely find that once
you've used this product you
can easily switch to similar
ones—no need for lengthy
explanations Let's get straight
to it First let's go
to the official website of Cloud Code
This is the page Then we click the
copy button here go back to the terminal
and paste it That's how we start installing
Cloud Code After
installation is complete
We tried using it
to build a to-do app
first use the command
mkdir to create
a directory called my2do and we'll
keep all our code inside this folder
Then we navigate into
this directory and run
the Cloud command to open Cloud Code When
you first enter Cloud
Code might prompt you
to sign in If you like me aren't prompted
You can execute the login command
to manually trigger the login
process It can be seen that Cloud Code officially provides two
standard integration methods:
the first is subscription-based
available if you have purchased
Cloud's Pro or Max membership
Just go ahead and select this one
The second option uses the official API Key
billed according token usage
pay as you use
I'm a subscription user
so I chose the first option
After selecting
Cloud Code will pop up a webpage
Prompt me to authorize
We agree
You can see the login was successful
We close the current page
Back to the terminal here
Press Enter
The login is complete
By the way a quick note Some students might not be able to
Use Cloud's official subscription
or API
at this point
you can also use domestic models
to power Cloud Code
such as GLM
Minimax and so on
Cloud Code is a
general-purpose programming agent
It isn't actually tied
to Cloud's model—you
can fully use other models to power Cloud
Code how to specifically
use domestic models
is not detailed here
but it's quite simple
Setting a few environment
variables is all you need — a quick online search yields countless
results Students who need
help can look it up themselves
Now back to the main topic —
let's get started with Cloud
Code As we mentioned earlier —
We need to build a to
-do app we'll now pass
this requirement to Cloud Code to have it implemented for us—create
a to-do app using HTML
and now you can see Cloud
Code getting to work
Let's wait a moment
Cloud Code wants to
create a file called
index html and is
asking us if we agree
There are three options here The first
option yes means single-word licensing
Only agree to create the current file if any
additional files need to
be created afterward it
will ask for confirmation again The second
option is yes: allow all
edits during this session
Selecting it means that
throughout this conversation all
subsequent file operations
will be automatically approved
eliminating further interruptions
The third option is to disagree
after selecting it you can
continue entering your thoughts
Cloud Code will generate code based on your input
then confirm it with you
For demonstration purposes
we'll select the second
option here—enable automatic
mode and entrust it with all subsequent tasks
Good After selecting pay attention
a new line appears below the input box
which says accept edits on
this means
the current auto-approval mode is now enabled
if you regret it later
How do you switch to another mode
At this point you need to use
Shift + Tab to switch modes
Let's try pressing it
Look
It's now in plan mode
meaning planning mode
This mode is primarily used to explore complex scenarios
Chat only no execution
We'll go over specific usage later
Let's press it again
Pay attention
The plan mode at the bottom has disappeared
Instead a gray提示 appears
question mark for shortcuts
meaning pressing the question mark displays shortcuts
please don't misunderstand
this is not a shortcut mode
This line is merely a small reminder from
cloud code unrelated to
the current mode cloud
code actually does not indicate the current
mode at this point and
such an unmarked mode
That's the default mode—don't know if you
still remember when we first
entered Cloud Code were using
the default mode In this
mode Cloud Code behaves
the most cautiously and
every time a file is created
Or when editing files he always checks
with the user first
So can everyone see
it now Shift + Tab
cycles through these
three modes Let's briefly summarize
The first is the default
mode—displaying a question
mark—for shortcuts in this
mode users will always be
prompted before creating
or modifying files
making it the most secure option The
second is the automatic mode
at is accept edit on
in this mode
cloud code will automatically create or modify files
without asking the user
most convenient
the third is planning mode
that is plan mode on
this mode only discusses
The file is unmodified suitable for brainstorming
We'll explain this pattern in detail later
Okay These are the three modes of Cloud Code
Press Shift+Tab again
To enter the accept edit on mode
After selecting
the right mode let'
s go back and open
the file that the
cloud code previously
created for us—
simply locate it
in your file manager
Double-click to open it
However here I want to show you another method
We can directly execute a breakpoint command within the cloud code
to open it
First type an exclamation mark
The cloud code is responding now
We are now in bash mode
and can run any interrupt commands
Next we type
open index html
to open this HTML file
The code software works fairly well—
success on the first
try—so credit to Cloud
Code for that However there's a small
issue: it puts all the
code into index html
Small projects are fine but if the project
grows maintaining it would be a nightmare So
we'd better switch to a modern setup like
React TypeScript and
Vite as early as possible
Modularize the code for better
management we can directly
submit this request to Cloud Code to make the changes but altering the architecture is a major undertaking
so it's best to finalize the
details before proceeding
This is when plan mode comes into play—it's
specifically designed for
discussing proposals and
finalizing details Let's first close the current
page and return to the
terminal then press Shift+Tab
Enter plan mode
then input our request
restructure the current code to
a project using React TypeScript and Vite
the issue doesn't end here
At this point we want to
insert a line break—how do
we do it Just pressing
Enter won't work If we press
Enter our question will be submitted immediately To
insert a line break we need to press Shift + Enter
Then we can keep writing
preserving all existing
features By the way if Shift+Enter isn 't working you're likely using an outdated
Cloud Code version and
will need to update it
Also one more thing—some students might find the terminal's input box extremely
inconvenient and want
to replace it with a
more modern editor which is perfectly feasible
We can press
Ctrl+G and at this
point Cloud Code will open a
VSCode tab making editing much
easier here—just press Enter随意
No need to worry about accidentally submitting issues either—
of course you'll need to have
VSCode installed beforehand We'll
complete the requirements right
here add one more point ensure
the UI style remains
consistent save after writing and that's it
Then close this tab
at this point cloud code
will paste everything from within VSCode
into the input field
we just press Enter again
and the request will be submitted
You can see the cloud code has started working
Let's wait a moment
The plan seems to be ready Let's scroll
it up a bit and take
a look at what this
plan actually looks
like The plan starts
right here and appears quite thorough
Target item list
Information about directory structure and similar elements
All covered
Finally it asked us whether we wanted to proceed
It presented us with three options in total
The first one was to execute the plan
and enter the same mode thereafter no further prompts will
be sent to the user before
editing files the second option is
also an execution plan except
that the default mode will be used
afterward meaning that every
time a file is written afterward
You'll need to ask the user
The third step is to continue editing the plan
If you're not satisfied with the plan
you can keep entering input here
Cloud Code will adjust the
plan according to your requests
and generate a new version
Here assume we are dissatisfied with the plan
select the third option
submit our revision suggestions
for each item
add a priority level
such as high medium or low
and indicate them with different colors
Then we press Enter
At this point
Cloud Code begins adjusting its schedule
Let's wait a moment longer
Good Cloud Code has generated another plan
We won't go through the details
But just looking at the final testing section
we can clearly see
it has indeed taken our
priority requirements into account
This time it's about right
Let's just agree to it
—let's select
the first
option implement the
plan and enter auto- approval mode meaning
we won't be asked again
when modifying
documents Okay Press Enter to see
The current mode has switched to
accept add it on
no problem
this matches our choice
when writing the documentation later
we won't have to worry anymore
cloud code is now starting execution of the schedule
The estimated time is longer
so let's wait patiently
Cloud Code has paused — it now wants to create a directory
using mkdlr and then ask
us for approval Just a
moment — what's going
on here Didn't we already tell Cloud Code
We don't need to
keep asking the user
every time if they remember we're in
the accept add it
on mode—how come we'
re asking again now Yes we did say that
However that's just when writing to the file—no
need to ask the user—this is during execution of a
terminal command and cloud
code considers executing
a terminal command to be a relatively risky operation
So user consent is required before proceeding Not
only that but there is no
option here to automatically
execute all terminal commands Even the second
option is merely a
notification sent to Cloud Code
You can freely access the src
directory from now on without
asking the user however other commands still require
permission If you find it
tedious to make choices each
time Cloud Code actually provides a way to handle this
A less obvious option
allows skipping this
step enabling whatever
command he wants
to run directly—this requires adding a
specific option when starting the cloud
called dangerously skip permissions
I'll open a new terminal tab for everyone
to demonstrate
First let's navigate into the
original my2do directory
then enter cloud
Plus the dangerously skip permissions
means skipping all permission checks
Pay close attention to the word inside this parameter
dangerously which means dangerous
The official has literally written the word "dangerous" on their face
The meaning is very clear: once you add
this parameter the cloud
code goes completely
unchecked upon entering
you'll find the mode
has changed to bypass
permissions which means
From now on it will execute any terminal
commands without asking
for your approval—
whether installing
dependencies deleting files
or creating directories it won't ask again
This is actually a double-
edged sword on the positive
side it can greatly boost
development efficiency—fully automated work no need for
you to constantly approve
every step—but on the downside it theoretically has
Same terminal privileges as you Although
cloud code could only possibly damage your computer under extremely
insane circumstances
—such a probability is virtually negligible
But as a responsible blogger
I must warn everyone that
this option allows cloud code
to run completely unchecked so
theoretically there is still some
level of risk involved—whether
the trade-off for efficiency is
worth it remains to be decided
Accepting this slight theoretical risk is up to you
The decision is in
your hands OkayDemonstration complete
Back to our original example
We'll still skip this option
Let's choose the second one
We'll only agree to it going forward
You can freely access
the src directory
Press Enter to let Cloud Code continue
cloud code asked
Can we run the npm install command
We decided to agree from now on
Here to start the
server use npm run dev
starting the server
allows you to view the webpage's effect
starting works too
but for now let's skip it
Later I'll use it to demonstrate
to you how to manually
start it and take this opportunity to explain some concepts related to the task Cloud Code sees that
we've declined and is now
asking us what we should do
Let's tell him about this
command I'll handle the
execution myself you
just make sure everything
else is done then the cloud code will start
verifying—okay verification complete looks good
Now we can run this command ourselves
Let's give it a try
Server started successfully
Let's click the link inside here
to see how it looks
Not bad the result is acceptable
Let's click around randomly
Seems to be working fine
Add a to-do item
That works too Then
we can add another task
adjust the priority and
add it—everything will
be perfect Now let's return
to Cloud Code—there 's
one point I'd like to
emphasize to everyone
This service's operation
blocks the cloud
code for example if we type "hi" here
you'll see the cloud
code doesn't respond
because the service is still running
Cloud code can't handle new requests
What should we do
It's simple
Just look here
Press Control+B
This will run the service in the background
Let's try it
It seems to be working
The cloud code has started processing our request
He has sent us a response
And notice here
there is a background task running
We can type 'tasks'
to view this task
You can see here that this is indeed the command we initiated:
npm run dev Note this
prompt—pressing k will shut down the
service but we don't
plan to stop it for now
We press Esc to return
to the original
interface let this service keep running continuously so that we can immediately see the effects of any
subsequent changes Now
assuming we want to add one
Language switching feature
Currently using Chinese
We would like it to be moved to the top right corner
Switch to English
Let's submit the request
Add a language switch option in
the top right corner of the page
Users can choose between
Chinese or English default is Chinese Press
Enter to start
cloud code Let'
s wait a moment
Good You can see the cloud code has been updated
Let's go back to the page and check the result
Nice The language switch option has indeed been added
And the switching effect works as expected
But think about it for a moment
No my users can all understand
Chinese so why
would I add
this feature
Either roll it back or
not Okay can Cloud Code
be rolled back
Of course it can The corresponding command is Gone Rewind
Or there's a simpler
way—you can just double
-click ESC to directly enter the rollback
page Every time we submit a request Cloud
Code automatically creates a rollback point
For instance if we don'
t want to go back to the
version before the language options were added
just select that rollback point press Enter
and Cloud Code will then give us four options
Is it rolling back the code and the
artwork or just the artwork or just the
code or should we abandon the rollback
altogether Let's go
with the first option
Code and artwork have been rolled back
Good Rollback successful
Let's verify
Open the page
No issues
Confirmed rollback was successful
No language switch option available anymore
Isn't that great Good
Suppose at this point you feel that React
plus TypeScript plus
Vite seems a bit overly
complicated You're
thinking maybe we
should just roll back to
Just the index html version is fine
Okay Just use the rollback feature
But before that
we should probably shut down the npm run dev
background tas
After all the relevant
files are gone once
rolled back so the background tasks are
useless now Let's return to Cloud Code and
type -tasks to check the background tasks
Then press K
to terminate the current background service
At this point the cloud code warning says
our development server is running normally
but it's just the cloud code being confused
ignore it
our development server
is actually already turned off
after the server was shut down
We can now begin the
rollback process First press
ESC twice then select the rollback point where
the duplicate code first appeared then choose
the first option: restore
code and drawing Okay
It appears the rollback
has already been completed
Let's check whether there's only the index html
file in the current directory We'll use the ls
command which lists the files
in the current directory
Running
The results seem off
Aside from the index html file
there are many other files in this directory
it only displays a portion by default
we can press Control
to show the full list of files
The total number of files still seems quite high
What's going on here
Could it be a bug in Cloud Code
Actually no
These files were created earlier using terminal commands
For example mkdlr
Commands like npm install cannot be rolled back by cloud
code it can only revert the
files it has written itself Files
generated by terminal commands
cannot be rolled back by cloud
code so I strongly advise against relying on them too heavily
The rollback feature of
Cloud Code is available
If precise rollback is needed using Git would
better Okay But the issue isn't really serious
—index html is managed directly by Cloud Code
So this file must have been successfully
rolled back we'll just
delete the other files
Let's get to it
Open the file manager
Delete all files except index html
Then go back to the cloud code here
run the ls command
and you'll see that there's indeed only one file left
at this point we can use the open command
to open the html file and verify its effect
everything works fine
The effect is the same as our previous index html
rolling back here marks the complete end Alright we'll stop here with the rollback
Now assuming you've made changes
to the page via cloud code
I've never been very satisfied with it so you went
ahead and designed a new interface on Figma—something along
these lines—and you'd like the cloud code to replicate
this layout How exactly should
we go about implementing it
It's simple—just send
the design image to Cloud
Code First we need to
make a quick adjustment
in Figma: export the current design as a PNG
file The export process is straightforward
Just export the frame as is
Then we return to the VistA interface here
and can see the image was exported successfully
Next our task
is to send this image to the cloud code
How do we do that
There are two methods
The first method is simply to drag this image directly into the Cloud Code area
— see the image2 here That means Cloud
Code has successfully
received our image
This is just one method the other
approach is to copy this file
Then go to cloud code here
press Control+V to paste
note that the shortcut I mentioned here is Control+V
not Command+V
even if you're using Mac OS
You need to use Control+V to
paste this image — Command+V
won't work so remember that —
now our image has been pasted
Immediately afterward we can continue entering requests
allowing the cloud code to modify the code based on the image
I won't demonstrate the exact process
this approach is definitely可行
To be honest
Often the restoration isn't that precise
—things like letter spacing for instance
Cloud code struggles to achieve highly
accurate results from
images so in such cases
We actually have another more precise and effective
method—using MCP to fulfill
the requirement of restoring
Figma designs MCP serves as the channel through
which large models communicate with the outside world
I've previously explained the usage and underlying
principles of MCP interested students can
review it on their own Figma provides a very
convenient MCP server that we can integrate and use
First we need to install
the MCP server According
to Figma's official requirements we need to
run this command So let's copy it first then
return to Cloud Code and
press Ctrl+C twice to exit
Then run this command —
you'll see the MCP server
has been successfully installed Next we need to
reopen Cloud Code — but it seems all previous
conversations are gone What
should we do now Don't worry
We can use the -resume command to
return to the previous
conversation where
the first option is our conversation
just now press Enter to select it
See the conversation comes
back just like that doesn't it
There's actually an even simpler method
Just add a parameter when launching Cloud Code Let's give it a try
First exit Cloud Code
Then we run the
command cloud conger-c
where the c stands for continue
its function is to open Cloud Code
and automatically resume the previous conversation
Good
Conversation resumed
We run the -mcp command to check the currently
installed mcp tools
currently there is only one
which is the Figma we just installed We can see
that we need to fix it
before we can use this tool
Let's select this MCP tool
then choose authenticate
at this point a page will automatically pop up
asking for our authorization
we grant permission
Then return to the cloud code section
execute -mcp to select Figma
at this point you will see
mcp server
is now in a usable state
select view tools
and you will see
the list of tools included within
mcp server internal
There are tools for taking
screenshots creating design
guidelines and so on—
specifically we won't go through
them in detail and we don't really need to worry too much about which exact tool to use to meet our needs
We let the cloud code make the judgment so we
press Esc to exit this
interface then enter our
requirements modify the
current page to align with the Figma
design but the issues aren't over yet
We're now back to the Figma page here
Copy the design file link
Just click inside
copy link to selection
then go back to Cloud Code
paste and press Enter
that should do it
You can now see Cloud Code has started working
It first detected
Our Figma MCP can resolve this
issue request
to invoke the get
design context MCP tool to
fulfill the
requirement We agree
Then the cloud code requests
to invoke the get screenshot
tool to obtain the corresponding design screenshot We
also agree that now that both
tools have been configured
the cloud code has acquired
all the design稿 information
It includes not only screenshots of design mockups but
also highly detailed specifications such as spacing
between various components and font styles once these
details are obtained Cloud
Code immediately gets to work
Modify the existing
HTML code to match the
Figma design exactly Let's wait a moment
Looks like it's done
Let's go to the browser side
and check how it looks
This is the cloud code
based on the Figma design
creating the page
I've also placed the original design file here
Feel free to compare the results and see how it looks—personally I think
the fidelity is quite high
Of course this page still
needs some fine-tuning
such as fixing issues like
undefined and NaN values
Maybe need a slight
adjustment but overall
it's really good enough Okay let 's
pause here for now on MCP Next let' s take
a look at context compression
We've written a lot of
code previously and the
cloud code has also invoked
numerous tools so by
now the context of the cloud code contains a
great deal of information
some of which is useful
Some of them aren't
particularly useful but
we can compress the context as needed— the command required here is gun compact We can
run it directly or choose
to do so selectively
Append some specific compression strategies
such as prioritizing user
-specified requirements
but we won't add any requirements here—let's
just execute the gun
compact command directly
Check how it works
Compression completed Press Ctrl+O
to view the compressed context content
This is the result after compression
Previously in the context
there was a lot of information including code
Results from MCP calls
and similar elements now
only leave this much
content remaining In this
case not only is the performance of cloud code
guaranteed but when executing tasks afterward
The token consumption will be significantly
reduced Good Now let's press Ctrl+O and return to
the original interface
Just a quick reminder
here —another context-related
command is 'gun clear'
It goes even
further —completely clearing
out all context content—generally
speaking if our
subsequent task has
no connection to the
previous context—
We can use the clear command to clear all
context content but we
won't demonstrate it here
since we still need the
previous context—after demonstrating it there would be nothing left
We'll keep the compressed
result for now The compression is complete but the
controllability of the compressed
result isn't very strong
For example if you want to
manually adjust the compression
result here cloud code
You weren't given this
option regardless of whether
it's compressed or not the context remains tied
to a specific drawing Whenever
we next enter Cloud Code we'll still need to return to this drawing
Otherwise the cloud code
doesn't know
what happened
before is there any way
to solve these issues
is there a solution that
allows the cloud code to
read some information we
define each time it runs
With this cloud code we
immediately understand what
kind of project it is what
the user needs and we can even
document all relevant notes
right here—once we have this
information the cloud code can work for us more effectively
Is there such a solution
Of course there is
This is cloud md
Let's try using it
First let the cloud code
generate a cloud md file on its own
using the -init command
Good Cloud code has been created
Let's open the cloud md file to take a look
It's located in the current directory
The content looks credible but
unfortunately it's in
English which makes it
somewhat inconvenient Maybe we should have
Cloud Code convert it into Chinese again
Conversion complete
Let's take another look
No problem
Definitely Chinese now
Also note
The content within this section
can be freely edited
For example we can
add a line at the end Important Notes
Always append this
sentence at the end of
every response: happy
coding Then
back to Cloud
Code first exit and
then re-enter so Cloud
Code will reload our
latest cloud md file
Let's casually say something
to Cloud Code like "Hi"
Cloud Code replied "It
did eventually add happy
coding " you can see our
cloud md really worked so if
you have anything you'd
like Cloud Code to read
every time just put it
directly in the cloud md file
That's it
Experiment complete
Now we remove the notes at the end of cloud md
Otherwise "happy coding" will appear every time
which would interfere with
our subsequent demonstration
We can directly locate
Open the cloud md file in VSCode
However here
I'd like to briefly show you
another way
to open cloud md
We type -memory in this input box
You can see the
cloud md file
here
There are two types: one is project-level with the corresponding file placed in the current directory
and effective for the current project the other is user-level
with the corresponding file located
in the user's configuration directory
and effective across all projects
Place it in the user directory
It takes effect for the current user
We previously used the first option
So select the first item
After selection
the corresponding cloud md file
opens automatically
This way there's no need to do it every time
You can find it directly in the file manager—
it'll be a bit more
convenient After opening the
cloud md file remove the
notes at the end save it then return to the cloud
code section and restart
Then ask one more random question
You can see that happy coding is gone which means our modification has taken effect That's
the end of the cloud
md file The cloud code also
has a hook feature allowing
users to execute actions before or after running tools
Execute a custom logic of your choice
for example we can use it
to perform automatic formatting
meaning after writing code in cloud code
it automatically runs the formatting function you've defined
o make the final code more elegant and better
meet our requirements
we first run the 'hooks'
command to enter the hook configuration page
where we can set the timing for hook execution
For example before tool usage
after tool usage
tool usage failure
sending notifications etc
let's select the second option
post to use
meaning this hook runs after the tool is used
then we select add new matcher
Here we need to select the corresponding tool —
that is we specify which tool should trigger our hook
logic after it has been executed We enter either "
write" or "edit " meaning
it will run after creation
Or when editing a file trigger this hook
then select Add New
Hook enter your specific
formatting command
here—the command looks
quite long so let's examine it closely
First when it runs the
cloud code sends us a
JSON containing the file
path which is the exact
location of the file
just edited in the cloud
code so we need to parse this JSON structure
Extract the value of the file path
from this part of our earlier command which is specifically
designed to do just that
where jq is a utility for parsing JSON
Students who aren't
familiar with it can look
it up themselves Once you have the file path we pass this path to the prettier command via
xargs and then the rest
is simply using prettier
It's time to format the file's content So
in summary this command
essentially uses jq
to retrieve the path
of the currently edited
file then uses prettier
to format that file
Alright that's done
Let's go back to Cloud Code now
After writing the code
we press Enter to confirm
At this point Cloud Code will ask
which episode we
should save this hook to
There are three options in
total: the first is the local
project-level option meaning this hook will only take
effect locally within the
current project After selecting
this option Cloud Code will handle the configuration
Place the settings local
json file inside the
project directory then
add settings json to
the gitignore file so
that this file won't be
shared with others The
second is project-level
That means all users of this project will have
access to this hook whose correspondingconfiguration
file is settings json This file will be distributed
to everyone via git The
third level is user-level
The configuration takes effect for the current user The corresponding settings
are saved within the user's directory
Each user has their own copy
They do not interfere with one another And they are not tied to the project
Let's select the second option
Everyone using this
project can access this
hook and once this
hook is set up we press
Esc to exit and finally
enter a request to
test it — our request
is to create a new file
est html
just write anything html
all content written on
a single line newline
let's wait a moment
through this file write request
you can see
cloud code indeed processes all the content
All written on a single line
We agree
Execution completed
Let's take a look at the final generated
test html file content
You can see the content
of this file has already
been properly formatted
unlike the initial cloud
code write which was just a single line—this confirms that the hook we
just wrote has taken effect
After the code is
written in cloud
code our hook
activates and formats
that file so what we see now is
beautifully formatted HTML code
That's all about the hook's
functionality Now suppose you
want to write a summary every
day recording which features
you developed and this summary must follow a specific
format such as including the date
and a development summary
Details about development and similar information
—just paste the corresponding format requirements
directly into this input field and Cloud Code
will generate a file for
you However in that case—
Having to paste the same thing
every day is really annoying—this kind of task is actually perfect
for solving with an agent
skill I previously made a video that systematically
explains agent skills
Interested students can take a look
though it's fine if you haven't seen it
you can roughly think of it as
a user manual for large models
a dynamically loaded prompt
Let's create an agent skill to test it out
First open a new middle tab
Use the mkdll command
in the darkcloud skills
folder under the user directory
Create a new folder
named daily report
we'll use VS Code
to open this folder
Then inside this folder create a file named
skill mb and fill it
with the following conte
This document is divided
into two parts: the name and
description fields which
represent the agent skill 's
name and description the cloud code uses this
information to determine whether to use the agent skill
The section that follows
details the agent skill
specifically outlining the
required format for daily reports After completing the
writing we return to the middle layer and
close the newly opened tab
Then restart the cloud code
Then type gantt skills
you can see cloud code
has already detected
our agent skill
then we return to the input field
enter our request
write a daily summary
press Enter to start execution
It can be seen that the cloud code detected a request related to the
agent skill we just recorded the request is
using the agent skill
and we have agreed
And our daily summary is
now complete matching the
required format exactly—
this is how you use
the agent skill isn't it simple Also
the computer requests for
the agent skill are identified by the large model
And initiate
In addition
We can also do this
to proactively trigger an agent skill
First input Gantt daily reports
Then append a specific request
The result is essentially the same as before
It's simply bypassing the large
model's intent recognition
process and directly having the user invoke the
agent skill resulting in
more control—specifically we won't
demonstrate it further so let's just remove it
That's about it for agent skills
Of course agent skills
have many advanced applications
for those interested
be sure to check out my previous video
Now let's move on to
cloud code's
Another key feature subagent
this is essentially a standalone agent with its
own independent context
tools and skills capable
of completing specific
tasks autonomously I've previously explained the principles behind agents
Students interested
can take a look for
themselves Below let 's
create a subagent
for code review First enter the command
gantt agent then
select create new agent
You need to choose
whether the agent type is
project-level or user-
level Let's select project
-level meaning everyone
using this project can
use it Next choose the agent creation method
One way is to initialize using cloud code the other
is to create everything
manually The first method is
recommended so we'll go
with that Next we'll describe
what this agent will do We'
ll enter the following content
This is a subagent designed for code
review When the user requests a
code review
invoke it Press Enter to see Cloud Code
generating the subagent
Let's wait a moment
Next we select the tools
available to this subagent
— we'll just choose read
-only tools meaning only read-only tools will be
used and everything else
will be removed The model will default to sonnet
Next choose the subagent's color
when cloud code runs the subagent
it will use the color we selected
to display it
we'll use green
Then the cloud code
will generate a subagent
for us which we can
see has an English
description and its
content is likely not
exactly what we
expected We'll click on e
Let's edit the subagent description
This is the subagent description
generated by the cloud code for us
but it's quite different from what we want so here I'll provide the subage
Replace the entire structure
with one tailored to our
specific context similar
in layout to the agent scale
consisting of two parts: the top section contains the
original data clearly labeled
with the subagent's name
Description of the model used
colors and so on
below is the subagent
the specific tasks to be performed
my requirements are two
one is the review criteria
which includes two items
one is for JS
A requirement regarding
the output format
will ultimately be specified and
we'll examine later whether
Cloud Code can comply with the subagent's
specifications after completing
the subagent description
We've come to Cloud
Code to restart it
After restart we
submitted the request
— please do a code review for me
It can be seen that
Cloud Code invoked the
subagent we just created and passed the corresponding
task description to it for
processing and here Cloud
Code is displayed in green
To indicate the subagent
This is consistent with our previous configuration
It's estimated to run for a bit longer
Let's wait a moment
After running for a while
it generated a code review
report clearly showing the content it checked which
indeed matched exactly what
we specified in the subagent
description file This is how the subagent is used
Someone might wonder
AgentSkill looks a lot like a subagent
what's the difference between them
Actually the biggest difference
lies in how they handle context
When AgentSkill runs
It will fully inherit and share the context of your current primary conversation meaning every
line of log and every
thought process during its
execution will be recorded
in your current context
Imagine this: if you have Skill review a project
with tens of thousands
of lines of code those
projects will gradually fill up your context window causing token consumption to skyrocket
Agents also slow down and become less
effective due to memory overload so AgentSkill is best
suited for characters that are highly context-
dependent yet have minimal
impact on the context
For example based on today 's
development process
write a daily summary or something similar
meanwhile the Subagent has its own completely
independent context when you activate it
It will open a brand-new conversation window where
all the code it views and all the intermediate analysis steps it generates will remain confined within that
window and will not be returned
to your main conversation
Only when it has finished the work will
it bring you a final
result for reporting
so your main conversation stays clean and
clear never cluttered with interruptions
The cluttered intermediate steps would
overwhelm the system so Subagent is better
suited for tasks that are less context-dependent
and have a greater impact on the context
Therefore the key difference between Agent Scale and
Subagent lies in their approach
to handling context
users should choose the appropriate solution based on the
specific scenario Next let's discuss the Plugin feature
You can think of a Plugin
as a bundled installation
package similar to a macOS
DMG file or a Windows
exe file which packages
together a set of Scale
Subagent Hook and other
capabilities into a single unit
You just need one-click installation of Cloud
Code to instantly gain
a full suite of advanced
capabilities Now let me demonstrate First
enter Gantt Plugin to
access the plugin manager
There are three options
here: Discover meaning
find new plugins Installed
meaning already installed
plugins and Marketplaces
meaning the plugin
marketplace We found
Friendly Design
in Discover
Press Enter to install
Next select the installation scope
There are three options
Effective for the current user
Effective for the current project
Or effective for the current user's
The current project is active
We'll just keep the default settings
Installation is complete once confirmed
That's how fast it is
A brief explanation here
Friendly Design
is a plugin for front-end design
Generally speaking
The frontends created by large models share certain common traits such as using
a dark purple theme this plugin
is said to break that uniformity and make the interface
look more visually appealing
—we'll take a look later
Is it like this:
after installation
we restart Cloud
Code use the MKDR
command to create a new directory named MKDR then
enter that directory
Restart Cloud Code
After restarting
we enter -plugin
to access the plugin management page again
then select Installed
where we can see
the Installed tab
now has an additional item
That's the
Friendly Design
we just installed Press Enter
to check
its details You can see
that the main
component of the
Plugin is an Agent Skill named
Since we've already
installed this plugin
the corresponding
Agent Skill should have
been installed as well Let's verify that
Back to the input box then type -skills
Isn't there an extra
Agent Skill called Friendly Design
here So installing this plugin
essentially means installing an Agent Skill
of course this plugin is somewhat special
A single component
consists of just one element
while some plugins contain
multiple elements such
as Agent Skill MCP and
Hook—you can think of it as
a complete solution package
installed all at once
Now let's move on to
applying this Friendly Design
and examine how it differs from
the original front-end design
Let's return to the input field
enter our request
in accordance with the Friendly Design requirements
Create a task management
software using HTML to implement
Pay attention
Cloud Code doesn't immediately start writing code
It first recognizes
the user's request to follow the Friendly Design guidelines
So it first requests to use the Agent Skill
We click同意
After reading it through
It now possessed Anthropic's
officially refined set of UI design
intuitions and then
it began writing
code—let's pause for a moment
Done We'll first use the ls command
to check what files are in the current directory
No issues
There's only one file index html
Then we can use the open command
to open this file
and see how it looks
Look at this compared to the
demo we initially created—the
style is completely different
its layout is more sophisticated
the colors are more harmonious and the interactions better align with modern
aesthetics This is Friendly Design
The power of this plugin
The current Cloud Code plugin marketplace
is growing rapidly
Beyond UI design there are also plugins
tailored for specific programming languages
LSP plugins among others
Of course if you feel your configuration needs improvement
If written well you can
also refer to the official
documentation to package
your Skill Subagent MCP and
other components into plugins and share them with
your team or community Good That concludes Cloud Code
If my video helped
you don't forget to
like and follow I'm
Mark breaking down the
most advanced technology with simple
everyday language See you in the next one—bye

