
Preflight
Webiny-only.
Install
npx skills add webiny/webiny-js --skill preflight -g -a claude-code -y- Repository
- webiny/webiny-js8.1k
- Category
- Testing
- Updated
- 5d ago
- License
- See repository
- Context cost
- Lightabout 1,156 tokens
- Runs scripts
- No, instructions only
What it does
Webiny-only. Run all checks required before packages are ready for publish: deps, build, lint, format, tests.
Preflight
Webiny-only skill. Run all checks required before packages are ready for publish.
Important
- Run steps in order.
- If any step fails, diagnose and fix the issue, then restart from step 1.
- Never run tests in parallel. Run each package sequentially.
- Before running tests for each package, count active test cases and shard at 32 tests per shard.
- To count active tests:
rg "^\s*(it|test|it\.each|test\.each)\s*\(" packages/<name>/__tests__ -t ts --count-matches | awk -F: '{s+=$2} END {print s}' - Calculate shards:
shards = ceil(count / 32). If shards is 1, no--shardflag needed. - Suppress noisy output: redirect stdout to
/dev/nullor pipe throughtailas needed.
Steps
1. Install dependencies
yarn > /dev/null 2>&1
2. Generate webiny package
yarn webiny-scripts generate-webiny-package
3. Sync dependency versions
yarn webiny sync-dependencies
Verify packages/cli/files/duplicates.json is an empty array ([]). If it contains entries, there are duplicate dependency versions that must be resolved before continuing.
4. Generate tsconfig files
node scripts/generateTsConfigsInPackages.js
5. Check package node_modules
node scripts/checkPackageNodeModules.js
6. Verify package.json dependencies match source imports
yarn adio
Must output "All dependencies in order!" to pass.
7. Format code
yarn format:fix > /dev/null 2>&1
This auto-fixes formatting issues. No manual intervention needed.
8. Lint
yarn eslint
This only checks, it does not auto-fix. If eslint reports errors, fix them manually, then restart from step 1.
9. Full clean build
yarn build --no-cache 2>&1 | tail -10
10. Check dist paths
node scripts/checkDistPaths.js
Verifies no src/ paths remain in built output.


