Chrome extension that creates Linear tickets from selected text/code, triggering automated Claude Code subagents via StackMemory webhooks.
┌─────────────┐ ┌─────────┐ ┌─────────────┐ ┌─────────────┐
│ Browser │────▶│ Linear │────▶│ StackMemory │────▶│ Claude Code │
│ Extension │ │ API │ │ Webhook │ │ Subagent │
└─────────────┘ └─────────┘ └─────────────┘ └─────────────┘
│ │ │ │
│ 1. Select text │ │ │
│ 2. Click "Create" │ │ │
│──────────────────▶│ │ │
│ │ 3. Create issue │ │
│ │────────────────▶│ │
│ │ │ 4. Spawn agent │
│ │ │──────────────────▶│
│ │ │ │ 5. Work on task
- Selected text from any webpage
- Source URL
- Optional: GitHub context (repo, file path, line numbers if on GitHub)
- Title (auto-generated from selection, editable)
- Description (captured text + source URL)
- Project selection (dropdown of Linear projects)
- Priority (optional)
- Labels:
automated,claude-code(auto-applied)
- Linear OAuth 2.0 flow
- Store tokens securely in chrome.storage.local
POST /api/webhooks/linear
- Issue created with label
automatedorclaude-code - Issue assigned to specific user/bot
interface LinearWebhookPayload {
action: 'create' | 'update';
type: 'Issue';
data: {
id: string;
identifier: string; // e.g., "STA-123"
title: string;
description: string;
labels: { name: string }[];
url: string;
};
}- Validate webhook signature
- Parse issue details
- Create StackMemory frame for the task
- Spawn Claude Code subagent with context:
- Issue title as task
- Description as context
- Source URL for reference
- Update Linear issue with agent session ID
interface SubagentSpawnConfig {
type: 'general-purpose' | 'code-reviewer' | 'debugger';
task: string;
context: {
linearIssueId: string;
linearUrl: string;
sourceUrl: string;
sourceText: string;
};
autoClose: boolean; // Close Linear issue when done
}┌─────────────────────────────────────────┐
│ Docker Compose │
├─────────────────────────────────────────┤
│ ┌─────────────────┐ ┌──────────────┐ │
│ │ Webhook Server │ │ ngrok/ │ │
│ │ (Node.js) │◀─│ Cloudflare │ │
│ │ Port 3456 │ │ Tunnel │ │
│ └────────┬────────┘ └──────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ StackMemory │ │
│ │ Daemon │ │
│ └─────────────────┘ │
└─────────────────────────────────────────┘
Receives Linear webhook, spawns subagent.
Health check for container monitoring.
Check subagent status (for extension polling).
- Linear webhook signature validation
- HTTPS required for webhook endpoint
- OAuth tokens stored encrypted
- No secrets in extension code (use backend for API calls)
{
"manifest_version": 3,
"name": "Linear + StackMemory",
"permissions": [
"activeTab",
"storage",
"contextMenus"
],
"host_permissions": [
"https://api.linear.app/*",
"https://*.stackmemory.ai/*"
],
"background": {
"service_worker": "background.js"
},
"action": {
"default_popup": "popup.html"
}
}- User can select text, create Linear ticket in <3 clicks
- Webhook fires within 5 seconds of ticket creation
- Subagent spawns and begins work within 10 seconds
- Linear issue updated with agent status/results