julianoczkowski/create-trimble-app/handle-modus-checkbox-value-bug
Claude Code and agent skill by julianoczkowski/create-trimble-app
- community
Checking that the SKILL.md file is still in the repository.
Apply the critical checkbox value inversion workaround when working with ModusCheckbox components
Install
npx vskill@latest install julianoczkowski/create-trimble-app/handle-modus-checkbox-value-bugSKILL.md
Handle Modus Checkbox Value Bug
Apply the critical value inversion workaround for ModusWcCheckbox components.
Critical Bug
The ModusWcCheckbox web component has a value inversion bug where the value property returns the opposite of the actual checked state:
- When checkbox is checked:
target.valuereturnsfalse - When checkbox is unchecked:
target.valuereturnstrue
This is the opposite of what developers expect.
When to Use
Use this skill when:
- Implementing checkbox functionality with ModusCheckbox
- Fixing checkbox-related bugs
- Handling checkbox value changes
- Creating forms with checkboxes
Reference Implementation
See src/components/ModusCheckbox.tsx:116-130 for the complete workaround implementation.
The Fix
Always invert the value when reading from checkbox events:
Complete Pattern
Usage in Forms
When using checkboxes in forms:
Multiple Checkboxes
When handling multiple checkboxes:
Important Notes
- The bug is in `target.value`: The inversion happens when reading
event.target.value, not inevent.detail - Always invert: Never trust the raw value - always invert it
- Wrapper handles it: The
ModusCheckboxwrapper component already handles this, so if you're using the wrapper, you don't need to invert again - Document the bug: Add comments explaining the workaround
Testing
To verify the fix works:
Common Mistakes
- Forgetting to invert: Using raw value directly
- Double inversion: Inverting when using the wrapper component (it already handles it)
- Wrong event: Using
inputChangeinstead of readingtarget.value
Related Files
src/components/ModusCheckbox.tsx- Complete wrapper implementation.cursor/rules/modus-checkbox-value-inversion-react.mdc- Detailed documentation
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingtemplates/react/.cursor/skills/handle-modus-checkbox-value-bug/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/julianoczkowski/create-trimble-app/handle-modus-checkbox-value-bug)