quality-check-javascript
Smart Collection JavaScript quality workflow. Use when the user asks to run JavaScript QA, validate esbuild/jsbundling-rails, check npm dependencies, verify Stimulus/Turbo controllers, or when files under app/javascript, package.json, package-lock.json, or JavaScript-related Rails layout/build configuration change.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-10-22
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- quality-check-javascript
- description
- Smart Collection JavaScript quality workflow. Use when the user asks to run JavaScript QA, validate esbuild/jsbundling-rails, check npm dependencies, verify Stimulus/Turbo controllers, or when files under app/javascript, package.json, package-lock.json, or JavaScript-related Rails layout/build configuration change.
03 SKILL.md 正文
Quality Check JavaScript
Assume the Smart Collection JavaScript QA role. Keep the esbuild bundle valid, Stimulus controllers registered, dependency locks consistent, and browser-facing text integrated with the Rails i18n pipeline.
Scope Detection
- For focused JavaScript changes, run the smallest relevant import/build/lint/browser check before the full workflow.
- If
package.jsonorpackage-lock.jsonchanged, verify dependencies with npm inside thewebcontainer. - If files under
app/javascript/changed, verify imports, Stimulus registration, and the esbuild bundle. - If Rails layouts or asset/build configuration changed, verify the generated
application.jsasset is resolvable by Propshaft. - If the user asks for full JavaScript QA, run the full workflow below.
Core Workflow
- Install or verify JavaScript dependencies from the project root:
docker compose exec web npm ci
Use npm install only when intentionally updating package-lock.json.
- Build the JavaScript bundle:
docker compose exec web npm run build
- Verify Rails can resolve the generated bundle:
docker compose exec web bundle exec rails runner "puts Rails.application.assets.load_path.find('application.js').logical_path"
- Check for dependency vulnerabilities:
docker compose exec web npm audit
- Run the JavaScript linter:
docker compose exec web npm run lint
Do not add ESLint, Prettier, TypeScript, or other JavaScript tools unless the user explicitly authorizes the new dependency.
Browser And Playwright Checks
- For visible frontend behavior, first validate the smallest affected route, component, selector, console error, HTTP status, or asset request that can confirm the bug.
- Prefer short temporary checks for assets, fonts, icons, Stimulus registration, Turbo events, or console errors before capturing large HTML or broad screenshots.
- Run focused Playwright specs inside the
webcontainer when browser behavior changes:
docker compose exec web npm run test:e2e -- path/to/test.spec.js --browser=chromium
- Use
http://127.0.0.1:3000when the test runs from inside thewebcontainer. - Remove or ignore temporary diagnostic artifacts after verification.
Fixing Issues
- Keep JavaScript dependencies managed by npm and locked in
package-lock.json. - Keep generated bundles out of git; only
app/assets/builds/.keepshould be versioned. - Register new Stimulus controllers in
app/javascript/controllers/index.js. - Use relative imports for local modules, such as
../i18n, instead of importmap aliases. - Keep JavaScript UI text in
config/locales/javascript.*.ymland access it throughapp/javascript/i18n.js. - Preserve Turbo behavior and existing
data-controller/data-actionnames when refactoring controllers. - Do not hardcode secrets, API keys, passwords, or tokens in JavaScript.
Final Report
Report:
- Which JavaScript files or package files were checked.
- Which npm/build/audit commands were run.
- Issues found and fixes applied.
- Final JavaScript QA status, including whether the bundle is Rails-resolvable.
04 同仓库更多 Skills
security-check
Smart Collection security audit workflow. Use when the user asks to run security checks, audit Ruby gems, audit JavaScript or Python dependencies, verify bundler-audit, run OWASP ZAP against the Rails app, investigate vulnerable dependencies, fix security issues, or improve project security posture in this Rails/Mongoid/Python/Docker project.
quality-check-rails
Smart Collection Rails quality assurance workflow. Use when the user asks to run Rails QA, verify project quality, check RuboCop/RSpec, validate Rails CI readiness, or fix quality issues in the Rails/Mongoid/Docker application.
quality-check-python
Smart Collection Python microservice quality workflow. Use when the user asks to run Python QA, lint Python code, test Python microservices, validate yolo/upscale changes, or when files under yolo/ or upscale/ change.
security-check
暂无简介
quality-check-rails
暂无简介
quality-check-python
暂无简介