omc-setup
БесплатноБез исполняемых скриптовНе проверенSetup and configure oh-my-claudecode (the ONLY command you need to learn)
от diegosouzapw★ 68 звёзд на GitHubОб этом скилле
OMC Setup
This is the only command you need to learn. After running this, everything else is automatic.
Note: All ~/.claude/... paths in this guide respect CLAUDE_CONFIG_DIR when that environment variable is set.
Pre-Setup Check: Already Configured?
CRITICAL: Before doing anything else, check if setup has already been completed. This prevents users from having to re-run the full setup wizard after every update.
# Check if setup was already completed
CONFIG_FILE="$HOME/.claude/.omc-config.json"
if [ -f "$CONFIG_FILE" ]; then
SETUP_COMPLETED=$(jq -r '.setupCompleted // empty' "$CONFIG_FILE" 2>/dev/null)
SETUP_VERSION=$(jq -r '.setupVersion // empty' "$CONFIG_FILE" 2>/dev/null)
if [ -n "$SETUP_COMPLETED" ] && [ "$SETUP_COMPLETED" != "null" ]; then
echo "OMC setup was already completed on: $SETUP_COMPLETED"
[ -n "$SETUP_VERSION" ] && echo "Setup version: $SETUP_VERSION"
ALREADY_CONFIGURED="true"
fi
fi
If Already Configured (and no --force flag)
If ALREADY_CONFIGURED is true AND the user did NOT pass --force, --local, or --global flags:
Use AskUserQuestion to prompt:
Question: "OMC is already configured. What would you like to do?"
Options:
- Update CLAUDE.md only - Download latest CLAUDE.md without re-running full setup
- Run full setup again - Go through the complete setup wizard
- Cancel - Exit without changes
If user chooses "Update CLAUDE.md only":
- Detect if local (.claude/CLAUDE.md) or global (~/.claude/CLAUDE.md) config exists
- If local exists, run the download/merge script from Step 2A
- If only global exists, run the download/merge script from Step 2B
- Skip all other steps
- Report success and exit
If user chooses "Run full setup again":
- Continue with Step 0 (Resume Detection) below
If user chooses "Cancel":
- Exit without any changes
Force Flag Override
If user passes --force flag, skip this check and proceed directly to setup.
Graceful Interrupt Handling
IMPORTANT: This setup process saves progress after each step. If interrupted (Ctrl+C or connection loss), the setup can resume from where it left off.
State File Location
.omc/state/setup-state.json- Tracks completed steps
Resume Detection (Step 0)
Before starting any step, check for existing state:
# Check for existing setup state
STATE_FILE=".omc/state/setup-state.json"
# Cross-platform ISO date to epoch conversion
iso_to_epoch() {
local iso_date="$1"
local epoch=""
# Try GNU date first (Linux)
epoch=$(date -d "$iso_date" +%s 2>/dev/null)
if [ $? -eq 0 ] && [ -n "$epoch" ]; then
echo "$epoch"
return 0
fi
# Try BSD/macOS date
local clean_date=$(echo "$iso_date" | sed 's/[+-][0-9][0-9]:[0-9][0-9]$//' | sed 's/Z$//' | sed 's/T/ /')
epoch=$(date -j -f "%Y-%m-%d %H:%M:%S" "$clean_date" +%s 2>/dev/null)
if [ $? -eq 0 ] && [ -n "$epoch" ]; then
echo "$epoch"
return 0
fi
echo "0"
}
if [ -f "$STATE_FILE" ]; then
# Check if state is stale (older than 24 hours)
TIMESTAMP_RAW=$(jq -r '.timestamp // empty' "$STATE_FILE" 2>/dev/null)
if [ -n "$TIMESTAMP_RAW" ]; then
TIMESTAMP_EPOCH=$(iso_to_epoch "$TIMESTAMP_RAW")
NOW_EPOCH=$(date +%s)
STATE_AGE=$((NOW_EPOCH - TIMESTAMP_EPOCH))
else
STATE_AGE=999999 # Force fresh start if no timestamp
fi
if [ "$STATE_AGE" -gt 86400 ]; then
echo "Previous setup state is more than 24 hours old. Starting fresh."
rm -f "$STATE_FILE"
else
LAST_STEP=$(jq -r ".lastCompletedStep // 0" "$STATE_FILE" 2>/dev/null || echo "0")
TIMESTAMP=$(jq -r .timestamp "$STATE_FILE" 2>/dev/null || echo "unknown")
echo "Found previous setup session (Step $LAST_STEP completed at $TIMESTAMP)"
fi
fi
If state exists, use AskUserQuestion to prompt:
Question: "Found a previous setup session. Would you like to resume or start fresh?"
Options:
- Resume from step $LAST_STEP - Continue where you left off
- Start fresh - Begin from the beginning (clears saved state)
If user chooses "Start fresh":
rm -f ".omc/state/setup-state.json"
echo "Previous state cleared. Starting fresh setup."
Save Progress Helper
After completing each major step, save progress:
# Save setup progress (call after each step)
# Usage: save_setup_progress STEP_NUMBER
save_setup_progress() {
mkdir -p .omc/state
cat > ".omc/state/setup-state.json" << EOF
{
"lastCompletedStep": $1,
"timestamp": "$(date -Iseconds)",
"configType": "${CONFIG_TYPE:-unknown}"
}
EOF
}
Clear State on Completion
After successful setup completion (Step 7/8), remove the state file:
rm -f ".omc/state/setup-state.json"
echo "Setup completed successfully. State cleared."
Usage Modes
This skill handles three scenarios:
- Initial Setup (no flags): First-time installation wizard
- Local Configuration (
--local): Configure project-specific settings (.claude/CLAUDE.md) - **Global Con
Установить omc-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл omc-setup?
Setup and configure oh-my-claudecode (the ONLY command you need to learn)
Как установить скилл omc-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл omc-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
patterns
Find patterns worth sharing from recent PRs and repo history, both repeats to fix and good practices worth spreading. Use when a champion wants to know what…
от Anthropiccopilot-cli-quickstart
Use this skill when someone wants to learn GitHub Copilot CLI from scratch. Offers interactive step-by-step tutorials with separate Developer and…
от GitHubvardoger-analyze
Use when the user asks to personalize the GitHub Copilot CLI assistant, adapt Copilot to their style, use vardoger, or analyze their Copilot CLI conversation…
от GitHubpolicy-lookup
Find and explain company policies in plain language. Trigger with "what's our PTO policy", "can I work remotely from another country", "how do expenses work"…
от Anthropic