β οΈ Status: Work in Progress
This extension is currently in development and requires further polish and performance improvements. While functional, you may encounter bugs or inconsistencies. Use with caution and expect regular updates.
A browser extension that automatically processes Figma links in GitHub PR descriptions and generates versioned, collapsible design specs with images and detailed metadata.
π Also available as a GitHub Action
- π Version Tracking: Handles different versions of the same design node intelligently
- π¨ Automatic Figma Link Processing: Converts Figma design links into rich, interactive design specifications
- πΌοΈ Design Previews: Generates preview images for each Figma design node
- π Detailed Specs: Includes version information, timestamps, and design links
- π« Duplicate Prevention: Avoids creating duplicate specs for the same design+version
- β Smart UI: Button only appears when editing PR descriptions in Write mode
- π Secure Token Storage: Safely stores Figma API tokens using browser storage APIs
| Browser | Status | Built To |
|---|---|---|
| Chrome/Chromium | β Supported | build/chrome/ |
| Firefox | β Supported | build/firefox/ |
-
Clone the repository and build the extensions:
git clone <repo-url> cd figma-pr-browser-extension npm install npm run build
-
Load the extension:
- Chrome: Navigate to
chrome://extensions/β Enable "Developer mode" β Click "Load unpacked" β Select thebuild/chrome/folder - Firefox: Navigate to
about:debuggingβ Click "This Firefox" β Click "Load Temporary Add-on" β Selectbuild/firefox/manifest.json
- Chrome: Navigate to
Use the pre-built zip files from build/releases/:
figma-pr-extension-chrome.zipfor Chrome Web Storefigma-pr-extension-firefox.zipfor Firefox Add-ons
- Install the extension for your browser
- Get a Figma API token:
- Go to Figma Account Settings
- Generate a new personal access token
- Ensure it has the required scopes:
file_content:read,file_metadata:read,file_versions:read,current_user:read
- Configure the extension:
- Click the extension icon in your browser toolbar
- Enter your Figma API token
- Click "Test Token" to verify it works
- Click "Save"
- Edit a GitHub PR description that contains Figma links
- Ensure you're on the "Write" tab (not "Preview")
- Click the "π¨ Process Figma Links" button that appears
- Wait for processing - the extension will:
- Parse all Figma links in the description
- Fetch design images and metadata
- Generate interactive design specs
- Replace original links with references to the specs
- Review and save your updated PR description
The extension converts Figma links like:
https://www.figma.com/design/abc123/MyDesign?node-id=1-2
Into interactive design specs with:
- πΌοΈ Design preview images
- π Expandable spec details
- π Clean links to specific design versions
- π Snapshot timestamps
- β° Image expiration dates
Your Figma API token needs these scopes:
file_content:read- Required to access design content and nodesfile_metadata:read- Required to fetch file information and metadatafile_versions:read- Required for version tracking functionalitycurrent_user:read- Required for token validation
- Tokens are stored securely using browser sync storage
- Tokens sync across devices when logged into the same browser account
- Tokens are never transmitted except to Figma's official API
figma-pr-browser-extension/
βββ src/
β βββ shared/ # Cross-browser source files
β β βββ content.js # Main content script
β β βββ popup.js # Popup functionality
β β βββ popup.html # Settings popup
β β βββ utils.js # Utility functions
β β βββ snarkdown.js # Markdown parser
β β βββ background-chrome.js # Chrome service worker
β β βββ background-firefox.js # Firefox background script
β β βββ debug-firefox.js # Firefox debug utilities
β βββ chrome/ # Chrome-specific files
β β βββ manifest.json # Chrome manifest v3
β βββ firefox/ # Firefox-specific files
β β βββ manifest.json # Firefox manifest v2
β βββ icons/ # Extension icons
β βββ content.css # Content script styles
βββ build/ # Generated builds (not committed)
β βββ chrome/ # Built Chrome extension
β βββ firefox/ # Built Firefox extension
β βββ releases/ # Distribution zip files
βββ build.js # Build script
| Feature | Chrome | Firefox |
|---|---|---|
| Manifest Version | v3 | v2 |
| Background Script | Service Worker | Persistent Background |
| Storage API | chrome.storage |
browser.storage |
| Runtime API | chrome.runtime |
browser.runtime |
- Make changes to the source files in the
src/directory - Build the extensions:
npm run build - Load the extension for testing:
- Chrome: chrome://extensions/ β Load unpacked β select
build/chrome/folder - Firefox: about:debugging β Load Temporary Add-on β select
build/firefox/manifest.json
- Chrome: chrome://extensions/ β Load unpacked β select
- Test on a GitHub PR with Figma links
- Distribution: Use zip files in
build/releases/for publishing
npm run build- Build both Chrome and Firefox extensions with zip filesnpm run dev- Build both extensions and show loading instructionsnpm run lint- Check code formatting with Prettiernpm run lint:fix- Fix code formatting issues automatically
We welcome contributions! To get started:
- Read the prompts: See prompts.md for AI-assistant prompts that help understand the codebase, customization options, and security considerations
- Test your changes thoroughly on different GitHub PR pages
- Follow the existing code patterns for browser compatibility
- Update documentation if you add new features
For questions about the codebase architecture, security practices, or troubleshooting, the prompts file contains helpful starter questions for AI assistants. 4. Check browser console for debug logs
- Ensure you're editing a PR description (not a comment)
- Make sure you're on the "Write" tab (not "Preview")
- Check that the extension has proper permissions for GitHub
- Verify your token has the correct scopes
- Check your internet connection
- Ensure the token hasn't expired
- Check browser console for detailed error messages
- Verify Figma links are properly formatted
- Ensure you have access to the Figma files
- Fork the repository
- Create a feature branch
- Make your changes
- Test on both Chrome and Firefox
- Submit a pull request
MIT License - see LICENSE file for details
This extension:
- Only processes data on GitHub PR pages
- Sends Figma API requests directly to Figma's servers
- Stores only your Figma API token locally
- Does not collect or transmit any personal data


