Skip to content

Commit 9f62c88

Browse files
authored
chore: add maintainer skills for PR push and issue creation (#424)
* chore: add maintainer skills for PR push and issue creation Add two Claude Code skills under .claude/skills/ for community maintainers: - pr-push: 5-phase pipeline (discovery -> branch hygiene -> commit -> push -> PR) that enforces dev as PR target, conventional commits, CHANGELOG gate, and explicit stop after gh pr create (no auto-merge). Phase 4 falls back to inline equivalent checks when the .claude/hooks/pre-push-validate.sh hook is absent (gitignored, not present on fresh clones). - issue-create: 4-phase interview (type -> required fields -> code context -> render+confirm) wrapping gh issue create with the project's existing label catalog and secret redaction. Performance reports use a dedicated perf-report.md template with measurement table + reproduction harness fields. Use chore: instead of feat: so this purely-internal tooling change does not trigger bump-electron-beta.yml (which keys off commit type prefix). Adjust .gitignore to .claude/* + !.claude/skills/ so private settings.local.json and hooks/ stay ignored while skills ship with the repo. * test(real): switch prompt-cache fixtures from codex to gpt-5.4 The bare 'codex' alias no longer routes through the cache-eligible path in real-upstream tests. Pin the model to gpt-5.4 so the cached_tokens assertions across Responses, OpenAI, Anthropic, and Gemini formats run against a deterministic backend. * fix: docker publish triggers and schema strictness * fix: smart version calculation in beta and docker workflows * test: simulate version bump to 2.1.0 for beta testing --------- Co-authored-by: icebear0828 <icebear0828@users.noreply.github.com>
1 parent 027f5c5 commit 9f62c88

17 files changed

Lines changed: 6885 additions & 14 deletions

File tree

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
---
2+
name: issue-create
3+
description: >-
4+
Interview the user to gather all required context, then open a high-quality GitHub issue (`gh issue create`) on the codex-proxy repo with the right template, labels, and structured body.
5+
TRIGGER when: user says "open an issue", "file an issue", "create issue", "report a bug", "feature request", "提个 issue", "报 bug", "提需求".
6+
DO NOT TRIGGER when: user wants to view, search, comment on, or close existing issues (use `gh issue list/view/comment/close` directly); user is writing a PR description (use `pr-push`).
7+
allowed-tools:
8+
- "Bash"
9+
- "Read"
10+
- "Write"
11+
---
12+
13+
# Issue Create
14+
15+
Gather complete context through a structured interview, then file a well-formed issue. The interview is a hard gate — vague issues waste maintainer time.
16+
17+
## Overview
18+
19+
Most "I have a bug" or "I want a feature" reports are missing the information a maintainer needs to act. This skill runs a four-phase interview, fills the appropriate template, applies the right labels, and only then calls `gh issue create`. The user sees and approves the rendered body before submission.
20+
21+
## When to Use
22+
23+
- A user wants to file a new issue on the codex-proxy repository.
24+
- A user describes a bug or feature in conversation and asks "should we file an issue?"
25+
26+
## Important Rules
27+
28+
1. **The interview is not optional.** Do NOT call `gh issue create` until all required fields for the chosen type are collected and the user has explicitly approved the rendered body.
29+
2. **Never invent reproduction steps, version numbers, log output, or behavior.** If the user did not provide it, ask. If they cannot provide it, write "not provided" in the field, do not fabricate.
30+
3. **Show the full body before submitting.** The user must explicitly say "submit" / "looks good" / equivalent. "Yes" without seeing the body is not enough — show it first.
31+
4. **Apply only labels from the project's existing label set.** Read `references/labels.md` for the catalog. Do not invent new labels.
32+
5. **Strip secrets.** If the user pastes logs, headers, or config that contain tokens, cookies, OAuth state, API keys, or account IDs, redact them before they enter the issue body. Replace with `<redacted>`.
33+
6. **One issue per scope.** If the user describes two unrelated problems, file two issues. Ask before splitting.
34+
35+
## Key Workflows
36+
37+
### Phase 1: Type classification
38+
39+
**Goal:** Pick the right template and label.
40+
41+
Ask the user (one consolidated question):
42+
43+
> What type of issue is this?
44+
> 1. **Bug** — something is broken or behaves incorrectly
45+
> 2. **Feature request** — propose new functionality
46+
> 3. **Question** — usage / configuration / "is this expected?"
47+
> 4. **Performance** — measurable regression or slowness
48+
> 5. **Documentation** — docs are wrong, missing, or unclear
49+
50+
Read the type spec:
51+
```
52+
Read: .claude/skills/issue-create/references/issue-types.md
53+
```
54+
55+
Map answer to template path:
56+
57+
| Type | Template asset | Default label |
58+
|---|---|---|
59+
| Bug | `assets/bug-report.md` | `bug` |
60+
| Feature request | `assets/feature-request.md` | `enhancement` |
61+
| Question | `assets/question.md` | `question` |
62+
| Performance | `assets/perf-report.md` | `bug` |
63+
| Documentation | `assets/feature-request.md` (with docs framing) | `documentation` |
64+
65+
Do **NOT** proceed to Phase 2 until the type is confirmed.
66+
67+
### Phase 2: Required-field interview
68+
69+
**Goal:** Collect every field the chosen template requires.
70+
71+
Read `references/issue-types.md` to see the required-field table for the chosen type. Ask for missing fields in **one consolidated message**, not one at a time. Group related fields together.
72+
73+
**For bugs**, the required fields are:
74+
- One-line summary
75+
- Expected behavior
76+
- Actual behavior
77+
- Reproduction steps (numbered)
78+
- Codex-proxy version (`npm pkg get version` or app About dialog)
79+
- Deployment mode (Electron app / Docker / `npm start` / dev)
80+
- Relevant log lines (redact secrets)
81+
- Frequency (always / intermittent / once)
82+
83+
**For feature requests**, the required fields are:
84+
- Problem the feature solves (user-facing motivation, not the proposed solution)
85+
- Proposed solution (high level)
86+
- Alternatives considered
87+
- Who benefits (single user / all users / specific deployment mode)
88+
89+
**For questions**:
90+
- What you tried
91+
- What you expected
92+
- What happened
93+
- Relevant config (redact secrets)
94+
95+
**For performance**:
96+
- All bug fields, plus:
97+
- Measured baseline vs current (timings, memory, request count — be specific)
98+
- Reproduction harness (script, steps, or `tests/bench/`)
99+
100+
**For documentation**:
101+
- Which doc page / file
102+
- What is wrong or missing
103+
- Suggested fix (if any)
104+
105+
If a field cannot be answered, the user must explicitly say "not applicable" or "unknown" — record that verbatim. Do not silently skip.
106+
107+
Do **NOT** proceed to Phase 3 until every required field has either an answer or an explicit "not applicable".
108+
109+
### Phase 3: Code & related-context grounding
110+
111+
**Goal:** Help maintainers find the relevant code fast.
112+
113+
Ask the user for:
114+
- File paths or `file:line` references they suspect are involved (optional but encouraged).
115+
- Related issues / PRs to link (`Refs #N`, `Related to #N`).
116+
- Whether they tried searching existing issues (`gh issue list --search "<keywords>"`). If they have not and the report sounds like something that might exist, run the search and show top 3 matches before continuing.
117+
118+
If the user provides no code locations and the bug is concrete, optionally offer:
119+
> "Want me to grep for the relevant code so we can include file:line in the issue?"
120+
121+
Do not grep silently — ask first, and only do it once.
122+
123+
### Phase 4: Render, confirm, submit
124+
125+
**Goal:** Show the final body, get explicit approval, file the issue.
126+
127+
1. Read the chosen template:
128+
```
129+
Read: .claude/skills/issue-create/assets/<template>.md
130+
```
131+
2. Read the labels catalog:
132+
```
133+
Read: .claude/skills/issue-create/references/labels.md
134+
```
135+
3. Fill the template with the collected fields. Strip secrets per Important Rule #5.
136+
4. Pick labels:
137+
- Always include the type label (Phase 1 mapping).
138+
- Add `good first issue` only if the user explicitly says it qualifies (small scope, low context required).
139+
- Add `help wanted` if the user has no plan to fix it themselves.
140+
- Add `documentation` in addition to the type label if docs need updating.
141+
5. Show the user the complete rendered output:
142+
```
143+
Title: <title>
144+
Labels: <label1>, <label2>
145+
Body:
146+
<full body>
147+
```
148+
6. Ask: "Ready to submit, or want to adjust anything?"
149+
7. Wait for an explicit affirmative. "Yes", "submit", "go", "looks good", "提交" all qualify. Silence or hedging does not.
150+
8. Submit:
151+
```bash
152+
gh issue create \
153+
--title "<title>" \
154+
--label "<label1>,<label2>" \
155+
--body "$(cat <<'EOF'
156+
<body>
157+
EOF
158+
)"
159+
```
160+
9. Print the issue URL.
161+
10. **STOP.** Do not assign, do not comment, do not link to projects unless the user issues a separate, explicit command.
162+
163+
## Common Pitfalls
164+
165+
- Do not call `gh issue create` before showing the body for approval.
166+
- Do not invent reproduction steps when the user gave a vague report — ask.
167+
- Do not paste raw logs that contain tokens / cookies / OAuth state / account IDs.
168+
- Do not apply labels outside the existing catalog.
169+
- Do not file two issues from one report without confirming the split with the user.
170+
- Do not grep / search the codebase silently to "fill in" missing fields — ask first.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<!--
2+
Bug report template for codex-proxy issues.
3+
The issue-create skill fills in {{placeholders}}.
4+
Match the language of the repo's existing issues (currently a mix of zh-CN and en).
5+
-->
6+
7+
## Summary
8+
9+
{{One sentence describing the bug.}}
10+
11+
## Expected behavior
12+
13+
{{What the user thought would happen.}}
14+
15+
## Actual behavior
16+
17+
{{What actually happened.}}
18+
19+
## Reproduction steps
20+
21+
1. {{step 1}}
22+
2. {{step 2}}
23+
3. {{step 3 — describe the failure}}
24+
25+
## Environment
26+
27+
| Field | Value |
28+
|---|---|
29+
| Codex-proxy version | {{e.g. 1.4.2 or commit SHA}} |
30+
| Deployment mode | {{Electron / Docker / `npm start` / dev}} |
31+
| OS + arch | {{e.g. macOS 14.5 arm64}} |
32+
| Frequency | {{always / intermittent / once}} |
33+
| First broken version (if known) | {{version or "unknown"}} |
34+
| Workaround (if any) | {{description or "none"}} |
35+
36+
## Logs / output
37+
38+
```
39+
{{Paste relevant log lines. SECRETS REDACTED — no tokens, cookies,
40+
oauth_state, API keys, account IDs.}}
41+
```
42+
43+
## Additional context
44+
45+
{{Anything else the maintainer should know. Remove this section if empty.}}
46+
47+
## Related
48+
49+
{{Refs #N, Related to #N — remove if none.}}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<!--
2+
Feature request template for codex-proxy issues.
3+
The issue-create skill fills in {{placeholders}}.
4+
-->
5+
6+
## Summary
7+
8+
{{One sentence describing the feature.}}
9+
10+
## Problem
11+
12+
{{The user-facing motivation. What can the user not do today, or what is
13+
painful about how they have to do it? DO NOT describe the proposed
14+
solution here — only the problem.}}
15+
16+
## Proposed solution
17+
18+
{{High-level description of how the feature would work. Implementation
19+
detail is welcome but not required. If you have a UI in mind, sketch
20+
or screenshot helps.}}
21+
22+
## Alternatives considered
23+
24+
{{Other approaches the user thought about and why they don't fit.
25+
Even "I considered X but it doesn't work because Y" is useful — it
26+
saves the maintainer from re-deriving the same conclusion.}}
27+
28+
## Who benefits
29+
30+
{{single user / all users / a specific deployment mode (Electron / Docker / dev) /
31+
a specific upstream provider / a specific account state}}
32+
33+
## Impact if not done
34+
35+
{{Does the user have a workaround? Is this blocking? Nice-to-have?
36+
Remove this section if "no impact, just nice".}}
37+
38+
## Additional context
39+
40+
{{Mockups, links, related discussions. Remove if empty.}}
41+
42+
## Related
43+
44+
{{Refs #N, Related to #N — remove if none.}}
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<!--
2+
Performance report template for codex-proxy issues.
3+
The issue-create skill fills in {{placeholders}}.
4+
A perf report without numbers is just a bug — switch to bug-report.md if
5+
no measurements are available.
6+
-->
7+
8+
## Summary
9+
10+
{{One sentence describing the regression or slowness.}}
11+
12+
## Expected behavior
13+
14+
{{What performance was expected, and where that expectation comes from
15+
(prior version, docs, comparable system).}}
16+
17+
## Actual behavior
18+
19+
{{What is observed instead.}}
20+
21+
## Measurements
22+
23+
| Metric | Baseline | Current | Delta |
24+
|---|---|---|---|
25+
| {{e.g. p95 latency}} | {{200ms}} | {{1.4s}} | {{+600%}} |
26+
| {{e.g. memory RSS}} | {{180MB}} | {{420MB}} | {{+133%}} |
27+
28+
**Methodology:** {{How the numbers were taken — script, manual stopwatch,
29+
profiler, load test. Be specific enough that a maintainer can reproduce.}}
30+
31+
## Reproduction harness
32+
33+
```
34+
{{Script, `tests/bench/...` reference, or numbered steps. Must be
35+
deterministic enough to re-measure.}}
36+
```
37+
38+
## Environment
39+
40+
| Field | Value |
41+
|---|---|
42+
| Codex-proxy version | {{e.g. 1.4.2 or commit SHA}} |
43+
| Deployment mode | {{Electron / Docker / `npm start` / dev}} |
44+
| OS + arch | {{e.g. macOS 14.5 arm64}} |
45+
| First slow version (if known) | {{version or "unknown"}} |
46+
| Resource constraint hit | {{CPU / memory / network / FDs / "none"}} |
47+
48+
## Logs / output
49+
50+
```
51+
{{Relevant log lines or profiler output. SECRETS REDACTED.}}
52+
```
53+
54+
## Additional context
55+
56+
{{Anything else. Remove if empty.}}
57+
58+
## Related
59+
60+
{{Refs #N, Related to #N — remove if none.}}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<!--
2+
Question template for codex-proxy issues.
3+
The issue-create skill fills in {{placeholders}}.
4+
Note: if it turns out to be a bug, switch to the bug-report template.
5+
-->
6+
7+
## What I'm trying to accomplish
8+
9+
{{The end goal, not the immediate confusion. e.g. "I want to route
10+
gpt-5.5 traffic only to my work account" — not "what does
11+
plan_mapping do?"}}
12+
13+
## What I tried
14+
15+
{{Commands, config snippets, docs read, search terms used. Be specific.}}
16+
17+
```yaml
18+
# Relevant config — SECRETS REDACTED
19+
{{config snippet or "none"}}
20+
```
21+
22+
## What I expected
23+
24+
{{What outcome did you anticipate?}}
25+
26+
## What happened
27+
28+
{{What did you actually observe?}}
29+
30+
## Environment
31+
32+
| Field | Value |
33+
|---|---|
34+
| Codex-proxy version | {{e.g. 1.4.2}} |
35+
| Deployment mode | {{Electron / Docker / `npm start` / dev}} |
36+
| OS + arch | {{e.g. macOS 14.5 arm64}} |
37+
38+
## Additional context
39+
40+
{{Logs, screenshots, anything else. Remove if empty.}}

0 commit comments

Comments
 (0)