daymade/claude-code-skills

github-ops

- Operates GitHub through gh CLI and the REST/GraphQL APIs with explicit target, authorization, impact preview, and independent readback.

Vedi sorgente
Documento Skill originale

Contenuto dal repository con titoli, esempi, codice, tabelle, link e immagini preservati.

GitHub Operations

Deliver the requested GitHub state, not a successful-looking command. A 200, 201, 202, or 204 response is evidence that GitHub accepted a request; it is not proof that every requested field changed, an invitation was accepted, an asynchronous job finished, or the user's business outcome was achieved.

Route by operation

Read only the reference required for the task:

TaskReference
Create, review, merge, close, compare, or converge PRs; retire remote PR branches`references/pr_operations.md`
Create, edit, search, transfer, close, or bulk-manage issues`references/issue_operations.md`
Inspect, clone, create, edit, rename, archive, transfer, change visibility, or delete repositories`references/repository_operations.md`
Inspect or change collaborators, teams, base permissions, member privileges, or organization 2FA`references/organization_access_and_settings.md`
Protect a default branch while letting collaborators contribute through PRs`references/branch_protection.md`
Trigger, inspect, rerun, cancel, or purge Actions; manage secrets or variables`references/workflow_operations.md`
Build and publish a Docker/OCI image to GitHub Container Registry (GHCR)`references/ghcr_publishing.md`
Use raw REST/GraphQL endpoints, pagination, rate limits, webhooks, or Enterprise hosts`references/api_reference.md`
Build scripts, retries, bulk operations, or machine-readable output`references/best_practices.md`

For local Git recovery, dirty worktrees, bundles, or lost commits, use git-safety-net. This skill owns GitHub-hosted state.

Universal operating contract

1. Classify the request before touching GitHub

  • Answer, inspect, diagnose, or review: read-only. Do not create a PR, issue,

comment, invitation, workflow run, or setting change.

  • Create, change, merge, close, grant, revoke, publish, or delete: the named

state change is authorized. Keep the target and blast radius inside that request.

  • **Destructive, public, credential-related, production-triggering, or externally

communicative:** require the exact target, consequence, and recovery path. If the user did not provide a material choice such as repository owner, visibility, or message content, stop before the write.

Do not turn a read-only investigation into a mutation because the fix looks obvious. Do not send a comment, review, issue, or invitation whose recipient or content was not authorized in the current task.

For an authorized contributor, assess repository access against their ongoing contribution role, not just today's read or sync command. Repository Write access and permission to update the default branch are separate decisions. Follow the user's chosen contribution scope; use branch protection and PR review to control integration rather than silently reducing a contributor to Read. A diagnosis alone still does not authorize a grant.

2. Bind identity, host, and target

Before the first write, verify the active account and resolve a fully qualified target:

bash
gh auth status --hostname HOST
gh api --hostname HOST user --jq '.login'
gh repo view HOST/OWNER/REPO \
  --json nameWithOwner,visibility,isPrivate,viewerPermission,url

For github.com, OWNER/REPO is sufficient. Never use gh auth status --show-token for routine diagnosis, and never print, paste, or log a token.

Before the first push to a remote in the current session, read its live visibility:

bash
gh repo view OWNER/REPO \
  --json nameWithOwner,visibility,isPrivate,stargazerCount,forkCount,url

3. Read current authority and preview the delta

Use GitHub-hosted state, not a stale local ref or remembered setting. Capture only the fields required to prove the requested transition. Before a consequential write, make this plan explicit:

text
Target: fully qualified repository, organization, PR, issue, run, or account
Current: authoritative fields and immutable IDs/SHAs
Requested: exact field or state transition
Blast radius: people, repositories, forks, runs, or public surfaces affected
Recovery: exact inverse operation or explicit “not recoverable”
Readback: independent GET/CLI query and expected result

If the user already authorized this exact consequence, execute it. Do not add a ceremonial second confirmation. If target, scope, public exposure, deletion, recipient, or recovery remains ambiguous, pause before the write.

4. Choose an interface whose input contract actually supports the change

