
Claude Skills by HoangNguyen0403
github.com/HoangNguyen0403Use pytest with pytest-asyncio for the async workflow. Patch the RPC and Postgres helpers at their external seams using fakes or monkeypatch, then assert the structured route/result, emitted calls, and failure behavior. Keep the test isolated from live network and DB and cover timeout, malformed data, and missing-environment paths.
Assert the parsed route fields and the structured outcome for valid input, then assert that malformed or unsupported input produces the intended error or blocker result. Use explicit pytest assert statements on route, metadata, and failure details rather than only checking a truthy output.
Run the verification chain in layers: ruff check, pyright or basedpyright, focused pytest for changed behavior, and python -m compileall -q on the changed runtime tree. Because this is workflow runtime code, also run the relevant integration or smoke checks and security gates, then inspect the real failure paths.
Keep one authoritative dependency surface per environment, enumerate every tracked requirements file in CI, and audit each one with the same security policy. Keep dependency reports and pip-audit coverage synchronized, and fail CI when a requirements surface is omitted or vulnerable.
Create the LambdaTest session with `appium:noReset: true` for resiliency, perform the login flow, collect evidence, and call session `delete` in a mandatory cleanup block even when a step fails.
Find the button semantically rather than with a hardcoded XPath or raw coordinates. Prefer an `accessibility id` or a `uiautomator` text match for `Submit`; use coordinates only for a raw Flutter canvas interaction after taking a screenshot and scaling to the window size.
TICK-1234’s AC, “User can view order history,” is not test-ready. It defines a goal but omits the Actor, authorization rules, data contract, platform behavior, and failure states. Assumption for analysis: `Customer` means an authenticated customer viewing only their own orders on both Web and Mobile. This must be confirmed. - What qualifies as “order history”: all orders, only completed orders, or also pending, canceled, failed, refunded, and returned orders? - Whether the newest or oldest or...
Assumption: The same rule applies to the relevant Actor on Mobile (and Web, if applicable). | Variable: Feature toggle | Variable: Order status | Reorder button | |---|---|---| | ON | Delivered | Visible | | ON | Not Delivered | Hidden | | OFF | Delivered | Hidden | | OFF | Not Delivered | Hidden | **Rule:** `Visible = (Toggle ON) AND (Status Delivered)`.
Before writing test cases, perform this impact analysis: - Confirm the rule: invoice download button is visible/enabled only for `Market: VN`; `MY` and `SG` must not show it. - Identify the `Actor` and permissions: customer, sales representative, admin, or other roles. Verify whether access differs by role. - Identify the market `Variable`: user profile market, invoice/order market, account configuration, or feature-flag configuration. Test mismatches between these values. - Check platform pa...
As a `{APP_NAME}` user, I want to see the product tax breakdown on product cards, so that I understand the price before tax, tax amount, and final price.
Not ready for development: the story has an unclear Actor, undefined price-change logic, buried platform scope, and “to discuss” translation behavior. **As a Customer, I want to see when an offer’s price changes, so that I can notice the updated price before purchasing.** - `previousPrice` - `currentPrice` - `priceChanged` - `userLanguagePreference` - Currency and rounding rules - Offer states: active, unavailable, expired **AC1 — `[MOBILE]` Price change is highlighted** Given the Customer is...
Write it as an atomic, market- and platform-scoped AC: **[BOTH] [Market: VN]** **Given** the Actor’s market `Variable = VN` **When** the tender status `Variable = Available` **Then** `{APP_NAME}` displays the `Tender Available` tag. Assuming the behavior applies to both Web and Mobile, `[BOTH]` is appropriate. If parity is unconfirmed, create separate `[WEB]` and `[MOBILE]` ACs. Additional implied ACs: - **[BOTH] [Market: VN]** Given tender status is not `Available`, when the Actor views it, ...
TICK-4521 - Acceptance criteria: Unable to retrieve without live Jira access. - Labels: Unable to verify whether `has-zephyr-tests` is present. - Linked components: Unable to retrieve. - Linked Zephyr test cases: Unable to verify existing links.
Assuming `TICK-T892` is the Zephyr Scale test case: 1. **Identify** existing links for Jira issue `TICK-3301` using **Get Issue Link Test Cases** to avoid duplicates. 2. Link the test case with SmartBear’s **Create Test Case Issue Link** tool, using: - Jira issue: `TICK-3301` - Zephyr test case: `TICK-T892` 3. Confirm the link appears as a Remote Link or Zephyr Issue Link. 4. Add one Jira comment: `Linked Zephyr Test Case: TICK-T892` 5. After the link succeeds, add the Jira label `has-zephyr-...
Assuming you have the Jira key and Zephyr permissions: 1. Identify the affected Jira issue by its unique key (for example, `TICK-123`) and review its Summary, Description, Acceptance Criteria, Components, reporter, assignee, and Story Points. 2. Use **Get Issue Link Test Cases** for that issue. Compare each linked Zephyr test case against the current checkout behavior and ACs. 3. Remove or unlink outdated Zephyr test cases and delete obsolete Jira links/comments. Remove unused labels, includi...
Run the sequence with a named session: `playwright-cli -s=verify-search open <url>`, then `playwright-cli -s=verify-search snapshot --aria` to assert the search results, capture a screenshot, inspect console output, and finish with `playwright-cli -s=verify-search close`.
Use the 🎭 Playwright CLI (Web Automation) workflow: start a named session, use `hover` or scroll to bring the sticky header into view, freeze animations if needed, then call `screenshot` for evidence. Close the session afterward.
Assumptions: On Mobile, a Sales Rep adds the product to the selected customer’s cart; a Customer adds it to their own cart. The product is in stock, and the user is authenticated. `1 Test Case = 1 Condition` and `No "OR" Logic`; divergent role and platform behavior is split into separate TCs. **Name:** `Mobile_Product_Add to Cart on Product Detail when user is a Sales Rep` **Priority:** High — Critical path **Preconditions:** - User is authenticated as a Sales Rep. - A customer account is sel...
“Verify checkout works for all payment methods” is too broad: - It tests multiple conditions and implicitly uses **“OR” Logic**. - It may cover multiple screens. - It violates the `Module_Action on Screen when Condition` naming convention. - It cannot isolate which payment method failed. Apply the guardrail: **1 Test Case = 1 Condition** on 1 screen. Split into separate TCs, for example: - `Checkout_Verify payment on Payment Screen when Credit Card is selected` - `Checkout_Verify payment on P...
Priority: Low. Why: Extra spacing in an iOS button label is a cosmetic, minor UI issue and does not block the critical path. High is reserved for critical-path or blocker bugs.
Run the coverage audit and produce `coverage_analysis_report.md`. Include an executive dashboard for covered, partial, and not-covered slots, an AC-to-TC heatmap with risk scores, and a prioritized action plan. Mark release blockers as HIGH and do not create new TCs in this analysis-only workflow.
Produce `coverage_analysis_report.md` with an AC-to-TC heatmap, independent Web/Mobile coverage slots, partial and uncovered gaps, and a `QE Debt` section for stale labels, combined steps, generic objectives, and missing traceability. This is read-only: do not create TCs.
Produce `coverage_analysis_report.md` with an Executive Dashboard showing coverage %, a risk-scored AC heatmap, a Prioritized Action Plan with P1 must-have TCs, and a release-readiness verdict. Use HIGH risk for release-blocking gaps and keep Web/Mobile slots separate.
Do not use this coverage-analysis workflow. Route the request to `zephyr-test-generation`: this is a TC creation request, not a read-only coverage audit. The coverage skill must not create cases.
Run impact analysis first with `Get Issue Link Test Cases`, then draft the Web-only case with a `Web_` name prefix and the correct Customer/VN role. After approval, create the test case and steps, then call `Create Test Case Issue Link` to link it to `{PROJECT}-{ID}`.
Run impact analysis with Step A direct `Get Issue Link Test Cases`, then Step B supplemental search. Map each AC to `Covered`, `Partial`, or `Not Covered`; update Covered cases only after showing a before/after diff and getting approval, and create only the needed new cases. Never create a duplicate.
Create separate cases for Sales Reps and Customers; do not combine actors with OR conditions. Since one AC row covers both platforms, set Platform to `Web and Mobile` and use no platform prefix. Populate the Roles field independently for each case.
Use a feature-first structure as the app grows: - Put each feature's screens, components, hooks, services, and tests together. - Keep cross-feature primitives in shared components and shared utilities. - Keep UI separate from business logic and data access. - Use absolute TypeScript imports and keep nesting to about three levels. Avoid root folders organized only by type, such as screens or containers. Each file should have one responsibility, and features should not import one another direct...
Split the 400-line screen by responsibility and keep the screen mostly declarative: - Keep JSX and screen-level event wiring in the screen component. - Move API calls and business rules into a feature service and a custom hook. - Colocate the screen, hook, service, and feature-specific components in one feature directory. - Move genuinely reusable UI to shared components, with styles defined through StyleSheet.create. The hook should expose loading, error, data, and actions; the screen should...
For a new Expo project, prefer Expo Router: it provides file-based routing, good web parity, and is built on React Navigation. Choose React Navigation directly when the app is legacy, has complex deep-linking requirements, or needs highly customized navigation behavior. Whichever you choose, document the decision and keep navigation separate from feature business logic. For a React Navigation setup, use typed param lists and a dedicated navigation layer; for Expo Router, keep route files thin...
Make the card a function component with a typed interface, a named export, and composition through children or small render slots. Keep data fetching and feature logic in a hook or container; the card should receive the data and callbacks it needs and focus on presentation. Use React Native primitives such as View and Text, not DOM elements. Define styles with StyleSheet.create, keep the file under about 250 lines, and use stable IDs for any lists. If features need different content, compose ...
Separate the screen into a container and presentational components. A custom hook or feature service should own API calls, state transitions, and business logic. The screen can call that hook and pass the resulting data, loading/error state, and callbacks into focused presentational components. Use function components only, TypeScript interfaces for props, and named exports. Keep each component small and single-purpose, define styles with StyleSheet.create, and use composition to avoid prop d...
Yes. A component declared inside the parent render function gets a new component identity on every parent render. That can cause it to remount, lose local state, reset effects, and do unnecessary work. Move it to module scope and pass the required values through typed props. If it is reusable, export it as a named function component; if its render cost is significant, consider React.memo after measuring. Keep its styles in StyleSheet.create and use children or composition instead of deeply dr...
Use an OTA system only for JavaScript and asset changes. Expo projects can use expo-updates with separate development, staging, and production channels; bare React Native projects can use CodePush with separate deployments. Neither can safely deliver native Objective-C, Swift, Java, Kotlin, or other native changes, which require a store release. Gate updates by release channel, publish from CI, and verify the artifact and rollback strategy before production. For EAS, a production update is pu...
Create separate development, preview or staging, and production configurations. With EAS, define matching profiles in eas.json and provide environment variables through the profile or CI secret store. With a bare app, use separate Android product flavors and iOS schemes. Keep environment files such as .env.dev, .env.staging, and .env.production out of version control when they contain secrets; react-native-config or the EAS environment facility can expose non-secret configuration at build tim...
Use a repeatable CI/CD pipeline. For Expo, define development, preview, and production profiles in eas.json, then run the production build with EAS for both platforms and submit the verified artifacts with EAS Submit. For bare React Native, automate Android flavors and iOS schemes with Fastlane and CI. Keep signing credentials and environment values in the CI secret store, not in source. Build and test each platform, verify the artifacts on the build service, and publish only after the intend...
Create a token layer such as theme/colors.ts, theme/spacing.ts, and theme/typography.ts. Replace each literal color with a color token, each spacing value with a spacing token, and each font size with a typography token. Import those tokens into component styles and define the styles with StyleSheet.create. For light and dark themes, expose the same token shape from separate theme objects or a theme provider so components do not contain mode-specific literals. Migrate incrementally, starting ...
Define semantic tokens for colors, spacing, and typography rather than using raw values in components. Provide light and dark token maps with the same interface, select the active theme using React Context and useColorScheme, and expose a typed useTheme hook. Components should consume theme.colors, theme.spacing, and theme.typography through StyleSheet-compatible style factories. This keeps mode switching centralized, avoids hardcoded values, and lets the design system evolve without editing ...
Make the design system the only source of styling tokens: export colors, spacing, and typography from the theme package and use them in StyleSheet.create or the themed styling layer. Avoid raw color, spacing, and font-size literals in feature components. Enforce this in CI with an ESLint rule or targeted custom lint rule that flags literal style values, plus code review checks and a small set of approved exceptions. A codemod can migrate existing code, while tests or linting should verify tha...
Declare a typed tab param list and create the navigator with createBottomTabNavigator using that type. Register each screen with a route name from the param list, and type screen components with NativeStackScreenProps or the appropriate bottom-tab props. Use stable route names and keep tab screens focused on UI and callbacks. If tabs are nested in a stack, use CompositeScreenProps for the combined navigation type. Keep navigator nesting shallow and use React Navigation's typed APIs rather tha...
Define a param list whose route entry describes the required parameters, for example Details: { itemId: string }. Type the screen's navigation prop from that list and call navigation.navigate with the route name and matching object. Routes without parameters should be typed as undefined. Use NativeStackScreenProps for stack screens and CompositeScreenProps for nested navigators. Pass only small IDs through route.params; keep larger domain objects in shared state, and do not navigate from busi...
Configure a linking prop on NavigationContainer with prefixes for the custom scheme and universal-link domain, then map URL paths to typed routes through linking.config. Handle unmatched paths with a 404 or safe fallback and validate all incoming parameters before using them. On iOS, configure Associated Domains and the apple-app-site-association file. On Android, configure the intent filter and assetlinks.json for the App Link. Test cold start, warm start, and invalid URLs on both platforms;...
Define a RootStackParamList containing every route and its parameter shape, then create a native stack navigator from that type. Wrap it in NavigationContainer and type each screen with NativeStackScreenProps; use CompositeScreenProps when navigators are nested. Use route.params only for small, typed identifiers. Keep complex data in global state, keep navigation out of business services, and avoid stringly typed routes. For a new Expo app, consider Expo Router instead because it provides fil...
Configure the NavigationContainer linking prop with a prefix array for the app scheme and web/universal-link domains, then map URL paths to typed routes in linking.config. Include a fallback or 404 screen for paths that do not match. Validate and sanitize route parameters before fetching or navigating. Configure the platform association files as well: Universal Links on iOS and App Links on Android. Do not manually parse URLs in screens; let React Navigation resolve them through the linking c...
Treat the userId as untrusted input. Type the route parameter, validate its format before the request, and handle a missing or unauthorized record as an explicit not-found or error state instead of assuming the fetch succeeds. Render loading, error, and 404 or redirect-to-Home states without dereferencing missing data. The linking configuration should map the URL to the typed route, while the screen or service performs validation and the backend remains authoritative. Avoid manual URL parsing...
In a bare app, install and configure @react-native-firebase/messaging, including the Firebase files, Android notification channel, and iOS APNs capability and provisioning. Request notification permission after a short rationale rather than unconditionally on launch. Register handlers for all lifecycle states: onMessage for foreground, onNotificationOpenedApp for background opens, and getInitialNotification for a quit-state launch. Normalize and validate payload data before turning it into na...
Do not request permission during the first render. Show an in-app explanation at a useful point in the user journey, explain the benefit, and request system authorization only after the user opts in. Persist enough state to avoid repeatedly showing the rationale, while still honoring the platform's denied or restricted result. Configure the Android channel and iOS APNs settings separately, and handle foreground, background, and quit notification lifecycles. If permission is denied, keep the a...
Handle notification opens in every lifecycle: onNotificationOpenedApp for a background app, getInitialNotification for a quit launch, and onMessage for foreground behavior. Extract only a validated route and parameter from the payload, wait until NavigationContainer is ready, then navigate through the typed linking or navigation API. Do not trust arbitrary payload data or pass sensitive tokens in a notification deep link. Route unknown or invalid targets to a safe screen and test cold start, ...
Use FlatList rather than rendering all 1000 rows in a ScrollView. Give each item a stable unique key through keyExtractor; memoize an item component; and keep renderItem, callbacks, and derived props stable where useful. Tune windowSize to about 5–10 for memory-heavy lists, set initialNumToRender to the first viewport, and limit maxToRenderPerBatch to about 5–10. For fixed-height rows, provide getItemLayout, and enable removeClippedSubviews on Android. Profile before and after to confirm whet...
Profile first with React DevTools or Flipper and determine whether the UI thread, JS thread, rendering, or network is responsible. Verify Hermes is enabled, remove unnecessary renders with React.memo, useMemo, and useCallback where they address measured work, and keep large collections in FlatList with stable keys. Use the native animation driver or Reanimated 3 for animations, avoid heavy JS work on each frame, cache and resize images, and batch network requests. Strip production console log...