spacing

Generate an 8-step spacing scale token file from a detected codebase grid.

4|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/Dragoon0x/dragoon-skills --skill spacing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: spacing
Source: https://github.com/Dragoon0x/dragoon-skills/tree/main/skills/spacing
Command: npx skills add https://github.com/Dragoon0x/dragoon-skills --skill spacing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill eliminates the frustration of inconsistent, off-grid spacing values scattered across your codebase that create unpolished user interfaces and require hours of manual standardization work.

Core Features & Use Cases

  • Standardized 8-Step Spacing Scale: Automatically generates a consistent xs/sm/md/lg/xl/2xl/3xl/4xl spacing scale anchored to the grid (e.g. 4px, 8px) detected in your codebase.
  • Flexible Output Formatting: Supports exporting tokens in formats compatible with popular tools like Tailwind CSS.
  • Use Case: Clean up a legacy codebase with random, unaligned spacing values by formalizing them into a maintainable token system that matches your existing design patterns.

Quick Start

Use the spacing skill to generate a consistent 8-step spacing scale token file aligned to your codebase's detected spacing grid, with the option to apply the changes directly to your project.

Frequently Asked Questions about spacing

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

FAQPage Schema
How do I create consistent spacing tokens for my frontend codebase?

You can generate a standardized 8-step spacing scale token file anchored to the spacing grid detected in your codebase, producing t-shirt sized tokens from xs through 4xl as multiples of the detected grid.

Can I format generated spacing scale tokens for Tailwind CSS?

Yes, flexible output formatting supports exporting the generated spacing scale tokens in formats compatible with popular tools like Tailwind CSS for direct integration into your layout system.

What is the best way to clean up inconsistent spacing values in a legacy codebase?

The best way to clean up inconsistent, off-grid spacing values is to formalize them into a maintainable 8-step spacing token system that automatically matches your existing design patterns and detected grid.

How does the spacing grid detection work for design system initialization?

Grid detection scans your codebase to identify the existing spacing grid base, such as 4px or 8px, and anchors the generated xs through 4xl spacing scale tokens as direct multiples of that detected grid value.

Do I need existing design tokens to generate a spacing scale?

No, you do not need existing design tokens. The tool detects the underlying spacing grid directly from your codebase to scaffold a new layout system and standardize off-grid values.

What are the limitations of automatically generating a spacing scale?

This tool provides a basic 8-step scale from xs to 4xl based on detected grid multiples. It focuses on standardizing spacing values and may not cover highly custom or non-linear layout system requirements.