Skip to content
Back to skills

1 Repository Discovery From Gitignore

ASecurity

Sub-skill of git-sync-manager: 1. Repository Discovery from .gitignore.

  • 17 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 9, 2026
documentationgobashgit

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add vamseeachanta/workspace-hub --skill 1-repository-discovery-from-gitignore --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1 Repository Discovery From Gitignore?

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

Security grade badge for 1 Repository Discovery From Gitignore
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vamseeachanta-1-repository-discovery-from-gitignore/badge)](https://www.skillsdirectory.com/skills/vamseeachanta-1-repository-discovery-from-gitignore)

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

Download with Pro
SKILL.md
---
name: git-sync-manager-1-repository-discovery-from-gitignore
description: 'Sub-skill of git-sync-manager: 1. Repository Discovery from .gitignore.'
version: 1.0.0
category: _core
type: reference
scripts_exempt: true
---

# 1. Repository Discovery from .gitignore

## 1. Repository Discovery from .gitignore


Automatically discover repositories listed in .gitignore:

```bash
#!/bin/bash
# ABOUTME: Discover repositories from .gitignore patterns
# ABOUTME: Parses directory entries and validates git repos

WORKSPACE_ROOT="${1:-.}"

# Discover repositories from .gitignore
discover_repos() {
    local repos=()

    while IFS= read -r line; do
        # Skip comments and empty lines
        [[ "$line" =~ ^[[:space:]]*# ]] && continue
        [[ -z "$line" ]] && continue

        # Extract repo name (before the /)
        local repo_name="${line%%/*}"
        [[ -z "$repo_name" ]] && continue

        # Check if directory exists and is a git repo
        if [[ -d "$WORKSPACE_ROOT/$repo_name/.git" ]]; then
            repos+=("$repo_name")
        fi
    done < <(grep -v "^[[:space:]]*#" "$WORKSPACE_ROOT/.gitignore" | grep "/" | head -100)

    printf '%s\n' "${repos[@]}"
}

# Usage
REPOS=($(discover_repos))
echo "Found ${#REPOS[@]} repositories"
```

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.