公理工具
- 作者仓库星标 0
- 作者更新于 2026年8月24日 18:29
- 作者仓库 Axiom
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @CharlesWiltgen · 未声明许可证
- 上下文用量评级
- 中等消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
## Cursor MCP Tool Boundary
The `xclog`, `xcsym`, and `xcprof` examples below are reference syntax, not executable commands for Cursor. Map each subcommand to the same-named MCP tool—for example, `xclog launch` to `axiom_xclog_launch`, `xcsym crash` to `axiom_xcsym_crash`, and `xcprof record` to `axiom_xcprof_record`—and preserve its arguments as structured fields. Do not run a bare helper binary. If a required MCP tool is unavailable, stop and report that the Axiom MCP integration is missing; do not fall back to a same-named executable.
## Cursor UI Tool Availability
`xcui` is an external tool and is not bundled with the Cursor plugin; it has no Axiom MCP wrapper. Before UI automation, check `command -v xcui`. If it is absent, AXe fallback is limited to compatible input verbs: `tap`, `slider`, `type`, `swipe`, `drag`, `touch`, `gesture`, `button`, `key`, `key-sequence`, `key-combo`, and `screenshot`. Then check `command -v axe` before that fallback and handle `DEVELOPER_DIR` explicitly if AXe reports a SimulatorKit loading error. AXe cannot replace `wait`, `assert`, `a11y`, `dialog`, `voiceover`, `resize`, or `doctor`. If neither tool is available, stop UI automation, explain the external setup requirement, and continue only with non-UI simulator and log checks. If AXe exists but the requested workflow requires an xcui-only capability, stop that UI workflow and report the limitation.
# Axiom Tools & Onboarding
This suite covers Axiom itself — how to use it, what's available, and the tools that ship with it.
## Cursor Subagent Routing
Delegate to the appropriate Cursor subagent when this router calls for a specialized auditor.
## Routing
| Question | Read |
|----------|------|
| "How do I use Axiom?" / "What skills are available?" | [skills/getting-started.md](skills/getting-started.md) |
| "How do I capture console output?" / "What is xclog?" | [skills/xclog-ref.md](skills/xclog-ref.md) |
| "How do I symbolicate a crash?" / "What is xcsym?" / "Why is my crash unsymbolicated?" | [skills/xcsym-ref.md](skills/xcsym-ref.md) |
| "How do I drive/validate the sim UI?" / "What is xcui?" / "How do I script accessibility checks?" | [skills/xcui-ref.md](skills/xcui-ref.md) |
| "How do I analyze a trace / CPU or network profile?" / "What is xcprof?" / "Why does the profiler report no findings?" | [skills/xcprof-ref.md](skills/xcprof-ref.md) |
| "How do I control a simulator/device without Xcode running?" / "What is Device Hub?" / "devicectl vs simctl?" | [skills/device-control-ref.md](skills/device-control-ref.md) |
| "How do I capture a screenshot or record video of a sim or device from the CLI?" | [skills/device-control-ref.md](skills/device-control-ref.md) (Screen capture) |
| "How do I clean up the status bar for App Store screenshots?" / "How do I set the time to 9:41 and full bars?" | [skills/device-control-ref.md](skills/device-control-ref.md) (Status bar for screenshots) |
| "Can I automate resize testing?" / "Does my layout hold across breakpoints?" | [skills/xcui-ref.md](skills/xcui-ref.md) (Resize sweeps) — `xcui resize sweep` |
| "How do I drive `appResize` by hand?" | [skills/device-control-ref.md](skills/device-control-ref.md) (Resizable app sessions) |
## Using Axiom Skills
The content below is the core discipline for Axiom's routing system — it establishes the rule that Axiom skills must be checked before any iOS/Swift response.
<EXTREMELY-IMPORTANT>
If you think there is even a 1% chance an Axiom skill might apply to your iOS/Swift task, you ABSOLUTELY MUST check for the skill.
IF AN AXIOM SKILL APPLIES TO YOUR iOS/SWIFT TASK, YOU DO NOT HAVE A CHOICE. YOU MUST USE IT.
This is not negotiable. This is not optional. You cannot rationalize your way out of this.
</EXTREMELY-IMPORTANT>
## The Rule
**Check for Axiom skills BEFORE ANY RESPONSE when working with iOS/Swift projects.** This includes clarifying questions. Even 1% chance means check first.
## Red Flags — iOS-Specific Rationalizations
These thoughts mean STOP—you're rationalizing:
| Thought | Reality |
|---------|---------|
| "This is just a simple build issue" | Build failures have patterns. Check axiom-build first. |
| "I can fix this SwiftUI bug quickly" | SwiftUI issues have hidden gotchas. Check axiom-swiftui first. |
| "Let me just add this database column" | Schema changes risk data loss. Check axiom-data first. |
| "This async code looks straightforward" | Swift concurrency has subtle rules. Check axiom-concurrency first. |
| "I'll debug the memory leak manually" | Leak patterns are documented. Check axiom-performance first. |
| "Let me explore the Xcode project first" | Axiom skills tell you HOW to explore. Check first. |
| "I remember how to do this from last time" | iOS changes constantly. Skills are up-to-date. |
| "This iOS/platform version doesn't exist" | If it postdates your training, you can't know that. Apple shipped iOS 26 at WWDC 2025 (18 → 26, 19-25 skipped). Invoke Axiom skills for post-cutoff facts. |
| "The user just wants a quick answer" | Quick answers without patterns create tech debt. Check skills first. |
| "This doesn't need a formal workflow" | If an Axiom skill exists for it, use it. |
| "I'll gather info first, then check skills" | Skills tell you WHAT info to gather. Check first. |
## Skill Priority for iOS Development
When multiple Axiom skills could apply, use this priority:
1. **Environment/Build first** (axiom-build) — Fix the environment before debugging code
2. **Architecture patterns** (axiom-swiftui, axiom-data, axiom-concurrency) — These determine HOW to structure the solution
3. **Implementation details** (axiom-integration, axiom-ai, axiom-vision) — These guide specific feature work
Examples:
- "Xcode build failed" → axiom-build first (environment)
- "Add SwiftUI screen" → axiom-swiftui first (architecture), then maybe axiom-integration if using system features
- "App is slow" → axiom-performance first (diagnose), then fix the specific domain
- "Network request failing" → axiom-build first (environment check), then axiom-networking (implementation)
## iOS Project Detection
Axiom skills apply when:
- Working directory contains `.xcodeproj` or `.xcworkspace`
- User mentions iOS, Swift, Xcode, SwiftUI, UIKit
- User asks about Apple frameworks (SwiftData, CloudKit, etc.)
- User reports iOS-specific errors (concurrency, memory, build failures)
## Using Axiom Router Skills
Axiom uses **router skills** for progressive disclosure:
1. Check the appropriate router skill first (axiom-build, axiom-swiftui, axiom-data, etc.)
2. Router will invoke the specialized skill(s) you actually need
3. Follow the specialized skill exactly
**Do not skip the router.** Routers have decision logic to select the right specialized skill.
### Multi-Domain Questions
When a question spans multiple domains, **invoke ALL relevant routers — don't stop after the first one.**
Examples:
- "My SwiftUI view doesn't update when SwiftData changes" → invoke **both** axiom-swiftui AND axiom-data
- "My widget isn't showing updated data from SwiftData" → invoke **both** axiom-integration AND axiom-data
- "My Foundation Models session freezes the UI" → invoke **both** axiom-ai AND axiom-concurrency
- "My Core Data saves lose data from background tasks" → invoke **both** axiom-data AND axiom-concurrency
**How to tell**: If the question mentions symptoms from two different domains, or involves two different frameworks, invoke both routers. Each router has cross-domain routing guidance for common overlaps.
## Backward Compatibility
- Direct skill invocation still works: `/skill axiom-concurrency`
- Commands work unchanged: `/axiom-fix-build`, `/axiom-audit` accessibility
- Agents work via routing or direct command invocation
## When Axiom Skills Don't Apply
Skip Axiom skills for:
- Non-iOS/Swift projects (Android, web, backend)
- Generic programming questions unrelated to Apple platforms
- Questions about Claude Code itself (use claude-code-guide skill)
But when in doubt for iOS/Swift work: **check first, decide later.**
## Device Hub (Xcode 27)
On Xcode 27, **Device Hub** — a standalone app that auto-launches on build-and-run — replaces the `Simulator.app` GUI and manages simulators *and* physical devices in one place (Xcode 26 and earlier keep Simulator.app). Every operation has an Xcode-independent CLI counterpart, so the Axiom tools and scripts are unaffected.
For the full tool map (Device Hub / devicectl / simctl / xcui vs mcpbridge, and what each costs to run), the verified subcommand matrix, the unified `devicectl device capture` screenshot/screen-record path (works on sim and device, Xcode 26.6+), the status-bar overrides that prep a screenshot (`statusBar preset screenshot` and the simctl equivalents), and the Device Hub GUI reference, see `skills/device-control-ref.md`.
## Resources
**Skills**: axiom-swiftui, axiom-concurrency, axiom-data, axiom-build, axiom-performance
**Axiom tools**: `xclog` (simulator console capture, `skills/xclog-ref.md`), `xcsym` (crash symbolication for `.ips`, MetricKit, legacy `.crash` text files, and Xcode Organizer `.xccrashpoint` bundles, `skills/xcsym-ref.md`), `xcui` (scriptable sim UI & accessibility testing, `skills/xcui-ref.md`), `xcprof` (structured xctrace CPU & network profile analysis, `skills/xcprof-ref.md`)
章节与文件索引
按说明文件中的顺序排列。
光标 MCP 工具边界
光标 UI 工具可用性
游标子代理路由
路由
使用 Axiom 技能
文件/命令 -> xclog · xcsym · xcprof · xclog launch · axiom_xclog_launch · xcsym crash · axiom_xcsym_crash · xcprof record
内容校验值 -> 68f0ddced705
当前原文的自动摘译,尚未人工审校。
光标 MCP 工具边界
下面的
xclog、xcsym和xcprof示例是参考语法,不是 Cursor 的可执行命令。将每个子命令映射到同名的 MCP 工具(例如,xclog launch到axiom_xclog_launch、xcsym crash到axiom_xcsym_crash、xcprof record到axiom_xcprof_record)并将其参数保留为结构化字段。不要运行裸助手二进制文件。如果所需的 MCP 工具不可用,请停止并报告 Axiom MCP 集成丢失;不要回退到同名的可执行文件。光标 UI 工具可用性
xcui是一个外部工具,不与 Cursor 插件捆绑在一起;它没有 Axiom MCP 包装器。 在 UI 自动化之前,请检查command -v xcui。游标子代理路由
当此路由器需要专门的审核员时,委托给适当的 Cursor 子代理。
路由
问题 · 阅读“如何使用 Axiom?” /“有哪些技能可用?” · Skills/getting-started.md “如何捕获控制台输出?” /“xclog 是什么?” · Skills/xclog-ref.md “如何象征崩溃?” /“xcsym 是什么?” /“为什么我的崩溃没有符号?” · Skills/xcsym-ref.md “如何驱动/验证 sim UI?” /“xcui 是什么?” /“如何编写可访问性检查脚本?” · 技能/xcui-ref.md
使用 Axiom 技能
以下内容是 Axiom 路由系统的核心规则 - 它建立了在任何 iOS/Swift 响应之前必须检查 Axiom 技能的规则。 <极其重要> 如果您认为 Axiom 技能有 1% 的机会适用于您的 iOS/Swift 任务,那么您绝对必须检查该技能。如果某项公理技能适用于您的 iOS/SWIFT 任务,您就别无选择。你必须使用它。