What it does
Engineering and support ask the same question about high-priority bugs: is anyone on it, and how long has it been. A Linear view can filter for them, but it will not tell you that the oldest has been open six days or that the newest Urgent one has no owner.
The agent counts open Urgent and High bugs, works out how long each has been open, checks it against a target (24 hours for Urgent and 3 days for High unless you set others) and names the owner of each one past it. Support reads the same card, so "is anyone on it" already has an answer.
How it works
1Find open high-priority bugs
Query
issues(filter: { priority: { in: [1, 2] }, labels: { some: { name: { eqIgnoreCase: "bug" } } }, state: { type: { nin: ["completed", "canceled"] } } })withidentifier title priority createdAt startedAt slaBreachesAt assignee { name } team { key } state { name }.- 2
2Measure the age
Hours from
createdAtto now, and whether work has started (startedAtis set). An Urgent bug past 24 hours or a High bug past 72 is over target; if your workspace uses Linear SLAs,slaBreachesAtdecides instead. 3Rebuild the trend
Also fetch Urgent and High bugs closed in the last 8 days (
completedAt: { gt: "-P8D" }, and the same forcanceledAt). For each day, count bugs created before it and not yet closed by it, so the card has a trend from the first run.- 4
4Report
The open count with the Urgent and High split, the bugs over target with owner and age, unassigned ones, and the oldest open bug.
Post it to the board
With
BRIEFKIN_TOKENset, the agent sends the result as one card that updates in place every run. Without it, you get the report in the chat.
What you get
- Open Urgent and High bugs, and the change since yesterday.
- Over target: identifier, title, priority, time open and owner.
- Unassigned: high-priority bugs nobody has picked up.
- Oldest open bug and who has it.
Install and run it
Pick your agent, where the data comes from and how to schedule it; the commands below follow.
Install the skill
One command. It puts the SKILL.md in ~/.claude/skills and in ~/.agents/skills, which Codex, Cursor, Gemini CLI, Copilot CLI and OpenCode read too.
shell
curl -fsSL https://briefkin.dev/skills/linear-urgent-bugs/install | shRun it
Ask Claude Code:
prompt
Run the linear-urgent-bugs skillOr paste the prompt instead of installing:
prompt
Using the Linear GraphQL API (or the Linear MCP server), find open bugs (label Bug, state type not completed or canceled) with priority Urgent (1) or High (2). For each, give identifier, title, priority, how long it has been open since createdAt, whether work has started, and the assignee. Flag Urgent bugs open more than 24 hours and High bugs open more than 3 days (or past slaBreachesAt if we use Linear SLAs), and any with no assignee. Give me the open count split by priority and how it compares with yesterday. List over-target bugs first, then the rest by age.Put it on a schedule
Weekdays at 9:00 and 16:00, from cron on any machine where Claude Code is signed in:
crontab
0 9,16 * * 1-5 claude -p "Run the linear-urgent-bugs skill"Add it with
crontab -e. A laptop asleep at that time runs it when it wakes if you use launchd or Task Scheduler instead; GitHub Actions works for the API route.Send it to your board
Connect Briefkin once with
curl -fsSL https://briefkin.dev/install | shand every run lands on your board as a stat tile. How setup works
View the SKILL.mdRaw file
SKILL.md---
name: linear-urgent-bugs
description: "Twice a day: open Urgent and High priority bugs in Linear, how long each has been open and who owns it, with the ones past your target first. Use when the user asks for this, or when it runs on a schedule."
---
# Linear urgent bugs tracker
Twice a day: open Urgent and High priority bugs in Linear, how long each has been open and who owns it, with the ones past your target first.
Engineering and support ask the same question about high-priority bugs: is anyone on it, and how long has it been. A Linear view can filter for them, but it will not tell you that the oldest has been open six days or that the newest Urgent one has no owner.
The agent counts open Urgent and High bugs, works out how long each has been open, checks it against a target (24 hours for Urgent and 3 days for High unless you set others) and names the owner of each one past it. Support reads the same card, so "is anyone on it" already has an answer.
## Two ways to get the data
Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.
## Route A: API or MCP server
### What you need
- Access to the teams that file bugs, and the label your workspace uses for them (`Bug` by default).
- The Linear MCP server or connector, or an API key in `LINEAR_API_KEY` for read queries.
If something is missing, say what and stop; do not invent numbers.
### Steps
1. **Find open high-priority bugs** (Linear): Query `issues(filter: { priority: { in: [1, 2] }, labels: { some: { name: { eqIgnoreCase: "bug" } } }, state: { type: { nin: ["completed", "canceled"] } } })` with `identifier title priority createdAt startedAt slaBreachesAt assignee { name } team { key } state { name }`.
2. **Measure the age**: Hours from `createdAt` to now, and whether work has started (`startedAt` is set). An Urgent bug past 24 hours or a High bug past 72 is over target; if your workspace uses Linear SLAs, `slaBreachesAt` decides instead.
3. **Rebuild the trend** (Linear): Also fetch Urgent and High bugs closed in the last 8 days (`completedAt: { gt: "-P8D" }`, and the same for `canceledAt`). For each day, count bugs created before it and not yet closed by it, so the card has a trend from the first run.
4. **Report**: The open count with the Urgent and High split, the bugs over target with owner and age, unassigned ones, and the oldest open bug.
## Route B: the browser
### What you need
- Signed in to Linear as a member of the teams that file bugs; the workspace-wide Issues list shows only teams you belong to.
If something is missing, say what and stop; do not invent numbers.
### Steps
Start at https://linear.app/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.
1. **Open all issues**: Click **Issues** at the top of the sidebar (the workspace-wide list) and stay on the **Active** tab, which leaves out completed and canceled issues.
2. **Filter to high-priority bugs**: Click **Filter** and add `Priority` is `Urgent`, `High`, then `Labels` is `Bug`. In **View options**, group by `Priority`, order by `Created` with the oldest on top, and show `Created`, `Assignee`, `Status` and `Team`.
3. **Work out the ages**: Read the Created value of each row and convert it to hours or days open. An Urgent bug past 24 hours or a High bug past 72 hours is over target; a status of Todo or Backlog means work has not started. If a workspace SLA badge shows, go by that instead.
4. **Note owners and gaps**: Rows with no assignee avatar are unassigned. Note the owner of every bug over target and the oldest row in each group.
5. **Report**: Give the open count split into Urgent and High, the over-target bugs with owner and age, the unassigned ones and the oldest open bug. Save the filtered list as a view the first time so the next run is one click.
Note: Linear shows relative times in the list, so hover a Created value or open the issue when the exact hour matters near a 24-hour or 3-day line. The UI has no history of past counts; the card's own trend builds from the first run.
## The report
- **Open Urgent and High bugs**, and the change since yesterday.
- **Over target**: identifier, title, priority, time open and owner.
- **Unassigned**: high-priority bugs nobody has picked up.
- **Oldest open** bug and who has it.
## Post it to Briefkin
When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.
```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
-H "authorization: Bearer $BRIEFKIN_TOKEN" \
-H "content-type: application/json" \
-d @- <<'JSON'
{
"v": 1,
"event_id": "linear-urgent-bugs/<date of this run, e.g. 2026-10-16>",
"item_key": "linear-urgent-bugs",
"project": "Acme",
"source": "Linear urgent bugs tracker skill",
"kind": "metric",
"title": "7 urgent and high bugs open, 2 over target",
"metric": {
"label": "Open urgent and high bugs",
"value": 7,
"better": "lower",
"period_start": "<start of the period, ISO 8601>",
"period_end": "<end of the period, ISO 8601>"
},
"glance": [
{
"type": "Grid",
"props": {
"columns": 3
},
"children": [
{
"type": "Stat",
"props": {
"label": "Urgent",
"value": 2,
"tone": "bad"
}
},
{
"type": "Stat",
"props": {
"label": "High",
"value": 5,
"tone": "warn"
}
},
{
"type": "Stat",
"props": {
"label": "Over target",
"value": 2,
"tone": "bad"
}
}
]
},
{
"type": "Badges",
"props": {
"items": [
{
"label": "1 unassigned",
"tone": "warn"
},
{
"label": "Oldest 6 days",
"tone": "bad"
}
]
}
}
],
"widget": [
{
"type": "Table",
"props": {
"columns": [
"Bug",
"Priority",
"Open",
"Owner"
],
"align": [
"left",
"left",
"right",
"left"
],
"rows": [
[
"PLT-412 Payments stuck in pending for EU cards",
"Urgent",
"31h",
"Ana"
],
[
"PLT-418 Login fails after a password reset",
"Urgent",
"5h",
"Unassigned"
],
[
"WEB-233 Order totals off by a cent",
"High",
"6d",
"Kai"
],
[
"WEB-240 Image upload hangs at 99%",
"High",
"2d",
"Lin"
],
[
"MOB-77 Android crash on camera permission",
"High",
"2d",
"Joe"
],
[
"PLT-420 Rate limit returns a 500",
"High",
"20h",
"Ana"
],
[
"WEB-244 Broken links in invoice emails",
"High",
"9h",
"Kai"
]
]
}
},
{
"type": "Callout",
"props": {
"text": "PLT-418 is Urgent and still has no owner after 5 hours.",
"tone": "bad"
}
}
],
"size": "md"
}
JSON
```
Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.
Set `period_start` and `period_end` to the window the number covers: the tile names it from them ("Last 7 days", "Today", "This month"). For a count right now (open items, a balance), send `"period_label": ""` so no period shows; for another name, send it as `period_label` (at most 24 characters).
## Run it on a schedule
Suggested: Weekdays at 9:00 and 16:00 (`0 9,16 * * 1-5`). From cron, with the agent signed in on that machine:
```bash
0 9,16 * * 1-5 claude -p "Run the linear-urgent-bugs skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```
Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/linear-urgent-bugs#schedule
Source: https://briefkin.dev/skills/linear-urgent-bugs
What your agent needs
Access to the teams that file bugs, and the label your workspace uses for them (
Bugby default).The Linear MCP server or connector, or an API key in
LINEAR_API_KEYfor read queries.
Connecting Linear
- Linear MCP server, Linear's official remote server at
https://mcp.linear.app/mcp. Add Linear from Claude's connector directory, or runclaude mcp add --transport http linear https://mcp.linear.app/mcpin Claude Code, and sign in with OAuth. - GraphQL API with a personal API key. Create a key in Linear's settings under Security & access, store it in
LINEAR_API_KEY, and send it as theAuthorizationheader with noBearerprefix. For a workspace bot, an OAuth app with thereadscope does the same job.
When you create the key, give it Read access and only the teams in the report; it then can't create or edit issues.
Questions
Does a bug downgraded from Urgent still count?
Only at its current priority, so a bug moved from Urgent to Medium drops off the card. The rebuilt trend also uses today's priority for past days; the card's own history, kept run by run, is the accurate record once it has a week behind it.
Can support follow it without a Linear seat?
They can read the Briefkin card, which carries titles, ages and owners. Opening an issue still needs a Linear login, so for a support team without seats, ask the skill to keep titles descriptive and skip the links.
Do I need Briefkin to use the Linear urgent bugs tracker skill?
No. The skill runs with your own agent and gives you the report in the chat. With a Briefkin token set, each run also posts it to your board as a stat tile, so you can glance at it instead of asking again.
Which agents can run it?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot CLI, OpenCode, Windsurf and Amp all read SKILL.md files. The install command puts it in ~/.claude/skills and ~/.agents/skills, where they look. ChatGPT, the Claude app and Grok take the prompt instead. Pick your agent under "Install and run it" and the commands change to match.
Can it work without an API or MCP server, from my browser?
Yes. Switch the data source to "Your browser" and the steps change to the Linear pages themselves: the agent opens linear.app in a browser you are signed in to and reads the numbers off the page. Claude Code, Codex, Cursor, Claude app and ChatGPT can drive a browser out of the box; Gemini CLI, Copilot CLI and OpenCode need a Playwright or Chrome DevTools MCP server first. It is slower than the API and needs you signed in, so it suits a report you run by hand or from a scheduler on your own computer.