DAGA

Digital Agency Growth Academy

AI operator training, hosted products, and community

TextPreview access

Build your first script

Ask Claude Code to build a simple, useful script from a plain-English description, run it, and verify the output.

Time 20 minModule Your first real tasksCourse progress 0%

Lesson outcome

You will have asked Claude Code to create a working script from a plain-English description, run it successfully, and verified the result — without writing any code yourself.

Why this matters in an agency

This is the lesson where you prove to yourself that you can build tools without knowing how to code. Not in theory — in practice. You will describe what you want in plain English, Claude Code will write the code, and you will run it and check the output. If the output is wrong, you will tell Claude Code what is wrong and it will fix it. This build-run-verify loop is how you will create every tool in this course and in your daily work.

Inputs, tools, and prerequisites

Claude Code running in your vault directory. Your Obsidian vault with at least a few notes in it (from the previous modules). A willingness to run something you did not write — Claude Code's permission system will show you everything before it executes.

Step-by-step walkthrough

Describe what you want

You are going to build a simple tool: a script that counts the words in every note in your vault and tells you which notes are longest. This is genuinely useful — it helps you understand the state of your vault — and simple enough to build in one conversation.

Ask Claude Code:

```
Create a script that goes through every .md file in this vault, counts the words in each one, and prints a list sorted from most words to fewest. Skip any files inside the .obsidian folder. Show the filename and word count for each note.
```

Claude Code will write a script. It might write it in Python, JavaScript, or Bash — the language does not matter for this exercise. What matters is that Claude Code will show you the code and ask for permission to create the file.

Read the code before approving

This is your first encounter with code. Do not panic. You do not need to understand every line. But read through it and look for things you can recognize:

  • Does it mention .md files? (Good — that is what you asked for.)
  • Does it skip .obsidian? (Good — that is what you asked for.)
  • Does it count words and sort? (Good — that is what you asked for.)

If you see something confusing, ask Claude Code before approving:

```
Before I run this, explain what each section of the script does in plain English.
```

Claude Code will walk you through the code line by line. This is how you learn to read code — not from a textbook, but from code that does something you asked for, explained by the tool that wrote it.

Run the script

Approve the file creation. Then Claude Code will offer to run the script. It will show you the command it wants to execute (something like python vault-word-count.py or node vault-word-count.js). Approve the execution.

The script runs and prints a list of your vault notes sorted by word count. Look at the output. Does it list the notes you expected? Do the word counts look reasonable? If you have a note with a paragraph of text, it should show a higher count than an empty template.

Verify the result

Pick one note from the output and verify the word count manually. Open the note in Obsidian, select all the text, and do a rough count (or paste it into an online word counter). If the script's count is close to your manual count, it is working correctly. It does not need to match exactly — different word-counting methods handle punctuation and formatting slightly differently.

Fix a problem

If something is wrong — maybe the script counted files inside .obsidian when you asked it not to, or the word count seems way off — tell Claude Code:

```
The script is counting files inside the .obsidian folder. I asked you to skip that folder. Fix it.
```

Claude Code will read the script, identify the problem, and propose a fix. This correct-and-fix cycle is normal. It is not a failure. It is how iterative development works, whether the developer is a human or an AI.

Try a variation

Now ask for something slightly different:

```
Modify the script so it also shows the date each note was last modified, and only shows notes with more than 50 words.
```

Claude Code modifies the script. Run it again and check the output. You just added a feature to a tool by describing what you wanted in English. You are building software without writing code.

Failure modes and verification checks

The main failure mode is running a script without understanding what it does. Always ask Claude Code to explain before you run. Another failure mode is not verifying the output — the script ran, but did it produce the right answer? A third is giving up after the first error instead of telling Claude Code what went wrong so it can fix it.

Verification: the script runs without errors, the output lists your vault notes with word counts, and at least one word count matches your manual check.

Implementation checklist

  • Describe the vault word-counter script to Claude Code.
  • Read the code and ask Claude Code to explain anything unclear.
  • Run the script and review the output.
  • Manually verify at least one word count.
  • If anything is wrong, tell Claude Code and have it fix the issue.
  • Ask for one modification and verify the updated output.

Immediate next action

Move to the next module. You have proven that you can build working tools by describing what you want. From here on, that skill compounds — every module uses it.

Exercise

Ask Claude Code to build a second script — a project folder generator. Give it this prompt:

```
Create a script that takes a client name as an argument and creates a new folder in the current directory with that client name. Inside it, create subfolders called "briefs", "deliverables", "reports", and "communication". Also create an empty README.md in the client folder with the client name as a heading.
```

Run the script with a test client name. Verify the folder structure was created correctly by checking in your file manager. Then run it again with a different client name and confirm it creates a separate, identical structure. This exercise proves you can build practical agency tools — not just analysis scripts — with Claude Code.