categorize-pg-tickets
БесплатноБез исполняемых скриптовНе проверенApply the Linear "Issue Category" label to a state's PG tickets that the PG diagnosis bot covered since a given date. Use when the user asks to categorize…
от Recidiviz★ 48 звёзд на GitHubОб этом скилле
Skill: Categorize PG Tickets
Overview
Linear has a single-select Issue Category label group that records the root
cause of each PG ticket, so the team can see where support effort goes. This
skill finds every ticket for one state that the PG diagnosis bot covered since a
start date, reads the evidence on each one, and applies exactly one category
where the cause is settled.
The skill takes two inputs. Ask for either one the user didn't give:
- State code, e.g.
US_TX. For Idaho, include bothUS_IDandUS_IXtickets; the bot accepts either label. - Start date, e.g.
2026-07-01.
Categories
Read the current names and descriptions before starting, since the group can change:
list_issue_labels(team="One Big Team", includeGroups=true) # filter to parent "Issue Category"
The labels are workspace-wide, so they apply to tickets on any team. As of 2026-09-23 the group holds:
| Label | Use when |
|---|---|
Issue: Query logic |
A view, criterion, or calculation of ours gave the wrong result from correctly ingested data. |
Issue: Ingest |
Our ingest mapped, parsed, or imported raw data wrong, or dropped it. |
Issue: State data |
The problem is on the state's side, in the data they send or in their own systems and processes (late or wrong OMS entries, SSO set up wrong). |
Issue: Data freshness |
Nothing was wrong; a recent change hadn't reached the product yet and resolved once data caught up. |
Issue: Clarification |
Nothing is broken; the reporter needed an explanation of how the product works. |
Issue: Front-end |
The bug is in the app UI. |
Never create a label or edit a description in this skill. If a ticket fits no category, leave it unlabeled and tell the user; they decide whether the group needs a new entry.
Instructions
Keep working files in a per-state subdirectory of the scratchpad. The GitHub API
drops connections on long loops, so wrap every gh call in a retry.
Step 1: Read the bot's label check
The bot only runs on issues whose labels pass the if: check in
.github/workflows/pg-diagnosis.yml
(mirrored in recidiviz-dashboards' pg-diagnosis-dispatch.yml). Read it rather
than assuming its contents. At the time of writing it requires Team: State Pod,
a Region: label for one of the covered states, and Project: Workflows,
Project: Tasks, or Project: Supervisor Homepage/Insights. If the state isn't
in the check, stop and tell the user the bot doesn't cover it.
Step 2: Find the tickets in scope
A ticket is in scope if either holds, in Recidiviz/pulse-data or
Recidiviz/recidiviz-dashboards:
- It has a bot diagnosis comment (body starts with
<!-- pg-diagnosis-agent -->) posted on or after the start date. - It was created on or after the start date and its current labels pass the label check.
For (1), search issues with the Region label, commented on by
helperbot-recidiviz, updated since the start date, then read each one's
comments for the marker. GitHub search caps at 1,000 results, and states with
many automated alert issues (e.g. US_MI) exceed it. When that happens, narrow
the search to issues that also carry one of the Project labels, since the bot
never runs without one.
gh search issues --repo Recidiviz/<REPO> --label "Region: <STATE>" \
--commenter helperbot-recidiviz --updated ">=<DATE>" --limit 1000 \
--json number,repository
gh api --paginate "repos/Recidiviz/<REPO>/issues/<N>/comments?per_page=100" \
--jq '.[] | select(.body | startswith("<!-- pg-diagnosis-agent -->")) | .created_at'
For (2), run one search per Project label with all three required labels and
--created ">=<DATE>".
List the tickets that pass the label check but have no diagnosis separately. The
usual causes are a Cloud Build timeout or an issue body too large for the build;
check with gcloud builds list --project=recidiviz-staging --region=us-west1
near the issue's creation time if the user wants to know why.
Step 3: Gather the evidence for each ticket
From GitHub, fetch the body, all comments, and the linked PRs in one GraphQL call
(timeline items CROSS_REFERENCED_EVENT, CONNECTED_EVENT, CLOSED_EVENT). For
each fix PR, list the files it changes; they decide between categories (see
Step 4).
Then find the Linear ticket. Its ID appears in the issue body or comments as
OBT-<n>, but many tickets have since moved to a state team (ID-, TX-,
MI-, …). get_issue("OBT-<n>") follows the move and returns the current ID,
status, labels, and attachments; list_comments needs the current ID and fails
on the old one. To map many tickets at once, call list_issues on the state's
team with fields=["id","title","status","labels"] and match on title.
Read the Linear comments for every ticket whose resolution isn't visible on GitHub. Top-level Linear comments often don't sync, and they are where resolutions such as "resolved by PM-127" or "cl
Установить categorize-pg-tickets в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл categorize-pg-tickets?
Apply the Linear "Issue Category" label to a state's PG tickets that the PG diagnosis bot covered since a given date. Use when the user asks to categorize, label, or tag PG tickets for a state (e.g. "label the US_TX PG tickets since July 1").
Как установить скилл categorize-pg-tickets?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл categorize-pg-tickets запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic