Skip to content

xinetzone/SpecWeave / .agents/skills/byted-bp-cdn-pagesdeploy

byted-bp-cdn-pagesdeploy

Verified

One-click deployment of static websites to BytePlus Edge Pages platform, supporting auto project creation, update deployment, custom domain binding, and CDN acceleration. Includes guided onboarding for new users without a BytePlus account. Use when the user asks to deploy a static site, bind a custom domain, or set up CDN acceleration on BytePlus Edge Pages.

FileKindSize
SKILL.mdskill md8.0 KB
scripts/deploy.shscript9.3 KB
scripts/manage.shscript3.4 KB
scripts/onboard.shscript3.5 KB
scripts/setup.shscript1.3 KB
scripts/subscribe_cdn.pyscript4.7 KB

scripts/onboard.sh

View on GitHub
#!/usr/bin/env bash
# pages-deploy: New user onboarding utilities
# Commands: open-browser, save-credentials, subscribe-cdn

set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

usage() {
    cat <<EOF
Usage: bash onboard.sh <command> [args...]

Commands:
  open-browser <url>                    Open URL in user's default browser
  save-credentials <access_key> <secret_key>   Configure nest CLI with AK/SK
  subscribe-cdn <access_key> <secret_key>      Activate BytePlus CDN service via OpenAPI
EOF
    exit 0
}

[[ $# -eq 0 ]] && usage

CMD="$1"; shift

# ========== open-browser ==========
open_browser() {
    local url="$1"
    echo "[INFO] Opening: $url"

    if [[ "$(uname)" == "Darwin" ]]; then
        open "$url" 2>/dev/null && echo "[OK] Opened in browser" && return
    elif command -v xdg-open &>/dev/null; then
        xdg-open "$url" 2>/dev/null && echo "[OK] Opened in browser" && return
    elif command -v wslview &>/dev/null; then
        wslview "$url" 2>/dev/null && echo "[OK] Opened in browser" && return
    fi

    # Fallback: no browser available (e.g., remote/Cowork environment)
    echo "[WARN] Could not open browser automatically."
    echo "[INFO] Please open this URL manually:"
    echo ""
    echo "  $url"
    echo ""
}

# ========== save-credentials ==========
save_credentials() {
    local ak="$1"
    local sk="$2"

    echo "[INFO] Configuring nest CLI credentials..."

    # Find or install nest CLI
    local nest=""
    if command -v nest &>/dev/null; then
        nest="nest"
    elif [[ -x "$HOME/.nest-cli/node_modules/.bin/nest" ]]; then
        nest="$HOME/.nest-cli/node_modules/.bin/nest"
    elif [[ -x "~/tmp/nest-cli/node_modules/.bin/nest" ]]; then
        nest="~/tmp/nest-cli/node_modules/.bin/nest"
    else
        echo "[INFO] Installing @byteplus/nest CLI first..."
        local install_dir="$HOME/.nest-cli"
        npm install @byteplus/nest --prefix "$install_dir" 2>/dev/null
        nest="$install_dir/node_modules/.bin/nest"
    fi

    $nest config set -g cloud.access_key "$ak"
    $nest config set -g cloud.secret_key "$sk"

    # Verify
    if $nest pages list &>/dev/null 2>&1; then
        echo "[OK] Credentials configured and verified successfully"
    else
        echo "[OK] Credentials saved (CDN service may not be activated yet)"
    fi
}

# ========== subscribe-cdn ==========
subscribe_cdn() {
    local ak="$1"
    local sk="$2"

    echo "[INFO] Activating BytePlus CDN service..."
    echo "[INFO] Region: overseas, PayType: pay-as-you-go"

    python3 "$SCRIPT_DIR/subscribe_cdn.py" "$ak" "$sk"
    local exit_code=$?

    if [[ $exit_code -eq 0 ]]; then
        echo "[OK] BytePlus CDN service activated successfully!"
        echo "[INFO] Pages platform is now ready for deployment."
    else
        echo "[ERROR] Failed to activate CDN service."
        echo "[INFO] Please try manually at: https://console.byteplus.com/cdn"
        exit 1
    fi
}

# ========== Main dispatch ==========
case "$CMD" in
    open-browser)
        [[ $# -lt 1 ]] && { echo "Error: URL required"; exit 1; }
        open_browser "$1"
        ;;
    save-credentials)
        [[ $# -lt 2 ]] && { echo "Error: access_key and secret_key required"; exit 1; }
        save_credentials "$1" "$2"
        ;;
    subscribe-cdn)
        [[ $# -lt 2 ]] && { echo "Error: access_key and secret_key required"; exit 1; }
        subscribe_cdn "$1" "$2"
        ;;
    -h|--help)
        usage
        ;;
    *)
        echo "Unknown command: $CMD"
        usage
        ;;
esac
writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall