new-api-support

Add introspection support for new SwiftUI APIs to ViewInspector.

2.6k|190|Updated Nov 16, 2019
One-click install
npx skills add https://github.com/nalexn/ViewInspector --skill new-api-support
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: new-api-support
Source: https://github.com/nalexn/ViewInspector/tree/main/.claude/skills/new-api-support
Command: npx skills add https://github.com/nalexn/ViewInspector --skill new-api-support

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables developers to add introspection support for a newly discovered SwiftUI API (view type, modifier, or View extension function) into ViewInspector, reducing manual boilerplate and accelerating test coverage.

Core Features & Use Cases

  • API discovery & cataloging: Identify the SwiftUI entity in the local SDK and document available variants and availability.
  • Code scaffolding: Generate the necessary ViewType or Modifier wrappers, and integrate into tests and metadata.
  • Test & documentation updates: Create or adjust unit tests and readiness docs to reflect the new API, ensuring cross-platform availability.
  • Use Case: When you run new-api-support for ContentUnavailableView, the skill will add introspection support so the entity can be inspected in tests via ViewInspector.

Quick Start

Use the tool to add introspection support for a new SwiftUI API, e.g., /new-api-support ContentUnavailableView.

Frequently Asked Questions about new-api-support

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add introspection support for a new SwiftUI view type in ViewInspector?

To add introspection support for a new SwiftUI view type in ViewInspector, you catalog the entity's local SDK availability and generate corresponding ViewType or Modifier wrappers. This scaffolds the code structures needed to inspect the new view type.

What is SwiftUI API introspection and when do I need to extend it?

SwiftUI API introspection allows testing frameworks to inspect and verify view hierarchies. You need to extend it when a newly discovered SwiftUI view, modifier, or extension function lacks existing wrapper support in the ViewInspector library.

Does ViewInspector automatically generate unit tests for new SwiftUI modifiers?

Yes, extending ViewInspector for new SwiftUI modifiers includes wiring unit tests. The process scaffolds the Modifier wrappers and creates or adjusts test cases to verify the new API integration.

Can I use this approach to inspect cross-platform SwiftUI availability attributes?

Yes, API cataloging mirrors SDK availability attributes across supported platforms. This ensures the generated ViewType wrappers and readiness documentation accurately reflect the cross-platform SwiftUI availability.

What is the best way to document new ViewInspector API readiness?

The best way to document new ViewInspector API readiness is by updating readiness docs during the scaffolding process. This reflects the newly integrated SwiftUI entity and records its cross-platform availability.