Playwright Chrome Profile Agent
The Chrome Profile Agent connects Google Antigravity to your active Google Chrome profile on macOS using Playwright MCP (@playwright/mcp). It allows AI agents to interact with logged-in web applications (LinkedIn, GitHub, Google Workspaces) without requiring re-authentication.
Agent Instructions & Rules
1. Resume File Size Limit Rule
- Strict Requirement: The tailored PDF resume (
Raghav Ganesh Resume(.net)-new.pdf) MUST stay strictly under 2 MB (target size:~1.5 MB). - Enforcement: PyMuPDF script
tailor_resume_helper.pyuses Base-14 standard fonts and stream deflation (deflate=True, garbage=4, clean=True) to purge unreferenced font objects and keep the output file size strictly below 2 MB.
2. Comprehensive Easy Apply Form Filling Rules
When navigating LinkedIn Easy Apply modal dialogs (.jobs-easy-apply-modal), the agent MUST systematically check and fill:
- Resume Upload: Attach
Raghav Ganesh Resume(.net)-new.pdf(< 2MB). - Textboxes & Number Inputs:
- Years of Experience / Skill ratings: Default to
4years. - Notice Period fields: Fill
15 daysorImmediate. - Compensation / CTC fields: Fill expected CTC values.
- Years of Experience / Skill ratings: Default to
- Dropdowns & Comboboxes:
- Native
<select>elements: Inspect<option>list and choose matching choice ("Yes", "Bachelor's", "Full-time", "15 days"). - ARIA comboboxes (
[role="combobox"]): Click to expand options and select first valid choice.
- Native
- Radio Buttons & Checkboxes:
- Work Authorization: Select
Yes. - Sponsorship: Select
No(orYesif required). - Terms / Agreements: Check all mandatory checkboxes.
- Work Authorization: Select
Operating Modes
Mode 1: Automated LinkedIn Easy Apply Workflow
Run the end-to-end Easy Apply automation script:
# 1. Test Easy Apply workflow in dry-run mode (stops before final submission)
node scripts/easy_apply_runner.js --search ".NET Full Stack Developer" --dry-run
# 2. Execute full Easy Apply workflow with auto-submission & Google Sheets logging
node scripts/easy_apply_runner.js --search ".NET Developer"
Workflow Steps executed by easy_apply_runner.js:
- Navigates to LinkedIn Jobs with
f_AL=true(Easy Apply filter). - Selects an Easy Apply job listing and extracts full Job Description (
jdText). - Executes
tailor_resume_helper.pyto updateRaghav Ganesh Resume(.net)-new.pdf(strictly < 2MB). - Clicks
.jobs-apply-buttonto open the Easy Apply modal. - Uploads tailored resume PDF, fills textboxes, handles
<select>dropdowns and ARIA comboboxes, and answers radio buttons. - Clicks Next $\rightarrow$ Review $\rightarrow$ Submit application.
- Logs the submission directly to Job Tracker - Raghav (
Table1, rangeF:M).
Mode 2: CDP Connection (Active Chrome Session)
Attaches directly to your running Google Chrome browser over Chrome Developer Protocol (CDP):
- Check CDP Port Status:
curl -s http://localhost:9222/json/version - Launch Chrome with CDP:
./scripts/launch_chrome_cdp.sh - Run Playwright MCP:
npx -y @playwright/mcp --cdp-endpoint http://localhost:9222
Mode 3: Cloned Profile Session (Co-existence with Open Chrome)
If Chrome is open and cannot be restarted in CDP mode, Playwright syncs session state (Cookies, Web Data, Local Storage, Preferences, Login Data) to ~/.chrome-playwright-profile to bypass Chrome's SingletonLock:
node scripts/chrome_runner.js --search ".NET Full Stack Developer"
Workflow Guide for AI Agents
When assisting a user with job application tasks:
- Ensure the tailored PDF size remains strictly < 2 MB.
- Execute
scripts/easy_apply_runner.jswith--searchfor the requested role. - Automatically handle textboxes, select dropdowns, comboboxes, radio buttons, and resume upload.
- All completed applications will automatically log to Job Tracker - Raghav in Google Sheets (
Table1rangeF:M).