Skip to content
Back to skills

2563 Repos And Files Adcbb5f5

ASecurity

**Clone the repo and use normal file tools.** This is the best approach when you need to read multiple files, search code, or explore a repository structure.

  • 9 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 11, 2026
ai-agentsbashgitapi

Works with

  • api

Security analysis

A100/100

Scanned October 11, 2026

npx -y skills add tools-only/X-Skills --skill 2563-repos-and-files_adcbb5f5 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2563 Repos And Files Adcbb5f5?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2563 Repos And Files Adcbb5f5
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-2563-repos-and-files-adcbb5f5/badge)](https://www.skillsdirectory.com/skills/tools-only-2563-repos-and-files-adcbb5f5)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
# Repos and Files

## Browsing Code (Preferred)

**Clone the repo and use normal file tools.** This is the best approach when you need to read multiple files, search code, or explore a repository structure.

```bash
# Clone to a session-scoped temp directory
clonedir="$TMPDIR/gh-clones-${CLAUDE_SESSION_ID}"
mkdir -p "$clonedir"
gh repo clone owner/repo "$clonedir/repo" -- --depth 1

# Clone a specific branch
gh repo clone owner/repo "$clonedir/repo" -- --depth 1 --branch develop
```

After cloning, use the **Explore agent** (via the Task tool with `subagent_type=Explore`) to explore the codebase — it can search, read, and navigate across the clone efficiently in a single invocation. For targeted lookups where you already know what you're looking for, use Read, Glob, and Grep directly.

## Quick Single-File Lookup (Alternative)

When you only need one file and don't want to clone, use `gh api`:

```bash
# Get raw file content directly (skips base64)
gh api repos/owner/repo/contents/path/to/file.py \
  -H "Accept: application/vnd.github.raw+json"

# Get file from a specific branch/ref
gh api repos/owner/repo/contents/path/to/file.py?ref=develop \
  -H "Accept: application/vnd.github.raw+json"

# List directory contents
gh api repos/owner/repo/contents/src/ --jq '.[].name'
```

## When to Clone vs. Use API

| Scenario | Approach |
|----------|----------|
| Explore/understand a codebase | Clone, then use Explore agent |
| Search code with Grep/Glob | Clone, then search directly |
| Read a single known file | `gh api` with raw accept header |
| List directory contents | Either works |
| Need file from a specific commit SHA | `gh api` with `?ref=<sha>` |

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.