Skill: levi-law/forkzoo-skill (version 1.0.0)

--- name: forkzoo description: Adopt and manage GitHub-native digital pets (tamagotchis) that evolve daily with AI. Use when an agent wants to adopt a pet (monkey, cat, dog, lion), check their pet's status/evolution, interact with their pet, view the community gallery, or manage their forkZoo companion. Triggers on pet-related requests, tamagotchi mentions, forkzoo/forkmonkey references, or "my pet" queries. --- # ForkZoo - Digital Pets for AI Agents Your digital pet lives on GitHub, evolves daily with AI, and grows with you. ## Quick Reference | Command | Description | |---------|-------------| | `adopt <animal>` | Fork a pet to your GitHub (monkey/cat/dog/lion) | | `status` | Check pet stats, rarity, evolution streak | | `pet` / `feed` | Trigger manual evolution | | `gallery` | View all agent pets in the community | | `family` | View your pet's family tree | ## Setup Requirements Before adopting, the agent needs: 1. **GitHub Token** with `repo` and `workflow` scopes 2. Store as environment variable `GITHUB_TOKEN` or in config ## Adoption Flow ### 1. Choose Your Animal Available species (more coming): - 🐵 **Monkey** - The original, most evolved species - 🐱 **Cat** - Independent and mysterious - 🐕 **Dog** - Loyal companion - 🦁 **Lion** - Majestic and rare ### 2. Adopt via Script ```bash # Adopt a monkey (default) ./scripts/adopt.sh monkey # Adopt other animals ./scripts/adopt.sh cat ./scripts/adopt.sh dog ./scripts/adopt.sh lion ``` The script will: - Fork the animal repo from forkZoo org - Enable GitHub Actions - Initialize your pet with random DNA - Return your pet's GitHub Pages URL ### 3. Check Status ```bash ./scripts/status.sh [repo-name] ``` Shows: generation, age, mutations, rarity score, streak, achievements. ### 4. Interact ```bash # Trigger evolution manually ./scripts/interact.sh [repo-name] # View evolution history ./scripts/history.sh [repo-name] ``` ## Pet Evolution Pets evolve automatically every day via GitHub Actions: - AI (GPT-4o or Claude) decides mutations - Traits change: colors, accessories, expressions, patterns - Rarity builds over time - Streaks unlock achievements ### Rarity Tiers | Tier | Chance | Examples | |------|--------|----------| | ⚪ Common | 60% | Basic colors | | 💚 Uncommon | 25% | Accessories | | 💙 Rare | 10% | Unique patterns | | 🦄 Legendary | 5% | Ultra-rare combos | ### Extinct Traits (Gen-Locked) Early generations can get exclusive traits that become extinct: - 🏆 Genesis Aura (Gen 1 only) - 👑 Alpha Crown (Gen 1-3) - ✨ Founders Badge (Gen 1-5) ## Breeding Fork any pet to create offspring: - Child inherits 50% parent traits - 50% random mutations - Rare traits can pass down - Family tree tracks lineage ## Community - **Gallery**: https://forkzoo.com/gallery - **Leaderboard**: https://forkzoo.com/leaderboard - **Family Trees**: https://forkzoo.com/trees ## Troubleshooting **Pet not evolving?** - Check GitHub Actions are enabled - Verify ANTHROPIC_API_KEY or use free GitHub Models (GPT-4o) **Can't adopt?** - Ensure GITHUB_TOKEN has `repo` and `workflow` scopes - Check you're not rate-limited ## Links - Main site: https://forkzoo.com - GitHub org: https://github.com/forkZoo - Original project: https://github.com/roeiba/forkMonkey

path: scripts/gallery.sh
content: #!/bin/bash
# ForkZoo - View community gallery
# Usage: ./gallery.sh [limit]

set -e

LIMIT="${1:-10}"

echo "🐾 ForkZoo Community Gallery"
echo "============================"
echo ""

# Fetch forks from the main forkMonkey repo
echo "🔍 Fetching community pets..."
echo ""

FORKS=$(curl -s "https://api.github.com/repos/roeiba/forkMonkey/forks?per_page=$LIMIT&sort=stargazers")

echo "Top $LIMIT pets by activity:"
echo ""

echo "$FORKS" | jq -r '.[] | "🐵 \(.full_name)\n   🌐 https://\(.owner.login).github.io/\(.name)/\n   ⭐ \(.stargazers_count) stars | 🍴 \(.forks_count) children\n"'

echo ""
echo "View full gallery: https://forkzoo.dev/gallery"
echo "Leaderboard: https://roeiba.github.io/forkMonkey/#leaderboard"


path: scripts/status.sh
content: #!/bin/bash
# ForkZoo - Check pet status
# Usage: ./status.sh [repo-name]

set -e

REPO_NAME="${1:-}"

# Check for GitHub token
if [ -z "$GITHUB_TOKEN" ]; then
  echo "❌ GITHUB_TOKEN not set"
  exit 1
fi

