The 'Invisible' SEO Hack: Building an AI Internal Linking Agent

Internal linking is the "dark matter" of SEO. You can't see it on the page, but it's what holds your domain authority together.
But as my library grew to 700+ blueprints, I hit a massive wall. Every time I published a new "Tinker Log," I had to spend 30 minutes opening old posts, hitting Command+F, and trying to find a natural spot to link to the new one.
I was acting like a human search engine. It was a waste of time.
So, I built a Folder Agent to do it for me. Here is the "Harden Loop" I used to automate my linking strategy.
> TL;DR: I built an agent that reads my entire content library at once. Now, when I finish a post, I just ask: *"Where should I link this?"* and it gives me the exact file name and sentence to update.
The Problem with "Keyword" Plugins
Most people try to automate this with WordPress plugins. The problem? They are dumb.
If you have a post about "Email Marketing," a plugin will link every single time you say "email" to that post. That’s not SEO; that’s spam. It looks cluttered and annoys your readers.
I wanted something that understood Topic Clusters. I wanted the agent to say: *"Since you're talking about 'Scalability' in this post, you should link to your 'Folder Agent' guide because that's where you explain the technical side."*
Phase 1: The Tinkering
I started by giving my agent (Gemini CLI) a simple list of my page titles and the text of my new post.
I asked: *"Look at my new post about 'Clawdbot.' Based on these 700 other titles I have, which ones are most relevant?"*
It was a good start, but it didn't give me the "Anchor Text." I still had to go find the sentence.
Phase 2: The Hardening
To make this a permanent Skill, I had to give the agent more context. I realized the agent needed to see the *content* of the old posts, not just the titles.
I refined the blueprint to follow a 3-step logic:
1. Extract Entities: Identify the 5 main keywords in the new draft.
2. Scan Folder: Search my content/ folder for those keywords.
3. Suggest Placement: Provide the exact line of code where the link should go.
The Result: One Command Linking
Now, my workflow looks like this:
1. Finish a draft.
2. Run my ai-internal-linking-agent blueprint.
3. Get a report like this:
> *"In content/blog/state-of-ai.md, line 42, change 'manual data entry' to manual data entry."*
I just copy/paste the suggestions and I'm done in 2 minutes.
The Actionable Lesson
If you're building a content library, don't wait until you have 500 posts to worry about linking. Start by creating a manifest.json—a simple list of every page you have.
When you have a manifest, your AI agent has a "map." Without a map, it's just guessing.
I’ve added the AI Internal Linking Blueprint to the vault. You can use it to map your own site today.
Stop hunting for keywords. Start building a map.