accessibility-testing
WCAG compliance testing and accessibility quality assurance workflows for iOS apps. Use when validating accessibility labels, testing VoiceOver compatibility,…
Cache management, configuration best practices, and progressive disclosure patterns for efficient context window usage. Use when working with large responses, optimizing token costs, or managing plugin state across operations.
$ npx -y skills add conorluddy/xclaude-plugin --skill state-management --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/state-managementContext preview
The summary Claude sees to decide when to auto-load this skill.
Cache management, configuration best practices, and progressive disclosure patterns for efficient context window usage. Use when working with large responses, optimizing token costs, or managing plugin state across operations.
name: state-management description: Cache management, configuration best practices, and progressive disclosure patterns for efficient context window usage. Use when working with large responses, optimizing token costs, or managing plugin state across operations. version: 0.0.1 token_cost: ~40
**Optimizing token efficiency and state management in xc-plugin**
The xc-plugin implements sophisticated state management through caching, progressive disclosure, and configuration management. This Skill teaches how to leverage these patterns to minimize token usage, improve performance, and maintain clean state across operations.
**Key Benefits:**
Use this Skill when you need to:
1. **Optimize Token Usage**
2. **Manage Cache State**
3. **Handle Configuration**
4. **Design Efficient Workflows**
**Principle:** Show essentials first, provide details on-demand.
Instead of returning massive datasets that consume tokens, xc-plugin returns: 1. **Summary** - Key metrics and booted devices (~100 tokens) 2. **cache_id** - Reference to full dataset 3. **Follow-up query** - Retrieve complete details only if needed
**Token Efficiency:**
Traditional approach: 2000 tokens (full device list) Progressive disclosure: 100 tokens (summary) + optional 2000 tokens (details) Average savings: 95% (most queries don't need full details)
The plugin uses deterministic caching for expensive operations:
**Cache Key Generation:**
**Cache Storage:**
**Cache-Friendly Operations:**
**SuccessResult with Progressive Disclosure:**
{
success: true,
data: {
summary: "31 devices available, 1 booted",
booted_devices: [...],
cache_id: "a1b2c3d4e5f6g7h8"
},
summary: "Device list retrieved successfully"
}**Follow-up Query Pattern:**
{
operation: "get-details",
cache_id: "a1b2c3d4e5f6g7h8",
detail_type: "full-list"
}**Initial Query (Token-Efficient):**
{
"operation": "list",
"parameters": {
"concise": true
}
}**Response:**
{
"success": true,
"data": {
"summary": {
"total_devices": 47,
"available_devices": 31,
"booted_devices": 1
},
"booted": [
{
"name": "iPhone 15",
"udid": "ABC123...",
"state": "Booted",
"runtime": "iOS 17.0"
}
],
"cache_id": "sim-list-xyz789"
}
}**Follow-Up (Only If Needed):**
{
"operation": "get-details",
"cache_id": "sim-list-xyz789",
"detail_type": "full-list"
}**Token Analysis:**
**Build Operation:**
{
"operation": "build",
"scheme": "MyApp",
"configuration": "Debug",
"output_format": "summary"
}**Response with Cache:**
{
"success": true,
"data": {
"message": "Build succeeded",
"build_time": "45.2s",
"warnings": 3,
"cache_id": "build-abc123"
},
"summary": "Build completed successfully with 3 warnings"
}**Retrieve Full Logs:**
{
"operation": "get-details",
"cache_id": "build-abc123",
"detail_type": "full-log"
}**Cache Invalidation Scenarios:**
**Query Current Configuration:**
{
"operation": "cache",
"sub_operation": "get-config"
}**Response:**
{
"cache_enabled": true,
"cache_ttl": 3600,
"max_cache_size": 100,
"persistence_enabled": false
}**Update Configuration:**
{
"operation": "cache",
"sub_operation": "set-config",
"parameters": {
"cache_ttl": 7200,
"persistence_enabled": true
}
}**Pattern for Clean Test State:**
1. cache (clear: "all") → Remove all cached data 2. device-lifecycle (erase) → Reset simulator state 3. app-lifecycle (uninstall) → Remove app 4. app-lifecycle (install) → Fresh install 5. app-lifecycle (launch) → Start with clean state 6. (run tests) → Execute test suite 7. cache (clear: "response") → Clean response cache
**Why This Matters:**
**Level 1: Summary (Always Returned)**
{
"summary": {
"key_metric_1": "value",
"key_metric_2": "value",
"action_taken": "description"
},
"cache_id": "unique-identifier",
"next_Modular iOS development automation for Claude Code Build, test, and automate iOS apps through natural conversation with Claude. 8 workflow-specific MCP servers with 24 tools across Xcode, Simulator, and IDB. Enable only what you need.
Repo: conorluddy/xclaude-plugin
WCAG compliance testing and accessibility quality assurance workflows for iOS apps. Use when validating accessibility labels, testing VoiceOver compatibility,…
Crash log analysis, symbolication, and debugging workflows for iOS apps. Use when investigating app crashes, analyzing crash reports, symbolicating stack…
XCTest and XCUITest execution workflows and flaky test detection patterns
Instruments integration and performance analysis workflows for iOS apps. Use when profiling CPU usage, memory allocation, network activity, or energy…
iOS Simulator device and app management with simctl. Use when managing simulator devices (boot, create, delete), installing/launching apps, or troubleshooting…
Accessibility-first UI automation using IDB. Query accessibility tree (fast, 50 tokens) before screenshots (slow, 170 tokens). Use when automating simulator…