Best for
- The user hands over a Jira / Linear ticket key, URL, branch name, or
- A ticket looks too vague, too broad, or smells wrong.
- Before /feature-plan or /feature-explore on a ticket-anchored scope.
event4u-app/agent-config/src/skills/refine-ticket/SKILL.md
Refine a Jira/Linear ticket before planning — 'refine ticket', 'tighten AC on PROJ-123', 'ist das Ticket klar?'; rewritten ticket, risks, persona voices, close-prompt.
Decision brief
Move a ticket from "raw idea" to "implementation-ready" in one run. Produces a rewritten ticket, Top-5 risks, and persona voices. Orchestrates validate-feature-fit and threat-modeling as sub-skills — never duplicates their logic. Output is copy-paste ready; the user decides writ…
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/event4u-app/agent-config --skill "src/skills/refine-ticket"Inspect the Agent Skill "refine-ticket" from https://github.com/event4u-app/agent-config/blob/0adf49a8ae84b0ff6e2de8759eea43257e020eff/src/skills/refine-ticket/SKILL.md at commit 0adf49a8ae84b0ff6e2de8759eea43257e020eff. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Delegate to jira-ticket §1-3: - Extract ticket ID (branch / URL / arg). - Fetch via Jira API (GET /issue/{id}) — summary, description, issue type, priority, status, comments, linked issues. - Scan description + comments for Sentry URLs; pull stacktrace / tags when present.
1. — 2. — 3. — 4. — 5. —
Run these three scans on the rendered output before the close-prompt. Each is a fast pass; failure blocks emission and forces a fix.
Probe write access first (Phase F6). Before rendering, do a cheap upfront check:
The user hands over a Jira / Linear ticket key, URL, branch name, or
Permission review
The documentation includes network, browsing, or remote request actions.
Fetch via Jira API (`GET /issue/{id}`) — summary, description,Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Move a ticket from "raw idea" to "implementation-ready" in one run. Produces a rewritten ticket, Top-5 risks, and persona voices. Orchestrates
validate-feature-fitandthreat-modelingas sub-skills — never duplicates their logic. Output is copy-paste ready; the user decides write-back.
/feature-plan or /feature-explore on a ticket-anchored scope.| Phrasing | Route to |
|---|---|
| "plan this feature" | /feature-plan (downstream) |
| "estimate this ticket" | /estimate-ticket (sibling, Phase 4) |
| "is this a duplicate feature?" | validate-feature-fit (sub-skill) |
| "threat-model this change" | threat-modeling (sub-skill) |
| "investigate this bug" | /bug-investigate (bug-focused) |
/refine-ticket orchestrates these — it does not replace them.
The refined output's prose language is picked once, up front, and applied to every section (refined description, risks, persona voices, orchestration notes, close-prompt). Fallback order — first hit wins:
language-and-tone iron law./refine-ticket PROJ-123), mirror the language the
ticket is written in — detected from the summary + description..agent-settings.yml default. If both are silent or unclear,
fall back to the project default in .agent-settings.yml
(personal.language or equivalent). If that is also missing,
default to English.Quoted identifiers (ticket keys, file paths, command names, code snippets) stay in their native form. Only the prose mirrors the selected language.
Reuses the jira-ticket command's loader. Accepts:
/refine-ticket PROJ-123/refine-ticket with no arg; regex
[A-Z]+-[0-9]+ against git branch --show-current/refine-ticket followed by a markdown block/refine-ticket https://acme.atlassian.net/browse/PROJ-123If none resolve to a ticket, fall back to conversational discovery
(feature-explore-style): ask one focused question, then continue.
Delegate to jira-ticket §1-3:
GET /issue/{id}) — summary, description,
issue type, priority, status, comments, linked issues.If pasted text: skip API, parse markdown, extract title + AC bullets + body.
Auto-fetch parent (Phase F4). Before detection, check the issue type and fold parent context in:
import { issuetype_needs_parent, fold_parent_context } from 'scripts/refine_ticket_detect.js';
if (issuetype_needs_parent(ticket.issuetype)) {
const parentKey = ticket.parent_key; // from `fields.parent.key`
const parent = fetch_jira_issue(parentKey); // +1 API call
ticketBody = fold_parent_context(ticketBody, parent.body, parentKey);
}
Rules:
Story and Sub-task (and their Linear / Shortcut
equivalents). Task / Bug / Epic skip the auto-fetch unless a
parent link field is already populated — in that case the agent
folds explicitly without the issuetype guard.fold_parent_context() is idempotent; folding twice with the same
parent does not duplicate the block.<key> not reachable — AC may lack upstream context."Parent AC lines surfaced this way must be cited verbatim in the refined output's Open questions section so the user sees which constraints come from the parent.
Check the loaded ticket for clarity signals before orchestrating:
Cross-source discrepancy scan (per cross-source-consistency, gated by consistency.cross_source): the ticket is rarely a single source. Compare every source against the others and surface any conflict as an Open question — never resolve it silently:
Fold every discrepancy into the refined output's Open questions section (one batched list), never a second prompt. Full taxonomy + scan procedure: cross-source-consistency-mechanics.
Then run the deterministic detection helper — do not re-derive trigger logic in prose:
./agent-config refine-ticket:detect <ticket-body-file>
# or, inside the skill run (scripts/refine_ticket_detect.ts):
# import { detect, load_map } from 'scripts/refine_ticket_detect.js';
# const decision = detect(ticketBody, load_map(), process.cwd());
The helper consumes detection-map.yml (co-located
in this skill folder) and returns:
validate-feature-fit — fires when ≥ 2 distinct feature-area keywords
appear in the body (see sub_skills.validate-feature-fit.keywords).threat-modeling — fires on any auth / webhook / upload / queue /
secret / tenant / admin / PII / payment keyword, or a CVE-YYYY-N
regex match.repo_aware — on when .git/, agents/settings/contexts/, composer.json,
or package.json is present in the cwd; off otherwise.repo_aware=True, decision.repo_context is populated by
gather_repo_context():
recent_branches — up to 20 most recent local branches (naming
convention signal).recent_commits — up to 30 most recent commit subjects (active
modules + verb conventions).context_docs — every agents/settings/contexts/*.md filename (domain
vocabulary).Use repo_context.recent_branches to anchor the "Refined ticket" title
naming (e.g. feat/ vs fix/ vs refactor/ prefix), and
repo_context.context_docs to cite domain vocabulary in the Top-5
risks instead of inventing terms.
The match lists and require_count thresholds are owned by
detection-map.yml — edit the map, not this skill (DE + EN fixtures,
repo-aware + graceful-degrade coverage are regression-locked in this
package's own test suite).
For every SubSkillDecision with fired=True, invoke the named sub-skill
with the ticket body as input:
validate-feature-fit → returns duplicate / scope-creep findingsthreat-modeling → returns trust boundaries + abuse casesCite, don't copy — the output references findings by sub-skill name and
file:line where applicable. If a sub-skill reports zero findings, emit
fired → clean in the orchestration section. Skipped sub-skills appear
as skipped (no trigger match) — never silently omitted.
Each fired finding must map to at least one entry in the Top-5 risks section; orchestration that does not influence the risks is waste.
Load the persona set from frontmatter (Core-6 default). Each persona reviews the ticket through its lens and produces one paragraph:
Optional: --personas=+qa adds the QA persona (edge cases, regression
risk, test matrix).
Optional: --user-type=<id> loads one user-type from user-types/<id>.md
and adds an end-user simulation lens to the persona stack (e.g.
--user-type=galabau-field-crew). User-types compose orthogonally with
personas — persona = methodology / role lens; user-type = end-user / field
lens. v1 is CLI-only (no skill-level default; no frontmatter list). The
user-type voice renders as one paragraph in Persona voices labelled
**User: <label>**, citing Daily Workflow, Vocabulary, Operational
Constraints, and Ticket Red Flags from the loaded user-type. Contract:
docs/contracts/user-type-schema.md.
Produce the three-section output (template below). After rendering, emit the close-prompt (below). Do not write to Jira. Do not open a planning doc.
Frozen per Q25.
## Refined ticket
**Title:** <rewritten title>
<rewritten description — tightened AC, explicit out-of-scope,
open questions surfaced>
## Top-5 risks
1. <risk> — <mitigation / deferral>
2. <risk> — <mitigation / deferral>
3. <risk> — <mitigation / deferral>
4. <risk> — <mitigation / deferral>
5. <risk> — <mitigation / deferral>
## Persona voices
- **Developer** — <one paragraph>
- **Senior Engineer** — <one paragraph>
- **Product Owner** — <one paragraph>
- **Stakeholder** — <one paragraph>
- **Critical Challenger** — <one paragraph>
- **AI Agent** — <one paragraph>
- **[qa]** — *(only when `--personas=+qa`)* <one paragraph>
- **User: <label>** — *(only when `--user-type=<id>`)* <one paragraph
citing Daily Workflow / Vocabulary / Operational Constraints /
Ticket Red Flags from the loaded user-type>
## Orchestration notes
- `validate-feature-fit` — <fired / skipped; key findings or "clean">
- `threat-modeling` — <fired / skipped; key findings or "clean">
- Repo-aware — <on / off; contexts loaded>
The "Refined ticket" section is wrapped in a copyable Markdown box so the user can grab it verbatim.
Run these three scans on the rendered output before the close-prompt. Each is a fast pass; failure blocks emission and forces a fix.
fold_parent_context) is reflected in the rewritten ticket, the Top-5 risks, or the Open questions section. Nothing from the input vanishes silently.<placeholder>, TODO, FIXME, tbd, ???, XXX strings remain. The angle-bracket placeholders in the template (<rewritten title>, <risk>, <one paragraph>) must be replaced with concrete prose before the close-prompt fires.repo_context.context_docs and recent_branches vocabulary. Invented terms are flagged in Open questions or replaced with the project's actual term.Self-review is mechanical (gaps, leftovers, naming drift); persona voices and orchestration outputs handle reasoning critique. Both run; neither replaces the other.
Source: adapted from an external reference.
Probe write access first (Phase F6). Before rendering, do a cheap upfront check:
import { render_close_prompt } from 'scripts/refine_ticket_detect.js';
let write: boolean | null;
try {
const me = jira_get('/myself'); // existence → auth works
const meta = jira_get(`/issue/${key}/editmeta`); // fields → write access
write = Boolean(meta.fields);
} catch {
write = null; // probe itself failed
}
console.log(render_close_prompt(write));
Behaviour:
| Probe result | Prompt shape |
|---|---|
Write access present (True) | Full three-option prompt (comment / replace / nothing) |
Read-only (False) | Single option: "Copy-paste — no write access to this project" |
Probe failed (None) | Full three-option prompt; skill degrades to copy-paste on selection (v1 fallback) |
Per user interaction rules, accept number or free text. editmeta
is cheap and cacheable; cache the result per Jira project key for
the session, re-probe on project change.
After refinement, run
judge-artifact-completeness
with rubric ticket-quality-score to verify DoR readiness — acceptance
criteria, test plan, risk, and estimate. Invoke when the user asks for a
DoR check — not automatically on every refinement.
validate-feature-fit, threat-modeling) cost tokens; orchestrate only when the trigger matrix actually matches, not defensively on every run.[A-Z]+-[0-9]+ in the branch name; chained keys (e.g. feat/PROJ-1-and-PROJ-2) pick the first and note the rest./estimate-ticket or /feature-plan automatically — separate invocations by design (Q5 decision).validate-feature-fit or threat-modeling — orchestrate by reference, cite findings, don't re-derive them.--personas=+qa, add QA, otherwise do not.--user-type=<id> was passed; loading a user-type proactively (e.g. "this ticket smells like field-crew") is forbidden — the axis is CLI-only in v1.jira-ticket — ticket loadervalidate-feature-fit — orchestrated sub-skillthreat-modeling — orchestrated sub-skillfeature-explore — upstream idea capture; hints at /refine-ticket when input looks like a ticketfeature-plan — downstream planningadversarial-review — same critical-challenger persona, different stage (post-plan)artifact-drafting-protocol — this skill was drafted under itAlternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
event4u-app/agent-config
Grounded design brief from the adopted corpus — style, WCAG-checked color tokens, typography, layout pattern, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart decision.
event4u-app/agent-config
Use BEFORE writing or editing any non-trivial UI — inventories components, design tokens, shadcn primitives, and reusable patterns into state.ui_audit. Hard gate for the ui directive set.
event4u-app/agent-config
Use BEFORE writing/changing tests, adding mocks, or test-only methods on production classes — vs mocking-the-mock, production pollution, partial mocks, and overfit/tautological assertions