AgentSkillsCN

xcode-health

针对常见问题与最佳实践,对Xcode项目配置进行审计。当用户希望检查项目健康状况、查找配置问题或审阅构建设置时,可使用此技能。

SKILL.md
--- frontmatter
name: xcode-health
description: Audits Xcode project configuration for common issues and best practices. Use when user wants to check project health, find configuration issues, or review build settings.
disable-model-invocation: true
argument-hint: [path/to/Project.xcodeproj]
allowed-tools: Bash(swift:*), Read, Glob

Xcode Project Health Check

Audits Xcode project configuration for common issues, misconfigurations, and best practice violations.

When to Use

  • User wants to audit their project setup
  • User experiences mysterious build issues
  • User asks about best practices
  • Before major releases or CI setup

Usage

code
/xcode-health path/to/MyApp.xcodeproj

Or let it auto-discover:

code
/xcode-health

What Gets Checked

Build Settings

  • Debug vs Release configuration differences
  • Optimization levels
  • Code signing settings consistency
  • Swift version settings
  • Deployment target appropriateness

Project Structure

  • Orphaned file references
  • Missing files
  • Duplicate targets
  • Unused build phases

Dependencies

  • Embedded frameworks configuration
  • Framework search paths
  • Missing required frameworks

Code Signing

  • Provisioning profile validity
  • Certificate consistency
  • Entitlements configuration

Warnings

  • Recommended warning flags not enabled
  • Deprecated settings in use
  • Known problematic configurations

Output Format

The script outputs a health report with:

  • score: Overall health score (0-100)
  • issues: List of problems found
  • warnings: Non-critical suggestions
  • passed: Checks that passed
  • recommendations: Suggested improvements

Issue Severity Levels

LevelDescription
criticalWill cause build failures or runtime crashes
errorSignificant problems that should be fixed
warningPotential issues or suboptimal configuration
infoSuggestions for improvement

Example Issues

Critical: Code signing identity not found Error: Deployment target below minimum for linked framework
Warning: Debug symbols enabled in Release configuration Info: Consider enabling whole module optimization