PR

Let Claude Code Build Your YouTube Uploader Without Reading Secrets

Let Claude Code Build Your YouTube Uploader Without Reading Secrets YouTube Auto-Upload for Business
記事内に広告が含まれています。

When a team asks Claude Code or Cursor to build a YouTube upload workflow, the IT or security lead usually has two questions. Will the AI open our credential files? Will it run a real upload without checking with anyone? This article outlines the order in which the master prompt in the YouTube Auto-Upload Builder Pack for Teams runs the build, and the settings that keep credentials away from the AI. The prompt text itself is not reproduced here. You will find its headings and key points only.

1. Two decisions to make before an AI agent builds anything

To upload through the API, the interface that lets software operate YouTube without a person clicking through the website, you need credential files issued through OAuth. OAuth is the mechanism that lets an app act on your channel with your permission, without the app ever seeing your password. There are two files: client_secret.json, which you download from Google Cloud, and token.json, which is created the first time you sign in. A token is the saved proof that you granted that permission. Both files work like keys to your channel.

An AI coding agent can read the files in its working folder. If you give it a task with no ground rules, it may try to print a credential file while it investigates an error, or run a command that really uploads a video because it wanted to confirm that the code works. Neither is malicious. Both are things you do not want.

So there are two decisions to make up front. The AI does not read the contents of the credential files. And a real upload runs only after a person approves it. The master prompt has both built into its instructions from the first line.

2. The master prompt is a work order you paste in

The master prompt is the file prompts/build_with_ai_prompt_en.md. You put the whole pack into a working folder, start an AI agent such as Claude Code, Cursor or Codex in that folder, and paste everything inside the box under the “Prompt body” heading.

the contents of the ZIP, 11 files arranged under prompts, docs and reference_code
the contents of the ZIP, 11 files arranged under prompts, docs and reference_code

At the top of the prompt is a block titled “My environment and preferences.” It has six lines to fill in: your operating system, the build mode, your video folder layout and naming rules, the default category, language and time zone, the target channel name, and any extra features or operating rules. You fill in what you can. For anything left blank, the prompt tells the agent to ask you in Step 1, in a single message, with a recommended default for each question.

The agent then works from the bundled reference code, upload_youtube.py, written in Python, and from the two guides in docs/. That is the idea behind the kit: the AI is not asked to write API code from memory. It is given working code and current documentation as its source material. The prompt backs this up with five working rules at the end, which include asking instead of guessing and not reporting something as verified unless it was actually verified.

3. The flow from Step 0 to Step 8

The prompt divides the work into nine steps, numbered 0 through 8. Here are the headings with the main point of each.

Step Heading Main point
0 Protect secrets first Before reading any other file, put the protections for the credentials folder in place
1 Check the environment and requirements Check the OS, the shell and the Python version (3.10 or later), ask about the blank items, and agree on a plan
2 Read the reference code Read the code, the template and both guides, and note the design points to keep
3 Implement and customize Implement according to the build mode and report what changed
4 Install dependencies Create a virtual environment, an isolated folder that holds this project’s Python libraries, and install the dependencies
5 Verify without using quota Verify with --init-meta and --dry-run
6 Google Cloud setup and sign-in The agent guides you through work that you do yourself
7 First real upload Upload one private test video, only with your approval
8 Final report Summarize the files, the daily commands, the protections, the verification results and the known limits
the headings of Step 0 through Step 8 in the master prompt appear one after another
the headings of Step 0 through Step 8 in the master prompt appear one after another

Step 0 comes first for a reason. The protections have to be in place before the agent starts reading through the folder.

The verification in Step 5 uses methods that do not call the API. --dry-run is a rehearsal: the script shows what it would send and what is wrong with it, without sending anything. No video is uploaded, and no quota is used. Quota is the daily allowance of API usage that Google gives each project. The step also has the agent try two or three failure cases, such as a missing video or a schedule in the past, to confirm that the tool stops with a clear message.

In Step 6, the Google Cloud setup and the placement of the credential file are your job. The agent walks you through the order and only checks whether the file exists. In Step 7, the agent tells you that it is about to upload one private test video and that this uses quota, and it proceeds only if you say yes. Afterward it shows you the YouTube Studio edit link and asks you to review the result there.

4. Choosing build mode A, B or C

You choose one of three ways to build.

Mode A uses the reference code as it is. The agent copies the script, the metadata template and the dependency list to the top of your working folder and leaves the originals untouched. Mode B starts from A and then changes the copies to match your folder layout and operating rules. That includes aligning the default category, language and time zone, and the initial values in the template, with your answers. Mode C writes a new implementation that follows the design of the reference code.

For modes B and C, the prompt lists 11 design points and tells the agent to keep every one of them, even in a rebuild. They include the resumable upload with retries on errors, --dry-run, the channel guard that aborts when the signed-in channel is not the expected one, the duplicate-upload guard, pre-flight validation of lengths, and a default privacy setting of private.

