前端设计
- 作者仓库星标 977
- 叉子 74
- 许可证 MIT
- 作者更新于 2026年6月15日 03:09
- 作者仓库 Axiom
- 领域
- 通用
- 兼容 Agent
-
- Claude Code
- Cursor
- Cline
- Codex
- Windsurf
- Gemini CLI
- +20
- 信任分
- 94 / 100 · 已通过审计
- 作者 / 版本 / 许可
- @CharlesWiltgen · MIT
- Token 消耗评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部 API Key
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 底层运行要求
- 无特殊要求
- 文件与系统权限
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 26 条
档案由构建时根据 SKILL.md 与安装命令自动衍生,可能与作者实际意图存在差异。
需要注意: 未限定 allowed-tools,默认拥有全部工具权限。
---
name: axiom-swiftui
description: Use when building, fixing, or improving ANY SwiftUI UI — views, navigation, layout, animations…
category: 通用
runtime: 无特殊运行时
---
# axiom-swiftui 输出预览
## PART A: 任务判断
- 适用问题:通用任务拆解、检查和交付。
- 输入要求:目标材料、限制条件、期望输出和验收方式。
- 证据边界:围绕“Quick Reference / Non-SwiftUI UI Routes / Conflict Resolution”读取原文规则,不把推断写成作者承诺。
## PART B: 执行结果
- **01** 任务判断:确认你的需求是否属于通用任务拆解、检查和交付,并标出输入、限制和预期结果。
- **02** 执行计划:优先按“Quick Reference / Non-SwiftUI UI Routes / Conflict Resolution”拆成步骤,说明每一步会读取什么、修改什么、产出什么。
- **03** 交付结果:给出可复制的命令、文件改动、检查清单或内容草稿,并说明如何继续迭代。
- **04** 风险边界:结合 读取文件、写入/修改文件、主要在本地完成、通常不需要额外 API Key 给出执行前确认项。
## Running Rules
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先小样例验证,再放大到真实任务。
- 交付时同时给结果、检查口径和下一步迭代建议。 原文出现了 `/skill`、`/axiom` 这类斜杠命令;如果你的 Agent 支持命令触发,优先用命令开场,再补充目标和边界。
告诉 Agent 目标文件或材料、期望结果、不可改范围、是否允许联网或执行命令。本 Skill 的权限画像是:读取文件、写入/修改文件。
先用一个小任务确认它会围绕“Quick Reference / Non-SwiftUI UI Routes / Conflict Resolution”工作;涉及文件或命令时,先看 diff、日志、预览或测试结果。
检查最终产物是否包含明确结果、必要证据和下一步动作;如果输出泛泛而谈,就补充输入、边界和验收标准后重跑。
---
name: axiom-swiftui
description: Use when building, fixing, or improving ANY SwiftUI UI — views, navigation, layout, animations…
category: 通用
source: CharlesWiltgen/Axiom
---
# axiom-swiftui
## 什么时候使用
- SwiftUI 界面卡顿、导航混乱或状态不刷新时提供排查路径 适合处理通用任务拆解、检查、交付和复盘,核心价值是把输入、判断、执行、验证和交付边界固定下来,避免 Agent 泛泛回答。 把任务拆成可执行、可检查、可继续迭代的步骤;通常不…
- 面向通用任务拆解、检查和交付,优先处理能明确输入、步骤和验收标准的工作。
## 需要提供什么
- 目标材料、目录范围、期望结果和不可改动内容。
- 是否允许联网、执行命令、读写文件或调用外部服务。
## 执行规则
- 围绕「Quick Reference / Non-SwiftUI UI Routes / Conflict Resolution」组织步骤,不把推断写成作者事实。
- 读取文件、写入/修改文件;主要在本地完成;通常不需要额外 API Key。
- 先跑小样例,确认结果可检查后再扩大任务范围。
## 输出要求
- 给出最终产物、关键证据、验证方式和下一步动作。
- 信息不足时标记 unknown,不编造命令、平台或依赖。 作者原文负责流程事实;仓库文件负责来源和命令;流狐只补充适用场景、限制和质量判断。
skill "axiom-swiftui" {
输入层 -> 用户目标 + 目标文件 + 禁止范围 + 验收标准
上下文层 -> Quick Reference / Non-SwiftUI UI Routes / Conflict Resolution
规则层 -> SKILL.md 触发条件 / 执行顺序 / 输出格式
运行层 -> 无特殊运行时 | 读取文件、写入/修改文件 | 主要在本地完成
安全层 -> 通常不需要额外 API Key + 小任务验证 + diff / 日志复核
输出层 -> 可复制结果 + 检查清单 + 下一步迭代
} SwiftUI
You MUST use this skill for ANY SwiftUI work including views, state, navigation, layout, animations, architecture, gestures, and debugging.
Quick Reference
| Symptom / Task | Reference |
|---|---|
| View not updating | See skills/debugging.md |
| View update still broken after debugging | See skills/debugging-diag.md |
Slow previews / building good previews / @Previewable / PreviewModifier / variant matrix |
See skills/previews.md |
Preview API reference (#Preview, traits, modes, Development Assets) |
See skills/previews-ref.md |
| Preview crashes / won't load | See skills/debugging.md (Preview Crashes section) |
| Navigation issues | See skills/nav.md |
| Navigation still broken after debugging | See skills/nav-diag.md |
| Navigation API reference | See skills/nav-ref.md |
| Layout breaks on iPad/rotation | See skills/layout.md |
| Layout API reference | See skills/layout-ref.md |
| Performance/lag/slow scroll | See skills/swiftui-performance.md |
| Architecture/testability | See skills/architecture.md |
| Animation issues | See skills/animation-ref.md |
| Stacks/grids/outlines | See skills/containers-ref.md |
| Custom containers / List replacement (iOS 18+) | See skills/containers-ref.md Part 7 |
| Search implementation | See skills/search-ref.md |
| Toolbars, ToolbarItem, sheet button placement, customization | See skills/toolbars.md |
| Gesture conflicts | See skills/gestures.md |
| iOS 26 features | See skills/26-ref.md |
Non-SwiftUI UI Routes
These topics are part of the broader iOS UI domain but live in separate suites:
UIKit issues
- Auto Layout conflicts → See axiom-uikit (skills/auto-layout-debugging.md)
- Animation timing → See axiom-uikit (skills/uikit-animation-debugging.md)
- SwiftUI ↔ UIKit bridging → See axiom-uikit (skills/uikit-bridging.md)
Design & guidelines
- Liquid Glass adoption → See axiom-design (skills/liquid-glass.md)
- SF Symbols → See axiom-design (skills/sf-symbols.md)
- HIG compliance → See axiom-design (skills/hig.md)
- Typography → See axiom-design (skills/typography-ref.md)
- TextKit/rich text → See axiom-uikit (skills/textkit-ref.md)
Other
- tvOS (focus, remote, text input) → See axiom-swift (skills/tvos.md)
- App-level composition (root, auth, scenes) → See axiom-design (skills/app-composition.md)
- Drag/drop, sharing, copy/paste → See axiom-swift (skills/transferable-ref.md)
- VoiceOver, Dynamic Type →
/skill axiom-accessibility - UI test flakiness →
/skill axiom-testing - UX dead ends, dismiss traps → Launch
ux-flow-auditoragent
watchOS-specific patterns
- Glanceable UI, watch navigation, Smart Stack widgets → See axiom-watchos
Conflict Resolution
axiom-swiftui vs axiom-performance: When UI is slow (e.g., "SwiftUI List slow"):
- Try axiom-swiftui FIRST — Domain-specific fixes (LazyVStack, view identity, @State optimization) often solve UI performance in 5 minutes
- Only use axiom-performance if domain fixes don't help — Profiling takes longer and may confirm what domain knowledge already knows
Decision Tree
digraph swiftui {
start [label="SwiftUI issue" shape=ellipse];
what [label="What's wrong?" shape=diamond];
start -> what;
what -> "skills/debugging.md" [label="view not updating"];
what -> "skills/nav.md" [label="navigation"];
what -> "skills/swiftui-performance.md" [label="slow/lag"];
what -> "skills/layout.md" [label="adaptive layout"];
what -> "skills/containers-ref.md" [label="stacks/grids/outlines"];
what -> "skills/architecture.md" [label="feature architecture"];
what -> "skills/animation-ref.md" [label="animations"];
what -> "skills/gestures.md" [label="gestures"];
what -> "skills/search-ref.md" [label="search"];
what -> "skills/toolbars.md" [label="toolbars / sheet buttons"];
what -> "skills/26-ref.md" [label="iOS 26 features"];
what -> "skills/previews.md" [label="slow previews / building good previews"];
what -> "skills/previews-ref.md" [label="preview API reference"];
what -> "skills/debugging.md" [label="preview crashes / won't load"];
what -> "axiom-uikit (skills/uikit-bridging.md)" [label="UIKit interop"];
what -> "axiom-design (skills/app-composition.md)" [label="app-level (root, auth)"];
what -> "axiom-swift (skills/transferable-ref.md)" [label="drag/drop, sharing"];
}
Automated Scanning
- Architecture audit → Launch
swiftui-architecture-auditoragent - Performance scan → Launch
swiftui-performance-analyzeragent or/axiom:audit swiftui-performance - Navigation audit → Launch
swiftui-nav-auditoragent or/axiom:audit swiftui-nav - Layout audit → Launch
swiftui-layout-auditoragent or/axiom:audit swiftui-layout - UX flow audit → Launch
ux-flow-auditoragent or/axiom:audit ux-flow - Liquid Glass scan → Launch
liquid-glass-auditoragent or/axiom:audit liquid-glass(detects migration opportunities AND adoption-completeness gaps: variant discipline for media surfaces, glass-on-glass nesting, missingif #availablegates, primary-action tinting,.tabRole(.search); scores ADOPTED / PARTIAL / NOT ADOPTED) - TextKit scan → Launch
textkit-auditoragent or/axiom:audit textkit(detects fallback triggers, glyph APIs that corrupt complex scripts, missing Writing Tools wiring, AND architectural gaps like missing fallback observation, SwiftUI wrappers dropping TextKit 2 properties, missingisWritingToolsActiveguards; scores MODERN / MIXED / LEGACY)
Anti-Rationalization
| Thought | Reality |
|---|---|
| "Simple SwiftUI layout, no need" | SwiftUI layout has 12 gotchas. skills/layout.md covers all of them. |
| "I know how NavigationStack works" | Navigation has state restoration, deep linking, and identity traps. skills/nav.md prevents 2-hour debugging. |
| "It's just a view not updating" | View update failures have 4 root causes. skills/debugging.md diagnoses in 5 min. |
| "I'll just add .animation()" | Animation issues compound. skills/animation-ref.md has the correct patterns. |
| "No architecture needed" | Even small features benefit from separation. skills/architecture.md prevents refactoring debt. |
| "I know .searchable" | Search has 6 gotchas. skills/search-ref.md covers all of them. |
| "I'll just add a Done button" | Sheets without Cancel break the HIG (updated 2026-03-24). .cancellationAction / .confirmationAction produce HIG-correct placement automatically — skills/toolbars.md Pattern 2 has the rules. |
| "Previews are slow forever, I'll just use the simulator" | Five concrete fixes in skills/previews.md. Rule 4 (auto-refresh off) is 30 seconds and often halves perceived slowness. |
"I'll just write a wrapper view for @State in this preview" |
@Previewable @State (Xcode 16+) eliminates that boilerplate. skills/previews-ref.md has the macro signature. |
先判断是否适合
作者设计意图
作者的方法与取舍
边界和复核