# Setup

> Full Cal.com Commander setup wizard - Cal.com API, Telegram bot, Supabase DB, GCP project, launchd services. Discovers 1Password.

- **Type:** Skill
- **Install:** `agentstack add skill-terrylica-cc-skills-setup`
- **Verified:** Pending review
- **Seller:** [terrylica](https://agentstack.voostack.com/s/terrylica)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [terrylica](https://github.com/terrylica)
- **Source:** https://github.com/terrylica/cc-skills/tree/main/plugins/calcom-commander/skills/setup

## Install

```sh
agentstack add skill-terrylica-cc-skills-setup
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Cal.com Commander Setup

Complete setup wizard for Cal.com CLI access, Telegram bot, Supabase database, and launchd services.

> **Self-Evolving Skill**: This skill improves through use. If instructions are wrong, parameters drifted, or a workaround was needed — fix this file immediately, don't defer. Only update for real, reproducible issues.

## Prerequisites Check

```bash
# Check required tools
command -v op && echo "OK 1Password CLI" || echo "MISSING: brew install 1password-cli"
command -v mise && echo "OK mise" || echo "MISSING: curl https://mise.run | sh"
command -v bun && echo "OK bun" || echo "MISSING: curl -fsSL https://bun.sh/install | bash"
command -v gcloud && echo "OK gcloud" || echo "OPTIONAL: brew install google-cloud-sdk"
command -v supabase && echo "OK supabase" || echo "OPTIONAL: brew install supabase/tap/supabase"
```

## Phase 1: Cal.com API Setup

### Step 1: Check if already configured

```bash
echo "CALCOM_OP_UUID: ${CALCOM_OP_UUID:-NOT_SET}"
```

If already set, use AskUserQuestion to ask if user wants to reconfigure.

### Step 2: Discover 1Password items

```bash
op item list --vault "Claude Automation" --format json | jq -r '.[] | select(.title | test("calcom|cal.com|calendar"; "i")) | "\(.id)\t\(.title)"'
```

### Step 3: Present options

Use AskUserQuestion with discovered items or guide new API key creation.

### Step 4: Configure .mise.local.toml

```bash
# Add to .mise.local.toml in project directory
cat >> .mise.local.toml "
EOF
```

### Step 5: Build Cal.com CLI

```bash
cd "$HOME/.claude/plugins/marketplaces/cc-skills/plugins/calcom-commander/scripts/calcom-cli" && bun install && bun run build
```

### Step 6: Test Cal.com access

```bash
"$HOME/.claude/plugins/marketplaces/cc-skills/plugins/calcom-commander/scripts/calcom-cli/calcom" event-types list
```

## Phase 2: Telegram Bot Setup

### Step 1: Check Telegram config

```bash
echo "TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN:+SET}"
echo "TELEGRAM_CHAT_ID: ${TELEGRAM_CHAT_ID:-NOT_SET}"
```

If NOT_SET, guide user through BotFather setup:

1. Message @BotFather on Telegram
2. Send `/newbot` and follow prompts
3. Copy the token
4. Get chat ID: message the bot, then check `https://api.telegram.org/bot/getUpdates`

### Step 2: Add to .mise.local.toml

```bash
# Append bot config
cat >> .mise.local.toml "
TELEGRAM_CHAT_ID = ""
EOF
```

## Phase 3: GCP + Supabase Setup

### Step 1: Check GCP configuration

```bash
echo "CALCOM_GCP_PROJECT: ${CALCOM_GCP_PROJECT:-NOT_SET}"
echo "CALCOM_GCP_ACCOUNT: ${CALCOM_GCP_ACCOUNT:-NOT_SET}"
echo "SUPABASE_PROJECT_REF: ${SUPABASE_PROJECT_REF:-NOT_SET}"
```

If NOT_SET, guide user through:

1. GCP project creation: `gcloud projects create `
2. Enable APIs: Cloud Run, Artifact Registry, Cloud Build
3. Link billing account
4. Supabase project creation via CLI or dashboard
5. Store all references in `.mise.local.toml`

### Step 2: Generate Cal.com secrets (if needed)

```bash
# Generate 3 secrets
NEXTAUTH_SECRET=$(openssl rand -base64 32)
ENCRYPTION_KEY=$(openssl rand -hex 32)
CRON_API_KEY=$(openssl rand -hex 32)

echo "NEXTAUTH_SECRET: $NEXTAUTH_SECRET"
echo "CALENDSO_ENCRYPTION_KEY: $ENCRYPTION_KEY"
echo "CRON_API_KEY: $CRON_API_KEY"
```

Store in 1Password Claude Automation vault.

## Phase 4: launchd Service Installation

### Step 1: Create launcher scripts

```bash
mkdir -p ~/own/amonic/bin ~/own/amonic/logs

# Bot launcher
cat > ~/own/amonic/bin/calcom-commander-bot  ~/own/amonic/bin/calcom-commander-sync &1 | head -5

echo ""
echo "=== Bot Process ==="
pgrep -fl calcom-commander || echo "Not running"

echo ""
echo "=== launchd ==="
launchctl list | grep calcom-commander || echo "Not registered"

echo ""
echo "=== Supabase ==="
DATABASE_URL=$(op read "$SUPABASE_DB_URL_REF" 2>/dev/null) && psql "$DATABASE_URL" -c "SELECT 1" 2>&1 | head -3 || echo "DB not configured"
```

## Success Criteria

1. `echo $CALCOM_OP_UUID` shows a UUID
2. Cal.com CLI returns event type data
3. `echo $TELEGRAM_BOT_TOKEN` is set
4. Bot responds to /help in Telegram
5. Supabase DB is accessible
6. launchd jobs are loaded (optional)

## No API Credentials?

Direct user to: [calcom-api-setup.md](../skills/calcom-access/references/calcom-api-setup.md)

---

## Post-Execution Reflection

After this skill completes, reflect before closing the task:

0. **Locate yourself.** — Find this SKILL.md's canonical path (Glob for this skill's name) before editing. All corrections target THIS file and its sibling references/ — never other documentation.
1. **What failed?** — Fix the instruction that caused it. If it could recur, add it as an anti-pattern.
2. **What worked better than expected?** — Promote it to recommended practice. Document why.
3. **What drifted?** — Any script, reference, or external dependency that no longer matches reality gets fixed now.
4. **Log it.** — Every change gets an evolution-log entry with trigger, fix, and evidence.

Do NOT defer. The next invocation inherits whatever you leave behind.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [terrylica](https://github.com/terrylica)
- **Source:** [terrylica/cc-skills](https://github.com/terrylica/cc-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** yes
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: flagged — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-terrylica-cc-skills-setup
- Seller: https://agentstack.voostack.com/s/terrylica
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
