code-standards

作成者: mastra-ai

プルリクエストをレビューするためのコード品質基準とスタイルガイド

npx skills add https://github.com/mastra-ai/mastra --skill code-standards

Code Standards Review

When reviewing code, follow this structured process:

Step 1: Critical Issues

Check for issues that MUST be fixed before merging:

  • Logic bugs and incorrect behavior
  • Missing error handling for failure cases
  • Race conditions or concurrency issues
  • Unhandled edge cases (null, undefined, empty arrays, boundary values)
  • Breaking API changes without migration path

Step 2: Code Quality

Evaluate overall code quality:

  • Functions should do one thing and be reasonably sized (< 50 lines preferred)
  • Avoid code duplication — look for repeated patterns that should be abstracted
  • Use descriptive, meaningful names for variables, functions, and types
  • Prefer explicit types over any in TypeScript
  • Ensure proper use of async/await (no floating promises, proper error propagation)

Step 3: Style Guide Conformance

Check against the style guide in references/style-guide.md:

  • Naming conventions
  • Code organization and import ordering
  • Comment quality (explain "why", not "what")

Step 4: Linting Flags

Flag these patterns:

  • var usage (should be const or let)
  • Leftover console.log or debugger statements
  • Commented-out code blocks
  • Magic numbers without named constants
  • TODO or FIXME comments without issue references

Output Format

Structure your feedback as:

  1. Summary: 1-2 sentence overview of the changes and overall quality
  2. Critical Issues: Must-fix problems with file path and line numbers
  3. Suggestions: Improvements that would make the code better
  4. Positive Notes: Good patterns and decisions worth acknowledging

mastra-aiのその他のスキル

testing-mastracode-tui
mastra-ai
Konsole上でmastracode TUIの機能をインタラクティブにテストします。モデル設定、スレッドライフサイクル、タスク状態の分離、一般的なブロッカーをカバーします。
official
mastra-smoke-test
mastra-ai
Mastraプロジェクトをローカルでスモークテストするか、ステージング/本番環境にデプロイします。Studio UI、エージェント、ツール、ワークフロー、トレース、メモリなどをテストします。ローカルと…の両方をサポートします。
official
security-review
mastra-ai
セキュリティに焦点を当てたコードレビューのチェックリストで、脆弱性を特定するためのものです。
official
technical-writing
mastra-ai
明確で構造化された技術文書を作成するためのガイドライン
official
debugging-difficult-bugs
mastra-ai
中程度または難しいバグのデバッグ時、特にテストだけでは実際のランタイム障害が明らかにならない可能性がある場合に、早い段階で使用してください。長期にわたるTDDの反復を始める前に、これを起動してください…
official
e2e-frontend-validation
mastra-ai
Playgroundパッケージにおけるフロントエンド変更のための、Playwright MCPを使用したE2E検証ワークフロー
official
e2e-tests-studio
mastra-ai
packages/playground-ui または packages/playground 内のファイルを変更する場合に必須。対象: React コンポーネントの作成・変更・リファクタリング、UI 変更、…
official
general-tasks
mastra-ai
ファイル、シェル、またはウェブに触れるオープンエンドなタスクを処理するためのデフォルトのプロセス。
official