Skill: billychl1/footballbin-predictions (version 1.1.3)

--- name: footballbin-predictions description: Get AI-powered match predictions for Premier League and Champions League including scores, next goal, and corners. homepage: https://apps.apple.com/app/footballbin/id6757111871 publisher: achan metadata: {"clawdbot":{"emoji":"⚽","requires":{"bins":["curl","jq"]},"files":["scripts/*"]}} --- # FootballBin Match Predictions Get AI-powered predictions for Premier League and Champions League matches via the FootballBin MCP API. ## Usage Run `scripts/footballbin.sh` with the following commands: ### Get current matchweek predictions ``` scripts/footballbin.sh predictions premier_league scripts/footballbin.sh predictions champions_league ``` ### Get specific matchweek ``` scripts/footballbin.sh predictions premier_league 27 ``` ### Filter by team ``` scripts/footballbin.sh predictions premier_league --home arsenal scripts/footballbin.sh predictions premier_league --away liverpool scripts/footballbin.sh predictions premier_league --home chelsea --away wolves ``` ### List available tools ``` scripts/footballbin.sh tools ``` ## Supported Leagues | Input | League | |-------|--------| | `premier_league`, `epl`, `pl`, `prem` | Premier League | | `champions_league`, `ucl`, `cl` | Champions League | ## Supported Team Aliases Common aliases work: `united` (Man Utd), `city` (Man City), `spurs` (Tottenham), `wolves` (Wolverhampton), `gunners` (Arsenal), `reds` (Liverpool), `blues` (Chelsea), `villa` (Aston Villa), `forest` (Nottingham Forest), `palace` (Crystal Palace), `barca` (Barcelona), `real` (Real Madrid), `bayern` (Bayern Munich), `psg` (PSG), `juve` (Juventus), `inter` (Inter Milan), `bvb` (Dortmund), `atleti` (Atletico Madrid). ## Response Data Each match prediction includes: - **Half-time score** (e.g., "1:0") - **Full-time score** (e.g., "2:1") - **Next goal scorer** (e.g., "Home,Salah") - **Corner count** (e.g., "7:4") - **Key players** with form-based reasoning ## External Endpoints - Host: `api.footballbin.achaninc.net` - Path: `/mcp` - Method: `POST` (JSON-RPC) - Data sent: league, optional matchweek, optional team filters ## Security & Privacy - This skill does not install software. - This skill does not execute downloaded scripts. - No API key required (public endpoint, rate-limited) - No user data collected or stored - Read-only: only fetches prediction data - No secrets or environment variables needed ## Links - iOS App: https://apps.apple.com/app/footballbin/id6757111871 - Android App: https://play.google.com/store/apps/details?id=com.achan.footballbinandroid

path: scripts/footballbin.sh
content: #!/usr/bin/env bash
set -euo pipefail

# Security Manifest:
#   Environment variables: none
#   External endpoint host: api.footballbin.achaninc.net
#   External endpoint path: /mcp
#   Local files accessed: none
#   Data sent: league name, matchweek number, team name filters (no PII)
#   Software installation: none

MCP_ENDPOINT="https://api.footballbin.achaninc.net/mcp"

usage() {
    cat <<'EOF'
Usage: footballbin.sh <command> [options]

Commands:
  tools                              List available MCP tools
  predictions <league> [matchweek]   Get match predictions

Options for predictions:
  --home <team>    Filter by home team
  --away <team>    Filter by away team

Examples:
  footballbin.sh predictions premier_league
  footballbin.sh predictions epl 27
  footballbin.sh predictions premier_league --home arsenal
  footballbin.sh predictions ucl --away barcelona

Leagues: premier_league, epl, pl, prem, champions_league, ucl, cl
EOF
    exit 1
}

# Call the MCP endpoint with a JSON-RPC payload
mcp_call() {
    local payload="$1"
    curl --fail --show-error --silent --max-time 20 -X POST "$MCP_ENDPOINT" \
        -H "Content-Type: application/json" \
        -d "$payload"
}

# Restrict values to expected characters to avoid malformed JSON arguments.
validate_slug() {
    local value="$1"
    [[ "$value" =~ ^[a-zA-Z0-9_-]+$ ]]
}

validate_team() {
    local value="$1"
    [[ "$value" =~ ^[a-zA-Z0-9._-]+$ ]]
}

# List available tools
cmd_tools() {
    local payload='{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
    local response
    response=$(mcp_call "$payload")

    if command -v jq &>/dev/null; then
        echo "$response" | jq '.result.tools[] | {name, description}'
    else
        echo "$response"
    fi
}

# Get match predictions
cmd_predictions() {
    local league=""
    local matchweek=""
    local home_team=""
    local away_team=""

    # Parse arguments
    if [[ $# -lt 1 ]]; then
        echo "Error: league is required" >&2
        usage
    fi

    league="$1"
    if ! validate_slug "$league"; then
        echo "Error: invalid league value '$league'" >&2
        exit 1
    fi
    shift

    # Check if next arg is a matchweek number
    if [[ $# -gt 0 && "$1" =~ ^[0-9]+$ ]]; then
        matchweek="$1"
        shift
    fi

    # Parse optional flags
    while [[ $# -gt 0 ]]; do
        case "$1" in
            --home)
                shift
                home_team="${1:-}"
                if [[ -z "$home_team" ]] || ! validate_team "$home_team"; then
                    echo "Error: invalid --home team value" >&2
                    exit 1
                fi
                shift
                ;;
            --away)
                shift
                away_team="${1:-}"
                if [[ -z "$away_team" ]] || ! validate_team "$away_team"; then
                    echo "Error: invalid --away team value" >&2
                    exit 1
                fi
                shift
                ;;
            *)
                echo "Unknown option: $1" >&2
                usage
                ;;
        esac
    done

    # Build arguments JSON
    local args
    args="{\"league\":\"$league\""
    if [[ -n "$matchweek" ]]; then
        args="$args,\"matchweek\":$matchweek"
    fi
    if [[ -n "$home_team" ]]; then
        args="$args,\"home_team\":\"$home_team\""
    fi
    if [[ -n "$away_team" ]]; then
        args="$args,\"away_team\":\"$away_team\""
    fi
    args="$args}"

    local payload="{\"jsonrpc\":\"2.0\",\"id\":2,\"method\":\"tools/call\",\"params\":{\"name\":\"get_match_predictions\",\"arguments\":$args}}"

    local response
    response=$(mcp_call "$payload")

    if command -v jq &>/dev/null; then
        # Check for errors
        local is_error
        is_error=$(echo "$response" | jq -r '.result.isError // false')
        if [[ "$is_error" == "true" ]]; then
            echo "Error: $(echo "$response" | jq -r '.result.content[0].text')" >&2
            exit 1
        fi

        # Format output
        echo "$response" | jq -r '
            .result.structuredContent |
            "League: \(.league) | Matchweek: \(.matchweek) | Matches: \(.count)",
            "",
            (.matches[] |
                "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━",
                "\(.home_team) vs \(.away_team)",
                "Kickoff: \(.kickoff_formatted) (\(.status))",
                (.predictions[] | "  \(.type): \(.value)"),
                (.key_players[] | "  Key: \(.player_name) - \(.reason)"),
                ""
            )
        '
    else
        echo "$response"
    fi
}

# Main dispatch
if [[ $# -lt 1 ]]; then
    usage
fi

command="$1"
shift

case "$command" in
    tools)
        cmd_tools
        ;;
    predictions)
        cmd_predictions "$@"
        ;;
    *)
        echo "Unknown command: $command" >&2
        usage
        ;;
esac


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