Build the Sell By Chat. Reply Co-Pilot

Use the prompt below to generate your Chrome extension in Claude. Load it in Developer Mode to reply faster inside Instagram and LinkedIn DMs.

OpenQualifyCloseFollow upObjection

One-shot mega prompt for Claude

Paste into a fresh Claude chat. Ask for a downloadable ZIP if possible.

PROMPT:
I need you to create a Chrome extension (Manifest V3) that generates AI-powered reply suggestions for social media DMs using OpenAI's API and keyboard shortcuts.

Core Requirements
Platform Support:

Instagram Direct Messages (web version)
LinkedIn Messaging (web version)

Main Features:

Keyboard Shortcuts (4 maximum - Chrome's limit)

Alt+1, Alt+2, Alt+3, Alt+4 for different reply modes
Show shortcuts in UI and context menu

Multiple Reply Modes:

Mode 1: [OPENING] - First message to new contact
Mode 2: [QUALIFYING] - Discovery questions
Mode 3: [CLOSING] - Present offer/next steps
Mode 4: [FOLLOW-UP] - Re-engagement message
Mode 5: [OBJECTION] - Handle concerns (no keyboard shortcut, menu only)

Custom Framework Integration:

User can add custom instructions in settings
System prompts for each mode following my framework
Generates 3 reply variations per request

Three Access Methods:

Keyboard shortcuts (Alt+1-4)
Right-click context menu on message input
Floating button with sidebar UI

Framework/Instructions Structure
Replace this with your own framework:

MODE 1 (OPENING):
[Your exact opening message template or rules]

MODE 2 (QUALIFYING):
[Your qualifying questions framework]

MODE 3 (CLOSING):
[Your closing/offer presentation approach]

MODE 4 (FOLLOW-UP):
[Your follow-up sequence rules]

MODE 5 (OBJECTION):
[Your objection handling framework]

Style Rules for All Modes:
- [Your writing style preferences - e.g., "UK English", "short sentences", "no emojis"]
- [Your formatting rules]
- [Your ending requirements - e.g., "always end with one question"]

## Technical Specifications

Settings Popup Requirements:
- OpenAI API key input (stored locally)
- Custom instructions textarea
- Optional: Payment link, sales page link, calendar link fields
- Save all settings to chrome.storage.sync

DM Thread Scraping:
- Automatically detect and scrape Instagram DM conversations
- Automatically detect and scrape LinkedIn message threads
- Extract last 40 messages with sender labels (You/Them)
- Handle multiple selector strategies for resilience
- Deduplicate repeated messages

UI Requirements:

1. Floating Button:
   - Position: Bottom-right corner
   - Emoji/icon: ✨
   - Opens sidebar on click

2. Sidebar:
   - Slide-in from right
   - Mode selection buttons with keyboard shortcut badges (⌥1, ⌥2, etc.)
   - Generate button
   - Display 3 reply options as clickable buttons
   - Keyboard shortcuts help button (⌨️)

3. Inline Options Display:
   - Fixed position at bottom center of screen
   - Show all 3 generated options
   - Click any option to copy to clipboard
   - Success feedback on copy
   - Close button (×)

4. Keyboard Shortcuts Help Modal:
   - Show all 4 shortcuts in a table
   - Explain Chrome's 4-shortcut limit
   - Note that Mode 5 uses menu instead

5. Context Menu:
   - Parent item: "[Your Extension Name]"
   - 5 sub-items for each mode
   - Show keyboard shortcuts next to modes 1-4
   - Mode 5 shows no shortcut

Reply Generation Flow:
1. User triggers via keyboard shortcut, context menu, or button
2. Extension scrapes current DM thread
3. Sends to OpenAI with: platform, mode, custom instructions, links, thread context
4. Requests 3 reply variations
5. Displays options inline at bottom of screen
6. User clicks option to copy to clipboard
7. User pastes into message box manually

OpenAI Integration:
- Model: gpt-4o-mini
- Temperature: 0.7
- Max tokens: 800 (for 3 variations), 600 (for single)
- System prompt: Built from mode-specific framework
- User prompt: Includes platform, mode, custom instructions, conversation thread

Output Format from AI:
For single replies:
REPLY:
[The actual reply text]

WHY:
[1-2 sentence strategy explanation]

SCORE:
[1-10] | HANDOFF: [YES or NO]

ALT:
[Alternative opening line]

For multiple options:
OPTION 1:
[First reply]

OPTION 2:
[Second reply]

OPTION 3:
[Third reply]

File Structure
Create these files:

manifest.json - Include commands API for keyboard shortcuts
background.js - Service worker with:

buildSystemPrompt(mode) function
buildUserPrompt() function
callLLM() function
Message listener for GENERATE_REPLY
Context menu creation
Keyboard command listener

content.js - Content script with:

Platform detection
DM scraping functions (Instagram & LinkedIn)
Floating button injection
Sidebar creation and logic
Inline options display
Keyboard shortcuts help modal
Message insertion (copy to clipboard)

popup.html - Settings UI
popup.js - Settings save/load logic
styles.css - Popup styling
Icon files (16px, 48px, 128px)

Critical Requirements

Conversation Stage Awareness:
Mode 1: "This is the FIRST message. Use exact opening script."
Mode 2: "Conversation already open. Do NOT repeat greetings. Just ask questions."
Mode 3: "Already qualified. Do NOT repeat questions. Present offer."
Mode 4: "They went silent. Brief bump only."
Mode 5: "They raised concern. Address it directly."

Chrome Limitations:
- Maximum 4 keyboard shortcuts per extension
- Mode 5 accessible via context menu and sidebar only
- Explain this in help modal

Error Handling:
- Validate API key exists before calls
- Check if on correct platform/page
- Show clear error notifications
- Handle API failures gracefully

User Experience:
- All actions show loading states
- Success feedback when copying
- Notifications auto-dismiss after 3 seconds
- Shortcuts work immediately without page refresh

Documentation to Include:
Create these files:

README.md - Installation, usage, keyboard shortcuts, framework explanation
KEYBOARD_SHORTCUTS.md - Detailed shortcuts guide with troubleshooting
INSTALLATION.md - Quick 5-minute setup guide
CHANGELOG.md - Version history starting at 2.4.0
SHORTCUTS_REFERENCE_CARD.txt - Printable ASCII reference
Privacy policy and license files

Deliverables:
Please provide:
- Complete extension folder with all files
- Comprehensive documentation
- Installation instructions
- Keyboard shortcuts reference
- Zip file ready to load as unpacked extension

Replace all placeholders with my specific use case:
- Extension name: [YOUR_EXTENSION_NAME]
- Framework name: [YOUR_FRAMEWORK_NAME]
- Mode names: [YOUR_MODE_NAMES]
- System prompts: [YOUR_EXACT_PROMPTS]
- Style rules: [YOUR_STYLE_RULES]
- Links to include: [YOUR_LINKS]

Build everything to be production-ready with proper error handling, clean code, and comprehensive documentation.
    

Turn on Developer Mode

  1. Open Chrome.
  2. Go to chrome://extensions.
  3. Toggle Developer Mode on in the top right corner.

Load the Extension

  1. Click Load unpacked.
  2. Select the folder Claude generated.
  3. Confirm it appears in your list.
  4. Click the extension icon → Open Settings → paste your OpenAI API key → Save.

Use it in DMs

  1. Open Instagram or LinkedIn DMs on desktop.
  2. Right click in the message box. Choose Sell By Chat → Pick a mode.
  3. Three options appear above the composer. Click to copy. Paste. Send.
Subscribe for More AI and Automation Tips

You’ll get prompts, templates, and setups that save time.