Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

defensive-data-design

Skill by WordPress

Defensive data design is a skill that gives checks for error messages, destructive actions and code that reads data it did not create. It is for developers working on the WordPress codebase.

  • Score 82
  • 12k stars
  • NOASSERTION
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install defensive-data-design

Built from the published package, never by AI.

git clone --depth 1 https://github.com/WordPress/gutenberg /tmp/gutenberg && mkdir -p ~/.claude/skills && cp -r /tmp/gutenberg/.agents/skills/defensive-data-design ~/.claude/skills/defensive-data-design

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install defensive-data-design in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Defensive data design is a SKILL.md file that gives an AI assistant a set of checks for WordPress code. It covers three situations: user-facing error messages and notices, destructive or irreversible actions, and code that reads data it did not create, such as REST responses, block attributes, post meta, theme.json and localStorage. The checks are written as rules to apply, not intentions.

The skill points to repository files and docs, including the copy guide and the destructive actions pattern. It asks for real failure causes instead of fixed fallback strings, isDestructive on irreversible confirm buttons, and Undo with a captured prior value. It also asks for shape checks on JSON and PHP data before use. It is aimed at developers and contributors working on WordPress code.

Written from the project's SKILL.md and checked against it.

What it can do

  • Error messagesShow the real cause of a failure and avoid fixed fallback strings in catch blocks.
  • Destructive actionsMake irreversible actions harder to trigger and label confirm buttons clearly.
  • Undo and mutationsAnnounce successful changes and offer Undo when the prior value is in scope.
  • Snackbar rulesExplains the single action limit and the six second automatic dismissal of snackbars.
  • Legibility labelsChecks that labels such as Published reflect qualifiers like password protection.
  • Untrusted data guardsGuards REST responses, post meta, theme.json and storage reads where data enters.
  • JSON parsing checksWraps JSON.parse in try and catch and checks the shape before iterating.
  • PHP failure modesLists PHP warnings and fatals that bad data can cause during rendering.
  • Error boundary limitsNotes which throws escape React error boundaries and can drop a user's edit.

Try asking

  • Review my new error notice for a clear cause and next step
  • Check this delete button for irreversible action labels and confirmation
  • Add shape checks to this REST response handling code

Good to know

  • Refers to files and docs inside the WordPress repository, so it assumes that codebase.
  • Block attributes are only partly covered, according to the source.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .agents/skills/defensive-data-design/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • SKILL.md5 KB

Alternatives to defensive-data-design

All alternatives →

Compare with setup-zoom-webhooks, baoyu-post-to-weibo or add-dial-number

defensive-data-design: common questions

Who is defensive data design for?

The source is written for developers working on WordPress code. It refers to repository files such as packages in the WordPress codebase and its contributor docs.

What situations does the skill cover?

It covers user-facing error messages and notices, destructive or irreversible actions, and code that reads data it did not create, such as REST responses and post meta.

Does it fully check block attributes?

No. The source says a parser check covers only part of the case, and updateBlockAttributes does not check types at all.

How do I install defensive-data-design?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is defensive-data-design free?

The code is published under the NOASSERTION licence. The service it connects to may have its own pricing.

Is defensive-data-design safe to use?

It scores 82 of 100. Grades: maintenance A, licence F, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to defensive-data-design?

Similar skills: setup-zoom-webhooks, baoyu-post-to-weibo, add-dial-number, setup-zoom-websockets.

defensive-data-design Install

Add to stack

Loading.