flows-code-review
Run the technical (code) review step of Flows app certification. Produces three artifacts under reviews/code-review/feedback-round-<N>/: review-files.md (per-file inventory), review-packages.md (dependency audit), and code-review-report.md (scored report with Must Fix / Should Fix / Nice Fix items). Use when the user asks for a Flows code review, technical review, pre-submit review, app certification code review, or "run flows-code-review". Re-run until 0 open Must Fix items remain before moving on to flows-design-review.
What this skill does
# Flows Code Review This skill is the **technical review** step of the Flows app certification flow: ``` flows-app-brief → build → flows-code-review (this skill, repeat until clean) → flows-design-review → flows-external-app-submit ``` ## Pre-checks Before starting, confirm: - `package.json` exists (Node/TS project) - We are inside a git repository (`git rev-parse --git-dir`) - If `App-Brief.md` is missing at repo root, warn the user that `flows-app-brief` should be run first, but continue. Determine the feedback round: look at `reviews/code-review/`. If it doesn't exist, use `feedback-round-1/`. Otherwise increment to the next missing round number. ## Step 1 — Load review guidance Before any scoring, read all relevant skill files. The skills ship alongside this skill in the same repo and are available locally. For each skill below, `Glob '**/skills/<name>/SKILL.md'` and `Read` the first match. **Required reads (always):** | Skill | Informs criteria | | --- | --- | | `correctness-and-error-handling` | 1.1 (bugs), 1.4 (tests), plus error-state patterns | | `security` | 1.2 (CDF via SDK), 1.3 (dependencies, CVEs) | | `dependencies-audit` | 1.3 (packages audit) | | `test-coverage` | 1.4 (coverage gate), 1.6 (testability) | | `code-quality` | 1.5 (dead code), 1.6 (patterns) | | `dm-limits-and-best-practices` | 2.1–2.5 (DMS query patterns, limits, rate) | | `performance` | 2.3–2.4 (pagination, call rate) | | `design` | 3.1 (Aura consistency) | **Conditional read:** - `setup-flows-auth` — read if the app imports `connectToHostApp`, `useHostApp`, or configures OAuth in Vite. **Note on DMS patterns:** the `dm-limits-and-best-practices` skill is the canonical local reference for search vs joins, cardinality, and query-time semantics — no external `semantic-knowledge/` submodule is needed. Do not proceed to scoring until all skill reads are complete. ## Step 2 — Build the file inventory (`review-files.md`) List **all `.ts` and `.tsx` files** in the app (exclude `node_modules`, `dist`, `.cognite-bundles`). For each file assess: - **Structure** (1–5): file size, single responsibility, clear organization - **Quality** (1–5): type safety, no `any`/`unknown` casts, proper error handling, no dead code, clean naming - **Patterns** (1–5 or N/A): DI/testability, correct platform patterns, no anti-patterns; `N/A` for pure utils/types - **Tests**: `✓` adequate | `⚠` has tests with meaningful gaps | `✗` no test file | `N/A` (presentational-only or barrel) Write to `reviews/code-review/feedback-round-<N>/review-files.md`: ```markdown ## File inventory: [app name] | File | Structure | Quality | Patterns | Tests | Notes | | ---- | --------- | ------- | -------- | ----- | ----- | | src/main.tsx | 5 | 5 | N/A | N/A | Clean entry point | | src/services/cdfHelper.ts | 3 | 2 | 2 | ✗ | No DI; raw sdk.get/post; no test file (1.2, 1.6, 2.5) | | ... | ... | ... | ... | ... | ... | ``` ## Step 3 — Build the package inventory (`review-packages.md`) Gather dependency state with two one-shot commands — do **not** loop per package (`npm view <pkg>` is one network call per package; 40–80 calls = 2–4 minutes): ```bash npm outdated --json 2>/dev/null || true # exits 1 when outdated packages exist — normal; parse stdout regardless npm audit --json 2>/dev/null || true # exits 1 when vulnerabilities exist — parse stdout regardless ``` From `npm outdated --json`: packages absent from the output are up-to-date; packages present show `current` / `wanted` / `latest`. Flag any in `dependencies` (not `devDependencies`) that are ≥ 1 major behind. From `npm audit --json`: parse severity counts and per-package advisory details. **Deprecated status:** `npm outdated` does not report this. Only spot-check with `npm view <pkg> deprecated` for packages that already triggered another flag (≥ 1 major behind, in audit advisories, or unfamiliar name). Assign health: **Pass** (up-to-date or ≤ 1 minor behind, 0 critical/high CVEs) | **Warn** (1 major behind in `dependencies`, or moderate CVE) | **Fail** (≥ 2 majors behind, or high/critical CVE, or deprecated). Write to `reviews/code-review/feedback-round-<N>/review-packages.md`: ```markdown ## Package audit: [app name] ### Dependencies | Package | Used version | Latest | Deprecated | CVEs | Health | | ------- | ------------ | ------ | ---------- | ---- | ------ | | react | ^18.2.0 | 18.3.1 | No | 0 | Pass | | some-old-lib | ^1.0.0 | 1.0.3 | No | 0 | Fail | | ... | ... | ... | ... | ... | ... | ### Security audit | Severity | Count | | -------- | ----- | | Critical | 0 | | High | 0 | | Moderate | 0 | | Low | 0 | #### Vulnerabilities | Package | Severity | Title | Patched in | Advisory | | ------- | -------- | ----- | ---------- | -------- | | example-pkg | High | Prototype pollution | >=2.1.0 | https://github.com/advisories/GHSA-xxxx | ``` ## Step 4 — Assess test coverage Run the test suite with coverage: ```bash npx vitest run --coverage # Vite/Vitest projects npx jest --coverage # Jest projects npm test -- --coverage # generic fallback ``` Record the output: framework, pass/fail counts, statement/branch/function/line percentages. If the test suite fails to run or no framework is configured, note explicitly — **absence of a working test setup is itself a finding for criterion 1.4**. **Hard gate:** Overall line coverage must be **≥ 80%** for the app to be approved. Coverage applies to all `.ts`/`.tsx` files under `src/` (excluding test files, type declarations, and `main.tsx`). Apps that exclude production files from coverage measurement must be re-measured at full scope. Coverage exclusions hiding untested code are themselves a finding. Also note per each non-trivial file: is there a corresponding `.test.ts` / `.spec.ts`? If not, mark `Tests: ✗` in the file inventory. Assess whether hooks and services use **dependency injection via React context** rather than direct imports (`vi.mock` usage is a red flag unless justified with a comment). ## Step 5 — Score the 12 criteria Evaluate all 12 criteria using the rubric below. For each, state the score and one or two sentences of evidence (file paths, patterns observed, or gaps). Mark **N/A** with explanation if a criterion is not applicable. ### 1.1 No known bugs **Check:** Open issues, obvious regressions, error paths untested, or `TODO: fix` in critical paths. | Score | Why | | ----- | --- | | 5 | No known defects; edge cases handled or explicitly out of scope with safe failure modes. | | 4 | Minor issues only; none affect core user flows or data integrity. | | 3 | Some known bugs or rough edges; workarounds exist or impact is limited. | | 2 | Material bugs, unreliable flows, or silent failures; users or data could be harmed. | | 1 | Broken primary flows, data corruption risk, or security-adjacent defects. | ### 1.2 CDF access via Cognite SDK only **Check:** All traffic to CDF goes through the official Cognite SDK. Flag any `fetch`/`axios`/raw REST to CDF-like URLs that bypasses the SDK. | Score | Why | | ----- | --- | | 5 | CDF usage is exclusively via the SDK; non-CDF calls are minimal and intentional. | | 4 | SDK used for CDF; one borderline or legacy call worth confirming. | | 3 | Mix of SDK and direct calls with weak justification. | | 2 | Repeated or critical paths use raw CDF HTTP instead of the SDK. | | 1 | Custom CDF clients, token handling outside SDK patterns, or undisclosed CDF endpoints. | ### 1.3 Dependencies and packages **Check:** `package.json` / lockfiles; unmaintained packages, duplicate majors, known CVEs, license issues, install scripts. | Score | Why | | ----- | --- | | 5 | Dependencies are current, trustworthy, and scanned; no red flags. | | 4 | Small updates or pinning tweaks needed; no serious supply-chain signals. | | 3 | Outdated or heavy deps; plan to upgrade documented. | | 2 | High-risk packages, excessive bundle, or unclear provenance. | | 1 | Known-vulnerable, deprecated, or malicious-adjacent dependenc
Related 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.