Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/tomevault-io/skills-registry --skill gc-mobile-ios명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
| Use when this capability is needed.
> Use when this capability is needed.
Review architecture and API design for the vfs-s3 project. Use when the user mentions @architect, asks to review an issue's design, discuss module boundaries, API shape, or architectural decisions for vfs-s3. Also trigger when the user wants to create an ADR (Architecture Decision Record) or evaluate a technical approach for the project. Intended for dispatch from Codex automation or Claude routines; GitHub trigger phrase: @vfs-s3-bot please prepare design doc Use when this capability is needed.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | gc-mobile-ios |
| description | >- Use when this capability is needed. |
Audit an iOS app for energy efficiency, battery impact, and sustainability.
If the sustainable-code MCP server is configured:
| Tool | Purpose |
|---|---|
sci_calculate | Compute SCI per mobile operation |
grid_carbon_intensity | Get grid carbon intensity for user region |
sci_compare | Compare SCI before/after optimization |
creedengo_check | Check Swift files for energy-wasteful patterns |
iOS Green Audit Progress:
- [ ] Phase 1: Explore — understand architecture and energy profile
- [ ] Phase 2: Energy profiling — identify battery-draining operations
- [ ] Phase 3: Code patterns — check against Creedengo iOS rules
- [ ] Phase 4: Network efficiency — minimize data transfer
- [ ] Phase 5: Asset optimization — reduce resource footprint
- [ ] Phase 6: SCI measurement — quantify carbon per operation
- [ ] Phase 7: Report and recommendations
Understand the app's architecture and energy profile:
Identify the biggest energy consumers. On iOS, the main energy drains are:
| Component | Energy impact | What to check |
|---|---|---|
| Location Services | Very high | Continuous GPS vs significant-change vs visit monitoring |
| Networking | High | Request frequency, payload size, background transfers |
| CPU processing | High | Main thread blocking, inefficient algorithms, polling loops |
| Graphics/GPU | High | Overdraw, off-screen rendering, animation complexity |
| Bluetooth/sensors | Medium-high | Polling frequency, unnecessary scans |
| Display | Medium | Brightness APIs, always-on content, dark mode support |
| Background tasks | Medium | BGTaskScheduler usage, background refresh frequency |
Recommend the user profile their app using:
// Add MXMetricManagerSubscriber to receive daily energy reports
class MetricsSubscriber: NSObject, MXMetricManagerSubscriber {
func didReceive(_ payloads: [MXMetricPayload]) {
// payloads contain cumulativeCellularConditionTime,
// cumulativeWiFiConditionTime, cpuMetrics, gpuMetrics
}
}
Check Swift files against Creedengo iOS energy rules:
| Rule | Pattern to avoid | Green alternative |
|---|---|---|
| Location precision | kCLLocationAccuracyBest when not needed | Use kCLLocationAccuracyHundredMeters or CLLocationManager.significantLocationChangeMonitoringAvailable() |
| Location continuous | startUpdatingLocation() running permanently | Use startMonitoringSignificantLocationChanges() or requestLocation() for one-shot |
| Sensor polling | Timer-based accelerometer/gyroscope reads | Use CMMotionManager with appropriate updateInterval, stop when not needed |
| Idle timer | UIApplication.shared.isIdleTimerDisabled = true | Only disable when genuinely needed (navigation, video playback), re-enable promptly |
| Brightness override | Setting UIScreen.main.brightness to max | Let the system manage brightness, respect auto-brightness |
| Torch/flashlight | AVCaptureDevice.torchMode = .on left on | Turn off torch as soon as task completes |
| Animation overuse | Complex UIView.animate chains, always-running CADisplayLink | Use UIView.animate with prefers-reduced-motion check, avoid continuous animations |
| Bluetooth scanning | centralManager.scanForPeripherals without timeout | Set a scan timeout, stop scanning once device found |
| Background fetch | Aggressive setMinimumBackgroundFetchInterval | Use BGAppRefreshTaskRequest with reasonable earliest begin date |
| Large image loading | Loading full-resolution images into memory | Use UIImage(contentsOfFile:) with downsampling, or ImageIO for thumbnails |
Use the creedengo_check MCP tool on Swift files, or manually review against these patterns.
Additionally check for general Swift energy patterns:
struct over class — value types avoid heap allocation and ARC overheadDispatchQueue.main.async flooding — batch UI updateslazy var for expensive computed propertiesasync/await over completion handler chains — cleaner, avoids retain cyclesURLSession background transfers for large downloads instead of foreground requestsMobile network operations are energy-expensive. Check:
| Check | Why it matters |
|---|---|
| Batch API calls | Each network transaction wakes the radio. Batch multiple requests into one |
| Compress payloads | Use gzip/brotli. Consider Protocol Buffers or MessagePack over JSON for high-frequency APIs |
| Cache aggressively | Use URLCache with appropriate policies. Cache images with NSCache or third-party (Kingfisher, SDWebImage) |
| Avoid polling | Replace polling with push notifications (APNs) or WebSocket for real-time updates |
| Background transfers | Use URLSessionConfiguration.background for non-urgent uploads/downloads — iOS batches these efficiently |
| Prefetch intelligently | Use UITableViewDataSourcePrefetching / UICollectionViewDataSourcePrefetching — don't prefetch everything |
| Reduce image sizes | Request appropriate resolution from server (?w=375 for phone, ?w=768 for tablet) |
| HTTP caching headers | Ensure ETag, Last-Modified, Cache-Control are set server-side |
| Asset type | Check | Target |
|---|---|---|
| Images | HEIC preferred over PNG/JPEG. Use Asset Catalog with device-specific variants | Smallest format for quality needed |
| App size | App Thinning enabled? Bitcode? On-demand resources for large assets? | Smaller download = less energy to transfer |
| Fonts | System fonts (SF Pro, SF Mono) preferred over custom fonts | Zero download cost for system fonts |
| Videos | HLS adaptive streaming? Appropriate resolution per device? | Don't stream 4K to an iPhone SE |
| Core Data | Batch inserts (NSBatchInsertRequest)? Proper indexing? Fetch limits? | Reduce disk I/O and CPU |
| Launch time | Minimize work in application(_:didFinishLaunchingWithOptions:) | Faster launch = less energy |
Measure the carbon intensity of key operations:
CFAbsoluteTimeGetCurrent() or ContinuousClock:
let clock = ContinuousClock()
let duration = try await clock.measure {
// operation to measure
}
let wallTimeMs = duration.components.seconds * 1000
+ duration.components.attoseconds / 1_000_000_000_000_000
grid_carbon_intensity MCP tool (use user's region)sci_calculate MCP tool:
wallTimeMs: measured durationdevicePowerW: ~3W (iPhone average) or ~5W (iPad)carbonIntensity: from step 3embodiedTotalG: ~70000 (iPhone, from Apple Environmental Report)lifetimeHours: ~26280 (3 years typical iPhone lifecycle)## iOS Green Audit: [app name]
### Energy profile
| Component | Impact | Status | Notes |
|-----------|--------|--------|-------|
| Location | high/medium/low/none | ok/warn/fail | ... |
| Networking | ... | ... | ... |
| CPU/processing | ... | ... | ... |
| Graphics/GPU | ... | ... | ... |
| Sensors | ... | ... | ... |
| Background tasks | ... | ... | ... |
### Code patterns (Creedengo iOS)
| File | Rule violated | Severity | Fix |
|------|--------------|----------|-----|
| ... | ... | high/medium/low | ... |
### SCI measurements
| Operation | SCI (mgCO2eq) | Notes |
|-----------|---------------|-------|
| ... | ... | ... |
### Top 5 Recommendations
1. [highest impact action]
2. ...
### Methodology and sources
- Formula: SCI = ((E x I) + M) / R — [GSF SCI Specification v1.0](https://sci-guide.greensoftware.foundation/) (ISO 21031:2024)
- Code rules: [Creedengo iOS](https://github.com/green-code-initiative/creedengo-ios) — green-code-initiative
- Energy profiling: Xcode Instruments Energy Log / MetricKit
- Device power: [value] W — Apple Product Environmental Report [year]
- Embodied carbon: [value] gCO2eq — [Apple Product Environmental Report](https://www.apple.com/environment/) [year]
- Grid carbon intensity: [value] gCO2eq/kWh — [Ember Global Electricity Review](https://ember-energy.org/) [year]
- Platform guide: [Apple Energy Efficiency Guide for iOS Apps](https://developer.apple.com/library/archive/documentation/Performance/Conceptual/EnergyGuide-iOS/)
After presenting the iOS audit report, automatically run /gc-verify in quick mode. This triggers a Chain-of-Verification (CoVe) process: extract claims from the report, generate adversarial questions, answer each independently, and present findings under a ## Verification (CoVe) heading.
/gc-mobile-android — green coding audit for Android apps/gc-setup — full 9-phase sustainability audit (web-focused)/gc-measure-sci — measure SCI for any operation/gc-dev — daily development companionSource: fullo/sustainable-code-skill-setup — distributed by TomeVault.