PR

Build a YouTube Uploader With Claude Code, Keep Your Keys Private

Build a YouTube Uploader With Claude Code, Keep Your Keys Private YouTube Auto-Upload for Solo Creators
記事内に広告が含まれています。

Ask Claude Code or Cursor to “write a script that uploads my videos to YouTube” and you will get something that looks right. Many people stop at the next step. Is it fine for an AI to see the credential files that can post to my channel? Could a test run go public by accident?

This article shows how the master prompt in the “YouTube Auto-Upload Builder Pack for Solo Creators” is built to answer those two worries. The prompt text is the core of the product, so this article covers its headings and key points only.

1. Decide first what the AI does and what you do

This pack is not a finished app that works as soon as you install it, and it is not a hosted service. It is a foundation for building: a reference script in Python, a template for the upload details, two guides, and a master prompt to paste into an AI coding agent.

the layout of the ZIP, a list of all 11 files
the layout of the ZIP, a list of all 11 files

Handing the build to an AI does not mean handing over everything. The split looks like this:

The AI agent does You do
Puts the files in place and adds the protection settings The Google Cloud setup, in your browser
Builds the Python environment Downloading the credential file and putting it in place
Adjusts the defaults in the template The first sign-in in the browser
Runs the pre-upload check and explains any errors Approving the real upload and reviewing it in YouTube Studio

You can also skip the AI and follow the manual setup in README.md.

2. How to use the master prompt

There are four steps.

  1. Create a new folder (for example youtube_uploader) and copy everything from the ZIP into it.
  2. Open that folder in Claude Code or Cursor.
  3. Open prompts/build_with_ai_prompt_en.md, copy everything between “COPY FROM HERE” and “COPY TO HERE”, and paste it into the agent.
  4. Answer the agent’s questions and follow its guidance.

The file opens with three notes under “Before you start”. Do not paste the contents of your credential files into the AI chat. Do the Google Cloud setup and the first browser sign-in yourself instead of handing them to the agent. And when the agent asks for permission to run a command, read the command before you approve it.

3. The 8 safety rules the agent has to follow

The first part of the prompt is not a to-do list. It is a set of rules for the agent. In summary:

  1. Do not read credentials. The only thing the agent may check is whether a file exists.
  2. Do not send credentials anywhere: not to the chat, logs, commits or outside services.
  3. Run --dry-run and see “OK: no errors” before any real upload.
  4. Keep the first upload private, with no schedule.
  5. Before a real upload, show the exact command and wait for your approval.
  6. Browser work belongs to you. The agent guides and waits.
  7. Ask before overwriting or deleting an existing file.
  8. Do not guess. Look errors up in the included troubleshooting guide first.

A dry run is a rehearsal: --dry-run validates what would be uploaded without calling the API, the interface a program uses to operate YouTube in place of your clicks. With rules 3 to 5 in place, the instructions make it less likely that an eager agent rushes straight to a public upload.

Still, these are instructions to an AI, and AI output is not the same every time. Read each proposed command with your own eyes before you let it run.

4. What happens in Steps 0 to 8

Nine steps follow the rules.

Step What it covers
0 Check the environment and ask a few questions (operating system, Python version, your channel name, your usual category and language)
1 Put the files in place (copy the reference code, create the secrets/ folder)
2 Protect the credentials
3 Build the Python environment
4 Google Cloud setup (your work)
5 Create and customize the template
6 Dry run
7 Private test upload
8 Write down the routine
the headings of Steps 0 to 8 in the master prompt appear one after another
the headings of Steps 0 to 8 in the master prompt appear one after another

The order matters. Protecting the credentials (Step 2) comes before the credential file is put in place (Step 4). The lock goes on first, and only then does the thing it protects arrive.

In Step 3, “Python environment” means a virtual environment, a private space inside the project folder that holds the libraries this project needs and nothing else. In Step 7 the first video is uploaded as private, and you check the title, thumbnail, visibility and other settings in YouTube Studio yourself. In Step 8 the agent writes a one-page note called HOW_TO_USE.md with the commands for your own setup: the steps for each upload, an example for scheduling, and what to do when your sign-in expires.

