Skip to content

openJiuwen-ai/sciencediscovery / .agents/skills/github

github

Verified

Use the gh CLI for GitHub issues and pull requests on openJiuwen-ai/sciencediscovery. Issue and pull request titles and bodies are English. Use when filing or editing an issue, opening or updating a pull request, or when an agent or a person asks how to talk to this repository on GitHub. For the test gates, fork push, and release label, continue in the create-github-pr skill. gitcode.com is a read-only mirror.

FileKindSize
SKILL.mdskill md7.6 KB
---
name: github
description: >
  Use the gh CLI for GitHub issues and pull requests on
  openJiuwen-ai/sciencediscovery. Issue and pull request titles and bodies are
  English. Use when filing or editing an issue, opening or updating a pull
  request, or when an agent or a person asks how to talk to this repository
  on GitHub. For the test gates, fork push, and release label, continue in
  the create-github-pr skill. gitcode.com is a read-only mirror.
---

# GitHub (`gh`)

Project-local skill for **ScienceDiscovery**.

New issues and pull requests go to
[openJiuwen-ai/sciencediscovery](https://github.com/openJiuwen-ai/sciencediscovery)
with **`gh`**. Do not open them in the browser, and do not use the `gitcode`
CLI for a new issue or pull request. GitCode
(`openJiuwen/sciencediscovery`) is a read-only mirror. The
[gitcode](../gitcode/SKILL.md) skill is only for an existing mirror item that
still has to be read or commented on.

The full pull-request procedure — local UT/ST/E2E, pushing the branch to your
own fork, the release label, reading Actions back — is
[create-github-pr](../create-github-pr/SKILL.md). This page is the usage
guide those steps assume.

## Language

**Issue and pull request titles and bodies are English.**

That includes the explanation under any template heading, the validation
numbers, and the E2E conclusion. Write Chinese only when the person who asked
explicitly wants Chinese. If a GitHub issue or pull request was filed in
Chinese by mistake, fix it with `gh issue edit` or `gh pr edit` before calling
it done.

Edit only items you created. On someone else's issue or pull request, add a
comment; do not rewrite their title, body or comments. The one exception is
adding yourself as an assignee to an issue you start implementing, under
[Issues](#issues).

## Setup

```bash
gh auth status          # retry once if it fails, then ask the operator
gh api user --jq .login # current login; do not hard-code a person; never print a token
```

Always pass `--repo openJiuwen-ai/sciencediscovery` so a checkout whose
`origin` is something else still hits this repository.

`origin` on a current clone of this repo is
`openJiuwen-ai/sciencediscovery`. Do not `git push origin` a task branch.
Push the branch to the operator's own fork, then open the pull request with
`--head <login>:<branch>`.

## Issues

Always read the matching form under `.github/ISSUE_TEMPLATE/` before creating
an issue, and use its title prefix and required body sections. `config.yml`
is chooser configuration, not a form.

`gh issue create` does not render a YAML issue form. The web form applies the
template's labels and issue type, but through the API `--label` and `--type`
require push access and are silently dropped without it. Pass them only when
you have that access, and do not report them as applied unless the readback
shows them.

Search before creating. A duplicate title is not a new issue.

```bash
gh issue list --repo openJiuwen-ai/sciencediscovery --state open --limit 50 \
  --search "keywords"
gh issue create --repo openJiuwen-ai/sciencediscovery \
  --title "[Feature]: Short English summary" \
  --body-file .tmp/issue.md
gh issue view <n> --repo openJiuwen-ai/sciencediscovery
gh issue edit <n> --repo openJiuwen-ai/sciencediscovery --body-file .tmp/issue.md
gh issue comment <n> --repo openJiuwen-ai/sciencediscovery --body-file .tmp/comment.md
```

Read the issue back after create or edit and confirm the number, the English
title, and that the body is the text you wrote.

To put a screenshot in the body, reference a local image in the Markdown and
pass the same path to `--attach`. `gh` rewrites the reference to a
`user-attachments` URL. `--attach` needs write access on this repository. A
person can also drop the file into the issue on the website; that upload does
not require a git push, but agents should use `--attach` rather than asking
someone to paste by hand.

```bash
gh issue edit <n> --repo openJiuwen-ai/sciencediscovery \
  --body-file .tmp/issue.md \
  --attach '.tmp/screen.png#What the screen shows'
```

### Work on an existing issue

These steps apply when you start implementing an existing issue. Reading it,
giving a brief answer, or creating a new issue alone does not claim the work.

1. Resolve the current `gh` login and inspect the issue's assignees:

   ```bash
   login=$(gh api user --jq .login)
   gh issue view <n> --repo openJiuwen-ai/sciencediscovery \
     --json number,title,assignees
   ```

2. If you are already assigned, skip the assignment. Otherwise add yourself;
   `--add-assignee` preserves everyone already assigned:

   ```bash
   gh issue edit <n> --repo openJiuwen-ai/sciencediscovery --add-assignee @me
   ```

   If `@me` is unavailable, use the resolved login instead; never hard-code a
   person's login:

   ```bash
   gh issue edit <n> --repo openJiuwen-ai/sciencediscovery --add-assignee "$login"
   ```

3. Read the issue back and check whether `assignees` contains your login:

   ```bash
   gh issue view <n> --repo openJiuwen-ai/sciencediscovery \
     --json number,assignees
   ```

   If your login is missing, do not retry assignment or report it as assigned.
   Still post the plan comment in step 4, say you are working on the issue,
   and ask a maintainer to assign it to you. The `"$login"` fallback above only
   covers `@me` being unavailable; it does not grant assignment permissions.

4. Post an English plan whether or not assignment persisted, describing what
   you intend to change and how completion will be judged. If other assignees
   are present, say that you are also working on it. Add a new English progress comment when a PR
   opens, work is blocked or the plan changes. Leave other people's titles,
   bodies and comments unchanged:

   ```bash
   gh issue comment <n> --repo openJiuwen-ai/sciencediscovery \
     --body-file .tmp/issue-plan.md
   # When there is progress:
   gh issue comment <n> --repo openJiuwen-ai/sciencediscovery \
     --body-file .tmp/issue-progress.md
   ```

## Pull requests

Follow [create-github-pr](../create-github-pr/SKILL.md). The commands that
file the request:

```bash
login=$(gh api user --jq .login)
git push -u <fork-remote> HEAD:<branch>
gh pr create --repo openJiuwen-ai/sciencediscovery \
  --draft --base main --head "${login}:<branch>" \
  --title "type(scope): what changes, in English" \
  --body-file .tmp/pr.md
gh pr view <n> --repo openJiuwen-ai/sciencediscovery \
  --json number,title,state,isDraft,baseRefName,headRefName,url
```

Keep the braces in `"${login}:<branch>"`: zsh reads `$login:chore/…` as
`$login` with a `:c` modifier (likewise `:h`, `:t`, `:r`, `:e`) and sends
GitHub a head that is not your branch. The symptom and both of its causes are
in the create-github-pr skill's *Troubleshooting*, under `No commits between`.

Keep it a draft while preparing the change. Drafts already run L1. Once it
is ready, mark it ready for review to start UT, ST and mocked E2E, then
request review from a code owner listed in
[.github/CODEOWNERS](../../../.github/CODEOWNERS). An automated review also
runs on the pull request.

```bash
gh pr ready <n> --repo openJiuwen-ai/sciencediscovery
```

The title is an English sentence a reader can understand without the diff.
`update`, `fix bug`, and a raw file name are not titles. The body states what
changed, why, what was run (with numbers), and the E2E conclusion. A change
with no user-observable path may say the E2E is not applicable and why.
Backend-only is not that reason.

## What not to do

- Do not file a new issue or pull request on gitcode.com.
- Do not write the GitHub title or body in Chinese unless asked.
- Do not put tokens, local absolute paths, or private notes in the body.
- Do not `git push origin` a task branch.
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 198kUpdated Claude CodeCodexVerifiedInstall