maggielerman/codex-skills/alpinejs-lightweight-js
Claude Code and agent skill by maggielerman/codex-skills
- community
Checking that the SKILL.md file is still in the repository.
Custom skill created by Maggie Lerman. Alpine.js and lightweight progressive JavaScript workflow for static/JAMstack sites. Use when working with x-data, x-show, x-bind, x-on, x-transition, Alpine.data/store, @alpinejs plugins, CSP-safe Alpine, dropdowns, accordions, tabs, dialogs, filters, or minimal client JS.
Install
npx vskill@latest install maggielerman/codex-skills/alpinejs-lightweight-jsSKILL.md
The same SKILL.md was published earlier as maggielerman/codex-skills/alpinejs-lightweight-js.
Alpine.js Lightweight JS
Custom skill created by Maggie Lerman.
Use this skill to add small, resilient interactivity to otherwise static sites. Prefer HTML-first progressive enhancement, accessible native behavior, and tiny state scopes over large client-side frameworks.
Start Here
- Confirm the interaction actually needs JavaScript. Prefer native HTML, CSS, server-rendered variants, and simple links/forms when they solve the problem.
- Inspect how JavaScript is loaded: CDN script, bundled npm import, deferred module, site-wide entrypoint, page-specific bundle, CSP build, or existing helper.
- If the repo's Alpine version, CDN pin, plugin compatibility, or CSP package matters, pair with
jamstack-version-auditorbefore recommending an update. - Keep Alpine component state local with
x-dataunless multiple distant components need shared state. - Use
Alpine.data()for repeated or complex components. UseAlpine.store()for genuinely shared state. - Preserve core content and navigation without JavaScript whenever practical.
Alpine Patterns
- Use
x-datato establish component scope. Alpine directives likex-bind,x-on, andx-transitionneed an Alpine component context. - Use
x-showfor toggles that remain in the DOM; pair it withx-transitionfor simple transitions. - Use
x-ifonly when an element should be created/destroyed; do not expectx-transitionto work withx-if. - Use
x-bindor:for attributes and classes derived from state. - Use
x-onor@for events, with keyboard and outside-click modifiers when appropriate. - Use
x-cloakfor content that should stay hidden until Alpine initializes; make sure the cloak CSS exists. - Keep inline expressions short. Extract complex logic into methods, getters, or
Alpine.data(). - For strict Content Security Policy sites, use
@alpinejs/cspand avoid unsupported global expressions.
Accessibility Rules
- Match state to ARIA:
aria-expanded,aria-controls,aria-selected,aria-current,hidden,inert, or dialog semantics as appropriate. - Keep keyboard support complete for menus, dialogs, tabs, disclosures, and combobox-like controls.
- Manage focus deliberately for dialogs, popovers, and menu-like interactions.
- Do not hide important content in a JS-only path. Server-render default content when possible.
- Respect reduced motion for custom transitions if the repo has motion utilities or CSS support.
Tailwind And Nunjucks
Pair with tailwindcss-expert for styling and eleventy-jamstack-expert in 11ty repos.
- Put state styling in Tailwind variants when possible:
aria-expanded:*,data-*,group-*,peer-*, or class maps from Alpine state. - Keep Tailwind class names statically discoverable. Avoid constructing partial utility names in Alpine expressions.
- In Nunjucks macros/includes, pass simple behavior options and emit complete Alpine attributes and complete class strings.
Example disclosure:
Quality Gate
Before completion:
- Verify the page still has useful content before Alpine starts.
- Test mouse, keyboard, focus, and escape/outside-click behavior where relevant.
- Test with the repo's CSP assumptions.
- Run the repo's build and browser smoke test.
- Check for console errors and hydration-like assumptions that do not belong in a static site.
References
Read references/alpine-patterns.md for component patterns and references/official-docs.md for primary docs.
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 repositoryCheckingskills/alpinejs-lightweight-js/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/maggielerman/codex-skills/alpinejs-lightweight-js)