component-usage-analysis

Analyze Drupal/Twig component dependencies and usage patterns.

7|Updated Dec 26, 2025
One-click install
npx skills add https://github.com/schalkneethling/webdev-agent-skills --skill component-usage-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: component-usage-analysis
Source: https://github.com/schalkneethling/webdev-agent-skills/tree/main/component-usage-analysis
Command: npx skills add https://github.com/schalkneethling/webdev-agent-skills --skill component-usage-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps teams locate where Drupal/Twig components are used, assess whether a component can be safely removed, audit dependencies, identify components using specific properties, and understand the impact of refactoring.

Core Features & Use Cases

  • Usage discovery: Find all Twig includes and mock references to a target component.
  • Dependency auditing: Analyze how components depend on others to plan safe changes.
  • Refactor impact analysis: Determine which parts of the codebase would be affected by a change to a component.

Quick Start

Run the analysis workflow against your component library by specifying a target component, for example: component-usage-analysis "elements/image" or provide the target component path. The tool will scan Twig includes, embed blocks, and mock references to produce a usage map and risk assessment.

Frequently Asked Questions about component-usage-analysis

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

FAQPage Schema
How do I find all usages of a Twig component before refactoring?

To find all Twig component usages, apply a structured search workflow that scans Twig includes, embed blocks, and mock references to produce a complete usage map and risk assessment for safe refactoring.

Can I audit Drupal Twig component dependencies to see if a component can be safely removed?

Yes, you can audit Drupal Twig component dependencies by analyzing cross-file impact and usage patterns to evaluate whether a target component can be safely removed without breaking references.

What is the best way to analyze the impact of refactoring a Twig include?

The best way to analyze refactoring impact is to scan the component library for Twig includes and mock references, generating a dependency map that identifies affected files and properties.

How do I identify which Twig components use specific properties?

Identify Twig components using specific properties by running an analysis workflow that searches across the component library to locate files referencing those exact properties and dependencies.

Does this component usage analysis work with Drupal component libraries?

Yes, this component usage analysis is designed for Drupal and Twig component libraries, scanning includes, embed blocks, and mock references to map dependencies and assess refactor impact.