Prefer, in order:

  1. a purpose-built gh subcommand;
  2. a documented REST endpoint for one resource or authoritative readback;
  3. GraphQL when the required mutation/query is GraphQL-only or combines related data;
  4. the documented GitHub UI when the setting has no supported API input.

Response fields are not automatically writable fields. Before using PATCH, compare the desired key against the operation's current request body parameters, not the shape returned by GET. GitHub may ignore an unsupported key while still returning a successful response. Do not switch API families merely to make the command run.

Use explicit methods with gh api. Adding -f or -F changes the default method to POST; filtered GET requests must include -X GET.

5. Mutate once; do not retry ambiguity

  • Pin repository, object number, branch, run ID, username, and expected SHA where the

operation supports it.

  • Do not blindly retry non-idempotent writes such as comments, invitations, workflow

dispatches, releases, or PR/issue creation. After a timeout or 5xx, read back first to determine whether the first request landed.

  • For bulk changes, freeze and display the finite target list, then process one target

at a time with per-item results. Never pipe an unreviewed live query directly into a destructive xargs command.

  • Do not bypass repository hooks, required checks, branch protections, signatures, or

visibility-consequence acknowledgements.

6. Verify through an independent readback

Run a fresh read that does not trust the mutation response or a cached local ref:

MutationRequired acceptance evidence
PR merge/close/editPR state plus accepted behavior on the fetched base when landing matters
Branch deletionHosted branch/ref is absent; local remote-tracking cleanup is a separate check
Issue/comment/reviewExact object exists once with the intended state/content
Repository create/edit/visibilityFully qualified repository readback matches owner, visibility, and requested fields
Collaborator/team permissionInvitation state if pending, then effective permission; also identify remaining base/team grants when revoking
Organization settingA fresh organization/settings read returns every requested field; UI-only settings require UI readback plus any available API signal
2FA requirementPreflight affected accounts, UI confirmation, API readback, then membership/outside-collaborator audit
Workflow dispatch/rerun/cancelThe intended run ID reaches the expected state; command acceptance is not completion
Secret/variable changeMetadata and consumer behavior, never secret value disclosure

For asynchronous state, poll with a bounded deadline and report pending if the terminal state is not observed. If readback differs, report failed/no-op or partially applied, show the mismatched fields, and keep recovery available. Never say “done” from the write receipt alone.

7. Report the business outcome

End with one of four honest states:

  • changed and verified — requested state is independently observed;
  • already satisfied — no write was necessary;
  • pending — accepted but not yet terminal, with the next authoritative check;
  • failed/no-op or partial — requested and observed states differ, with recovery and

unresolved risk.

8. Authenticate only for the named write

Authentication is scoped to the authorized operation; it is not a reason to reopen an already-authorized exact write. Before starting an interactive browser or device flow, state the GitHub application, active account, target host, and the exact permission delta. Continue the steps the browser can complete after that explanation. Hand control to the user only when their physical presence is required, such as MFA, a hardware key, or an account-selection decision. Never request broader scopes, a different account, or an unrelated approval merely because the normal flow is interactive.

Do not expose credential values in terminal output, URLs, arguments, committed files, or reports. A production host's pull-only registry credential is not authorization to publish. Reuse the current, already-authorized credential when it has been verified for the exact write; use a temporary local Docker configuration and remove that configuration after the operation. GHCR publication has its own preflight and digest readback; load references/ghcr_publishing.md before building or pushing an image.

High-impact boundaries

  • Repository creation requires an explicit OWNER/REPO and visibility. Never default

a generic example to --public; public exposure is a product decision.

  • Repository visibility changes can expose code, Actions logs, artifacts, forks, and

history. Use gh repo edit --visibility ... --accept-visibility-change-consequences only after the consequences and exact repository are authorized, then read back.

  • Merges, branch deletions, repository creation/deletion/transfer/visibility changes,

organization-wide permissions, 2FA enforcement, and secret rotation require their operation-specific reference.

  • PR and issue title formats are repository policy. Inspect templates, contribution