# Get current user
GITHUB_USER=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/user | jq -r '.login')

# If no repo specified, try to find one
if [ -z "$REPO_NAME" ]; then
  echo "🔍 Looking for your pets..."
  
  # Search for forkzoo-related repos
  REPOS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
    "https://api.github.com/users/$GITHUB_USER/repos?per_page=100" | \
    jq -r '.[] | select(.name | test("fork(Monkey|Cat|Dog|Lion|monkey|cat|dog|lion)"; "i")) | .name')
  
  if [ -z "$REPOS" ]; then
    echo "❌ No pets found. Adopt one with: ./adopt.sh <animal>"
    exit 1
  fi
  
  # Use first found
  REPO_NAME=$(echo "$REPOS" | head -1)
  echo "📍 Found: $REPO_NAME"
fi

echo ""
echo "🐾 Fetching status for $GITHUB_USER/$REPO_NAME..."
echo ""

# Get stats.json
STATS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3.raw" \
  "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME/contents/monkey_data/stats.json" 2>/dev/null || echo "{}")

if [ "$STATS" == "{}" ] || [ "$STATS" == "404: Not Found" ]; then
  # Try alternate location
  STATS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
    -H "Accept: application/vnd.github.v3.raw" \
    "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME/contents/pet_data/stats.json" 2>/dev/null || echo "{}")
fi

if [ "$STATS" == "{}" ] || [ -z "$STATS" ]; then
  echo "⚠️  Could not fetch pet stats. Pet may still be initializing."
  echo "   Check: https://github.com/$GITHUB_USER/$REPO_NAME"
  exit 0
fi

# Parse and display stats
GENERATION=$(echo "$STATS" | jq -r '.generation // "?"')
AGE=$(echo "$STATS" | jq -r '.age_days // .age // "?"')
MUTATIONS=$(echo "$STATS" | jq -r '.mutations // .total_mutations // "?"')
RARITY=$(echo "$STATS" | jq -r '.rarity_score // .rarity // "?"')
STREAK=$(echo "$STATS" | jq -r '.evolution_streak // .streak // 0')
NAME=$(echo "$STATS" | jq -r '.name // "Unnamed"')

# Determine rarity tier
if [ "$RARITY" != "?" ]; then
  RARITY_NUM=$(echo "$RARITY" | cut -d'/' -f1)
  if (( $(echo "$RARITY_NUM >= 35" | bc -l) )); then
    TIER="🦄 Legendary"
  elif (( $(echo "$RARITY_NUM >= 25" | bc -l) )); then
    TIER="💙 Rare"
  elif (( $(echo "$RARITY_NUM >= 15" | bc -l) )); then
    TIER="💚 Uncommon"
  else
    TIER="⚪ Common"
  fi
else
  TIER="?"
fi

echo "╔════════════════════════════════════╗"
echo "║         🐾 PET STATUS 🐾           ║"
echo "╠════════════════════════════════════╣"
echo "║ Name:       $NAME"
echo "║ Generation: $GENERATION"
echo "║ Age:        $AGE days"
echo "║ Mutations:  $MUTATIONS"
echo "║ Rarity:     $RARITY ($TIER)"
echo "║ Streak:     🔥 $STREAK days"
echo "╚════════════════════════════════════╝"
echo ""
echo "🌐 View live: https://$GITHUB_USER.github.io/$REPO_NAME/"
echo "📂 Repo: https://github.com/$GITHUB_USER/$REPO_NAME"


path: scripts/interact.sh
content: #!/bin/bash
# ForkZoo - Interact with your pet (trigger evolution)
# Usage: ./interact.sh [repo-name]

set -e

REPO_NAME="${1:-}"

# Check for GitHub token
if [ -z "$GITHUB_TOKEN" ]; then
  echo "❌ GITHUB_TOKEN not set"
  exit 1
fi

# Get current user
GITHUB_USER=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/user | jq -r '.login')

# If no repo specified, try to find one
if [ -z "$REPO_NAME" ]; then
  REPOS=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
    "https://api.github.com/users/$GITHUB_USER/repos?per_page=100" | \
    jq -r '.[] | select(.name | test("fork(Monkey|Cat|Dog|Lion|monkey|cat|dog|lion)"; "i")) | .name')
  
  if [ -z "$REPOS" ]; then
    echo "❌ No pets found. Adopt one with: ./adopt.sh <animal>"
    exit 1
  fi
  
  REPO_NAME=$(echo "$REPOS" | head -1)
fi

echo "🐾 Interacting with $REPO_NAME..."
echo ""

# Try to trigger the daily evolution workflow
echo "⚡ Triggering evolution..."

# Try different workflow names
for WORKFLOW in "daily-evolution.yml" "evolve.yml" "daily.yml"; do
  RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
    -H "Authorization: token $GITHUB_TOKEN" \
    -H "Accept: application/vnd.github.v3+json" \
    "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME/actions/workflows/$WORKFLOW/dispatches" \
    -d '{"ref": "main"}' 2>/dev/null)
  
  if [ "$RESPONSE" == "204" ]; then
    echo "✅ Evolution triggered!"
    echo ""
    echo "Your pet is evolving... Check back in a minute!"
    echo "🌐 Watch at: https://github.com/$GITHUB_USER/$REPO_NAME/actions"
    exit 0
  fi
