block-decision-matrix

Determine whether new UI components should be new blocks, variants, or reused.

3|Updated Jan 3, 2026
One-click install
npx skills add https://github.com/NextSpark-js/nextspark --skill block-decision-matrix
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: block-decision-matrix
Source: https://github.com/NextSpark-js/nextspark/tree/main/.claude/skills/block-decision-matrix
Command: npx skills add https://github.com/NextSpark-js/nextspark --skill block-decision-matrix

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a structured framework to help developers and designers decide whether a new UI component should be built as a new block, a variant of an existing block, or if an existing block can be reused directly, preventing code bloat and ensuring consistency.

Core Features & Use Cases

  • Decision Flowchart: A visual guide to navigate the decision-making process.
  • Criteria Definitions: Clear guidelines for Reuse, Variant, and New Block scenarios based on semantic purpose, structure, and required fields.
  • Complexity Thresholds: Quantifiable metrics for props count and conditionals to guide decisions.
  • Anti-Pattern Identification: Highlights common pitfalls like "Frankenstein Blocks" and "God Components."
  • Use Case: When a designer provides a mock for a new section, use this Skill to determine if it can be a simple variation of the existing Hero block or if it requires a completely new Hero-Special block.

Quick Start

Use the block-decision-matrix skill to determine if a new mock section should be a new block, a variant, or reused.

Frequently Asked Questions about block-decision-matrix

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I decide whether to reuse a UI component or create a new block?

To decide whether to reuse a UI component or create a new block, evaluate semantic purpose, structural similarity, required custom fields, and conditional logic complexity. A decision framework analyzes these factors to prevent code duplication and over-engineering in frontend architecture.

What is a Frankenstein Block in component design?

A Frankenstein Block in component design is an anti-pattern where a UI component is overloaded with too many custom fields and conditional logic. Identifying this pitfall helps maintain scalable UI architectures by avoiding God Components and ensuring proper block strategy.

When should I create a variant of an existing block instead of a new block?

You should create a variant of an existing block instead of a new block when the new UI component shares structural similarity and semantic purpose with the existing one, but requires minor custom field adjustments. Complexity thresholds guide this decision to maintain frontend reusability.

What are the limitations of using a decision matrix for frontend architecture?

Limitations of using a decision matrix for frontend architecture include relying on quantifiable metrics like props count and conditionals, which may not fully capture nuanced design semantics. It guides block strategy effectively but requires accurate structural analysis to avoid misclassifying component variations.

How do I use complexity thresholds to guide component development?

You use complexity thresholds to guide component development by measuring props count and conditional logic complexity against predefined metrics. If a UI component exceeds these thresholds, the decision framework suggests implementing a new block rather than forcing a variant to ensure maintainable code.