Get the FREE Ultimate OpenClaw Setup Guide →

github-navigator

Scanned
npx machina-cli add skill arvindand/agent-skills/github-navigator --openclaw
Files (1)
SKILL.md
4.8 KB

GitHub Navigator

Use gh for GitHub work. Prefer command discovery over memorizing flags.

This is an execution skill. Use gh instead of generic web fetching for GitHub tasks, inspect gh --help when syntax is uncertain, then execute with tight guardrails. Keep the main flow lean and load REFERENCES.md only when you need concrete examples, installation steps, or GraphQL details.

When to Use

Activate when:

  • the user gives a github.com URL
  • the user names a repo path like facebook/react or owner/repo
  • the user asks about repository files, issues, PRs, releases, workflows, or metadata
  • the user wants to understand the architecture or structure of a GitHub-hosted codebase

Core Rules

  • Always prefer gh over WebFetch for GitHub content and operations.
  • Use gh api for raw file content, directory listings, and API-only endpoints.
  • Use gh subcommands (issue, pr, release, run, workflow, repo) when a dedicated command exists.
  • Use gh <domain> --help before guessing flags or subcommands.
  • Limit each command pattern to 2 attempts; if it still fails, stop and report the error.

Command Routing

User IntentPrimary Command Path
fetch file or list directorygh api repos/OWNER/REPO/contents/...
inspect issuesgh issue ...
inspect pull requestsgh pr ...
inspect releasesgh release ...
inspect Actions runs or workflowsgh run ... or gh workflow ...
inspect repo metadata or clone/forkgh repo ...
endpoints without a dedicated subcommandgh api ...

Use dedicated subcommands first. Fall back to gh api only when needed.

Execution Pattern

  1. Identify the command domain from the request.
  2. Check the relevant help output if the exact syntax is not already obvious.
  3. Substitute the user's repo, path, issue number, PR number, or other arguments.
  4. Run the command.
  5. If it fails, adjust once based on the error message.
  6. If it fails again, stop and report the error instead of trying blind variations.

Deep Analysis Mode

When the user wants to understand a codebase deeply, clone it locally for inspection instead of making many remote API calls.

Default flow:

  1. Clone with depth 1 to /tmp/github-navigator/OWNER-REPO/

    git clone --depth 1 https://github.com/OWNER/REPO.git /tmp/github-navigator/OWNER-REPO
    
  2. Inspect the repository for:

    • tech stack signals (package.json, go.mod, Cargo.toml, pom.xml, requirements.txt, etc.)
    • high-level directory structure
    • entry points and primary modules
    • README, docs, examples, and contribution files
    • architectural patterns worth calling out
  3. Summarize the findings in plain language.

  4. Keep the clone for follow-up questions unless cleanup is requested.

Use a full clone only if the user explicitly needs commit history or deeper git analysis.

Safety

Always confirm before executing state-changing or destructive commands, including:

  • creating, closing, or reopening issues
  • creating, merging, or closing pull requests
  • deleting, archiving, or transferring repositories
  • setting secrets or triggering workflows
  • any use of --force, --yes, or similar bypass flags

Authentication and Recovery

  • Check gh auth status when the task touches private repos or write operations.
  • Use gh auth login if the client is not authenticated.
  • If permissions are insufficient, use gh auth refresh -s repo -s workflow -s read:org as appropriate.
  • If a command fails, read the error, check help, retry once, then stop.
  • If gh is not installed, point the user to REFERENCES.md for installation guidance.

Reference Handoff

Use REFERENCES.md when you need:

  • concrete example commands for common tasks
  • install and auth setup details
  • troubleshooting reminders
  • GraphQL examples or other lower-frequency patterns

License: MIT See also: REFERENCES.md

Source

git clone https://github.com/arvindand/agent-skills/blob/main/skills/github-navigator/SKILL.mdView on GitHub

Overview

GitHub Navigator drives repository exploration and management using gh CLI. It handles inspecting files, issues, PRs, releases, Actions runs, and overall repo structure, avoiding WebFetch and preferring gh api when needed. It emphasizes guided command discovery and guarded execution for reliable results.

How This Skill Works

Identify the command domain from the user request and verify syntax with gh --help. Substitute repository paths, issue/PR numbers, and other arguments, then execute the appropriate gh subcommand (issue, pr, release, run, workflow, repo) or gh api for raw endpoints. If the command fails, retry once with adjusted arguments, then report the error; for deep analysis, clone with depth 1 to /tmp/github-navigator/OWNER-REPO and inspect the codebase locally.

When to Use It

  • When you provide a github.com URL
  • When you name a repo path like owner/repo
  • When you ask to inspect files, issues, PRs, releases, workflows, or metadata
  • When you want to understand the architecture or structure of the codebase
  • When you request to show README, list issues, check a PR, clone the repo, or analyze the repo

Quick Start

  1. Step 1: Identify the domain and pick the gh subcommand
  2. Step 2: Validate syntax with gh --help and substitute OWNER/REPO and numbers
  3. Step 3: Run the command; if it fails, retry once or clone for deep analysis

Best Practices

  • Always prefer gh over WebFetch for GitHub content.
  • Check gh help before guessing syntax.
  • Use dedicated subcommands first (issue, pr, release, run, workflow, repo).
  • Use gh api for raw content or endpoints not covered by a subcommand.
  • Limit patterns to 2 command attempts; report errors if unresolved.

Example Use Cases

  • Show README for facebook/react
  • List open issues in facebook/react
  • Check PR #42 in facebook/react
  • Show the latest release for facebook/react
  • Inspect the CI workflow runs in facebook/react

Frequently Asked Questions

Add this skill to your agents
Sponsor this space

Reach thousands of developers