done

echo "⚠️  Could not trigger evolution workflow."
echo "   The pet may evolve automatically on schedule."
echo ""
echo "Check workflows at: https://github.com/$GITHUB_USER/$REPO_NAME/actions"


path: scripts/adopt.sh
content: #!/bin/bash
# ForkZoo - Adopt a digital pet
# Usage: ./adopt.sh <animal> [repo-name]
# Animals: monkey, cat, dog, lion

set -e

ANIMAL="${1:-monkey}"
CUSTOM_NAME="${2:-}"

# Validate animal type
case "$ANIMAL" in
  monkey|cat|dog|lion)
    ;;
  *)
    echo "❌ Unknown animal: $ANIMAL"
    echo "Available: monkey, cat, dog, lion"
    exit 1
    ;;
esac

# Map animal to source repo
case "$ANIMAL" in
  monkey) SOURCE_REPO="forkZoo/forkMonkey" ;;
  cat)    SOURCE_REPO="forkZoo/forkCat" ;;
  dog)    SOURCE_REPO="forkZoo/forkDog" ;;
  lion)   SOURCE_REPO="forkZoo/forkLion" ;;
esac

# Check for GitHub token
if [ -z "$GITHUB_TOKEN" ]; then
  echo "❌ GITHUB_TOKEN not set"
  echo "Set it with: export GITHUB_TOKEN=your_token"
  echo "Token needs 'repo' and 'workflow' scopes"
  exit 1
fi

# Get current user
GITHUB_USER=$(curl -s -H "Authorization: token $GITHUB_TOKEN" \
  https://api.github.com/user | jq -r '.login')

if [ "$GITHUB_USER" == "null" ] || [ -z "$GITHUB_USER" ]; then
  echo "❌ Could not get GitHub user. Check your token."
  exit 1
fi

echo "🐾 Adopting a $ANIMAL for $GITHUB_USER..."

# Determine repo name
if [ -n "$CUSTOM_NAME" ]; then
  REPO_NAME="$CUSTOM_NAME"
else
  REPO_NAME="fork${ANIMAL^}"  # Capitalize first letter
fi

# Check if repo already exists
EXISTING=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: token $GITHUB_TOKEN" \
  "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME")

if [ "$EXISTING" == "200" ]; then
  echo "⚠️  You already have a repo named $REPO_NAME"
  echo "   Check it at: https://github.com/$GITHUB_USER/$REPO_NAME"
  echo "   Or specify a custom name: ./adopt.sh $ANIMAL my-pet-name"
  exit 1
fi

# Fork the repo
echo "🍴 Forking $SOURCE_REPO..."
FORK_RESPONSE=$(curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  "https://api.github.com/repos/$SOURCE_REPO/forks" \
  -d "{\"name\": \"$REPO_NAME\", \"default_branch_only\": true}")

FORK_URL=$(echo "$FORK_RESPONSE" | jq -r '.html_url')

if [ "$FORK_URL" == "null" ]; then
  echo "❌ Failed to fork repo"
  echo "$FORK_RESPONSE" | jq -r '.message // .errors[0].message // "Unknown error"'
  exit 1
fi

echo "✅ Forked to: $FORK_URL"

# Wait for fork to be ready
echo "⏳ Waiting for fork to initialize..."
sleep 5

# Enable GitHub Actions (they're disabled by default on forks)
echo "⚡ Enabling GitHub Actions..."
curl -s -X PUT \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME/actions/permissions" \
  -d '{"enabled": true, "allowed_actions": "all"}' > /dev/null

# Trigger the genesis workflow if it exists
echo "🐣 Initializing your pet..."
curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME/actions/workflows/genesis.yml/dispatches" \
  -d '{"ref": "main"}' 2>/dev/null || true

# Enable GitHub Pages
echo "🌐 Setting up GitHub Pages..."
curl -s -X POST \
  -H "Authorization: token $GITHUB_TOKEN" \
  -H "Accept: application/vnd.github.v3+json" \
  "https://api.github.com/repos/$GITHUB_USER/$REPO_NAME/pages" \
  -d '{"source": {"branch": "main", "path": "/"}}' 2>/dev/null || true

PAGES_URL="https://$GITHUB_USER.github.io/$REPO_NAME/"

echo ""
echo "🎉 Congratulations! You adopted a $ANIMAL!"
echo ""
echo "📍 Repository: $FORK_URL"
echo "🌐 Live page:  $PAGES_URL"
echo ""
echo "Your pet will evolve daily via GitHub Actions."
echo "Check status anytime with: ./status.sh $REPO_NAME"
echo ""
echo "Welcome to the ForkZoo! 🐾"


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (CRITICAL)