[00:00] (0.00s)
I've been using Cloud Code a lot lately.
[00:01] (1.92s)
It's really surpassed cursor for me for
[00:04] (4.48s)
all my AI coding needs. Hey, my name is
[00:06] (6.96s)
Ben. In this video, I'm going to show
[00:08] (8.40s)
you the top three productivity tips that
[00:10] (10.56s)
I've learned from my hundreds of hours
[00:12] (12.16s)
of using cloud code. Let's go.
[00:17] (17.60s)
This first tip addresses something that
[00:19] (19.52s)
really can kill your flow in Cloud Code.
[00:21] (21.92s)
If we do something simple in a project,
[00:23] (23.52s)
especially on the first time we say
[00:24] (24.96s)
start a dev server, it's going to go and
[00:27] (27.28s)
it's going to ask us for permission to
[00:28] (28.72s)
actually run the command or edit the
[00:30] (30.88s)
code, whatever the case may be. And then
[00:32] (32.24s)
it gives you three options. You can
[00:33] (33.60s)
either just proceed with it. You can
[00:35] (35.60s)
proceed with it and then don't ask again
[00:37] (37.20s)
for that particular command. And then
[00:39] (39.44s)
third, you can just say no, I don't want
[00:40] (40.80s)
to do it differently. But as I was using
[00:42] (42.32s)
cloud code more and more, I found myself
[00:44] (44.24s)
always just picking two no matter what.
[00:46] (46.24s)
I found with cloud code, it doesn't
[00:47] (47.76s)
really try to do anything crazy ever. So
[00:50] (50.40s)
there's not really any reason to always
[00:51] (51.84s)
ask this question. I'll show you a
[00:53] (53.12s)
different way to open cloud code. So you
[00:54] (54.64s)
don't have to always approve all those
[00:56] (56.08s)
permissions. To bypass permissions, what
[00:58] (58.08s)
you have to do is launch cloud normally,
[01:00] (60.56s)
but then add a flag dash dash
[01:02] (62.64s)
dangerously skip permissions. And now
[01:04] (64.32s)
when you open it up, we're going to see
[01:05] (65.60s)
a message here saying bypassing
[01:06] (66.96s)
permissions. And now if we ask to start
[01:08] (68.48s)
the dev server, it's just going to do
[01:09] (69.92s)
it. It's not going to ask for permission
[01:11] (71.28s)
or not going to give us those options
[01:12] (72.64s)
anymore. Obviously, this does introduce
[01:14] (74.32s)
a bit more risk because now clock can do
[01:16] (76.56s)
anything on your system. So, there are
[01:18] (78.00s)
some hooks you can add in that gives you
[01:19] (79.76s)
some protection. You could add in a hook
[01:21] (81.20s)
that prevents it from going outside the
[01:22] (82.88s)
scope of your project folder. You could
[01:24] (84.88s)
also add a hook that stops it from
[01:26] (86.24s)
removing files. But to be honest, I
[01:28] (88.08s)
don't find those are used actually very
[01:29] (89.52s)
much at all cuz like I said, claw
[01:31] (91.52s)
doesn't do any crazy changes from my
[01:33] (93.20s)
personal experience. Always putting in
[01:34] (94.72s)
that flag every time can be a bit
[01:36] (96.48s)
annoying. There's a shortcut you can use
[01:38] (98.56s)
so you can create an alias on your
[01:40] (100.08s)
system. That's what I did. So you can
[01:42] (102.08s)
create an alias that maps the just the
[01:44] (104.00s)
word claude to Claude with that
[01:45] (105.76s)
dangerously skip permissions flag. So
[01:48] (108.00s)
I'll put that in the description of the
[01:49] (109.12s)
video if you want to use that. Once
[01:50] (110.72s)
that's in place, now I can just open
[01:52] (112.32s)
claude like normal. And now it's going
[01:53] (113.84s)
to bypass permissions by default. So do
[01:55] (115.68s)
your own research. Make sure this is a
[01:57] (117.20s)
good fit for you to bypass permissions.
[01:59] (119.04s)
But for me, it's giving me a
[02:00] (120.16s)
productivity boost because it allows
[02:01] (121.52s)
cloud code to work more in agent mode.
[02:07] (127.04s)
You're in cursor and you're in your
[02:08] (128.64s)
project. If you just do the init
[02:10] (130.24s)
command, what it does is builds you a
[02:12] (132.80s)
cla.md file. So markdown file. The
[02:15] (135.76s)
unique thing about it though is that
[02:17] (137.68s)
every time cla loads, it loads this
[02:20] (140.08s)
cloud MD file in there. And there I
[02:21] (141.68s)
created it. And this file has the
[02:23] (143.28s)
essential development commands,
[02:24] (144.64s)
architecture overview, and key
[02:26] (146.32s)
components. That's great and it's it's
[02:29] (149.12s)
useful, but this next productivity hack
[02:31] (151.44s)
will make it even better. So, if we look
[02:33] (153.28s)
here at what it created, it's done a
[02:35] (155.04s)
really good job of creating this file,
[02:36] (156.56s)
but what I find is adding a section for
[02:38] (158.80s)
shortcuts really helps and really saves
[02:41] (161.04s)
a lot of time. I'm going to add command
[02:43] (163.28s)
shortcuts here. The ones I'm going to
[02:44] (164.64s)
use for this example are around GitHub.
[02:46] (166.40s)
So, creating feature branches in GitHub,
[02:48] (168.80s)
doing pull requests, pushing your code
[02:50] (170.80s)
to GitHub. Cloud code is a bit weak on
[02:53] (173.52s)
restore points and backups. So, this
[02:56] (176.64s)
actually these commands are a real
[02:58] (178.40s)
lifesaver. So if you look at the first
[02:59] (179.76s)
one, I just give it a short like two or
[03:01] (181.76s)
three letter acronym for the command I
[03:04] (184.48s)
want and then I remember all the
[03:05] (185.84s)
commands because I use them all the
[03:07] (187.20s)
time. So for example, NB here will be
[03:09] (189.92s)
creates a new branch for feature
[03:11] (191.76s)
development. So creates a feature
[03:13] (193.12s)
branch. Something like PPR publishes the
[03:16] (196.96s)
PR the pull request and creates good
[03:20] (200.24s)
commit messages. So you can do this for
[03:22] (202.00s)
whatever kind of commands you want in
[03:23] (203.92s)
your application that you use all the
[03:25] (205.36s)
time. It's going to save you a lot of
[03:27] (207.04s)
time in cloud code. So let's look at an
[03:28] (208.64s)
example. So now in cloud code I can just
[03:30] (210.48s)
use those shortcuts. So now I'm going to
[03:31] (211.60s)
say NB for new branch and then say what
[03:33] (213.52s)
the branch is going to be about. So this
[03:35] (215.04s)
is going to be create a branch to detect
[03:36] (216.56s)
duplicate locations. Now it's going to
[03:38] (218.16s)
know what that command means. It's going
[03:39] (219.60s)
to create the branch. It's going to name
[03:41] (221.44s)
it nicely for me. So say detect
[03:43] (223.44s)
duplicate locations. Now the branch is
[03:45] (225.92s)
all ready for me to go. And all I have
[03:47] (227.28s)
to do to get this hooked up by the way
[03:48] (228.96s)
is I just installed GitHub desktop
[03:50] (230.88s)
linked it to my GitHub account. And that
[03:52] (232.56s)
gave Cloud Code full access to my GitHub
[03:54] (234.72s)
account so I can create all these
[03:55] (235.92s)
feature branches etc. Now that's
[03:57] (237.44s)
created, I can just do my coding as
[03:58] (238.72s)
usual. I'm going to say add a warning if
[04:00] (240.08s)
a location has the same address and zip
[04:02] (242.00s)
code as one already in the system. The
[04:04] (244.88s)
clock code will go out as normal, do its
[04:06] (246.64s)
thing, but now I have that feature
[04:08] (248.72s)
branch created. So I can actually just
[04:10] (250.48s)
commit the changes it's doing. So now
[04:12] (252.56s)
it's done coding, I can just commit
[04:14] (254.00s)
those changes to that branch right
[04:15] (255.52s)
inside Cloud Code. And it's really nice
[04:18] (258.16s)
because it kind of makes up for some of
[04:20] (260.00s)
those lacking restore point features in
[04:22] (262.00s)
Cloud Code. It allows me to quickly back
[04:23] (263.84s)
up files to GitHub, keep a good version
[04:26] (266.00s)
track and then I'll show you in a
[04:27] (267.36s)
second. It does really good
[04:28] (268.40s)
documentation. We can also use our
[04:30] (270.08s)
create pull request command here and
[04:32] (272.00s)
that's going to go out to GitHub and
[04:33] (273.60s)
again it's going to create a pull
[04:34] (274.64s)
request. There is actually a GitHub app
[04:36] (276.64s)
built for cloud code. So you can say
[04:38] (278.08s)
install GitHub app here and that's
[04:40] (280.24s)
probably the recommended way to do it.
[04:41] (281.84s)
So you definitely try that out. But from
[04:43] (283.44s)
my experience using the the CloudMD file
[04:45] (285.68s)
and just putting in those custom
[04:47] (287.04s)
commands works really well for me and
[04:48] (288.80s)
it's really enhanced my productivity.
[04:50] (290.16s)
And this is just one example like using
[04:51] (291.68s)
GitHub, but there's I'm sure all kinds
[04:53] (293.28s)
of things you can think of to add to the
[04:54] (294.88s)
CloudMD file as shortcuts. And if we
[04:57] (297.04s)
look at the pull request it actually
[04:58] (298.48s)
created in GitHub, it did a really nice
[05:00] (300.32s)
job of documenting it. It has a really
[05:02] (302.08s)
nice summary, key features, even the
[05:04] (304.16s)
test plan in here. And it's very useful
[05:06] (306.16s)
documentation. This one thing I'm seeing
[05:07] (307.60s)
in the industry right now is everyone's
[05:09] (309.92s)
at least starting with using AI for
[05:12] (312.16s)
documentation. It is a really good first
[05:14] (314.48s)
use case and cloud code does it really
[05:19] (319.84s)
This next productivity tip is a bit of a
[05:21] (321.52s)
two for one. So, first it's about how
[05:23] (323.60s)
your screen's laid out for maximum
[05:25] (325.68s)
productivity. In this case, I want to
[05:27] (327.12s)
see everything I can. What I suggest is
[05:28] (328.88s)
you have a vertical monitor. So, you see
[05:30] (330.48s)
this on the left here. This would be
[05:32] (332.24s)
your code. So, your cursor or your
[05:33] (333.92s)
Visual Studio Code, whatever you're
[05:35] (335.36s)
using, that would be dedicated monitor
[05:37] (337.84s)
that's vertical. Then, your second
[05:39] (339.92s)
monitor could be more horizontal and you
[05:42] (342.16s)
could have on that one, you could have
[05:43] (343.60s)
cloud code in a separate terminal. You
[05:46] (346.00s)
could also have the application you're
[05:47] (347.36s)
building. This way you can just look at
[05:48] (348.96s)
the application. It's going to do a hot
[05:50] (350.64s)
refresh when you do changes and just do
[05:53] (353.20s)
commands and cloud code. Everything's
[05:54] (354.96s)
just right there right in front of you.
[05:56] (356.56s)
And then you can see the code being
[05:57] (357.68s)
updated in real time as you go. And by
[05:59] (359.68s)
the way, when you do have the second
[06:01] (361.12s)
monitor set up with a separate terminal
[06:03] (363.20s)
window, you can actually connect it to
[06:04] (364.64s)
your IDE. So you just do a / ID command
[06:07] (367.84s)
and it's going to give you a list of the
[06:09] (369.44s)
IDEs you have installed and you have
[06:12] (372.24s)
this configured in. So now I can just
[06:13] (373.84s)
say cursor and now it's linked up. So
[06:15] (375.52s)
that just ties everything together
[06:16] (376.80s)
between your two monitors. And now I
[06:18] (378.40s)
have all my windows positioned. So
[06:19] (379.84s)
everything's in front of me. So I can do
[06:21] (381.28s)
rapid development using Claude Code's
[06:23] (383.60s)
queuing methods. If you're used to
[06:25] (385.20s)
cursor like I was, you kind of used to
[06:27] (387.20s)
you put in your prompt and you wait for
[06:28] (388.72s)
it to finish and then you put in your
[06:30] (390.24s)
next one. But Cloud Code is actually way
[06:32] (392.32s)
better for this and it's got a really
[06:33] (393.76s)
powerful queuing feature. But check this
[06:35] (395.60s)
out. I just put in the prompt add sort
[06:37] (397.68s)
for website column. But while it's
[06:39] (399.60s)
actually cooking away and doing that, if
[06:41] (401.20s)
I put in another command like add icon
[06:43] (403.44s)
to store locations and I hit enter. So
[06:45] (405.68s)
now you see it's actually been cued here
[06:48] (408.32s)
and Claude's actually going to go
[06:50] (410.00s)
through all these cued messages and do
[06:52] (412.16s)
them not necessarily in the order you
[06:53] (413.76s)
present them, but it's going to kind of
[06:54] (414.96s)
combine them and do really intelligent
[06:56] (416.80s)
way of doing all the changes for you
[06:58] (418.96s)
kind of together. What I find myself
[07:00] (420.80s)
doing is like now that I have everything
[07:02] (422.08s)
on my screen, I can see the application
[07:03] (423.68s)
and see the changes coming in real time.
[07:05] (425.92s)
I just keep putting in things I want
[07:07] (427.68s)
changed and just not worrying about the
[07:09] (429.52s)
order or anything. Just keep putting
[07:10] (430.80s)
them in there, queuing them up. So,
[07:12] (432.40s)
Claude Code just does it for me. And
[07:13] (433.68s)
then I keep iterating in real time. Just
[07:15] (435.60s)
a little bit of time while I was
[07:16] (436.72s)
talking. It took those two cued messages
[07:18] (438.64s)
and did both the changes. Added sorting
[07:20] (440.96s)
to my website column and added this nice
[07:23] (443.36s)
little icon for my store locations. So,
[07:25] (445.12s)
when you're using cloud code, make sure
[07:26] (446.56s)
you invest the time to get your system
[07:28] (448.96s)
set up how you want it with the windows
[07:30] (450.40s)
and screens all how you want it. Also,
[07:32] (452.56s)
make constant use of the queueing
[07:34] (454.40s)
feature is really powerful. Just blast
[07:36] (456.32s)
away with all your changes and let Cloud
[07:37] (457.84s)
Code manage it and do them all for you.
[07:40] (460.00s)
I think we're in a period of time right
[07:41] (461.52s)
now where if you really understand how
[07:43] (463.12s)
to use Cloud Code effectively, you
[07:45] (465.36s)
really have an unfair advantage. I'm
[07:47] (467.12s)
going to do more videos on Cloud Code
[07:48] (468.64s)
coming up. Everything from tips and
[07:50] (470.48s)
tricks like this one to actual
[07:52] (472.24s)
application builds. If that's
[07:54] (474.24s)
interesting to you, make sure you
[07:55] (475.52s)
subscribe to the channel. I hope you're
[07:57] (477.04s)
having an amazing day. I'll talk to you
[07:58] (478.80s)
in the next one.