Skip to content

Kartik-Doye/Ravengard-AI-Recruiter / .agents/skills/spelunk

spelunk

Verified

Maps an unfamiliar repository from a concrete question by finding manifests, entry points, execution paths, dependencies, churn, ownership, and risk. Use for codebase onboarding, impact analysis, or locating where behavior lives before planning or debugging.

FileKindSize
SKILL.mdskill md9.5 KB
references/discovery-map.mdmarkdown3.7 KB
references/evidence-protocol.mdmarkdown1.5 KB
references/research.mdmarkdown768 B
scripts/inventoryother4.4 KB

scripts/inventory

View on GitHub
#!/usr/bin/env bash
# inventory: deterministic first-pass repository scan for spelunk.
# Read-only. Replaces ~15 tool calls of "look around" with one invocation.
# Usage: skills/spelunk/scripts/inventory [dir] [--json]
#   stdout: report (human) or JSON (--json). Diagnostics: stderr.
set -u
TARGET="${1:-.}"
JSON=0
[ "${2:-}" = "--json" ] || [ "${1:-}" = "--json" ] && { JSON=1; [ "$1" = "--json" ] && TARGET="."; }
[ -d "$TARGET" ] || { echo "inventory: not a directory: $TARGET" >&2; exit 2; }
cd "$TARGET" || exit 2

emit() { if [ "$JSON" = 1 ]; then printf '{"%s": %s}\n' "$1" "$2"; else printf '%-22s %s\n' "$1:" "$2"; fi; }

# languages / file distribution by extension (top 10)
dist=$(find . -type f -not -path '*/node_modules/*' -not -path '*/.git/*' \
  -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/.venv/*' \
  -not -path '*/venv/*' -not -path '*/__pycache__/*' 2>/dev/null |
  awk -F. 'NF>1 {print $NF}' | sort | uniq -c | sort -rn | head -10)

# largest tracked-ish source files (top 10, exclude obvious noise)
large=$(find . -type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' -o -name '*.jsx' \
  -o -name '*.py' -o -name '*.go' -o -name '*.rs' -o -name '*.java' -o -name '*.rb' \
  -o -name '*.php' -o -name '*.cs' -o -name '*.kt' -o -name '*.swift' -o -name '*.vue' \
  -o -name '*.svelte' \) -not -path '*/node_modules/*' -not -path '*/.git/*' \
  -not -path '*/dist/*' -not -path '*/build/*' 2>/dev/null -exec wc -l {} + 2>/dev/null |
  sort -rn | head -11 | tail -10)

# debt markers
debt=$(grep -rEI '(TODO|FIXME|HACK|XXX)' --include='*.ts' --include='*.tsx' \
  --include='*.js' --include='*.py' --include='*.go' --include='*.rs' --include='*.java' \
  --exclude-dir=node_modules --exclude-dir=.git --exclude-dir=dist 2>/dev/null |
  awk -F: '{print $1}' | sort | uniq -c | sort -rn | head -8)

# test-to-source heuristic
tests=$(find . -type f \( -name '*test*' -o -name '*spec*' \) \
  -not -path '*/node_modules/*' -not -path '*/.git/*' 2>/dev/null | wc -l | tr -d ' ')
srcs=$(find . -type f \( -name '*.ts' -o -name '*.tsx' -o -name '*.js' -o -name '*.py' \
  -o -name '*.go' -o -name '*.rs' -o -name '*.java' \) \
  -not -path '*/node_modules/*' -not -path '*/.git/*' -not -name '*test*' -not -name '*spec*' \
  2>/dev/null | wc -l | tr -d ' ')

# manifests present (ecosystem identity: never guess the stack)
manifests=$(ls package.json pyproject.toml setup.py requirements.txt go.mod Cargo.toml \
  pom.xml build.gradle build.gradle.kts Gemfile composer.json pubspec.yaml 2>/dev/null | tr '\n' ' ')

# generated / vendor candidates (do not read blindly; verify before citing)
genv=""
for d in dist build coverage .next out vendor generated gen third_party; do
  [ -e "$d" ] && genv="$genv$d "
done
minified=$(find . -type f -name '*.min.js' -not -path '*/node_modules/*' \
  -not -path '*/.git/*' 2>/dev/null | wc -l | tr -d ' ')

# git churn hotspots (last 6 months, top 8)
churn=""
if [ "$(git rev-parse --is-inside-work-tree 2>/dev/null)" = "true" ]; then
  churn=$(git log --format=format: --name-only --since="6 months ago" -- . 2>/dev/null |
    grep -v '^$' | sort | uniq -c | sort -rn | head -8)
fi

if [ "$JSON" = 1 ]; then
  tojson() { python3 -c 'import json,sys; print(json.dumps(sys.stdin.read()))'; }
  printf '{"target": %s, "manifests": %s, "files_by_ext": %s, "largest_files": %s, "debt_markers": %s, "test_files": "%s", "source_files": "%s", "generated_vendor_dirs": %s, "minified_bundles": "%s", "git_churn_top": %s}\n' \
    "$(printf '%s' "$TARGET" | tojson)" "$(printf '%s' "$manifests" | tojson)" \
    "$(printf '%s' "$dist" | tojson)" "$(printf '%s' "$large" | tojson)" \
    "$(printf '%s' "$debt" | tojson)" "$tests" "$srcs" \
    "$(printf '%s' "$genv" | tojson)" "$minified" "$(printf '%s' "$churn" | tojson)"
else
  echo "== inventory: $TARGET =="
  [ -n "$manifests" ] && echo "manifests: $manifests" || echo "manifests: none found"
  echo "$dist" | awk '{printf "  %-8s %s files\n", $2, $1}'
  echo "== largest source files =="
  echo "$large" | sed 's/^/  /'
  echo "== debt markers (TODO/FIXME/HACK) =="
  [ -n "$debt" ] && echo "$debt" | sed 's/^/  /' || echo "  none found"
  echo "== test/source ratio =="
  emit "test files" "$tests"
  emit "source files" "$srcs"
  echo "== generated/vendor candidates (verify before citing) =="
  { [ -n "$genv" ] && echo "  dirs: $genv" || echo "  dirs: none"; }
  echo "  minified bundles (*.min.js): $minified"
  [ -n "$churn" ] && { echo "== churn hotspots (6mo) =="; echo "$churn" | sed 's/^/  /'; }
fi
exit 0
planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe.Stars: 118kUpdated Claude CodeCodexVerifiedInstall
contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies.Stars: 108kUpdated Claude CodeCodexVerifiedInstall
meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要".Stars: 108kUpdated Claude CodeCodexVerifiedInstall