A Chrome extension that generates high-signal, thoughtful comments for LinkedIn and Reddit posts using OpenAI.
- Platform Support: LinkedIn and Reddit post extraction
- Thought Leadership Modes: Builder, Strategist, Operator, Contrarian, Teacher, Curious Connector
- Voice Profile: Customizable tone and style
- History: Auto-saved generation history with JSON export
ghostwriter/
├── manifest.json Chrome extension manifest (MV3)
├── README.md
├── src/
│ ├── background/ Service worker (ES modules)
│ │ ├── background.js Message router entry point
│ │ ├── api.js OpenAI integration & comment generation
│ │ ├── history.js Generation history persistence
│ │ └── prompt.js Prompt builder
│ ├── content/ Content scripts (global scope)
│ │ ├── content.js Message listener & platform router
│ │ ├── dom-utils.js Shared DOM utilities
│ │ ├── linkedin.js LinkedIn extractor
│ │ └── reddit.js Reddit extractor
│ ├── options/ Settings page
│ │ ├── options.html
│ │ └── options.js
│ ├── popup/ Extension popup
│ │ ├── popup.html
│ │ ├── popup.js
│ │ └── popup.css
│ └── shared/ Shared utilities
│ └── storage.js Chrome storage helpers
└── icons/ Extension icons (add your own)
- Open
chrome://extensions/in Chrome - Enable Developer mode (top-right toggle)
- Click Load unpacked and select this
ghostwriterfolder - Open the extension settings and add your OpenAI API key
- Navigate to a LinkedIn or Reddit post and click the extension icon
To reload after changes, click the refresh icon on the extension card.
- Create
src/content/<platform>.jswith anextract<Platform>()function - Add the platform's URL pattern to
manifest.json(host_permissions+content_scripts.matches) - Add the new JS file to
manifest.json→content_scripts.js(beforecontent.js) - Update
extractPageData()insrc/content/content.jsto route to your extractor