force-update
БесплатноБез исполняемых скриптовНе проверенGenerates a minimum version enforcement system with hard-block and soft-prompt update flows, App Store redirect, and remote config or App Store lookup for…
от rshankras★ 922 звезды на GitHubОб этом скилле
Force Update Generator
Generate a minimum version check system that blocks app usage when a critical update is required, or shows a dismissible prompt for recommended updates. Checks the current app version against a remote configuration endpoint or the App Store lookup API and presents the appropriate UI.
When This Skill Activates
Use this skill when the user:
- Asks to "add force update" or "force update screen"
- Wants "minimum version check" or "minimum version enforcement"
- Mentions "required update" or "mandatory update"
- Asks about "version check" or "app version check"
- Wants an "app update prompt" or "update dialog"
- Mentions "block old versions" or "deprecate old versions"
Pre-Generation Checks
1. Project Context Detection
- Check Swift version (requires Swift 5.9+)
- Check deployment target (iOS 16+ / macOS 13+)
- Check for @Observable support (iOS 17+ / macOS 14+)
- Identify source file locations
2. Conflict Detection
Search for existing version check code:
Glob: **/*ForceUpdate*.swift, **/*VersionCheck*.swift, **/*UpdateManager*.swift, **/*AppVersion*.swift
Grep: "ForceUpdate" or "minimumVersion" or "mandatoryUpdate" or "CFBundleShortVersionString"
If an existing update mechanism is found:
- Ask if user wants to replace or extend it
- If extending, integrate with the existing check flow
3. Network Layer Detection
Search for existing networking code:
Glob: **/*API*.swift, **/*Client*.swift, **/*Network*.swift
Grep: "APIClient" or "URLSession" or "NetworkService"
If a networking layer exists, generate the version checker to use it rather than raw URLSession.
Configuration Questions
Ask user via AskUserQuestion:
Update check source?
- Remote JSON endpoint (your own server hosts a JSON config) — recommended
- App Store lookup API (uses iTunes Search API, no server needed)
- Firebase Remote Config (requires Firebase SDK)
Update types to support?
- Hard block only (always force update)
- Soft prompt only (always dismissible)
- Both hard block and soft prompt — recommended
Check frequency?
- Every app launch
- Once per day — recommended
- Once per week
Include skip option for soft updates?
- Yes — user can skip a specific version and won't be prompted again until a newer version is available
- No — prompt shows every time (respecting check frequency)
Generation Process
Step 1: Read Templates
Read templates.md for production Swift code.
Step 2: Create Core Files
Generate these files:
AppVersion.swift— Semantic version model (major.minor.patch) with ComparableUpdateRequirement.swift— Enum: none, softUpdate, hardUpdate with message and store URLVersionChecker.swift— Protocol + implementation based on chosen source
Step 3: Create Manager
UpdateManager.swift— @Observable manager that coordinates checks, caches timing, exposes state
Step 4: Create UI Files
ForceUpdateView.swift— Full-screen blocking view with App Store buttonSoftUpdateBannerView.swift— Dismissible banner with Update and Later buttons
Step 5: Create Integration
UpdateCheckModifier.swift— ViewModifier that auto-checks on appear and presents UI
Step 6: Determine File Location
Check project structure:
- If
Sources/exists →Sources/ForceUpdate/ - If
App/exists →App/ForceUpdate/ - Otherwise →
ForceUpdate/
Output Format
After generation, provide:
Files Created
ForceUpdate/
├── AppVersion.swift # Semantic version model with Comparable
├── UpdateRequirement.swift # none / softUpdate / hardUpdate enum
├── VersionChecker.swift # Protocol + remote/App Store implementation
├── UpdateManager.swift # @Observable coordinator
├── ForceUpdateView.swift # Full-screen blocking UI
├── SoftUpdateBannerView.swift # Dismissible banner UI
└── UpdateCheckModifier.swift # ViewModifier for auto-check
Integration Steps
Add the modifier to your root view:
@main
struct MyApp: App {
var body: some Scene {
WindowGroup {
ContentView()
.checkForUpdates()
}
}
}
Custom configuration:
ContentView()
.checkForUpdates(
checker: RemoteJSONVersionChecker(
url: URL(string: "https://api.example.com/app-config")!
),
frequency: .daily
)
Manual check from a settings screen:
struct SettingsView: View {
@Environment(UpdateManager.self) private var updateManager
var body: some View {
Section("App") {
if case .softUpdate(_, let message) = updateManager.requirement {
Button("Update Available") {
updateManager.openAppStore()
}
}
Button("Check for Updates") {
Task { await updateManager.checkNow() }
}
}
}
}
Testing
Установить force-update в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteEditGlobGrepBashAskUserQuestionВложенные файлы
FAQ
Что делает скилл force-update?
Generates a minimum version enforcement system with hard-block and soft-prompt update flows, App Store redirect, and remote config or App Store lookup for version checks. Use when user wants force update, mandatory update, or minimum version check.
Как установить скилл force-update?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл force-update запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic