Token导航 LogoToken导航

Agent Skill · 待分类

axiom-core-location-ref(Axiom 核心位置参考)

axiom-core-location-ref 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

axiom-core-location-ref 是待分类类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证为 MIT,第三方扫描有未通过项,按安装量在待分类类的 11,209 个 Skill 里排第 1,271。

总安装 4,104周安装 171GitHub Stars 873下载 1,368核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:axiom-core-location-ref(Axiom 核心位置参考)
来源仓库:https://github.com/charleswiltgen/axiom
仓库路径:skills/axiom-core-location-ref
安装命令:
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-core-location-ref
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/charleswiltgen/axiom --skill axiom-core-location-ref

这个 Skill 是做什么的

这个 Skill 的分类还没最终确定,用法以来源仓库的说明为准。

iOS 17+ 现代 Core Location API 的全面参考手册。包含 CLLocationUpdate、CLMonitor 与 CLServiceSession 用法。支持高精度定位与低功耗区域监控模式配置。需确保设备支持所需定位精度等级与传感器组合。

axiom-core-location-ref 属于待分类类 Skill,可作为该场景下的辅助能力补充。

来源仓库内路径:skills/axiom-core-location-ref

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/charleswiltgen/axiom --skill axiom-core-locati…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

axiom-core-location-ref 怎么安装?

在终端执行 npx skills add https://github.com/charleswiltgen/axiom --skill axiom-core-location-ref。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

axiom-core-location-ref 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

axiom-core-location-ref 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

axiom-core-location-ref 是免费的吗?

来源标注的许可证是 MIT。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

axiom-core-location-ref 用的人多吗?

公开数据是累计安装 4,104 次,近一周安装 171 次,下载 1,368 次,GitHub 873 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

axiom-core-location-ref 安全吗?

第三方扫描有未通过项,风险较高。除非你确认过源码,否则不建议直接安装到常用环境。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 3 个目录同时收录,说明这个 Skill 流传比较广。
  • 许可证明确为 MIT,商用和分发边界好判断。

先想清楚的地方

  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理待分类类任务、又不想每次都手写提示词的人。

不太适合

  • 需要厂商级技术支持和 SLA 的生产系统。

待分类类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
infsh-cli

infsh CLI · Codex、Claude

4,374,576382权限未标注未明确未收录
ai-video-generation

AI 视频生成 · Codex、Claude

4,313,376382调用外部服务未明确有提醒
lark-openapi-explorer

云雀 OpenAPI 浏览器 · Codex、Claude

2,064,1209,011需要联网未明确有提醒
lark-workflow-standup-report

Lark 工作流程站立报告 · Codex、Claude

2,041,6328,978需要联网未明确通过
use-my-browser

使用我的浏览器 · Codex、Claude

1,848,49140操作浏览器未明确未通过
axiom-core-location-ref

Axiom 核心位置参考 · 本页

4,104873需要联网MIT未通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Core Location Reference

Comprehensive API reference for modern Core Location (iOS 17+).

When to Use

  • Need API signatures for CLLocationUpdate, CLMonitor, CLServiceSession
  • Implementing geofencing or region monitoring
  • Configuring background location updates
  • Understanding authorization patterns
  • Debugging location service issues

Related Skills

  • axiom-core-location — Anti-patterns, decision trees, pressure scenarios
  • axiom-core-location-diag — Symptom-based troubleshooting
  • axiom-energy-ref — Location as battery subsystem (accuracy vs power)

Part 1: Modern API Overview (iOS 17+)

Four key classes replace legacy CLLocationManager patterns:

ClassPurposeiOS
CLLocationUpdateAsyncSequence for location updates17+
CLMonitorCondition-based geofencing/beacons17+
CLServiceSessionDeclarative authorization goals18+
CLBackgroundActivitySessionBackground location support17+

Migration path: Legacy CLLocationManager still works, but new APIs provide:

  • Swift concurrency (async/await)
  • Automatic pause/resume
  • Simplified authorization
  • Better battery efficiency

Part 2: CLLocationUpdate API

Basic Usage

import CoreLocation

Task {
    do {
        for try await update in CLLocationUpdate.liveUpdates() {
            if let location = update.location {
                // Process location
            }
            if update.isStationary {
                break // Stop when user stops moving
            }
        }
    } catch {
        // Handle location errors
    }
}

LiveConfiguration Options

CLLocationUpdate.liveUpdates(.default)
CLLocationUpdate.liveUpdates(.automotiveNavigation)
CLLocationUpdate.liveUpdates(.otherNavigation)
CLLocationUpdate.liveUpdates(.fitness)
CLLocationUpdate.liveUpdates(.airborne)

Choose based on use case. If unsure, use .default or omit parameter.

Key Properties

PropertyTypeDescription
locationCLLocation?Current location (nil if unavailable)
isStationaryBoolTrue when device stopped moving
authorizationDeniedBoolUser denied location access
authorizationDeniedGloballyBoolLocation services disabled system-wide
authorizationRequestInProgressBoolAwaiting user authorization decision
accuracyLimitedBoolReduced accuracy (updates every 15-20 min)
locationUnavailableBoolCannot determine location
insufficientlyInUseBoolCan't request auth (not in foreground)

Automatic Pause/Resume

When device becomes stationary:

  1. Final update delivered with isStationary = true and valid location
  2. Updates pause (saves battery)
  3. When device moves, updates resume with isStationary = false

No action required—happens automatically.

AsyncSequence Operations

// Get first location with speed > 10 m/s
let fastUpdate = try await CLLocationUpdate.liveUpdates()
    .first { $0.location?.speed ?? 0 > 10 }

// WARNING: Avoid filters that may never match (e.g., horizontalAccuracy < 1)

Part 3: CLMonitor API

Swift actor for monitoring geographic conditions and beacons.

Basic Geofencing

let monitor = await CLMonitor("MyMonitor")

// Add circular region
let condition = CLMonitor.CircularGeographicCondition(
    center: CLLocationCoordinate2D(latitude: 37.33, longitude: -122.01),
    radius: 100
)
await monitor.add(condition, identifier: "ApplePark")

// Await events
for try await event in monitor.events {
    switch event.state {
    case .satisfied:  // User entered region
        handleEntry(event.identifier)
    case .unsatisfied:  // User exited region
        handleExit(event.identifier)
    case .unknown:
        break
    @unknown default:
        break
    }
}

CircularGeographicCondition

CLMonitor.CircularGeographicCondition(
    center: CLLocationCoordinate2D,
    radius: CLLocationDistance  // meters, minimum ~100m effective
)

BeaconIdentityCondition

Three granularity levels:

// All beacons with UUID (any site)
CLMonitor.BeaconIdentityCondition(uuid: myUUID)

// Specific site (UUID + major)
CLMonitor.BeaconIdentityCondition(uuid: myUUID, major: 100)

// Specific beacon (UUID + major + minor)
CLMonitor.BeaconIdentityCondition(uuid: myUUID, major: 100, minor: 5)

Condition Limit

Maximum 20 conditions per app. Prioritize what to monitor. Swap regions dynamically based on user location if needed.

Adding with Assumed State

// If you know initial state
await monitor.add(condition, identifier: "Work", assuming: .unsatisfied)

Core Location will correct if assumption wrong.

Accessing Records

// Get single record
if let record = await monitor.record(for: "ApplePark") {
    let condition = record.condition
    let lastEvent = record.lastEvent
    let state = lastEvent.state
    let date = lastEvent.date
}

// Get all identifiers
let allIds = await monitor.identifiers

Event Properties

PropertyDescription
identifierString identifier of condition
state.satisfied, .unsatisfied, .unknown
dateWhen state changed
refinementFor wildcard beacons, actual UUID/major/minor detected
conditionLimitExceededToo many conditions (max 20)
conditionUnsupportedCondition type not available
accuracyLimitedReduced accuracy prevents monitoring

Critical Requirements

  1. One monitor per name — Only one instance with given name at a time
  2. Always await events — Events only become lastEvent after handling
  3. Reinitialize on launch — Recreate monitor in didFinishLaunchingWithOptions

Part 4: CLServiceSession API (iOS 18+)

Declarative authorization—tell Core Location what you need, not what to do.

Basic Usage

// Hold session for duration of feature
let session = CLServiceSession(authorization: .whenInUse)

for try await update in CLLocationUpdate.liveUpdates() {
    // Process updates
}

Authorization Requirements

CLServiceSession(authorization: .none)       // No auth request
CLServiceSession(authorization: .whenInUse)  // Request When In Use
CLServiceSession(authorization: .always)     // Request Always (must start in foreground)

Full Accuracy Request

// For features requiring precise location (e.g., navigation)
CLServiceSession(
    authorization: .whenInUse,
    fullAccuracyPurposeKey: "NavigationPurpose"  // Key in Info.plist
)

Requires NSLocationTemporaryUsageDescriptionDictionary in Info.plist.

Implicit Sessions

Iterating CLLocationUpdate.liveUpdates() or CLMonitor.events creates implicit session with .whenInUse goal.

To disable implicit sessions:

<!-- Info.plist -->
<key>NSLocationRequireExplicitServiceSession</key>
<true/>

Session Layering

Don't replace sessions—layer them:

// Base session for app
let baseSession = CLServiceSession(authorization: .whenInUse)

// Additional session when navigation feature active
let navSession = CLServiceSession(
    authorization: .whenInUse,
    fullAccuracyPurposeKey: "Nav"
)
// Both sessions active simultaneously

Diagnostic Properties

for try await diagnostic in session.diagnostics {
    if diagnostic.authorizationDenied {
        // User denied—offer alternative
    }
    if diagnostic.authorizationDeniedGlobally {
        // Location services off system-wide
    }
    if diagnostic.insufficientlyInUse {
        // Can't request auth (not foreground)
    }
    if diagnostic.alwaysAuthorizationDenied {
        // Always auth specifically denied
    }
    if !diagnostic.authorizationRequestInProgress {
        // Decision made (granted or denied)
        break
    }
}

Session Lifecycle

Sessions persist through:

  • App backgrounding
  • App suspension
  • App termination (Core Location tracks)

On relaunch, recreate sessions immediately in didFinishLaunchingWithOptions.


Part 5: Authorization State Machine

Authorization Levels

StatusDescription
.notDeterminedUser hasn't decided
.restrictedParental controls prevent access
.deniedUser explicitly refused
.authorizedWhenInUseAccess while app active
.authorizedAlwaysBackground access

Accuracy Authorization

ValueDescription
.fullAccuracyPrecise location
.reducedAccuracyApproximate (~5km), updates every 15-20 min

Required Info.plist Keys

<!-- Required for When In Use -->
<key>NSLocationWhenInUseUsageDescription</key>
<string>We need your location to show nearby places</string>

<!-- Required for Always -->
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We track your location to send arrival reminders</string>

<!-- Optional: default to reduced accuracy -->
<key>NSLocationDefaultAccuracyReduced</key>
<true/>

Legacy Authorization Pattern

@MainActor
class LocationManager: NSObject, CLLocationManagerDelegate {
    private let manager = CLLocationManager()

    func locationManagerDidChangeAuthorization(_ manager: CLLocationManager) {
        switch manager.authorizationStatus {
        case .notDetermined:
            manager.requestWhenInUseAuthorization()
        case .authorizedWhenInUse, .authorizedAlways:
            enableLocationFeatures()
        case .denied, .restricted:
            disableLocationFeatures()
        @unknown default:
            break
        }
    }
}

Part 6: Background Location

Requirements

  1. Background mode capability: Signing & Capabilities → Background Modes → Location updates
  2. Info.plist: Adds UIBackgroundModes with location value
  3. CLBackgroundActivitySession or LiveActivity

CLBackgroundActivitySession

// Create and HOLD reference (deallocation invalidates session)
var backgroundSession: CLBackgroundActivitySession?

func startBackgroundTracking() {
    // Must start from foreground
    backgroundSession = CLBackgroundActivitySession()

    Task {
        for try await update in CLLocationUpdate.liveUpdates() {
            processUpdate(update)
        }
    }
}

func stopBackgroundTracking() {
    backgroundSession?.invalidate()
    backgroundSession = nil
}

Background Indicator

Blue status bar/pill appears when:

  • App authorized as "When In Use"
  • App receiving location in background
  • CLBackgroundActivitySession active

