repo-gitlink

Extract git remote URLs from local repository directories into a deduplicated tracking file.

3|1|Updated Apr 14, 2026
One-click install
npx skills add https://github.com/ZHLX2005/sl --skill repo-gitlink-zhlx2005
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: repo-gitlink
Source: https://github.com/ZHLX2005/sl/tree/main/skills/repo-gitlink
Command: npx skills add https://github.com/ZHLX2005/sl --skill repo-gitlink-zhlx2005

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Teams managing multiple cloned repositories under a shared directory often lose track of which remote origins are in use. This Skill automates the discovery and recording of every git remote URL into a single append-mode file, so collaboration metadata stays current without manual auditing. ## Core Features & Use Cases - Cross-Platform Scripts: Ships both PowerShell (Windows) and Bash (Linux/Mac) implementations with identical behavior. - Append with Auto-Dedup: Preserves historical entries across runs while skipping URLs already recorded; a -f/-Force flag resets the file when a fresh snapshot is needed. - Silent Skipping of Non-Repos: Directories without a .git folder or without an origin remote are counted and skipped without failing the run. - Use Case: When onboarding a new team member, run the script once to produce .claude/www/git.remote listing every tracked repository URL for quick reference. ## Quick Start Run the repo-gitlink script to collect all git remote URLs from the repositories under .claude/repo into the git.remote tracking file.

Frequently Asked Questions about repo-gitlink

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I list git remote URLs for multiple repositories at once?▼

Run the provided PowerShell or Bash script, which iterates over each subdirectory of .claude/repo, checks for a .git folder, and appends the output of git remote get-url origin to .claude/www/git.remote, one URL per line.

How to extract git remotes on Windows vs Linux?▼

On Windows run get-git-remotes.ps1 via powershell with -ExecutionPolicy Bypass; on Linux or Mac run get-git-remotes.sh with bash. Both scripts produce identical output and accept a force flag to reset the file.

Does the script overwrite existing git remote entries?▼

No, append is the default mode and existing URLs are loaded into memory so duplicates are skipped automatically. Passing -f, --force, or -Force deletes the output file first for a fresh snapshot.

What happens to directories that are not git repositories?▼

Directories without a .git folder are silently skipped and counted in the NotGit summary. Repositories lacking an origin remote produce a warning and are counted as NoRemote without stopping the run.

Why is the git.remote file growing unbounded over time?▼

Append mode preserves history by design, so repeated runs add lines. The built-in dedup prevents duplicate URLs, but you can periodically reset with the force flag or post-process with sort -u if downstream consumers need a compact list.