5. Keeping your credentials out of the AI’s reach

Uploading uses two credential files. client_secret.json is the file you download from Google Cloud. token.json is created automatically at your first sign-in. A token is a permit that says “I allowed uploads to this channel”. Anyone who holds these two files can post to your channel, so do not give them to an AI or to anyone else.

The pack stacks several protections:

  • One place for credentials. The credential files live only in the secrets/ folder.
  • An exclusion list. The included sample claudeignore.example is copied under the name .claudeignore. If you use Cursor, the same content is also saved as .cursorignore.
  • A deny rule for reading. In Claude Code, the agent adds "Read(./secrets/**)" to permissions.deny in .claude/settings.json. How ignore files are handled differs by tool and version, so the pack does not rely on the sample file alone. The deny rule is a separate step in the prompt.
  • Out of Git. In case you use Git, a tool that tracks the history of file changes, the .gitignore made from gitignore.example lists secrets/.
  • Instructions in the prompt. Rules 1 and 2 from the section above.

The script follows the same principle. It checks only whether the credential files exist and does not print what is inside them. The dry-run screen has a [Credentials] block whose heading says “existence check only; contents are never shown”, and under it each file is reported as found or missing.

After all of these settings, the part that matters most is your own habit. When you ask the agent about an error, give it the error message that was printed, not the contents of a file. If you do paste a credential somewhere by mistake, topic 15 of the included troubleshooting guide lists what to do, starting with deleting that client in the Google Cloud Console and creating a new one.

6. The work you do yourself, and how long to allow

To be honest, the first time takes effort.

  • You do the Google Cloud setup yourself, in your browser, by following the included guide (Steps 1 to 6). The guide estimates 20 to 30 minutes. This is where you configure OAuth, the mechanism that lets you give a program permission to act for you without handing over your password.
  • Separately, the README estimates 30 to 60 minutes for the whole first-time setup if you are new to Google Cloud. Both figures are estimates.
  • Screen names and steps reflect November 2026. Google changes its console from time to time.
the bundled documents and their roles: How_to_Use.md, README.md, the two guides in docs, the prompt, and the license
the bundled documents and their roles: How_to_Use.md, README.md, the two guides in docs, the prompt, and the license

The pack suits people who are comfortable with an AI coding agent and with a terminal, the text window where you type commands. What you pay for the agent itself depends on the service you use, and it is separate from the pack.

On what has been confirmed: uploading, applying the title and other details, the dry run and the template command were checked against the live YouTube API on Windows, using private test videos. The first-time browser sign-in and running on macOS are implemented, but they have not been confirmed in a real run.

7. When it stalls, and customizing after the build

This pack comes with no human support. In its place, the end of the prompt file says what to do when things stop:

  • If the agent stops partway, tell it: “Please continue from the next step.”
  • If an error appears, give the agent the error message, never any credentials, and tell it to check docs/troubleshooting_en.md, which has 15 topics.

The prompt also has a section called “Further customization”. After Step 8, and only if you ask, the agent may adjust the folder layout or the default values, or write a helper script that processes several folders in a row. The 8 rules still apply. After any change, check it with a dry run and one private test video. You are responsible for the results of changes an AI agent makes.

8. Recap and what to read next

  • The master prompt consists of 8 safety rules and a procedure in Steps 0 to 8.
  • Credentials stay in secrets/, and an exclusion list, a deny rule and the prompt’s own rules keep that folder out of what the agent reads.
  • The Google Cloud setup, the first sign-in and the approval of each real upload stay with you.

If you find deciding where the AI should stop harder than getting it to write code, this part of the pack was written for you. What the pack reduces is the upload chore. It does not promise more views, subscribers or revenue.

The product page is below. It is a builder pack with no support, a personal license for one person, $19 one-time.

▶ YouTube Auto-Upload Builder Pack for Solo Creators on Gumroad: https://ainavi.gumroad.com/l/youtube-auto-upload-builder-pack-solo

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

コメント

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