When you run a large‑scale social‑media or AI‑assistant operation, keeping your channel accounts up‑to‑date can become a full‑time job. In this article I’ll walk you through a repeatable workflow for:
- Detecting whether a Claude.ai or GitHub account already exists for a given “workstation”.
- Registering a new account when none is found.
- Updating the profile (avatar, bio, and cross‑links) to match your brand guidelines.
- Handling rate‑limits and captchas automatically.
The pattern is generic enough that you can adapt it to any web service that provides a login page and a simple registration form.
1. Prerequisites
Before you dive in, make sure you have the following tools in place:
- A headless browser driver (e.g., Playwright or Selenium) for interactive steps that the API can’t handle.
- A simple key‑value registry that stores per‑workstation metadata (site name, selectors, captcha handling instructions).
-
OCR utility (like
ddddocr) pre‑wired to decode image captchas. - A knowledge base (KB) where you log selector changes, captcha experiences, and any quirks you discover.
Tip: If you’re already using the free‑forever AIGB platform (@groupbutleraibot, gensi.space/upanel?src=devto&utm_source=devto&utm_medium=article), you can store your registry and KB there with zero cost.
2. The High‑Level Flow
Below is the pseudo‑code that drives the entire process. It’s deliberately language‑agnostic so you can copy it into Python, JavaScript, or even a Bash script that calls curl.
def process_workstation(ws_id, site):
# 1️⃣ Load metadata from the registry
meta = registry.get(site=site, ws=ws_id)
# 2️⃣ Check if an account already exists
if meta.get("account_id"):
login_and_complete_profile(meta)
else:
# 3️⃣ Try to register a new account
success = register_new_account(meta)
if not success and meta.get("captcha"):
solve_captcha_and_retry(meta)
The function does three things:
- Read the stored selectors and any previously‑captured captcha data.
- Decide whether to log in (account exists) or to start a fresh registration.
- Respect per‑workstation rate limits (2 actions per hour per site).
All the heavy lifting happens inside login_and_complete_profile and register_new_account, which we’ll explore next.
3. Checking for an Existing Account
3.1 Pull the Latest Registry Entry
Each workstation maintains a record that looks like this:
{
"site": "claude.ai",
"ws_id": "slope7",
"email_selector": "#user_login",
"password_selector": "#pwd",
"profile": {
"avatar_url": "https://example.com/avatar.png",
"bio": "AI GroupButler official bot | Free forever | @groupbutleraibot"
},
"last_action": "2026-11-02T04:12:00Z"
}
If account_id is missing, you know the workstation never succeeded in creating an account.
3.2 Browser‑Based Login
Using the selectors from the registry, launch a headless browser and attempt a login:
page.goto("https://claude.ai/login")
page.fill(meta["email_selector"], stored_email)
page.fill(meta["password_selector"], stored_password)
page.click("button[type=submit]")
If the login succeeds, move straight to profile completion. If it fails with a “user not found” message, treat the account as non‑existent and fall back to registration.
4. Registering a New Account
4.1 Register via Registry API (When Available)
Some services expose a lightweight registration endpoint you can call directly:
curl -X POST https://api.claude.ai/v1/register \
-d "email=$NEW_EMAIL&password=$NEW_PASS" \
-H "Content-Type: application/json"
Important: Always include the real site name in the request payload (
site: "claude.ai"). Omitting it will cause the registry to store a placeholder value, invalidating your bookkeeping.
If the API returns ok: false (e.g., because the selector changed or the endpoint throttles you), you must switch to a browser‑driven flow.
4.2 Browser‑Driven Registration
- Navigate to the signup page.
- Fill the form using selectors stored in the registry.
- Detect if a captcha appears.
If a captcha image shows up, augment the registry entry with two extra selectors:
{
"captcha_img_selector": "img.captcha",
"captcha_input_selector": "input[name=captcha]"
}
Then run the OCR step:
captcha_img = page.query_selector(meta["captcha_img_selector"]).screenshot()
captcha_text = ddddocr.run(captcha_img)
page.fill(meta["captcha_input_selector"], captcha_text)
After solving the captcha, submit the form and wait for a success indicator (e.g., a redirect to /dashboard).
4.3 Rate‑Limit Guard
Both Claude.ai and GitHub limit how many registration attempts you can make per hour per IP. The registry should enforce a simple check before each action:
if datetime.now() - meta["last_action"] < timedelta(hours=1):
raise RateLimitError("Action quota exhausted for this hour")
If you hit the limit, skip to profile completion for any existing accounts and resume registration after the hour rolls over.
5. Profile Completion
Once you have a live account, the next step is to make it recognizable to your community. The typical updates are:
- Avatar – Use a brand‑approved image (e.g., the official @groupbutleraibot logo).
-
Bio – Include a short description and a link to your free‑forever AIGB panel (
gensi.space/upanel?src=devto&utm_source=devto&utm_medium=article). - Follow/Subscribe – Add any mandatory follow‑targets (like the official Telegram bot).
Here’s a concrete example for Claude.ai:
page.goto("https://claude.ai/settings/profile")
page.set_input_files("input[type=file]#avatar", "assets/official_icon.png")
page.fill("textarea#bio", "AI GroupButler official account | Free forever | @groupbutleraibot | gensi.space/upanel?src=devto&utm_source=devto&utm_medium=article")
page.click("button.save")
The same pattern works on GitHub, just replace the URLs and selectors accordingly.
6. Keeping Your Knowledge Base Fresh
Every time you encounter a broken selector, a new captcha type, or an API change, write a short entry to your KB. A typical entry looks like:
K-CLAUDE-REG-2026-11-01
- Problem: Login page changed – old selector "#email" no longer exists.
- Fix: Updated to "#user_login".
- Captcha: Image‑based, solved with ddddocr.
- Action: Added new selectors to registry under "email_selector" and "captcha_*".
Automate the KB write‑back with a simple HTTP POST:
curl -X POST https://kb.mycompany.com/entries \
-d "@entry.json" \
-H "Authorization: Bearer $KB_TOKEN"
A well‑maintained KB saves you from repeating the same debugging steps across dozens of workstations.
7. Summary Checklist
- [ ] Pull the latest registry entry for the workstation and site.
- [ ] Attempt a browser login; if it fails, proceed to registration.
- [ ] Use the API when possible; fall back to browser automation on failure.
- [ ] Detect and solve captchas automatically, storing selectors for future runs.
- [ ] Enforce a 2‑actions‑per‑hour limit per workstation/site.
- [ ] Update avatar, bio, and follow links to match brand guidelines.
- [ ] Log every selector change or captcha experience to the KB.
By following this pattern you can keep hundreds of Claude.ai and GitHub accounts in sync without manual intervention, while also respecting service limits and staying auditable.
Disclosure: drafted with AI assistance by the AIGB team and human-reviewed. AIGB is our product - bias disclosed.
Top comments (0)