Agent skill

smith-gh-cli

GitHub CLI gotchas and best practices. Use when executing gh commands. Covers token efficiency, pagination limits, and common pitfalls.

Stars 1
Forks 0

Install this agent skill to your Project

npx add-skill https://github.com/tianjianjiang/smith/tree/main/smith-gh-cli

SKILL.md

GitHub CLI Best Practices

  • Load if: Using GitHub CLI commands
  • Prerequisites: @smith-git/SKILL.md, @smith-gh-pr/SKILL.md

CRITICAL: Avoid GitHub MCP (Primacy Zone)

  • GitHub MCP tools - hard to control pagination (25k token truncation), less complete than CLI, requires personal token

Use instead: gh pr-review extension, gh api, or GraphQL queries

Token Efficiency

Safe perPage limits:

  • list_pull_requests: perPage 20-30
  • get_review_comments: perPage 10 (bot reviews are massive)
  • get_files: perPage 30
  • search_repositories: minimal_output: true

Common Pitfalls

  • ALWAYS assign yourself: --assignee @me
  • Draft PRs: Use --draft with #WIP in title for work-in-progress
  • Ensure gh installed: If gh not found, prompt user/agent to install

Issue Linking

In PR descriptions:

  • Closes #123 - Auto-closes on merge
  • Fixes #123 - Same as Closes
  • Relates to #123 - Links without closing
  • @smith-gh-pr/SKILL.md - PR workflows, review comment fetching
  • @smith-git/SKILL.md - Git operations

Expand your agent's capabilities with these related and highly-rated skills.

tianjianjiang/smith

smith-style

File naming, path standards, and conventional commits. Use when naming files, creating branches, writing commit messages, or setting up new projects. Covers underscore vs hyphen conventions, commit format, and branch naming patterns.

1 0
Explore
tianjianjiang/smith

smith-stacks

Stacked pull request workflows for large features. Use when creating stacked PRs, managing dependent PRs, or rebasing after parent merges. Covers stack creation, merge order, and squash merge handling.

1 0
Explore
tianjianjiang/smith

smith-python

Python development with uv, pytest, ruff, and type hints. Use when writing Python code, running tests, managing Python packages, or working with virtual environments. Covers import organization, type hints, pytest patterns, and environment variables.

1 0
Explore
tianjianjiang/smith

smith-principles

Fundamental coding principles (DRY, KISS, YAGNI, SOLID, HHH). Use when starting any development task, evaluating implementation approaches, or reviewing code quality. Always active as foundation for all development decisions.

1 0
Explore
tianjianjiang/smith

smith-nuxt

Nuxt 3 development patterns including auto-import stubbing for tests, environment variable conventions, and middleware testing. Use when working with Nuxt projects, testing Nuxt components/middleware, or configuring Nuxt environment variables.

1 0
Explore
tianjianjiang/smith

smith-plan

Plan tracking protocol (portable). Progress tracking with checkboxes, iteration workflow, completion/blocker signals. Use when executing multi-step plans, tracking task progress, or working from plan files. IMPORTANT - Always update the plan file after completing tasks.

1 0
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results