A Chrome Extension that generates LLM-optimized context for AI coding tools. Capture frontend bugs and enhancement requests with one click, then export everything your AI assistant needs to understand and fix the issue.
clankercontext.mp4
- Element Capture - Point and click to capture any element's HTML
- Multi-Element Selection - Ctrl/Cmd+click to select multiple elements with numbered badges
- Quick Select - Instantly copy element HTML and selectors to clipboard without creating an issue
- CSS Selectors - Auto-generates robust selectors using data-testid, ARIA labels, IDs, and smart fallbacks
- Console Errors - Captures JavaScript errors with full stack traces
- Network Failures - Logs failed API calls with status codes and URLs
- Markdown Export - One-click export to LLM-optimized markdown (clipboard or file)
- Custom Prompt Templates - Edit Fix/Enhancement templates in Settings to match your workflow
- Custom Attributes - Configure additional HTML attributes to capture and use in prompt templates
- Pause/Resume Monitoring - Pause error capture without losing session data
- Auto-Copy to Clipboard - Automatically copy context after logging an issue
- Direct Integrations - Send context directly to OpenCode or VSCode
- Zero Footprint - Does nothing until you click "Start listening"
ClankerContext is 100% client-side. No data is ever sent to any server. There's no telemetry, no analytics, no tracking. All captured data stays in your browser's IndexedDB until you export or clear it.
ClankerContext on Chrome Store
-
Clone the repository:
git clone https://github.com/DNGriffin/clankercontext.git cd clankercontext -
Install dependencies:
npm install
-
Build the extension:
npm run build
-
Load in Chrome:
- Open
chrome://extensions/ - Enable "Developer mode"
- Click "Load unpacked"
- Select the
dist/folder
- Open
- Click the ClankerContext extension icon
- Click "Start listening" to begin monitoring console errors and network requests
- Click "Modify with AI" (for enhancements) or "Fix with AI" (for bugs)
- Enter a description of what you want
- Click on the relevant element on the page (use Ctrl/Cmd+click to select multiple elements)
- Export the issue as markdown and paste it into your AI coding tool
Tips:
- Use the Pause button to temporarily stop monitoring without losing your session
- Open Settings to customize prompt templates and enable auto-copy
- Configure Connections for direct integration with OpenCode or VSCode
Use Quick Select to instantly copy element HTML and selectors to your clipboard without creating a full issue:
- Click the pointer icon button in the extension header (no active session required)
- Click on any element to select it, or Ctrl/Cmd+click to select multiple elements
- Press Enter or single-click to finish selection
- Content is automatically copied to clipboard with a toast notification
Quick Select is perfect for quick reference or gathering context across multiple pages before starting a focused session.
When logging issues or using Quick Select, you can select multiple elements:
- Hold Ctrl (Windows/Linux) or Cmd (Mac) while clicking to add elements
- Each selected element displays a numbered badge
- Press Enter or single-click without modifier to finish selection
- All elements are included in the exported context
Configure additional HTML attributes to capture beyond the default set:
- Go to Settings > Custom Attributes
- Add attribute names you want to capture (e.g.,
data-qa,data-component) - Choose a search direction: Parent (ancestors), Descendant (children), or Both
- Captured attributes become template tokens:
{{data_qa}}and{{#data_qa_present}}...{{/data_qa_present}}
Customize the markdown output templates to match your workflow:
- Go to Settings > Prompts
- Edit the Fix or Enhancement prompt templates
Available tokens:
{{issue.user_prompt}}- Your description of the issue{{issue.page_url}}- Current page URL{{elements_markdown}}- Selected element(s) HTML and selectors{{console_errors_count}}- Number of console errors captured{{console_errors_markdown}}- Console errors with stack traces{{network_errors_count}}- Number of failed network requests{{network_errors_table}}- Network errors as a markdown table{{#console_errors_present}}...{{/console_errors_present}}- Conditional block for console errors{{#network_errors_present}}...{{/network_errors_present}}- Conditional block for network errors- Custom attribute tokens from your configuration
Use the Reset to Default button to restore the original templates.
Send context directly to OpenCode or VSCode without copy/paste:
- Go to Settings > Connections
- OpenCode: Enter your OpenCode endpoint URL, select a session, enable auto-send
- VSCode: Extension auto-discovers running instances via port scanning, select an instance, enable auto-send
- When auto-send is enabled, context is sent automatically when you log an issue
Connection cards show health indicators (green dot = connected) and can be enabled/disabled individually.
ClankerContext exports standard markdown that works with any AI coding assistant:
- Claude Code
- Cursor
- GitHub Copilot
- OpenCode (direct integration available)
- VSCode (direct integration available)
- Kilo Code
- Aider
- Any tool that accepts text input
Direct integrations let you send context straight to the tool without copy/paste. Configure connections in Settings.
# Install dependencies
npm install
# Build with watch mode
npm run dev
# Type check
npm run typecheck
# Lint
npm run lint
# Production build
npm run buildsrc/
├── background/ # Service worker, CDP, integrations (OpenCode, VSCode)
├── components/ # Shared UI components (badge, button, card)
├── content/ # Element picker overlay and selector generation
├── exporter/ # Markdown generation and template rendering
├── lib/ # Utility functions
├── popup/ # React UI (main view, settings, prompt editor)
├── prompts/ # Customizable prompt templates
└── shared/ # Types, messages, constants
-
Monitoring: When you click "Start listening", the extension attaches to Chrome DevTools Protocol to capture console errors and failed network requests. Use Pause/Resume to control monitoring without losing session data.
-
Element Selection: When you create an issue, a content script injects an element picker overlay. Click any element to capture its HTML and a CSS selector. Use Ctrl/Cmd+click to select multiple elements—each gets a numbered badge.
-
Export: The exporter generates LLM-optimized markdown using customizable templates:
- Your description
- Target element(s) HTML and selectors
- Console errors with stack traces
- Failed network requests
- Suggested approach for the AI
-
Integrations: Send context directly to OpenCode or VSCode, or copy/download for any other tool.
See CONTRIBUTING.md for guidelines.
MIT License - see LICENSE for details.