← 返回
未分类 中文

App Intents Code Review

Reviews App Intents code for intent structure, entities, shortcuts, and parameters. Use when reviewing code with import AppIntents, @AppIntent, AppEntity, Ap...
审查 App Intents 代码的意图结构、实体、快捷方式和参数。用于审查包含 import AppIntents、@AppIntent、AppEntity 等的代码。
anderskev anderskev 来源
未分类 clawhub v1.2.1 2 版本 99776.3 Key: 无需
★ 0
Stars
📥 446
下载
💾 2
安装
2
版本
#latest

概述

App Intents Code Review

Quick Reference

Issue TypeReference
-----------------------
AppIntent protocol, perform(), return typesreferences/intent-structure.md
AppEntity, EntityQuery, identifiersreferences/entities.md
AppShortcutsProvider, phrases, discoveryreferences/shortcuts.md
@Parameter, validation, dynamic optionsreferences/parameters.md

Review Checklist

  • [ ] perform() marked with @MainActor if accessing UI/main thread resources
  • [ ] perform() completes within 30-second timeout (no heavy downloads/processing)
  • [ ] Custom errors conform to CustomLocalizedStringResourceConvertible
  • [ ] EntityQuery.entities(for:) handles missing identifiers gracefully
  • [ ] EntityStringQuery used if Siri voice input needed (not plain EntityQuery)
  • [ ] suggestedEntities() returns reasonable defaults for disambiguation
  • [ ] AppShortcut phrases include .applicationName parameter
  • [ ] Non-optional @Parameter has sensible defaults or uses requestValue()
  • [ ] @IntentParameterDependency not used on iOS 16 targets (crashes)
  • [ ] Phrases localized in AppShortcuts.strings, not Localizable.strings
  • [ ] App Intents defined in app bundle, not Swift Package (pre-iOS 17)
  • [ ] isDiscoverable = false for internal/widget-only intents

When to Load References

  • AppIntent protocol implementation -> intent-structure.md
  • Entity queries, identifiers, Spotlight -> entities.md
  • App Shortcuts, phrases, discovery -> shortcuts.md
  • Parameter validation, dynamic options -> parameters.md

Review Questions

  1. Does perform() handle timeout limits for long-running operations?
  2. Are entity queries self-contained (no @Dependency injection in Siri context)?
  3. Do phrases read naturally and include the app name?
  4. Are SwiftData models passed by persistentModelID, not directly?
  5. Would migrating from SiriKit break existing user shortcuts?

Hard gates (before reporting)

Complete in order for each finding you intend to report. Do not advance until the pass condition is satisfied.

  1. Location artifact — The finding includes [FILE:LINE] (or a line range) copied from the current file contents; the path resolves in this repo.
  2. Scope read — You read the full surrounding type: the AppIntent / AppEntity / EntityQuery / AppShortcutsProvider (or equivalent) that contains the flagged code, not only a diff hunk or snippet.
  3. Platform or integration claim (only if the finding depends on minimum iOS, Swift Package vs app target, @IntentParameterDependency availability, SiriKit migration, or isDiscoverable / extension placement) — You name one concrete artifact you inspected (for example IPHONEOS_DEPLOYMENT_TARGET or target membership in the Xcode project, Package.swift platforms, entitlements, or where the intent file lives) or you drop or downgrade the finding to an open question.
  4. Protocol — Pre-report steps in review-verification-protocol are satisfied for this item (no finding if they are not).

Use the issue format [FILE:LINE] ISSUE_TITLE for each reported finding. Hard gate 4 is the full pre-report checklist for this skill’s review type.

版本历史

共 2 个版本

  • v1.2.1 当前
    2026-05-03 07:04 安全 安全
  • v1.2.0
    2026-03-31 05:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

dev-programming

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 677 📥 326,954
ai-agent

Deepagents Implementation

anderskev
使用 Deep Agents 实现代理,适用于创建代理、配置后端、定义子代理、添加中间件或设置...
★ 0 📥 683
dev-programming

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 72 📥 181,725