Word count: ~4500 words
Estimated reading time: ~16 minutes
Last updated: September 16, 2025
Chapter Contents
- Preface: Link building — a battle you have to fight
- Chapter 1: Transforming our “Link Building SOP” into “machine language”
- Chapter 2: Why “general AI assistants” hit a wall here
- Chapter 3: From “having AI operate” to “having AI program”
- Chapter 4: “God-tier” prompt — briefing your “AI engineer”
- Chapter 5: Results showcase — birth of link_prospector.py
- Chapter 6: Ultimate evolution — from “excavator” to “fully automated combat unit”
- Conclusion and preview: When machines start working for you
Preface: Link Building — A Battle You Have to Fight
Hey, welcome back to my SEO series that’s been on hiatus for a while. Honestly, “outdated” topics like SEO get dismal traffic — nowhere near as eye-catching as writing something like “how to achieve black-hat GEO by modifying open-source models.”
But thinking about it, as one of the few effective non-paid traffic channels for indie developers, and one of my strongest marketing channels, I still want to make this content more complete and systematic.
Generally speaking, in the AI era, as long as your SEO concepts and logic aren’t too weak, language and content are no longer roadblocks for most people. Link building, however, remains extremely difficult — many people simply don’t do any at all.
You need to understand, it’s long past the gold-rush era of 15 years ago. And in today’s deepening AI search landscape, high-quality, highly-relevant backlinks have become more important than ever. Plus, doing link building right isn’t just theory — different products and website types require completely different approaches. So this episode, let me share how to efficiently find backlink opportunities.
Chapter 1: Transforming Our “Link Building SOP” into “Machine Language”
Before putting AI to work, we must first define a clear, unambiguous “work manual” for it. This is the first step of “Vibe Coding”: transforming our human professional SOP into structured instructions machines can understand.
Our core task is discovering different types of link opportunities. Therefore, our “input” is those powerful Google advanced search commands mentioned in the previous article. We need to organize them into a clear keyword list:
# opportunities_keywords.py
GUEST_POST_QUERIES = [
'"SaaS" intext:"write for us"',
'"AI tools" intitle:"guest post"',
'"growth hacking" inurl:"submit-article"'
]
RESOURCE_PAGE_QUERIES = [
'"best marketing tools" intitle:"resources"',
'"startup resources" inurl:"links"'
]
# ... more types of search commands
This file is the “task list” for our entire automation system.
Chapter 2: Why “General AI Assistants” Hit a Wall Here
My first thought was having a general AI Agent (like an AI assistant integrated with Playwright MCP) execute this task. My instruction was simple: “Please iterate through all search terms in this list, find the first 20 results for me, and extract URLs and titles.”
The result was disastrous. The AI assistant got stuck in loops, errors, or “forgot” the original task after a few searches due to context being too long.
After a full day of repeated attempts, I realized why this “naive” approach failed — it ignored several basic facts:
- Massive token consumption: Every browser operation requires AI to process large amounts of HTML code, quickly exhausting tokens and your budget.
- Instability: Web page structures change dynamically; AI’s “click” operations easily fail due to minor page changes.
- Non-reproducibility: Even if it succeeds this time, AI might take a completely different path next time — you can’t guarantee consistent results.
Chapter 3: From “Having AI Operate” to “Having AI Program”
This failure brought my “eureka” moment.
I realized that for repetitive, structured tasks, the best solution isn’t having AI mimic a clumsy human “clicking” screens. Instead, AI should play the role of a top-tier “software engineer,” writing a dedicated automation script for us — developed once, used repeatedly.
This is the higher-level “Vibe Coding” mindset: we shouldn’t settle for AI being a repetitive-labor “operator,” but upgrade to “project manager,” having AI build a system that works 24/7 for us.
Chapter 4: “God-Tier” Prompt — Briefing Your “AI Engineer”
Before getting to the point, I want to emphasize: this step is actually quite simple. Even without AI, you could implement it well using traditional scraping stacks like Beautiful Soup and SerpAPI. SerpAPI typically offers 100 free requests per month — plenty for initial exploration. If that’s not enough, registering multiple accounts for rotation is common practice.
But today’s topic is Vibe Coding — exploring the limits of human-machine collaboration. So we’ll challenge AI to complete this work. With my previous epiphany, I redesigned my prompt. This time, I wasn’t asking AI to “execute” but to “build.”
You are now a professional web data collection engineer. You need to write a Python script for me to automate collecting backlink opportunities from Google search results.
Task Requirements:
1. Tech stack: Use the Playwright library to drive a headless browser for searching.
2. Input: The script should be able to read a list containing multiple Google advanced search commands.
3. Execution flow:
a. Iterate through each search command in the list.
b. For each command, execute a Google search and collect the first 2 pages of results.
c. For each search result, precisely capture its "page title" and "URL."
4. Data output:
a. Aggregate all collected data (title, URL, source search command).
b. Save to a file named link_opportunities.csv, ensuring UTF-8 encoding.
5. Robustness:
a. Add appropriate error handling mechanisms to handle network fluctuations or page structure changes.
b. (Important) Add a random 3-5 second delay between each page load or operation to simulate human behavior and avoid anti-scraping detection.
Chapter 5: Results Showcase — Birth of link_prospector.py
This time, AI fully understood my intent. After several iterations and corrections, it generated a fully functional Python script for me — I call it link_prospector.py.
I won’t show the complete code, just share its core logic, as it embodies AI’s “intelligence”:
import asyncio
from playwright.async_api import async_playwright
import csv
QUERIES = [...] # Read our task list from file
async def scrape_google(query, page):
# ... Navigate to Google and execute search ...
# ... Loop clicking "next page," collecting two pages of data ...
results = []
for result in page.locator('div.g'):
title = await result.locator('h3').inner_text()
url = await result.locator('a').get_attribute('href')
results.append({"title": title, "url": url, "source_query": query})
return results
# ... Main function, responsible for launching browser, iterating QUERIES, calling scrape_google and writing to CSV ...
I ran this script. It worked silently in the background for about 15 minutes, then gave me a link_opportunities.csv file containing over 300 potential link opportunities. Stable, efficient, reproducible. This is real productivity.
Chapter 6: Ultimate Evolution — From “Excavator” to “Fully Automated Combat Unit”
link_prospector.py is already a powerful opportunity excavator. But it’s not enough — this only completes a small part of our link building work. I need automated workflows for the subsequent work too.
So how can our workflow evolve further? The answer is definitely yes. I can extend this process into a three-in-one “fully automated combat unit,” connected by using instruction files like claude.md to have Claude Code implement a complete workflow system for me. Actually, I feel that since Claude Code came along, workflow apps like n8n, Dify, and Coze have become outdated. Rather than spending time studying workflows, just tell your requirements directly to Claude Code and have it implement the entire automation script.
Phase 2: AI Outreach Strategist & Personalized Email Writing
Email outreach is the key step from “data” to “action.” We can use link_opportunities.csv as input, hand it to an AI Agent capable of calling Playwright MCP (like Claude Code), and command it with a detailed claude.md file. If you need to do link exchanges, you’ll also need to compile your own website resources into a simple knowledge base in claude.md. If you have mature link building emails from before, they can also serve as reference cases in claude.md.
# outreach_generator.claude.md
**Role:** Automated Outreach Strategist
**My Website Assets:**
- my-saas.com (Topic: AI Marketing Tools)
- my-blog.dev (Topic: Web Development Tutorials)
**Task:**
Read the attached link_opportunities.csv file. For each URL in the file, execute these steps:
1. **Use Playwright MCP to visit that URL**.
2. **Analyze website information:**
- Read the "About Us" page to understand their mission and positioning.
- Browse their blog homepage, summarize the 3 most recent article titles to judge their current content focus.
- Judge the website's overall tone: professional and serious, or casual and fun?
3. **Write a highly personalized outreach email:**
- Subject: Must be unique and highly relevant to their website content.
- Opening: Must be a sincere, non-generic compliment about their specific content.
- Proposal: Based on their website's theme, propose a relevant guest article idea, or suggest adding one of our high-value "link magnets" to their resource page.
- **(Strategy option)** If their website relates to both of my websites, strategically propose a three-way link exchange.
4. **Output results:** Append results to a new personalized_outreach.csv file, containing URL, email subject, and email body columns.
Phase 3: AI Automated Email Sending Engineer
Going further, we can again commission AI to play “software engineer,” writing a Python script connecting to Gmail API to batch-send these personalized emails.
# email_sender.claude.md
**Role:** Automated Email Sending Engineer
**Task:**
Write a Python script for me to automatically send emails. Specific requirements:
1. **Tech stack:** Use google-api-python-client and google-auth-oauthlib libraries.
2. **Authentication method:** Script needs to handle Google OAuth 2.0 authentication flow. Please clearly explain in code comments that users need to set up credentials in Google Cloud Console first and download credentials.json file. Script will automatically generate token.json file on first run.
3. **Input:** Read personalized_outreach.csv file.
4. **Execution flow:**
a. Iterate through each row of the CSV file.
b. For each row of data, create a MIME format email.
c. Use CSV's "email subject" and "email body" as email content.
d. **(Important)** To avoid being flagged as spam, add a random 30-60 second delay between each email sent.
5. **Output:** After successful sending, print "Email successfully sent to [target email]" log to console.
The Art of Human Intervention & the Iron Rule of “Post-Delivery Verification”
Your work gets compressed to two highest-value steps:
- Human intervention: Only when you receive their reply do you need to truly get involved — reviewing whether their website’s metrics are solid, and most importantly — negotiating price. (You definitely don’t want AI negotiating prices for you; it’s absolutely untrustworthy in this regard. Don’t ask how I know — I’ve tried.)
- Post-delivery verification: After successful collaboration publishing, you must inspect to ensure your dollars and API fees weren’t wasted. Checklist includes: Was the link published as agreed? Is the anchor text correct? Is the link dofollow? And most importantly: Is the page or directory containing the link blocked from crawling by their robots.txt? This is a big trap — I’ve encountered dishonest websites doing this. (Friendly reminder: Try to pay with PayPal. If they’re not trustworthy, you can gift them a chargeback.)
Conclusion & Next Preview: When Machines Start Working for You
This leap from “manual” to “automated” is worth far more than just saving a few hours. It brings a fundamental mindset shift: as creators, we should invest more energy in “designing systems” rather than “executing tasks.”
We didn’t just gain a tool — we mastered a methodology for “programming” our own domain knowledge. This methodology can be applied to any repetitive, rule-based work.
Next preview: The Data Compass of Growth — Using AI to Deep-Analyze URL Traffic Secrets
Now we have powerful external link building capabilities and an endless stream of opportunity lists. But how do we scientifically measure the final results of all our efforts and guide the next optimization direction?
In the next article, our final intermediate-level piece, we’ll return to “internal” work, installing a precision “data compass” for our “growth engine.” We’ll learn how to do URL-level traffic analysis and completely ditch tedious Excel, using Claude Code as our “AI data analyst.” Through conversational Vibe Coding, we’ll mine growth insights that directly improve rankings from raw data.
If you’re interested in this Vibe Coding practice approach and want to systematically learn how to integrate AI into your daily marketing and operations workflows, check out my companion series “Vibe Coding Practical Handbook for Marketing and Operations.”
Found Mr. Guo’s analysis insightful? Drop a 👍 and share with more friends who need it!
Follow my channel — let’s build your growth system together.
🌌 Don’t try to manually do what machines should do. Focus on designing an elegant system that makes machines work for you.