claude

defra-shared

Cross-cutting Defra standards as installable skills and guardrail hooks: branching, commit messages, code-quality gates, security & PII handling, and accessibility. Referenced by every other Defra plugin so cross-cutting standards live in one place. No agent — skills + hooks only.

2 on GitHubv0.1.0updated 1 month ago
/

Plugin defra-shared from marketplace defra-ai-plugins in DEFRA/defra-ai-plugins. Commands read from the repo's manifest — 1 month ago.

This plugin runs code on your machine — its hooks fire automatically on events like tool use. The exact commands are listed below; read them before installing.

What it installs

Skills (5)

  • defra-accessibility

    Defra accessibility expectations — WCAG 2.2 AA for code-generating roles (frontend, backend rendering HTML), and semantic-markup expectations for documentation roles. Use when the agent generates a page, a component, a markdown file, or any artefact that will be read by a screen reader, a keyboard-o

  • defra-branching

    Defra branching strategy — never commit or push directly to main or master. Use a feature branch named for the work, open a pull request, get review, then merge. Use when the agent is about to run git commit, git push, or git checkout, or when a developer asks how to start a piece of work.

  • defra-commit-messages

    Defra commit-message format — provisionally Conventional Commits (type(scope) subject + optional body and footers). Subject ≤ 72 chars, imperative mood, no trailing period. Use whenever the agent is about to run git commit -m, draft a commit message for a developer, or review an existing commit mess

  • defra-quality-gates

    Defra code-quality gates — lint, format, test, and coverage must all pass before code is committed. The role plugin pins the exact toolchain (ESLint/Prettier/Vitest, dotnet format/xUnit, ruff/black/pytest, etc.); this skill states the universal expectations. Use before git commit, when wiring a new

  • defra-security-pii

    Defra security and PII handling — never hard-code secrets, never log PII, refuse unsafe template patterns, and redact known UK PII (NI numbers, NHS numbers, postcodes, DoB combinations) before any output leaves the service. Use when the agent is editing code that handles user data, writing log lines

Hooks (5)

  • PreToolUse

    node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/branch-guard.mjs"

  • PreToolUse

    node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/commit-message-format.mjs"

  • PreToolUse

    node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/secret-scan.mjs"

  • PostToolUse

    node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/pii-scan.mjs"

  • PostToolUse

    node "${CLAUDE_PLUGIN_ROOT}/hooks/scripts/coverage-floor.mjs"

View source on GitHub

More from DEFRA/defra-ai-plugins

All 6 plugins →

Builds Defra-compliant frontends following the GOV.UK Design System, WCAG 2.2 AA, and Defra software development standards (Hapi + Nunjucks + SCSS + Vitest).

5 skills · 1 agent · hooks

2

Creates well-structured JIRA tickets (stories and tasks) for any team. Ships default templates for user-facing stories and technical tasks, with support for custom templates at runtime.

2 skills · 1 agent

2

User-centred design skills for Defra: service blueprints and journey maps, document and presentation standards (GOV.UK content design, Defra visual standards), and interaction and content design for CDP frontends. No agent, skills only, built from the AI Capability and Enablement team's delivery work.

3 skills

2

Intercepts all LLM interactions — prompts, tool inputs, and tool outputs — and redacts UK PII before data reaches or leaves the model, using a configurable Python redaction script.

1 skill · hooks

2

Checks a working service for usability problems before testing with real people. It tries real jobs as the people who use the service, checks every screen against Nielsen's usability heuristics, Microsoft's Guidelines for Human-AI Interaction and the GOV.UK Design System, and writes a plain English report. Not a replacement for research with real people.

1 skill

2

Maintain defra-shared?

This page updates itself from your repo. Add the badge to your README, or get it Featured to pin it above the organic results with a followed link to your site.

claude & codex plugins6 plugins