Key takeaways

  • A ChatGPT prompt library for SEO saves time: keep your best prompts as text files and reuse them in seconds instead of retyping them.
  • The Python script in this article, first published in 2023, picks a saved prompt and pastes it into the chat window using PyAutoGUI.
  • For regular or larger-scale use, the official OpenAI API is the cleaner route. Check OpenAI’s terms of use for whatever method you choose.
  • Faster prompting does not mean faster publishing. Google asks for all AI-generated content to be fact-checked and reviewed by a person.
  • The real value is consistency: the same tested prompt every time, for briefs, titles, meta descriptions and summaries.

A ChatGPT prompt library for SEO is one of the simplest productivity wins I know. Most of us reuse the same dozen prompts every week, for content briefs, title ideas or summaries of data, and retype or copy them each time. In 2023 I wrote a small Python script to make that faster, and I still think the idea behind it is useful for anyone building AI SEO into their daily work.

I have worked in SEO and digital marketing for more than 16 years, and I am not a developer, so the script is deliberately simple. If you want the wider picture of where AI helps SEO work and where it doesn’t, read my guide to ChatGPT for SEO and working faster without cutting corners first.

I have rewritten this post to explain the script more clearly, add the limits I would now point out, and remove a price comparison with a paid tool that I could not support with a dated screenshot.

Why a prompt library helps SEO work

Good prompts take time to write and test. Once you have one that produces a useful content brief or a clean set of meta description options, you want the exact same wording every time. A prompt library gives you that:

  • Consistency. The same tested instructions every time, so the output is predictable and easy to review.
  • Speed. Pick a prompt by name instead of searching old chats or documents.
  • Shareability. A folder of text files is easy to share with a team and to improve over time.
A folder of prompt text files on a shelf, one file pulled out and passed by an arrow into a chat window
Figure 1. A prompt library: tested prompts saved as files, picked by name and sent to the chat in seconds.

How the script works

The script uses PyAutoGUI, a Python library that, in its own documentation’s words, “lets your Python scripts control the mouse and keyboard to automate interactions with other applications.” It works in four steps:

  1. open_file(file_path) reads a saved prompt from a text file.
  2. search_files(query, short_names) filters your list of prompts by a search word.
  3. send_text(text) copies the prompt to the clipboard, waits six seconds, pastes it into the chat box with Ctrl+V and presses Enter.
  4. A loop lets you pick the next prompt by number, or type “search” to filter again.

Before it starts, the script clicks once on the chat box, at screen coordinates you set yourself. That is why there is a second, tiny script to find those coordinates.

The Python script

This is the script as I published it in 2023. Replace the coordinates and add your own prompt names and file paths in the short_names_original dictionary.


import os
import pyautogui
import clipboard
import time
import pyperclip


pyautogui.moveTo(replace_with_your_own_coordinates_x, replace_with_your_own_coordinates_y)
pyautogui.click()


def open_file(file_path):
    with open(file_path, "r", encoding="utf-8") as f:
        file_text = f.read()
    return file_text


def send_text(text):
    clipboard.copy(text)
    time.sleep(6)
    pyautogui.hotkey('ctrl', 'v')
    pyautogui.press("enter")


def search_files(query, short_names):
    matching_files = {}
    for short_name, file_path in short_names.items():
        if query.lower() in short_name.lower():
            matching_files[short_name] = file_path
    return matching_files


short_names_original = {
    # Add your short names and their file paths here

    "Short description of your chatGPT Prompt": "the full path of your saved text file of your prompt",

    # ...
}


while True:
    short_names = short_names_original.copy()
    search_query = input("Enter a search query to filter the list of files or press Enter to skip: ")


    if search_query:
        short_names = search_files(search_query, short_names)


    while True:
        print("Select a file to send:")
        for index, (short_name, file_path) in enumerate(short_names.items()):
            print(f"{index + 1}. {short_name} - {os.path.basename(file_path)}")


        try:
            selected = input("Enter the number corresponding to the file you want to send or type 'search' to start a new search: ")
            if selected.lower() == 'search':
                break
            else:
                selected = int(selected) - 1
                if 0 <= selected < len(short_names):
                    short_name = list(short_names.keys())[selected]
                    text = open_file(short_names[short_name])
                    send_text(text)
                else:
                    print("Invalid selection. Try again.")
        except ValueError:
            print("Please enter a valid number or type 'search' to start a new search.")

Finding your screen coordinates

Save this as find_coordinates.py and run it. Hover the mouse over the chat box and note the X and Y values it prints. PyAutoGUI’s mouse functions explain that position() returns the cursor’s current coordinates and moveTo() moves the cursor to the coordinates you pass.


import pyautogui
import time

while True:
    x, y = pyautogui.position()
    print(f"X: {x}, Y: {y}")
    time.sleep(1)

Installing the modules

I ran the scripts in the free community edition of the PyCharm IDE on Windows. Install the modules first from the command prompt:


pip install pyautogui
pip install clipboard
pip install pyperclip

python --version
python -m pip install --upgrade pip

A safety tip from PyAutoGUI’s documentation: its fail-safe is “enabled by default”. If a script misbehaves, move the mouse quickly into a corner of the main screen and PyAutoGUI stops with an exception.

