check-use-state
Check that no frontend component uses more than 2 useState hooks. Reports violations with file paths, counts, and line numbers.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Check that no frontend component uses more than 2 useState hooks. Reports violations with file paths, counts, and line numbers.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Audit that docs/rbac-permission-matrix.md matches the RBAC catalog in code (roles, permissions, and grants in rbac.constants.ts and api-contracts permissions.ts). Reports every mismatch.
Generate CRUD boilerplate (backend NestJS controller/service/module/guard/policy/factory/routes/e2e + frontend Redux slice/thunks/selectors/middleware/spi/api) from a given entity file and a list of methods.
Run the last steps before ending a feature. Shows a form where you can check/uncheck which final steps to run — update changelog, create a branch, run tests-parallel, create a PR — then executes the selected steps in that order.
Create a GitHub issue on bayesimpact/bayes-platform from a free-text description. Drafts a clear title and structured body, picks appropriate labels, and posts it via the gh CLI, returning the issue URL. Optionally enriches the issue with context from the current codebase.
Suggest a Conventional Commits message for the last changes without committing. Analyzes the current diff and returns a ready-to-use commit name.
Run Trivy vulnerability scan on Docker images (API, CPU workers, GPU workers). Builds images, scans for CRITICAL/HIGH CVEs, and reports findings.
| name | check-use-state |
| description | Check that no frontend component uses more than 2 useState hooks. Reports violations with file paths, counts, and line numbers. |
Check that no frontend component uses more than 2 useState hooks. A component with too many local state variables is a sign it should be refactored (custom hook, context, or state manager).
Use the Grep tool to find all useState( occurrences across apps/web/src/**/*.tsx files, with output mode content and line numbers enabled, so you can see each match with its file path and line number.
Group the results by file. For each file, count the number of lines that contain useState( — ignore import lines (lines containing import).
Report the results in two sections:
List every file that has more than 2 useState calls. For each file show:
useState call"X files checked, Y violations found." If there are no violations, congratulate the user.