App Lifecycle

  1. Foreground → Background: Session continues
  2. Background → Suspended: Session preserved, updates pause
  3. Suspended → Terminated: Core Location tracks session
  4. Terminated → Background launch: Recreate session immediately
func application(_ application: UIApplication,
                 didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
    // Recreate background session if was tracking
    if wasTrackingLocation {
        backgroundSession = CLBackgroundActivitySession()
        startLocationUpdates()
    }
    return true
}

Part 7: Legacy APIs (iOS 12-16)

CLLocationManager Delegate Pattern

class LocationManager: NSObject, CLLocationManagerDelegate {
    private let manager = CLLocationManager()

    override init() {
        super.init()
        manager.delegate = self
        manager.desiredAccuracy = kCLLocationAccuracyBest
        manager.distanceFilter = 10 // meters
    }

    func startUpdates() {
        manager.startUpdatingLocation()
    }

    func stopUpdates() {
        manager.stopUpdatingLocation()
    }

    func locationManager(_ manager: CLLocationManager,
                        didUpdateLocations locations: [CLLocation]) {
        guard let location = locations.last else { return }
        // Process location
    }
}

Accuracy Constants

ConstantAccuracyBattery Impact
kCLLocationAccuracyBestForNavigation~5mHighest
kCLLocationAccuracyBest~10mVery High
kCLLocationAccuracyNearestTenMeters~10mHigh
kCLLocationAccuracyHundredMeters~100mMedium
kCLLocationAccuracyKilometer~1kmLow
kCLLocationAccuracyThreeKilometers~3kmVery Low
kCLLocationAccuracyReduced~5kmLowest

Legacy Region Monitoring

// Deprecated in iOS 17, use CLMonitor instead
let region = CLCircularRegion(
    center: coordinate,
    radius: 100,
    identifier: "MyRegion"
)
region.notifyOnEntry = true
region.notifyOnExit = true
manager.startMonitoring(for: region)

Significant Location Changes

Low-power alternative for coarse tracking:

manager.startMonitoringSignificantLocationChanges()
// Updates ~500m movements, works in background

Visit Monitoring

Detect arrivals/departures:

manager.startMonitoringVisits()

func locationManager(_ manager: CLLocationManager, didVisit visit: CLVisit) {
    let arrival = visit.arrivalDate
    let departure = visit.departureDate
    let coordinate = visit.coordinate
}

Part 8: Geofencing Best Practices

Region Size

  • Minimum effective radius: ~100 meters
  • Smaller regions: May not trigger reliably
  • Larger regions: More reliable but less precise

20-Region Limit Strategy

// Dynamic region management
func updateMonitoredRegions(userLocation: CLLocation) async {
    let nearbyPOIs = fetchNearbyPOIs(around: userLocation, limit: 20)

    // Remove old regions
    for id in await monitor.identifiers {
        if !nearbyPOIs.contains(where: { $0.id == id }) {
            await monitor.remove(id)
        }
    }

    // Add new regions
    for poi in nearbyPOIs {
        let condition = CLMonitor.CircularGeographicCondition(
            center: poi.coordinate,
            radius: 100
        )
        await monitor.add(condition, identifier: poi.id)
    }
}

Entry/Exit Timing

  • Entry: Usually within seconds to minutes
  • Exit: May take 3-5 minutes after leaving
  • Accuracy depends on: Cell towers, WiFi, GPS availability

Persistence

  • Conditions persist across app launches
  • Must reinitialize monitor with same name on launch
  • Core Location wakes app for events

Part 9: Testing and Simulation

Xcode Location Simulation

  1. Run on simulator
  2. Debug → Simulate Location → Choose location
  3. Or use custom GPX file

Custom GPX Route

<?xml version="1.0"?>
<gpx version="1.1">
    <wpt lat="37.331686" lon="-122.030656">
        <time>2024-01-01T00:00:00Z</time>
    </wpt>
    <wpt lat="37.332686" lon="-122.031656">
        <time>2024-01-01T00:00:10Z</time>
    </wpt>
</gpx>

Testing Authorization States

Settings → Privacy & Security → Location Services:

  • Toggle app authorization
  • Toggle system-wide location services
  • Test reduced accuracy