guidance, checks, or an accepted recent example; do not invent a universal JIRA prefix.

  • Enterprise policy can override organization or repository controls. Preserve HOST

explicitly and report when a lower layer cannot change the enforced state.

Safe read-only quick reference

bash
gh pr list -R OWNER/REPO --state open --json number,title,state,url
gh pr view 123 -R OWNER/REPO --json number,title,state,headRefOid,baseRefOid,url
gh issue list -R OWNER/REPO --state open --json number,title,state,url
gh workflow list -R OWNER/REPO
gh run list -R OWNER/REPO --limit 20 \
  --json databaseId,status,conclusion,headSha,url
gh api -X GET 'repos/OWNER/REPO/branches?per_page=100' --paginate --jq '.[].name'

Use --json/--jq for decisions. Human-formatted output is for reading, not parsing.

dallo stesso repository

Altri Skills

Tutti gli Skills
daymade
Community

i18n-expert

This skill should be used when setting up, auditing, or enforcing internationalization/localization in UI codebases (React/TS, i18next or similar, JSON locales), including installing/configuring the i18n framework, replacing hard-coded strings, ensuring en-US/zh-CN coverage, mapping error codes to localized messages, and validating key parity, pluralization, and formatting.

installazioni
1
GitHub Stars
1,4K
Aggiornato
22 set
daymade
Community

frontend-visual-qa

- Audits already-rendered web, landing-page, HTML deck/slide, browser tool/game, dashboard/admin, design-system, and desktop UIs using real-browser or native-app journeys, inspected screenshots, DOM geometry, responsive or projection viewports, and a bundled Playwright sweep. Use after UI implementation to find typography, wrapping, overlap, overflow, responsive, route, overlay, map, transient-state, data-visualization, browser-output, file-dialog, PDF/print, or Electron-shell defects, or to compare a rendered artifact with a visual reference. Do not use for greenfield UI design, extracting a design system from screenshots, general QA-program setup, or nonvisual code debugging.

installazioni
2
GitHub Stars
1,4K
Aggiornato
21 set
daymade
Community

ashare-news-fetcher

- 抓取 A 股消息面情报:从财联社、华尔街见闻、金十、新浪 7x24、东财快讯、 证监会/央行/上交所/财政部政策公告、东方财富股吧等公开来源抓取与股票相关的 新闻、政策、情绪,输出结构化 JSON 或 Markdown。 当用户提到“A 股消息面”、“抓新闻”、“个股消息”、“政策监管”、“股吧情绪”、 “财联社”、“东财快讯”、“市场情绪”或需要把某只股票相关的公开情报聚合出来时 触发。也适用于“帮我看看 000001 最近有什么消息”这类口语化请求。

installazioni
1
GitHub Stars
1,4K
Aggiornato
16 set
daymade
Community

asr-transcribe-to-text

- Transcribe audio/video to speaker-labeled text — who-said-what by default, plain-text opt-out; MLX-local on Apple Silicon or remote; local files, media URLs. Use for transcribing recordings/podcasts/lectures/meetings, ASR, speech-to-text, 转录, 语音转文字, 录音转文字, speaker diarization/说话人分离/识别/谁在说话, timestamps 字幕/时间戳/音画对齐, CAM++ voiceprint ID. This skill ALSO owns audio PREPROCESSING for ASR as a first-class trigger, even without transcription: convert any audio/video into an ASR-ready file (转换成适合 ASR 的格式, 转格式, convert/prepare audio for ASR, 音频预处理), downsample to 16kHz mono 16-bit (降采样, 重采样, 单声道, 归一化), merge multi-segment recorder dumps (多段合并/拼接, DJI TX01/TX02), transcode to small M4A + pitch-preserved speedup to cut metered-ASR billed minutes (转 M4A, 压缩上传, 加速, 1.3x, 飞书妙记/Feishu Minutes). Trigger even when it looks like a trivial one-line ffmpeg — the skill owns sample-rate/bit-depth/channel, merge-order, speed-vs-WER, format choices + a blessed prepareasrinput.py.

installazioni
1
GitHub Stars
1,4K
Aggiornato
16 set