quick-fix
Quick fixes for common issues (build errors, missing styles, validation)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Quick fixes for common issues (build errors, missing styles, validation)
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Create a new Gutenberg block with scaffolding
Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, /wp-json/wp-abilities/v1/*, @wordpress/abilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients.
Prepare plugin for WordPress.org deployment
Use when generating responses containing factual claims, API details, configuration specifics, version compatibility, or recalled knowledge that could be hallucinated - especially when not working directly from source code or command output
Use when executing implementation plans with independent tasks in the current session
Create a block extension to enhance core WordPress blocks
| name | quick-fix |
| description | Quick fixes for common issues (build errors, missing styles, validation) |
| allowed-tools | Read, Glob, Grep, Bash(ls *), Bash(cat *), Bash(npm *) |
Quickly diagnose and fix common DesignSetGo plugin issues.
npm run build failsSymptoms: npm run build fails with errors
Quick fixes:
# Clear everything and rebuild
rm -rf node_modules build
npm install
npm run build
# Check for syntax errors
npm run lint:js
npm run lint:css
npm run lint:php
# If specific file error, check that file for:
# - Missing imports
# - Syntax errors (missing brackets, semicolons)
# - Typos in function names
# 1. Check if styles are imported in editor.scss
grep "@import" src/styles/editor.scss
# 2. Verify build output
cat build/index.css | grep "your-class-name"
# 3. If missing, add import to src/styles/editor.scss
# @import '../blocks/your-block/editor';
# 4. Rebuild
npm run build
# 1. Check if styles are imported in style.scss
grep "@import" src/styles/style.scss
# 2. Verify build output
cat build/style-index.css | grep "your-class-name"
# 3. If missing, add import to src/styles/style.scss
# @import '../blocks/your-block/style';
# 4. Rebuild
npm run build
CRITICAL: Both style.scss and editor.scss must import block styles.
Symptoms: "This block contains unexpected or invalid content" or block shows recovery prompt
Common causes:
// ❌ WRONG - Different structure in edit vs save
// edit.js
<div {...blockProps}>
<div className="inner">
<InnerBlocks />
</div>
</div>
// save.js
<div {...blockProps}>
<InnerBlocks.Content />
</div>
// ✅ CORRECT - Identical structure
// Both edit.js and save.js:
const innerBlocksProps = useInnerBlocksProps(...);
<div {...innerBlocksProps} />
// If you changed attributes, add deprecation:
// block.json
{
"deprecated": [
{
"attributes": { /* old attributes */ },
"save": OldSaveComponent
}
]
}
<InnerBlocks /> instead of useInnerBlocksProps// ❌ WRONG
<InnerBlocks />
// ✅ CORRECT
const innerBlocksProps = useInnerBlocksProps();
<div {...innerBlocksProps} />
Check browser console for specific errors:
// Add proper import
import { __ } from '@wordpress/i18n';
// Import from correct package
import { useSelect } from '@wordpress/data';
// Add default in block.json
{
"attributes": {
"yourAttribute": {
"type": "string",
"default": ""
}
}
}
// Move hooks outside conditionals
// ❌ WRONG
if (condition) {
const value = useSelect(...);
}
// ✅ CORRECT
const value = useSelect(...);
if (condition && value) {
// use value
}
Symptom: Grid/flex/stack not applying to blocks
Fix: Use useInnerBlocksProps instead of plain <InnerBlocks />
// ❌ WRONG - Plain InnerBlocks
<div style={{ display: 'grid' }}>
<InnerBlocks />
</div>
// ✅ CORRECT - useInnerBlocksProps
const innerBlocksProps = useInnerBlocksProps({
style: {
display: 'grid',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: '20px'
}
});
return <div {...blockProps}><div {...innerBlocksProps} /></div>;
Save function must match:
// save.js
const innerBlocksProps = useInnerBlocksProps.save({
style: {
display: 'grid',
gridTemplateColumns: 'repeat(3, 1fr)',
gap: '20px'
}
});
return <div {...blockProps}><div {...innerBlocksProps} /></div>;
Symptom: Theme colors missing from color picker
Fix: Migrate to ColorGradientSettingsDropdown
See /color-controls-migrate command for complete migration guide.
Quick check:
# Are you using deprecated PanelColorSettings?
grep -r "PanelColorSettings" src/blocks/your-block/
# If yes, run:
# /color-controls-migrate
Symptom: Strings appear in English instead of target language
Quick fixes:
# 1. Regenerate POT file
npx wp i18n make-pot . languages/designsetgo.pot
# 2. Update PO files
msgmerge --update languages/designsetgo-nl_NL.po languages/designsetgo.pot
# 3. Compile MO files
msgfmt languages/designsetgo-nl_NL.po -o languages/designsetgo-nl_NL.mo
# 4. Clear WordPress cache
# In wp-admin: Go to Settings → General → Site Language → Save Changes
Check for untranslated strings:
# Find hardcoded strings
grep -r "'[A-Z][a-z]" src/ --include="*.js" | grep -v "__("
See /i18n-update for complete workflow.
Symptoms: npx wp-env start fails
Quick fixes:
# Stop all containers
npx wp-env stop
# Remove and restart
npx wp-env destroy
npx wp-env start
# Check Docker is running
docker ps
# If Docker not running, start Docker Desktop
# Check ports aren't in use
lsof -i :8888
lsof -i :8889
# Kill processes using ports if needed
kill -9 PID
Clear everything and start fresh:
# Stop wp-env
npx wp-env stop
# Clear build and dependencies
rm -rf node_modules build
# Reinstall and rebuild
npm install
npm run build
# Restart wp-env
npx wp-env start
Check plugin in browser:
Run this diagnostic:
# Check versions
node --version # Should be 18+ or 20+
npm --version
# Check build status
npm run build
# Check linting
npm run lint:js
npm run lint:css
# Check tests
npm test
# Check wp-env
npx wp-env start
For more detailed fixes:
/refactor - Refactor anti-patterns/color-controls-migrate - Fix color controls/i18n-update - Fix translations/check-compat - Check WordPress compatibility/build - Build troubleshooting