Matrix logo

Skills Reference: Planning, Review, QA, Code Quality, CLI, and Performance

Skill packs for project planning, PR review, QA discussion, code quality, CLI design, and performance optimization in matrix-core.

Overview

This section documents the skill packs that shape planning, review, QA discussion, code quality, CLI design, and performance guidance in matrix-core. The repository uses a split model: human-facing SKILL.md files describe the practice, while .mtx manifests encode the compiler-facing intent, slots, and clarification behavior.

The packs are delivery-oriented knowledge assets, not runtime services. Each pack guides an agent or contributor from a user goal to a concrete artifact: a plan, review, QA session, CLI spec, lint fix, or performance rule application.

Knowledge Asset Map

PackPathRole
Project planningskills/project-planning/SKILL.mdPlanning guide with artifact taxonomy, phases, estimation, relationships, and schema pointers
Project planningskills/project-planning/SKILL.mtxManifest for analyze; resolves the target, clarifies uncertainty, emits result and unknown slots
PR reviewskills/pr-review/SKILL.mdSecurity-first PR review checklist with diff scoping, dependency audit, cross-platform checks
PR reviewskills/pr-review/SKILL.mtxManifest for analyze and modify; resolves the review target
QA discussionskills/qa-discussion/README.mdStructured Q&A discussion engine with typed session flow
Code qualityskills/code-quality/SKILL.mdLint and code-quality guide with English comment rules and unused variable patterns
Code qualityskills/code-quality/SKILL.mtxManifest for modify; resolves the target and handles unknown requests
Create CLIskills/create-cli/SKILL.mdCLI design guide for arguments, flags, help text, output modes, exit codes
Create CLIskills/create-cli/SKILL.mtxManifest for find, modify, and build
Performanceskills/performance/references/rules/performance.mdCross-platform performance rulebook

Project Planning Skill Pack

skills/project-planning/SKILL.md frames planning around artifacts: PRD, Epic, Spec, Research, Decision, Story, Task, and Retrospective. Work is separated into Planning, Execution, Closing, and Retrospective phases. Scope changes, timeline shifts, technical refactoring, and resource constraints are explicitly escalated.

Estimation model

skills/project-planning/references/estimations.md keeps estimation hierarchical:

  • PRD and Spec are not estimated directly.
  • Epic is estimated in weeks or months.
  • Story is estimated in story points, typically 3-13.
  • Task is estimated in story points, typically 1-8.

Relationship model

skills/project-planning/references/relationships.md defines artifact connections:

Relationship groupLink types
Parent-childimplements
Cross-cuttinginfluenced_by_research, influenced_by_decision, influences, dependent_on_research, dependent_on
Task-specificblocks, dependent_on, related_to, duplicate_of
Project closuredocuments_closure, related_to, informed_by

Every Task must link to both a parent Story and a parent Epic. That rule is the core traceability constraint.

Schema reference stubs

The schema files under skills/project-planning/references/schema/ provide lightweight content-structure references for PRD, Epic, Spec, Research, Decision, Story, Task, and Retrospective artifacts.

PR Review Skill Pack

skills/pr-review/SKILL.md is security-first and change-centric. It starts from the diff against main, inventories changed files, and checks dependency risk, platform risk, and performance risk before producing findings.

Review workflow

  1. Scope the change set against main.
  2. Inventory changed files and modules.
  3. Audit package changes and lockfile changes.
  4. Inspect node_modules when supply-chain risk is non-trivial.
  5. Check cross-platform boundaries.
  6. Review performance hotspots in React and React Native code.
  7. Report findings by severity.

Dependency and platform checks

skills/pr-review/reference/dependency-audit.md recommends:

git diff -- package.json
git diff -- yarn.lock pnpm-lock.yaml package-lock.json
npm view <pkg> version time maintainers repository dist.tarball
cat node_modules/<pkg>/package.json

skills/pr-review/reference/cross-platform.md organizes checks by platform boundary: Extension (MV3 lifecycle, CSP, host permissions), Mobile RN (backgrounding, secure storage, WebView bridge validation), Desktop Electron (IPC validation, nodeIntegration, contextIsolation), and Web (XSS, CSP, CORS, storage leakage).

QA Discussion Skill Pack