Rank Check Reports

AI can draft the page. Only a live check tells you where it ranks.

A live Google check of your keywords on desktop and mobile · from $14.99 per check · no subscription · report within one working day

Order a rank check report →

Limits I would point out today

The script is a convenience for one person at one screen. If you use it, keep these points in mind.

Approach Good for Watch out for
Copy and paste by hand Occasional prompts Slow, easy to use an old version of a prompt
This script (screen automation) One person reusing a prompt library Fixed screen coordinates; the service’s terms of use
Official OpenAI API Regular, repeatable or team use API key security and usage costs
  • Screen automation is fragile. If the window moves or the layout changes, the click lands in the wrong place. Keep the fail-safe on.
  • Check the terms of use. OpenAI’s terms of use list what you cannot do, including to “Automatically or programmatically extract data or Output”. The script only sends prompts, but read the terms yourself and decide.
  • The API is the cleaner route for scale. OpenAI’s developer quickstart shows how to send a prompt from Python through the official API, so you could send your saved prompts the same way without controlling the mouse.
Two routes from a prompt file to an AI reply: one through a mouse and keyboard on a screen, the other through a direct cable-like connector into a server box
Figure 2. Screen automation suits one person at one screen; the official API is the cleaner route for regular or team use.

Free tool · Ping My URL

Published a page after reviewing the AI draft? Let search engines know it changed.

Notify Google and other search engines about up to 5 new or updated URLs at once. Free, no sign-up.

Ping your URLs →

Faster prompts still need human review

My 2023 post said the script helped produce content faster and more cheaply for clients. That is only half the story. Google’s guidance on generative AI content is clear: “It is critical to manually factcheck and review all AI-generated content for accuracy and trustworthiness before publishing.”

Automate the typing, never the judgement.

So the time a prompt library saves should go into review: checking facts against sources, adding real experience and examples, and deciding whether a page deserves to be published at all. Used that way, the prompts make you faster without making the work worse.

A stopwatch with time saved flowing into a review desk with a magnifying glass and a checklist, before a page goes live in a browser
Figure 3. Spend the time the prompt library saves on fact-checking and review.

Prompts that work well in a library, in my experience: a content brief from your own research notes, five title and meta description options for a page you paste in, a plain-English summary of a Search Console export, a first draft of FAQ questions from customer emails, and a checklist review of a draft against your style guide.

Free tool · SEO ROI Calculator

Choosing which pages to spend your saved time on? Estimate what their keywords could be worth.

Enter search volume, CPC and your current ranking to estimate traffic, revenue and value for a keyword. Free.

Calculate your SEO ROI →

FAQ

What is a ChatGPT prompt library for SEO?

A collection of tested prompts, saved as files or notes, that you reuse for recurring SEO tasks such as content briefs, titles, meta descriptions and data summaries. It keeps the wording consistent and saves retyping.

Can I send ChatGPT prompts from a file without the API?

The script in this article does it by pasting the file’s text into the chat window with PyAutoGUI. It is fragile and suited to one person; for regular use, the official OpenAI API is the cleaner option. Check OpenAI’s terms of use either way.

What does PyAutoGUI do?

It is a Python library that lets scripts control the mouse and keyboard. Its fail-safe is on by default: moving the mouse into a corner of the main screen stops the script.

Do I still need to review content produced with these prompts?

Yes. Google asks site owners to manually fact-check and review all AI-generated content for accuracy and trustworthiness before publishing.

Eugen Platon

Eugen Platon

Director of SEO & Web Analytics at onwardSEO
Eugen Platon is a highly experienced SEO expert with 16+ years of experience propelling organizations to the summit of digital popularity. Eugen, who holds a Master's Certification in SEO and is well-known as a digital marketing expert, has a track record of using analytical skills to maximize return on investment through smart SEO operations. His passion is not simply increasing visibility, but also creating meaningful interaction, leads, and conversions via organic search channels. Eugen's knowledge goes far beyond traditional limits, embracing a wide range of businesses where competition is severe and the stakes are great. He has shown remarkable talent in achieving top keyword ranks in the highly competitive industries of gambling, car insurance, and events, demonstrating his ability to traverse the complexities of SEO in markets where every click matters. In addition to his success in these areas, Eugen improved rankings and dominated organic search in competitive niches like "event hire" and "tool hire" industries in the UK market, confirming his status as an SEO expert. His strategic approach and innovative strategies have been successful in these many domains, demonstrating his versatility and adaptability. Eugen's path through the digital marketing landscape has been distinguished by an unwavering pursuit of excellence in some of the most competitive businesses, such as antivirus and internet protection, dating, travel, R&D credits, and stock images. His SEO expertise goes beyond merely obtaining top keyword rankings; it also includes building long-term growth and optimizing visibility in markets where being noticed is key. Eugen's extensive SEO knowledge and experience make him an ideal asset to any project, whether navigating the complexity of the event hiring sector, revolutionizing tool hire business methods, or managing campaigns in online gambling and car insurance. With Eugen in charge of your SEO strategy, expect to see dramatic growth and unprecedented digital success.
Eugen Platon
Check my Online CV page here: Eugen Platon SEO Expert - Online CV.