If you are unsure, mode A is the shortest path to a first private test upload, and you can ask for changes later in the same conversation.

5. Six security rules that override every other instruction

Before the steps, the prompt sets out six rules and states that they override every other instruction.

The first rule says the agent does not read, display, copy, summarize, log or commit the contents of any file in the credentials folder. Indirect routes are named and ruled out as well. The one thing it may do is check whether a file exists.

The second rule says that you, the human, obtain and place the credential files. The agent only guides you and does not ask you to paste their contents. If you paste them by mistake, the agent is told not to use them and to warn you that the credentials should be rotated.

The third rule covers error messages: if an error or stack trace contains something that looks like a credential, the agent does not quote that part. The fourth says credentials, API keys and tokens are not written directly into source code, configuration files or documentation.

The fifth rule says the agent does not run a real upload, meaning a command without --dry-run, on its own judgment. It gets your explicit approval immediately before running it. The sixth says that before deleting or overwriting an existing file, the agent tells you what and why and waits for your confirmation.

6. Settings that keep the AI away from your credentials

Written rules are one layer. Tool settings are a second layer, and the agent puts them in place in Step 0. The same settings are described in section 8 of the bundled docs/setup_google_cloud_en.md, so you can also apply them by hand.

For Claude Code, you add rules to the project’s .claude/settings.json that deny reading and editing the folder.

{
  "permissions": {
    "deny": [
      "Read(./secrets/**)",
      "Edit(./secrets/**)"
    ]
  }
}

You also save the bundled reference_code/claudeignore.example as .claudeignore in the project root. For Cursor, you save the same content as .cursorignore. Step 0 also creates a .gitignore from the bundled example, so that the credentials folder and video files are not tracked by Git.

The setup guide is frank about the limits. How ignore files and permission settings are honored depends on the tool and its version, and the guide says not to rely on settings alone. Reviewing what you approve is the safeguard it calls most reliable. When the agent asks permission to run a command, decline it if the command would display a file in the credentials folder, for example with cat, type or Get-Content. Do not hand the contents of the credential files to an AI agent or to any third party.

If the credentials may have reached an AI or someone outside your team, the troubleshooting guide lists what to do: reset the client secret of that OAuth client in the Google Cloud Console, remove the app’s access in your Google account, delete the saved token and sign in again. If the file was committed to Git, remove it from the history too.

7. Three follow-up prompts for customizing after the build

So that you can keep going in the same conversation once the build is done, the prompt file ends with three follow-up prompts that can be pasted as they are.

The first, “Batch upload of several folders,” asks for a mode that works through the folders that have not been uploaded yet, in order. The second, “Changing the defaults,” asks the agent to change the default category, language and time zone to suit your organization and to update the template to match. The third, “An operations guide for the team,” asks for a short guide to day-to-day use for non-engineering staff. That last one is the piece that helps with handover, because it turns what the builder knows into a document the rest of the team can follow.

8. What to know before you start

This pack is not a finished app or a hosted service. It is a build kit, a foundation for setting up the workflow on your own computers. It is written for people who can use an AI coding agent, run commands in a terminal and click through the Google Cloud Console. If you have an AI agent do the build, you need your own subscription to Claude Code or a similar tool.

AI agents do not produce the same output every time. You are responsible for the results of changes the agent makes, so after any modification, check the code with --dry-run and one private test video.

In the reference code, the video upload, the metadata being applied, scheduled publishing, --init-meta and --dry-run were verified against the live YouTube API on Windows in November 2026, by uploading private test videos. The first browser sign-in, the automatic retries on errors, adding to playlists and macOS are implemented but have not been tested against the live API. Some limits also come from Google. As of November 2026, the bundled guides note that tokens expire after 7 days while the OAuth consent screen is in Testing status, and they explain the options.

As for time, researching the YouTube Data API, implementing the upload and testing it yourself typically takes a few hours to a full day. Starting from this kit takes about 1 to 2 hours. Both figures are estimates and vary with your environment and experience.

a comparison table of building it yourself and using this kit
a comparison table of building it yourself and using this kit

9. Summary and related articles

The master prompt fixes an order of work in its instructions: protect the credentials first, verify with methods that do not call the API, and run a real upload only with a person’s approval. Combine that with the habit of reading each command before you approve it, and do not rely on settings alone.

The YouTube Auto-Upload Builder Pack for Teams is sold on Gumroad. It is a build kit with no support, unlimited seats within one organization or team, $79 one-time. Separate legal entities each need their own purchase, and the pack may not be redistributed or resold.

Get the pack on Gumroad: https://ainavi.gumroad.com/l/youtube-auto-upload-builder-pack

This article is based on the documentation bundled with the pack, as of November 2026. Tool settings, API specifications and on-screen wording may change.

YouTube is a trademark of Google LLC. This product is not provided, endorsed or sponsored by Google LLC or YouTube.

コメント

タイトルとURLをコピーしました