appbuilder-testing
Generate and run tests for Adobe App Builder actions and UI components. Scaffolds Jest unit tests, integration tests against deployed actions, contract tests for Adobe API interactions, and React component tests using Testing Library. Provides mock helpers for State, Files, Events SDKs, @adobe/aio-lib-* clients, ExC Shell context (@adobe/exc-app), and UIX Guest SDK (@adobe/uix-guest). Use this skill whenever the user mentions testing App Builder actions, writing unit tests for Runtime actions, creating integration tests, mocking Adobe SDKs, setting up test fixtures, running aio app test, or wants to verify action behavior before deployment. Also trigger when users mention Jest configuration for App Builder, test coverage, CI test setup, React component test, Testing Library, UI test, Provider wrapper, test my page, test my form, test my table, test my component, mock shell context, mock extension context, debug test failures, or fix Jest errors.
What this skill does
# App Builder Testing
Generate and run Jest tests for Adobe App Builder actions and React Spectrum UI components. Scaffolds unit tests, integration tests, component tests, and mock helpers for Adobe SDKs.
## Pattern Quick-Reference
Pick the template or reference that matches the user's intent. Default to `assets/unit-test-template.js` for generic test requests.
| User wants | Reference | Template / Asset |
| --- | --- | --- |
| Unit test for an existing action | references/testing-patterns.md | assets/unit-test-template.js |
| Integration test against deployed action | references/testing-patterns.md | assets/integration-test-template.js |
| Component test for React Spectrum UI | references/component-testing-patterns.md | assets/component-test-template.js |
| Mock ExC Shell context in tests | references/component-testing-patterns.md | assets/shell-mock-helper.js |
| Mock AEM extension context in tests | references/component-testing-patterns.md | assets/uix-guest-mock-helper.js |
| Mock State SDK in tests | references/mock-catalog.md | assets/mock-state-sdk.js |
| Mock Files SDK in tests | references/mock-catalog.md | assets/mock-files-sdk.js |
| Mock Events SDK in tests | references/mock-catalog.md | assets/mock-events-sdk.js |
| Mock Database SDK in tests | references/mock-catalog.md | assets/mock-database-sdk.js |
| Full mock catalog (all SDKs) | references/mock-catalog.md | — |
| Contract test for API interactions | references/testing-patterns.md | — |
| Pre-deployment verification | references/checklist.md | — |
| Debug test failures | references/debugging.md | — |
## Fast Path (for clear requests)
When the user's request maps unambiguously to a single pattern above — they name a specific test type, reference a template, or describe a use case that clearly matches one entry — skip straight to generation. Use the matched template and proceed directly.
Examples of fast-path triggers:
- "Write tests for my action" → Read the action source, use `assets/unit-test-template.js`, generate immediately
- "Help me mock State SDK" → Use `assets/mock-state-sdk.js`, inject into test file
- "Add integration tests" → Use `assets/integration-test-template.js`, configure for deployed action
- "Run tests with coverage" → Execute `npx jest --coverage` or `aio app test`
- "Test my component/page/form/table" → Read the component source, use `assets/component-test-template.js`, wrap in Provider
- "Mock shell context" → Use `assets/shell-mock-helper.js`, inject into test file
- "Test my AEM extension component" → Use `assets/uix-guest-mock-helper.js` + `assets/component-test-template.js`
If there is any ambiguity — multiple test types needed, project structure unclear, or the user hasn't specified enough — fall through to the full workflow below.
## Quick Reference
- **Test directory:** Place test files in `test/` mirroring the action path, e.g., `test/actions/<action-name>/index.test.js`.
- **Jest configuration:** App Builder projects use Jest by default. Config lives in `package.json` or `jest.config.js`.
- **Test command:** `aio app test` (wrapper) or `npx jest --coverage` (direct).
- **Mock pattern:** Use `jest.mock()` at the top of test files to mock Adobe SDK dependencies before importing the action.
- **Response shape:** All actions return `{ statusCode, body }` — assert both in every test.
- **Error paths:** Always test 200 (success), 400 (bad input), and 500 (SDK failure) scenarios.
- **CommonJS:** Action test files use `require()` and `module.exports` (not ES imports).
- **Component test directory:** `test/web-src/components/<ComponentName>.test.js` (or `test/components/`).
- **Provider wrapper:** Always wrap in `<Provider theme={defaultTheme}>` — Spectrum renders nothing without it.
- **ARIA selectors:** Use `getByRole()`, not CSS classes — see `references/component-testing-patterns.md` selector table.
- **Async testing:** Use `findBy*` for data that appears async, `queryBy*` for absence, `waitFor` for state changes.
## Full Workflow (for ambiguous or complex requests)
1. **Scan project structure** — Check for existing `test/` directory, `jest.config.js`, and test scripts in `package.json`. Scan both `src/` for actions AND `web-src/` for UI components.
2. **Identify targets to test** — Parse `ext.config.yaml` (or `app.config.yaml`) for declared actions and their source paths. Check `web-src/src/components/` for React components.
3. **Determine test types needed** — Unit tests for logic, integration tests for deployed actions, contract tests for API interactions.
4. **For each action:**a. Read the action source to identify SDK dependencies (State, Files, Events, Logger, etc.).b. Generate unit test using `assets/unit-test-template.js` as the base.c. Inject appropriate mocks from `references/mock-catalog.md` based on detected dependencies.d. Add error scenario tests (missing params, auth failures, SDK errors).
5. **For each UI component:**a. Read the component source to identify dependencies (shell context, UIX guest, action calls).b. Generate component test using `assets/component-test-template.js` as the base.c. Wrap all renders in `<Provider theme={defaultTheme}>` — Spectrum renders nothing without it.d. Inject shell mock (`assets/shell-mock-helper.js`) or UIX guest mock (`assets/uix-guest-mock-helper.js`) as needed.e. Add loading, success, and error state tests for async data using `findBy*` and `waitFor`.
6. **Run tests** — Execute `aio app test` or `npx jest --coverage` and report results.
7. **Validate** — Check against `references/checklist.md` before marking done.
## Example User Prompts
- "Write unit tests for my generic action"
- "Add integration tests for my deployed action"
- "My action uses State SDK — help me mock it in tests"
- "Run tests and show me coverage"
- "Set up Jest for my App Builder project"
- "Test my action handles errors properly"
- "Write component tests for my data table page"
- "Test my AEM extension panel component"
- "Help me mock shell context in my tests"
- "Add tests for my React Spectrum form"
## Inputs To Request
- Current repository path and action file locations
- Which actions need tests (or test all declared actions)
- Target test types: unit, integration, contract, or all
- Whether action is deployed (needed for integration tests)
## Deliverables
- Test files in `test/` matching the action directory structure
- Component test files in `test/web-src/components/` for UI components
- Mock helpers for detected Adobe SDK dependencies
- Shell or UIX Guest mock helpers when components depend on context SDKs
- Jest configuration if not already present (including jsdom environment for component tests)
- Coverage report from test execution
## Quality Bar
- Every action test covers at minimum: success (200), bad input (400), and SDK failure (500) paths
- Mocks are isolated per test via `beforeEach(() => jest.clearAllMocks())`
- No real SDK calls in unit tests — all external dependencies are mocked
- Tests are deterministic and can run offline (no network dependencies in unit tests)
- Coverage reporting is enabled (`--coverage` flag)
- All component tests wrap in `<Provider theme={defaultTheme}>` — Spectrum renders nothing without it
## References
- Use `references/testing-patterns.md` for unit, integration, and contract test patterns with annotated examples.
- Use `references/component-testing-patterns.md` for React Spectrum component testing with Provider wrapping, ARIA selectors, and async patterns.
- Use `references/mock-catalog.md` for mock helpers covering all Adobe SDKs (State, Files, Events, Logger, Database, Shell, UIX Guest).
- Use `references/checklist.md` for pre-deployment test verification.
- Use `assets/unit-test-template.js` for Jest unit test boilerplate (CommonJS).
- Use `assets/integration-test-template.js` for integration test against deployed actions.
- Use `assets/component-test-template.js` for React Spectrum component test boilerplate with `renderWithSpectrum()` helper.
- Use `assetRelated in Design
contribute
IncludedLocal-only OSS contribution command center. Auto-refreshes the user's in-flight PR and issue state on invoke so conversations start with full context — no need to brief Claude on what's in flight. Helps the user find issues to contribute to on GitHub, builds per-repo dossiers of what each upstream expects (CLA, DCO, branch convention, AI policy, draft-first, review bots, issue templates), runs deterministic gates before any external action so AI-assisted contributions don't reach maintainers as slop. State is markdown-only: candidate files at ~/.contribute-system/candidates/, repo dossiers at ~/.contribute-system/research/, append-only event log at ~/.contribute-system/log.jsonl. No database, no cloud calls. Use when the user asks about their PRs / issues / contributions, wants to find new work to take on, claim an issue, build/refresh a repo's dossier, or draft a Design Issue or PR. Trigger with "/contribute", "what's my PR status", "find a contribution", "claim issue X", "draft a Design Issue for Y", "refresh dossier for Z".
architectural-analysis
IncludedUser-triggered deep architectural analysis of a codebase or scoped subtree across eight modes — information architecture, data flow, integration points, UI surfaces, interaction patterns, data model, control flow, and failure modes. This skill should be used when the user asks to "diagram this codebase," "map the architecture," "show the data flow," "give me an ERD," "trace control flow," "find the integration points," "verify the layout pattern," "audit the UX architecture," or any similar request whose primary deliverable is mermaid diagrams plus cited reports under docs/architecture/. Dispatches haiku/sonnet sub-agents in parallel for per-mode exploration, then verifies every citation mechanically before any node lands in a diagram. Not for one-off prose explanations of code (use code-explanation) or for high-level system design from scratch (use system-design).
mcp
IncludedModel Context Protocol (MCP) server development and tool management. Languages: Python, TypeScript. Capabilities: build MCP servers, integrate external APIs, discover/execute MCP tools, manage multi-server configs, design agent-centric tools. Actions: create, build, integrate, discover, execute, configure MCP servers/tools. Keywords: MCP, Model Context Protocol, MCP server, MCP tool, stdio transport, SSE transport, tool discovery, resource provider, prompt template, external API integration, Gemini CLI MCP, Claude MCP, agent tools, tool execution, server config. Use when: building MCP servers, integrating external APIs as MCP tools, discovering available MCP tools, executing MCP capabilities, configuring multi-server setups, designing tools for AI agents.
react-native-skia
IncludedDesign, build, debug, and optimise high-polish animated graphics in React Native or Expo using @shopify/react-native-skia, Reanimated, and Gesture Handler. Use when the user wants canvas-driven UI, shaders, paths, rich text, image filters, sprite fields, Skottie, video frames, snapshots, web CanvasKit setup, or performance tuning for custom motion-heavy elements such as loaders, hero art, cards, charts, progress indicators, particle systems, or gesture-driven surfaces. Also use when the user asks for fluid, glow, glass, blob, parallax, 60fps/120fps, or GPU-friendly animated effects in React Native, even if they do not explicitly say "Skia". Do not use for ordinary form/layout work with standard views.
plaid
IncludedProduct Led AI Development — guides founders from idea to launched product. Six capabilities: Idea (discover a product idea), Validate (pressure-test the idea against fatal flaws, problem reality, competition, and 2-week MVP feasibility), Plan (vision intake + document generation), Design (translate image references into a design.md spec), Launch (go-to-market strategy), and Build (roadmap execution). Use when someone says "PLAID", "plaid idea", "help me find an idea", "product idea", "idea from my business", "idea from my expertise", "plaid validate", "validate my idea", "pressure-test", "is this idea good", "find fatal flaws", "validate the problem", "plan a product", "define my vision", "generate a PRD", "product strategy", "plaid design", "design from image", "translate image to design", "create design.md", "extract design tokens", "plaid launch", "go-to-market", "launch plan", "GTM strategy", "launch playbook", "plaid build", "build the app", "start building", or "execute the roadmap".
nextjs-framer-motion-animations
IncludedAdds production-safe Motion for React or Framer Motion animations to Next.js apps, including reveal, hover and tap micro-interactions, whileInView, stagger, AnimatePresence, layout and layoutId transitions, reorder, scroll-linked UI, and lightweight route-content transitions. Use when the user asks to add, refactor, or debug Motion or Framer Motion in App Router or Pages Router codebases, especially around server/client boundaries, reduced motion, LazyMotion, bundle size, hydration, or route transitions. Avoid for GSAP-style timelines, WebGL or 3D scenes, heavy scroll storytelling, or CSS-only effects unless Motion is explicitly requested.