GitHub Agentic Workflows 요청이 설계, 생성, 설정, 수정, 디버깅, 업그레이드 중 무엇인지 구분해 알맞은 프롬프트나 스킬 파일로 안내합니다.
- 새 워크플로 설계 또는 생성
- 기존 워크플로 수정
- 워크플로 오류 조사
GitHub CLI `gh`로 이슈, 풀 리퀘스트, 저장소 정보를 가져오고 가공하는 방법을 안내합니다. 구조화된 출력, 페이지 이동, 저장소 지정, 검색 방식과 `gh api`로 전환할 시점을 설명합니다.
Patterns for invoking the GitHub CLI (gh) from agents. Covers structured output, pagination, repo targeting, search vs list, gh api fallback.
실행 점수 미검증
설치 방법 보기이 참고 자료는 GitHub CLI gh를 사용해 이슈, 풀 리퀘스트, 저장소와 관련 정보를 가져오고 다루는 방법을 설명합니다. 구조화된 데이터를 위한 --json, 필터링을 위한 --jq, 출력 형식을 지정하는 --template을 안내합니다. 목록 결과의 상한과 API 페이지 이동, 작업 디렉터리에서 저장소를 판별하는 방법, --repo로 저장소를 명시하는 방법도 다룹니다. 여러 저장소를 검색할 때 유용한 gh search와 단일 저장소에 범위가 한정된 목록 명령의 차이도 설명합니다. 형식화된 명령으로 필요한 정보를 얻을 수 없을 때 gh api를 사용하는 방법도 안내합니다. 그 밖에 토론, 이슈 첨부 파일과 아티팩트, 저장소 파일 읽기를 다룹니다.
에이전트가 이슈나 풀 리퀘스트 정보를 가져와 후속 작업에서 처리할 수 있는 형태로 만들 때 참고할 수 있습니다. 기본 결과 상한으로 인한 누락을 피하거나, 대상 저장소를 분명히 지정하거나, 형식화된 명령에 없는 필드를 API에서 가져오려는 경우에도 유용합니다.
gh api로 이 풀 리퀘스트의 리뷰 댓글을 가져와 주세요.”GitHub CLI gh가 필요합니다. 실행할 수 있는 작업과 첨부 파일 업로드 여부는 인증 상태, 권한, GitHub.com·GHE.com·GitHub Enterprise Server 중 어느 환경을 쓰는지에 따라 달라집니다. 토론과 이슈 아티팩트 관련 일부 명령은 미리 보기 기능으로 표시되어 있으며 변경될 수 있습니다.
이 소개문은 공개된 SKILL.md를 바탕으로 AI(OpenAI Codex)가 작성했습니다. 정확한 사양은 아래 원문을 확인하세요.
AI가 SKILL.md의 내용에서 주의가 필요한 작업과 도입 전제를 확인했습니다. 점수는 실제로 실행한 결과(실행 검증)만으로 매깁니다.
점수에는 넣지 않았습니다. 2026년 10월 26일 기준으로 AI(OpenAI Codex)가 판정했습니다. 참고용이므로 설치 전에 원문도 확인해 주세요.
설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
gh already does the right thing in non-TTY contexts: it skips the pager,
strips ANSI color, and errors out fast with a helpful message instead of
prompting (e.g. must provide --title and --body when not running interactively).
You don't need to defensively set GH_PAGER or pass --no-pager (no such
flag exists).
Human output from gh is column-formatted. If you want structured data:
--json field1,field2,... for structured output.gh issue view and gh pr view, use --json ...,comments to include comments in structured data; use --comments only with the human-readable view.--json and no field list to print the full set of
available fields, then pick what you need.--jq '<expr>' for filtering without piping through a separate jq.--template '<go-template>' (alongside --json) when you want shaped
text output. Note that --template/-T collides with a body-template flag
on a few commands (e.g. gh pr create -T, gh issue create -T); always
check --help before assuming which one you're hitting.List commands cap results.
gh issue list, gh pr list, gh search ...: pass -L N (--limit N).
The default is usually 30.gh issue list / gh pr list do not expose aggregate totals like
totalCount via --json. If you need a true total, use gh api graphql
to query totalCount; otherwise, treat -L as the cap for the current call.gh api --paginate <path>. Combine with
--jq and (optionally) --slurp to assemble one array.gh infers the repo from the cwd's git remotes.
Pass --repo OWNER/REPO (-R) to override the resolved CWD repo.
gh search issues|prs|code|repos|commits|users uses GitHub's search
index and accepts the full search syntax (is:open, author:,
label:, repo:owner/name, in:title, ...). Pass each qualifier as
its own bare token, not as one quoted string:
gh search issues repo:cli/cli is:open author:monalisa works, but
gh search issues "repo:cli/cli is:open" is treated as a single keyword (parsed as repo:"cli/cli is:open")
and fails with Invalid search query. Quote only multi-word free text
(gh search issues "broken feature"). Most qualifiers also have a
dedicated flag (--repo, --author, --label, ...). Prefer search for
anything cross-repo or filtered by author/label.gh issue list --search "..." and gh pr list --search "..." take the
query as one quoted string (it is a flag value) and are scoped to one repo.--author dependabot matches nothing. Use
--app dependabot (on pr/issue list and search prs|issues; expands
to author:app/<slug>) or --author "dependabot[bot]".gh search issues also takes --search-type <lexical|semantic|hybrid>
(github.com/GHEC only, issues only): use semantic when the user describes a
problem in natural language rather than exact terms, and hybrid to blend
keyword and semantic ranking; lexical (default) is exact matching.Newer gh issue subcommands model issue types, sub-issue hierarchy, and
blocked-by/blocking relationships.
gh issue create: --type <name>, --parent <number|url> (creates the
new issue as a sub-issue), --blocked-by <number|url,...>, --blocking <number|url,...>.gh issue edit (edits one or more issues in the same repo, e.g.
gh issue edit 23 34): --type <name> / --remove-type,
--parent <n|url> / --remove-parent,
--add-sub-issue <n,n> / --remove-sub-issue <n,n>,
--add-blocked-by <n,n> / --remove-blocked-by <n,n>,
--add-blocking <n,n> / --remove-blocking <n,n>. Relationship and parent
refs are issue numbers or URLs; a URL may point to another repo on the same
host, but a different host is rejected. --add-sub-issue cannot be used
when editing more than one issue.gh issue list --type <name> filters by issue type.gh issue view and gh issue list accept these as --json fields (prefer
them over scraping the default text output): issueType, parent,
subIssues, subIssuesSummary, blockedBy, blocking. subIssues,
blockedBy, and blocking are objects shaped
{"nodes": [...], "totalCount": N} (not flat arrays), and nodes is capped
(subIssues at 100, blockedBy/blocking at 50), so compare the node count
against totalCount to detect truncation.--attach <path> is available on gh issue create, gh issue edit,
gh issue comment, gh pr create, gh pr edit, gh pr comment,
gh issue artifact create, and gh issue artifact edit.
--attach to upload multiple files:
gh issue comment 12 --attach ./before.png --attach ./after.png.--attach values total across
images and videos.png, jpg, jpeg, gif, webp, svg, mp4,
mov, and webm.#. Quote the value so the
shell does not treat # as a comment:
gh pr create --attach './login.png#The login error state'. Without alt
text, the filename is used.--attach paths and local Markdown destinations may be absolute or relative
to the directory where gh runs. When the body comes from a file with
--body-file, or from a file argument to gh issue artifact create,
relative destinations resolve against that file's directory first, then the
directory where gh runs.gh rewrites that Markdown
reference to the uploaded URL. The reference keeps its existing alt text.
Otherwise, gh appends the attachment to the body. For example:
gh pr edit 23 --body '' --attach ./login.png. becomes
a bare player URL, while an inline video image becomes a link. A
reference-style video image such as ![recording][clip] with
[clip]: ./repro.mp4 is rejected; use a reference-style link instead.gh issue create and gh pr create: --attach cannot be used with
--web. gh pr create --attach also cannot be used with --dry-run.gh issue edit: --attach can edit only one issue at a time.gh issue comment and gh pr comment: --attach cannot be used with
--web or --delete-last. It works alone, with --edit-last, or with one
of --body, --body-file, or --editor.gh issue artifact create and gh issue artifact edit: --attach works
only on Markdown documents, not links or HTML documents. With several
Markdown documents, create uploads each file once and points every
document that references it at the upload, and a file that no document
references is an error before anything uploads. edit with only
--attach appends the files to the artifact's current content.WRITE, MAINTAIN, or
ADMIN repository permission. GitHub Enterprise Server is unsupported. The
upload endpoint accepts tokens from only some GitHub Apps, and refuses the
rest with the same error as missing write access.gh still
writes those attachments and exits non-zero. gh issue create,
gh issue edit, gh pr create, and gh pr edit also print the issue or
pull request URL. gh issue artifact create and edit still save an
artifact that is missing some of its files if any of them uploaded, with
the upload error as the reason on its created or updated line. If none
of them uploaded, the artifact isn't saved and gets a failed line.gh discussion)Preview command set, subject to change. Subcommands:
gh discussion list [--state open|closed|all] [--category <name>] [--author <handle>] [--label <name>,...] [--answered] [--search <query>] [--sort created|updated] [--order asc|desc] [--limit N] [--after <cursor>] [--json <fields>] [--web]
lists a repo's discussions. --state defaults to open, --sort to updated,
--order to desc. --answered is tri-state (--answered=false for
unanswered) for Q&A categories.gh discussion view {<number>|<url>|<comment-id>|<comment-url>} [--comments] [--order oldest|newest] [--limit N] [--after <cursor>] [--json <fields>] [--web]
shows a discussion's body; add --comments for its comments, or pass a
comment ID/URL as the argument to list that comment's replies (no
--replies flag; --comments is rejected with a comment argument).
--order (default newest), --limit, and --after apply only to comment
and reply listings.gh discussion create [--title <t>] [--body <b> | --body-file <path>] [--category <name>] [--label <name>,...]
creates a discussion. --title, a body (--body or --body-file), and
--category are required non-interactively; omitting any will prompt on a
terminal.gh discussion edit {<number>|<url>} [--title <t>] [--body <b>] [--body-file <path>] [--category <name>] [--add-label <name>,...] [--remove-label <name>,...]
edits title, body, category, or labels.gh discussion comment {<number>|<discussion-url>|<comment-id>|<comment-url>} [--body <b>] [--body-file <path>] [--edit] [--delete] [--yes]
adds a top-level comment (when given a discussion) or a reply (when given a
comment); --edit or --delete updates or removes a comment/reply and
needs a comment ID or URL. --yes skips the --delete confirmation.--json/--jq/--template are available on list and view only;
create and edit print the discussion URL. comment prints the discussion comment (or reply) URL.gh issue artifact)Preview command set, subject to change. Issue artifacts are Markdown documents
(type generic or plan), HTML documents (type embedded_html), and links
(type link) attached to an issue. Each has a number on its issue, and
commands address artifacts by that number, since names aren't unique. They
are not GitHub Actions artifacts, which gh run download handles.
Subcommands:
gh issue artifact list {<issue-number>|<issue-url>} [--type generic|plan|link|embedded_html] [--limit N] [--json <fields>]
(alias ls) lists artifacts in number order. There is no default limit:
every artifact is listed unless --limit is set. --type generic and
--type plan both list every Markdown document, and each keeps its stored
type. Piped output is tab-separated number, name, type, and RFC 3339
update time. --json fields include body, so one call can return every
artifact's content.gh issue artifact view {<issue> <artifact-number> | <artifact-url>} [--version N] [--json <fields>] [--web]
shows one artifact and its edit history. In a terminal, it ends with the
artifact's URL. Piped output is name:, number:, version:, type:,
creator:, created:, updated-by:, updated:, and url: lines, in
that order, then -- and the raw body. --version N shows that version
from the edit history. --version, --json, and --web are mutually
exclusive. --json versions returns the edit history. --web opens a
document's page on GitHub, or a link's URL.gh issue artifact create {<issue-number>|<issue-url>} [<file>[#<name>] | <url>]... [--body <text> | --body-file <path>] [--name <name>] [--type generic|plan|embedded_html] [--attach <path>]...
(alias new) creates one artifact per file or URL, in argument
order. A text file becomes a document named after the file, or after the
text following #:
gh issue artifact create 142 'docs/signin-plan.md#Sign-in plan'. A
.html or .htm file becomes an HTML document. An
http(s) URL becomes a link named after its host, and a .url Internet
Shortcut file becomes a link to its URL. Names can't contain some
characters, such as parentheses. gh drops them from names it takes from
file names (plan (1).md becomes plan 1.md), but sends a name given with
# or --name as typed. Instead of file or URL arguments, --body <text>
creates one document and --body-file <path> creates one artifact from a
file. Neither can be combined with file or URL arguments. --name names a
single artifact. It's required with --body or --body-file -, and can't
be combined with a #<name> suffix. Documents are generic, and HTML
documents embedded_html. --type sets the type of every document
instead, whatever the file extension, so --type embedded_html makes
--body or --body-file - an HTML document. A plan currently behaves the
same as a generic document. --type is refused if any artifact is a link.gh issue artifact edit {<issue> <artifact-number> | <artifact-url>} [--name <name>] [--body <text> | --body-file <path>] [--attach <path>]... [--restore-version N]
renames an artifact or replaces its content, saving a new version. At least
one of --name, --body, --body-file, --attach, or --restore-version
is required, and a --body-file never renames the artifact. The type never
changes: a link's new content must be an http(s) URL or a .url file, and
a document can't take a .url file. --restore-version N saves the name
and content of version N from the edit history as a new version. It works
for any version view lists, and can't be combined with --name,
--body, --body-file, or --attach. If the artifact already matches
that version, nothing is saved and gh exits 0, with a skipped line when
piped.gh issue artifact delete {<issue> <artifact-number>... | <artifact-url>...} [--yes]
deletes artifacts, which can't be restored. In a terminal, gh asks once
for all of them. --yes skips the prompt and is required when gh can't
prompt. Without --yes, a failed lookup stops the command before the
prompt, and nothing is deleted. With --yes, every number is attempted.gh issue artifact download {<issue> [<artifact-number>...] | <artifact-url>...} [--dir <dir> | --output <path>] [--clobber | --skip-existing] [--version N]
writes the given artifacts, or every artifact on the issue, to files in
--dir (default .). Each file is named <number>-<name>, with path
separators, whitespace, control characters, and characters Windows forbids
replaced by -. Markdown documents end in .md, HTML documents in
.html or .htm, and links are saved as .url Internet Shortcut files,
which create and edit read back as links. An existing file fails that
artifact unless --clobber overwrites it or --skip-existing skips it.
--output <path> and --version N (an earlier version from the edit
history) need exactly one artifact number, and --output - prints its
stored body (a link's URL) with nothing else. Without numbers, an issue
with no artifacts is an error.https://github.com/<owner>/<repo>/issues/<issue>/artifacts/<number>, can
replace the issue and number, and selects its repository the same way.
Artifact URLs in one command must be on the same issue. Pull requests are
refused, and so is GitHub Enterprise Server.--json/--jq/--template are available on list and view only. The
id field is a global ID that no command accepts; commands take number,
or url, the artifact's page on GitHub.create, edit, and download (except with --output -) report each
artifact on its own line. When piped, every line goes to stdout with five
tab-separated columns, empty ones included: status (created, updated,
restored, written, skipped, or failed), artifact number, name (the
file path for download), source (the file, URL, or - given to
create, or the --body-file value given to edit), and the reason for a
skip, a failure, or --attach files that didn't upload. In a terminal,
failures go to stderr. A failed artifact doesn't stop the others, and the
command exits 1 after any failure or failed upload. After create exits 1,
retry only the failed lines, since the others were created.delete reports on stderr. In a terminal, each deleted or failed artifact
gets a line. When piped, a deleted artifact prints nothing, and each
failure prints <number>: <reason>. Any failure exits 1.create and edit read and check every file before any request, so a
missing, empty, or binary file fails the whole command, and nothing is
saved. Standard input is read only through --body-file -, and create
refuses a - argument.view, edit, and download refuse an artifact whose type this version
of gh doesn't know, with a message to upgrade gh. list and delete
work with any type.gh repo read-file / read-dir)Preview commands, subject to change. They read a repo's contents over the API
without cloning, and honor --repo OWNER/REPO (-R) and --ref <branch|tag|commit>
(default branch when omitted).
gh repo read-file <path> [--ref <ref>] [--output <path> [--clobber]] [--allow-escape-sequences] [--json <fields>] [--jq <expr>]
prints a file's contents. In non-TTY contexts the raw bytes go straight to
stdout (pipe-friendly); binary files are written as-is when piped but are
refused on a TTY. By default, a file containing terminal escape sequences is
refused; pass --allow-escape-sequences to read it anyway. --output <path> (-o) writes to
disk instead of stdout (a trailing slash writes under a directory using the
remote file name; --clobber allows overwrite); writing to disk always
includes the raw bytes regardless of escape sequences. --output and --json are
mutually exclusive. --json fields include name, path, gitSHA, size,
type, encoding, and content (base64 encoded).gh repo read-dir [<path>] [--ref <ref>] [--json <fields>] [--jq <expr>]
lists a directory; with no path it lists the repo root. Non-TTY output is tab
separated as type, name, octal mode, and byte size. --json fields include
name, path, type, gitType, mode, modeOctal, gitSHA, size, and
submodule. A path pointing at a file errors and points you at read-file
(and vice versa).gh api for anything --json doesn't exposeSometimes useful data isn't on the typed commands. Examples:
gh api repos/{owner}/{repo}/pulls/{n}/comments
(the --comments flag on gh pr view shows issue-level comments only).gh api graphql -f query='...' -F var=value.gh api repos/{owner}/{repo}/... - note the
{owner}/{repo} placeholder is filled in for you when run from a repo
with detected remotes; pass them literally if you want determinism.gh auth status prints the active host(s), user, and which env var (if
any) is being honored.gh auth status --json is supported.gh auth status --json hosts reports these with "refreshable": true and a
tokenExpiresAt timestamp.*.ghe.com) hosts support them; other hosts keep using
regular tokens.gh auth token: an expiring token can stop
working at any time because gh rotates it on refresh. Run gh auth token
again each time you need one, or prefer gh api over raw HTTP calls so gh
handles the refresh for you.refresh_expired state in gh auth status --json hosts means the refresh
token was rejected. Recovery needs an interactive gh auth login or
gh auth refresh, so ask the user to run it instead of retrying.GH_TOKEN or GITHUB_TOKEN are used as is and never refreshed.gh pr checkout <n> switches branches. Use gh pr diff <n> or
gh pr view <n> if you only need to read.gh pr checkout <n> --worktree <path> checks the PR out into a git worktree
at <path> instead of switching the current branch.gh issue develop <n> --checkout creates a linked branch for the issue and
checks it out. Add --worktree <path> to check that branch out into a git
worktree at <path> instead of switching the current branch;
--worktree requires --checkout, cannot be blank, and cannot be combined
with --list.NO_COLOR, CLICOLOR_FORCE, and GH_FORCE_TTY are honored. Set
GH_FORCE_TTY=1 if you want TTY-style output (colors, tables, the
pager, interactivity) inside an agent harness; leave it unset unless needed.아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
GitHub Agentic Workflows 요청이 설계, 생성, 설정, 수정, 디버깅, 업그레이드 중 무엇인지 구분해 알맞은 프롬프트나 스킬 파일로 안내합니다.
Exercise a real command-line program with specified cases or a stated goal, then capture and verify the observed behavior. It produces local media evidence such as a session video, helping reviewers see what the command did without treating the recording as proof of general correctness.
한국어 요약은 준비 중입니다. 영어 요약을 표시하고 있습니다.
명령줄 연습의 기대 결과를 기록된 증거와 대조하고, 요청된 미디어를 렌더링해 점검한 뒤 사례별 결과와 로컬 산출물 경로를 제공합니다. 기본적으로 증거를 공개하지 않습니다.
지정된 CLI 테스트의 명령, 입력, 순서, 기대 조건을 바꾸지 않고 실행하도록 안내합니다. 사례별 준비·실행·검증 후 실제 증거에 따라 통과, 실패, 차단 또는 관찰로 분류합니다.
승인된 범위 안에서 목표에 맞는 CLI 확인 항목을 정하고, 각 항목의 준비·실행·즉시 검증을 차례로 진행합니다. 증거로 확인된 결과와 도달하지 못한 동작을 구분해 정리합니다.
`cli-exercise` 내부 모듈로 빌드, 터미널, 미디어 도구의 사용 가능 여부를 확인합니다. 의존 항목이 없으면 설치 경로를 제안하고 승인을 받은 뒤 설치하며, 완료 후 준비 상태를 다시 확인합니다. 녹화나 다른 작업 권한을 부여하지는 않습니다.