Skip to main content
plugin

libreuiux-hooks — Claude Code plugin: what it does, how to install

libreuiux-hooks adds three Claude Code hooks to detect your UI stack at session start, protect secrets from silent edits, and flag accessibility issues right after UI changes.

MIT ★ 126 updated 2026-10-04

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add Ormus-Solutions/LibreUIUX-Claude-Code
/plugin install libreuiux-hooks@libreuiux
Open on GitHub

What libreuiux-hooks does

The plugin sets up three lifecycle hooks for frontend work. At session launch, it scans package.json, Tailwind config files, or shadcn/ui definitions to hand Claude a summary line describing the project stack and testing tools.

During file edits, the pre-tool hook checks targets against sensitive paths like .env, certificates, and private keys. Claude Code stops to ask for your confirmation instead of writing secrets directly. Edits to interface files trigger a post-tool check that scans for missing alt tags, clickable div elements, small font sizes, and missing reduced-motion alternatives.

Your system must have jq available in PATH. Without this binary, every hook exits silently and leaves Claude without extra context.

What it helps with

  • Block unattended edits to .env and secret key files
  • Give Claude Code immediate context about the frontend stack
  • Spot accessible naming issues on icon buttons and inputs
  • Catch missing alt attributes and click handlers on raw div tags

Example prompts for the agent

  • Refactor the navigation component in src/components/Nav.tsx
  • Style the signup form in src/components/Form.tsx

How to install libreuiux-hooks

Plugin marketplace

/plugin marketplace add Ormus-Solutions/LibreUIUX-Claude-Code
/plugin install libreuiux-hooks@libreuiux

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about libreuiux-hooks

How to install libreuiux-hooks in Claude Code?

Run /plugin marketplace add Ormus-Solutions/LibreUIUX-Claude-Code followed by /plugin install libreuiux-hooks@libreuiux. Then restart Claude Code so the hooks take effect.

What does libreuiux-hooks do?

It injects project UI context on startup, asks for approval before altering secrets files, and surfaces accessibility hints after UI file modifications.

What dependencies does the plugin need?

You need jq installed on your PATH. If jq is absent, the hook scripts exit silently without injecting context.

Source text

libreuiux-hooks · MIT
# libreuiux-hooks

> Optional Claude Code hooks for UI projects: stack context at session start, a confirmation prompt before editing secrets files, and accessibility and design-system hints after UI file edits.

This plugin packages the LibreUIUX hooks (first shipped as loose scripts in the repository's `hooks/` directory) so Claude Code registers them for you. The loose scripts need a `LIBREUIUX_HOOKS_DIR` variable and a hand-edited `settings.json`, parse the hook input with `grep`, return findings in a JSON shape Claude Code does not define (a top-level `additionalContext` array), set timeouts meant as milliseconds in a field Claude Code reads as seconds, and write log files into the hooks directory. These versions keep the same checks, read the JSON that Claude Code sends on stdin with `jq`, answer in the documented hook output format, and write no files. The original scripts stay in `hooks/` unchanged.

## Install

```
/plugin marketplace add HermeticOrmus/LibreUIUX-Claude-Code
/plugin install libreuiux-hooks@libreuiux
```

Or from a terminal: `claude plugin install libreuiux-hooks@libreuiux`. Restart Claude Code to load the hooks. Requires `jq` on your PATH; without it every hook exits silently.

## What each hook does

| Event | Matcher | Script | Behavior |
|-------|---------|--------|----------|
| SessionStart | `startup\|resume\|clear\|compact` | `scripts/session-start.sh` | When the project has a front-end framework or styling library in `package.json`, a `tailwind.config.*`, or a shadcn/ui `components.json`, prints one line naming the detected stack, whether accessibility test tooling is present, and the LibreUIUX plugins that fit. Claude Code adds that line to Claude's context. Prints nothing for other projects. |
| PreToolUse | `Edit\|Write\|MultiEdit` | `scripts/pre-tool-use.sh` | If the target file looks like a secrets file (`.env`, `.env.*` except `.env.example`/`.sample`/`.template`/`.dist`, `*.pem`, `*.key`, `*.p12`, `*.pfx`, or a name containing `credentials` or `secret`), returns `permissionDecision: "ask"` so you confirm the edit. Otherwise exits 0 silently. |
| PostToolUse | `Edit\|Write\|MultiEdit` | `scripts/post-tool-use.sh` | After an edit to a UI file (`.css`, `.scss`, `.sass`, `.less`, `.tsx`, `.jsx`, `.vue`, `.svelte`, `.html`, `.astro`, or a theme/token/Tailwind config script), returns findings to Claude as `additionalContext`: design token and global-style impact, co-located style/test/story files, light text classes, images without `alt`, icon-only buttons without a name, clickable `div`/`span`, inputs without labels, very small targets, animation without a reduced-motion path, autoplay, font sizes under 12px, and large fixed widths. Silent when nothing matches. |

The checks are pattern matches, not measurements: they point Claude at likely problems for it to verify, and they never block an edit.

## Test a hook by hand

```bash
echo '{"tool_name":"Write","tool_input":{"file_path":".env"}}' | bash scripts/pre-tool-use.sh
echo '{"tool_name":"Edit","tool_input":{"file_path":"src/components/ui/Button.tsx"}}' | bash scripts/post-tool-use.sh
echo "{\"cwd\":\"$PWD\"}" | bash scripts/session-start.sh
```

## Turn it off

`/plugin` and disable `libreuiux-hooks`, or `claude plugin disable libreuiux-hooks@libreuiux`.

© Diego Bodart · MIT · Ormus-Solutions/LibreUIUX-Claude-Code

Similar plugins

All plugins for Frontend and UI →

From the same set42

The whole set →
ui-agent-patterns ui-agent-patterns provides orchestration patterns to delegate UI development across AI agents, from single synthesis architectures to multi-agent pipelines. CX Codex +1 ★ 126repo stars design-system-context The design-system-context skill organizes design tokens and decisions for Claude Code UI work. Use it when generated screens drift from your design system or agents need consistent context. CX Codex +1 ★ 126repo stars browser-devtools-mcp Connects Claude Code to browser DevTools over MCP for live UI review, screenshot-to-code conversion, and computed style extraction. CX Codex +1 ★ 126repo stars smart-fix smart-fix — a Claude Code command that orchestrates multiple specialized agents to analyze and resolve production incidents. CX Codex +1 ★ 126repo stars vibe-coding The vibe-coding skill helps create throwaway UI prototypes, compare design directions, and decide when a concept is ready for production work. Use it while validating interface ideas or user flows. ★ 126repo stars mcp-integrations mcp-integrations is a Claude Code plugin that uses MCP browser tools to inspect live interfaces. It can turn screenshots into UI code and extract design tokens. ★ 126repo stars archetypal-alchemy archetypal-alchemy transforms Jungian archetypes and Major Arcana symbolism into UI layouts, design tokens, and Tailwind color palettes inside Claude Code. ★ 126repo stars design-mastery design-mastery is a Claude Code plugin that applies established design principles to UI work. It supports layout analysis, design audits, style guides, and brand identity tasks. ★ 126repo stars

Project sponsors

Companies that keep this analytics open