Console Filtering

# Filter location logs
log stream --predicate 'subsystem == "com.apple.locationd"'

Part 10: Swift Concurrency Integration

Task Cancellation

let locationTask = Task {
    for try await update in CLLocationUpdate.liveUpdates() {
        if Task.isCancelled { break }
        processUpdate(update)
    }
}

// Later
locationTask.cancel()

MainActor Considerations

@MainActor
class LocationViewModel: ObservableObject {
    @Published var currentLocation: CLLocation?

    func startTracking() {
        Task {
            for try await update in CLLocationUpdate.liveUpdates() {
                // Already on MainActor, safe to update @Published
                self.currentLocation = update.location
            }
        }
    }
}

Error Handling

Task {
    do {
        for try await update in CLLocationUpdate.liveUpdates() {
            if update.authorizationDenied {
                throw LocationError.authorizationDenied
            }
            processUpdate(update)
        }
    } catch {
        handleError(error)
    }
}

Part 11: Geocoding

CLGeocoder — Forward Geocoding (Address → Coordinate)

let geocoder = CLGeocoder()

func geocodeAddress(_ address: String) async throws -> CLLocation? {
    let placemarks = try await geocoder.geocodeAddressString(address)
    return placemarks.first?.location
}

// With locale for localized results
let placemarks = try await geocoder.geocodeAddressString(
    "1 Apple Park Way",
    in: nil,  // CLRegion hint (optional)
    preferredLocale: Locale(identifier: "en_US")
)

CLGeocoder — Reverse Geocoding (Coordinate → Address)

func reverseGeocode(_ location: CLLocation) async throws -> CLPlacemark? {
    let placemarks = try await geocoder.reverseGeocodeLocation(location)
    return placemarks.first
}

// Usage
if let placemark = try await reverseGeocode(location) {
    let street = placemark.thoroughfare          // "Apple Park Way"
    let city = placemark.locality                // "Cupertino"
    let state = placemark.administrativeArea     // "CA"
    let zip = placemark.postalCode               // "95014"
    let country = placemark.country              // "United States"
    let isoCountry = placemark.isoCountryCode    // "US"
}

CLPlacemark Key Properties

PropertyExampleNotes
name"Apple Park"Location name
thoroughfare"Apple Park Way"Street name
subThoroughfare"1"Street number
locality"Cupertino"City
subLocality"Silicon Valley"Neighborhood
administrativeArea"CA"State/province
postalCode"95014"ZIP/postal code
country"United States"Country name
isoCountryCode"US"ISO country code
timeZoneAmerica/Los_AngelesTime zone
locationCLLocationCoordinate

Geocoding Rate Limits

  • One request at a time — CLGeocoder throws if a request is in progress
  • Apple rate-limits — Throttle to avoid kCLErrorGeocodeCanceled
  • Cache results — Don't re-geocode the same address/coordinate
  • Batch carefully — Add delays between sequential geocode requests
// Check if geocoder is busy
if geocoder.isGeocoding {
    geocoder.cancelGeocode()  // Cancel previous before starting new
}

Troubleshooting Quick Reference

SymptomCheck
No location updatesAuthorization status, Info.plist keys
Background not workingBackground mode capability, CLBackgroundActivitySession
Always auth not effectiveCLServiceSession with .always, started in foreground
Geofence not triggeringRegion count (max 20), radius (min ~100m)
Reduced accuracy onlyCheck accuracyAuthorization, request temporary full accuracy
Location icon stays onEnsure stopUpdatingLocation() or break from async loop

Resources

WWDC: 2023-10180, 2023-10147, 2024-10212

Docs: /corelocation, /corelocation/clmonitor, /corelocation/cllocationupdate, /corelocation/clservicesession

Skills: axiom-core-location, axiom-core-location-diag, axiom-energy-ref

平台分布

Claude Code

29.24%
按下载量换算400

Codex

25.22%
按下载量换算345

OpenCode

15.95%
按下载量换算218

Antigravity

11.7%
按下载量换算160

Cursor

7.37%
按下载量换算101

windsurf

3.77%
按下载量换算52

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。

继续浏览同类 Skills