⚡ AI Automation Masterclass

Lab Activity 3: Building a Bulk Processing Script

Section 3: Vibe Coding Your Automation Tool


🎯 Objective

Use Google Antigravity to "vibe code" a Python script that monitors a local directory for new media files, renames them using a date format, and moves them to a compile directory.

⏱️ Time Allocation

  • Workspace Setup: 10 minutes
  • Vibe Coding Prompting & Implementation: 50 minutes

🛠️ Materials Required

  • Google Antigravity command center.
  • Local folder structure containing a raw_assets and a processed_assets folder.

📋 Step-by-Step Instructions

  1. Initialize Your Workspace:
  • Open Antigravity and point it to a clean workspace directory.
  • Create two local folders: raw_assets/ and processed_assets/.
  1. Draft the Vibe Code Prompt:
  • In the Antigravity prompt input, type:

"Write a Python script called file_monitor.py. The script should monitor the 'raw_assets' folder. When a new file is added, it should rename the file to include the current timestamp (YYYYMMDD_HHMMSS) and move it to the 'processed_assets' folder. The script should log its activity to console."

  1. Review and Approve:
  • Inspect the code generated by the agent.
  • Click Approve to write and test the file.
  1. Test the Automation:
  • Run the script in the terminal.
  • Drag and drop a sample image or video into raw_assets/.
  • Verify that the file is renamed and appears in processed_assets/.

🗣️ Debrief Questions

  • How did it feel to build a running Python script without writing a line of code?
  • What happens if the folder monitor script encounters duplicate file names?