skills/qa-discussion/README.md presents a production-ready structured discussion engine. The main entry point is conductDiscussion, with display helpers, validation helpers, session summary fields, three question types (single choice, multiple choice, open ended), and a security model.

Documented functions

FunctionPurpose
conductDiscussionMain entry point for the full Q&A discussion
displayQuestionShows one question at a time
displayValidationErrorDisplays validation feedback
displaySummaryReportPrints the final summary
validateAnswerRoutes validation by question type
validateSingleChoiceValidates single-choice input
validateMultipleChoiceValidates multiple-choice input
validateOpenEndedValidates open-ended input

Session fields

After conductDiscussion completes: sessionId, totalQuestions, completedQuestions, responses, summary.successRate, summary.validResponses, summary.totalAttempts, summary.averageAttempts, summary.completionTime.

Validation and quality evidence

The test suite runs with node --test index.test.ts and reports 71 passing tests, 0 failures, roughly 120 ms total duration, organized into eight describe blocks covering single choice, multiple choice, open-ended, answer routing, session management, edge cases, integration, and error scenarios.

Code Quality Skill Pack

skills/code-quality/SKILL.md defines the skill as a guide for linting, documentation, and general code quality. Comments must be in English. The pack triggers on linting, type-checking, unused variables, comments, documentation, spellcheck, and pre-commit work.

Rule themes

  • Prefer comments that explain business logic rather than restating the code.
  • Prefer simple, direct calls such as const user = await fetchUser(userId);.
  • Use _unused for unused destructured variables or parameters.
  • Use void or await for floating promises.
  • Extract nested components instead of defining them inline.
  • Prefer a guard or assertion over a non-null assertion when linting rejects !.

Lint fix playbook

  • Removing unused imports.
  • Prefixing unused parameters with _.
  • Prefixing unused destructured bindings with _.
  • Handling assigned-but-unused values.
  • Replacing non-null assertions with a type assertion or guard.
  • Extracting nested components.

Create CLI Skill Pack

skills/create-cli/SKILL.md is a design-time guide for command-line interfaces. It asks the user to clarify the command name, primary user, input sources, output contract, interactivity, config model, and platform constraints before the spec is finalized. Deliverables include a command tree, args and flags table, subcommand semantics, I/O rules, exit code map, safety rules, config/env precedence, shell completion story, and examples.

skills/create-cli/references/cli-guidelines.md is the condensed CLI rubric: human-first design, stdout for primary output, stderr for diagnostics, standard flags (--help, --version, --json, --dry-run, --no-input), and careful handling of signals and control characters.

CLI design expectations

  • -h and --help always show help.
  • --version prints version to stdout.
  • Primary data belongs on stdout.
  • --json and --plain are machine-friendly output modes.
  • Prompts only occur when stdin is a TTY.
  • Destructive operations require confirmation or an explicit force path.
  • NO_COLOR, TERM=dumb, and --no-color influence color output.
  • Ctrl-C should stop quickly and clean up safely.

Performance Rules Reference

skills/performance/references/rules/performance.md is a practical rulebook for React, React Native, and cross-platform work. It names two important helpers: InteractionManager from react-native and memo from react.

Optimization clusters

ClusterWhat the file teaches
Concurrent requestsLimit fan-out, batch tasks, avoid Promise.all on large request sets
Load shapingPaginate or lazy load large payloads
Input handlingDebounce noisy user input before tracking or network calls
Render deferralUse setTimeout or InteractionManager.runAfterInteractions for heavy work
Loop chunkingBreak expensive loops into chunks and yield to the event loop
MemoizationUse useMemo, memo, and useCallback when the cost justifies it
List tuningUse stable keys, lower windowSize, long-list visibility optimizations
State updatesBatch related updates and derive state instead of duplicating it
CancellationAbort stale network requests when input changes

Concrete patterns

  • executeBatched(tasks, 3) for controlled concurrency.
  • InteractionManager.runAfterInteractions to defer heavy work.
  • useMemo for expensive derived lists.
  • memo for components that benefit from stable props.
  • Stable callback references with useCallback.
  • windowSize={5} in optimized list paths.
  • contentVisibility: 'hidden' for closed force-mounted dialogs.
  • AbortController to cancel stale searches.