一键导入
unop-analyze-issue
Analyze a GitHub issue, classify it, post a comment, and write findings to a file
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze a GitHub issue, classify it, post a comment, and write findings to a file
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Scan recent Steam comments for bug reports and open or update GitHub issues for them
Adversarially review a PR's diff against main with inline comments and a verdict, appending to the shared file if one exists
Formulate and apply a fix for a confirmed Unop issue, commit and push
| name | unop-analyze-issue |
| description | Analyze a GitHub issue, classify it, post a comment, and write findings to a file |
| argument-hint | <issue-number> |
Analyze a reported issue in the Unop GitHub repo against vanilla and mod files, classify it on several dimensions, write findings to a shared file, and post a concise comment and labels on the issue.
This skill runs autonomously, without asking for approval. Any human gates belong to the calling workflow, not here. It reports a summary at the end.
ProZeratul/CrusaderKings3UnofficialPatch. Use the gh CLI for all GitHub operations.tmp/issue-<N>.md — the handover document. This skill creates it with the ## Analysis section. Other skills may append to it later.419).analyzer.CLAUDE.md first.<identity>: begin each comment's first line with **<identity>:**. A comment containing @<identity> is addressed to you.vanilla is still a real bug to be fixed in Unop — don't dismiss it as "not our code".confidence field rather than stopping to ask.duplicate or wontfix labels — note candidates in the findings and comment instead.Read the issue and all its comments:
gh issue view <N> --comments
Note any existing labels — they may already encode prior triage. Note any linked PRs.
Identify how many distinct bugs the issue contains. A title may name one symptom while later comments describe others. If the issue covers more than one distinct bug, record each in the findings and classify the issue by the primary bug, noting the others. Don't silently work only the title bug.
Re-analysis. If the issue already carries a **<identity>:** comment from you, you have analyzed this before. Consult the shared file if it exists. Read your prior comment, then read all comments posted after it (especially any addressing @<identity>). Make sure to take into account any feedback from the maintainers. Re-analyze from the files, treat your prior conclusion skeptically, and correct it.
From the issue, extract:
If the reporter only describes a symptom, search the vanilla and Unop trees to locate the responsible file(s):
grep -rn "<key or symbol>" "${CK3_BASE_DIR}/<area>/" 2>/dev/null
grep -rn "<key or symbol>" .
If the relevant file cannot be located confidently, classify as question and ask the reporter for the file path.
For each candidate file:
.info file in the vanilla directory and the ${CK3_USER_DIR}/logs/*.log files (triggers.log, effects.log, event_scopes.log, etc.) to verify scopes, signatures, and names.Guidelines:
Specifically look for:
#Unop markers and compare against the vanilla file. If yes, did Unop's changes introduce the regression? → leans mod.Decide on three label dimensions plus a confidence level.
vanilla — the buggy code is in the base game and is not (or not adequately) patched by Unop.mod — Unop itself is the cause: an Unop override is wrong or was made obsolete by a vanilla update.common — anything under common/.events — anything under events/.gui — anything under gui/.localization — missing or wrong loc keys, only loc files need to change.history — anything under history/.gfx — anything under gfx/.If the affected area doesn't fit any of these (e.g. map_data/), don't invent a label — note in the findings and summary that a new area label may be needed, and apply only the labels that do exist.
confirmed — the bug is verified against the files and a script fix is feasible.question — need more from the reporter to proceed, including when the bug can't be verified from script and needs an in-game repro.invalid — analysis shows it isn't a bug, it's already fixed, or it's not fixable in script.Two independent axes decide the status:
| Real bug? | Fixable in script? | status |
|---|---|---|
| yes | yes | confirmed |
| yes | no (engine-hardcoded) | invalid (out of scope) |
| no (intended / already fixed) | — | invalid |
| can't tell from files | — | question |
An invalid (out of scope) conclusion is door-closing, so it must clear the same bar as proposing a fix.
Also flag (but don't apply):
duplicate — if you find an existing open or closed issue covering the same thing. Mention the number in the findings and comment.wontfix — if the fix appears risky or low value. Never decide this autonomously; flag it for the maintainer.How sure you are of the classification, whatever it is:
high — the classification is unambiguous. For confirmed: the bug reproduces in the current files with a clear root cause and no plausible alternative. For invalid: the files plainly contradict the report or it's clearly out of scope. For question: the missing information is clearly identified and genuinely required to proceed.medium — likely but not certain: multiple possible causes, a possible duplicate, or the reporter's claim only partially matches the files.low — uncertain: the reporter may be on a stale version, another mod may be interfering, or missing information could change the picture.Create the shared file, or re-write it if this is a re-analysis. The findings here are the detailed record, the GitHub comment in step 6 is the concise version.
---
issue: <N>
title: "<issue title>"
status: confirmed|question|invalid
origin: vanilla|mod
area: [events, common, ...]
confidence: high|medium|low
---
## Analysis
**Reported:** <what the reporter claims, 1-2 sentences>
**Files checked:**
- `<path>` (Unop) — <note on what's relevant here>
- `<path>` (vanilla) — <note>
**Findings:** <verified facts — evidence that can be relied on>
- <bullet: the code path traced, what the relevant lines do>
- <root cause, with the specific trigger/effect/guard and why it misbehaves>
- <reachability: does it still reproduce in current vanilla?>
- <any duplicate / wontfix / multi-bug / new-area-label notes>
**Pattern class:** <the category this bug belongs to and its members; for each, whether the bug applies; and how comparable members that avoid it do so>
**Fix directions:** <optional and soft — one or more hypotheses with trade-offs, never a single prescribed remedy; omit this if you are not confident.>
**Classification:** `<status>` / `<origin>` / `<area>` — confidence `<confidence>`
Post a concise comment on the issue and apply the labels. Use the matching template from Reference.
confirmed, origin, area, and confidence:<level>.question and confidence:<level>, plus origin and area if confidently known.invalid and confidence:<level>, plus origin and area if applicable. Do not close the issue.Apply only your own labels (status, origin, area, confidence). On a re-analysis, remove any stale labels you are replacing.
gh issue comment <N> --body "$(cat <<'EOF'
<comment markdown>
EOF
)"
gh issue edit <N> --add-label "confirmed,vanilla,common,confidence:high"
If this is a re-analysis, post a very concise follow-up comment stating what changed compared to the previous one.
When done, report to the user:
duplicate/wontfix candidates, a missing area label, or multiple distinct bugs.Keep the posted comment concise — the details are in the shared file. Keep it to the diagnosis, don't prescribe a fix in it.
Confirmed:
**<identity>:** Confirmed.
- <root cause in 1-2 lines>
**Classification:** `confirmed` / `<origin>` / `<area>` — confidence `<confidence>`
Question:
**<identity>:** Information needed.
To proceed, could you please provide:
- <specific ask 1>
- <specific ask 2>
Invalid:
**<identity>:** Not a bug (or out of scope).
- <reason, citing what was checked>
Could you confirm whether it still reproduces with only vanilla + Unop?
# Search for possible duplicates (open + closed)
gh search issues "<keywords>" --repo ProZeratul/CrusaderKings3UnofficialPatch --state all
/unop-analyze-issue 419