purgetss

Generate a size-optimized app.tss from CSS-like utilities for Titanium Alloy.

1|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/macCesar/titools --skill purgetss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: purgetss
Source: https://github.com/macCesar/titools/tree/main/skills/purgetss
Command: npx skills add https://github.com/macCesar/titools --skill purgetss

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

PurgeTSS provides a utility-first styling workflow for Titanium Alloy apps, replacing brittle hand-written TSS with a scalable system that adapts to platforms, devices, and complex layouts.

Core Features & Use Cases

  • Centrally define color, spacing, typography, and layout utilities in config.cjs and generate a compact app.tss.
  • Apply platform modifiers (ios:, android:), the apply directive, and dynamic creation APIs to build reusable UI components.
  • Use with XML class attributes or programmatic creation (e.g., $.UI.create) for consistent, fast UI iteration.

Quick Start

Initialize PurgeTSS in your Alloy project, build the utilities, and start applying utility classes in XML or controllers.

Frequently Asked Questions about purgetss

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

FAQPage Schema
How do I apply utility-first styling to Titanium Alloy apps instead of writing TSS files manually?

Utility-first styling for Titanium Alloy apps is achieved by mapping CSS-like utilities to native properties and generating a size-optimized app.tss at build time. You define design tokens centrally in config.cjs and apply utility classes directly in XML views.

Does PurgeTSS support platform modifiers for iOS and Android in Alloy XML views?

Platform modifiers like ios: and android: are fully supported to build cross-platform UI components. PurgeTSS coordinates platform-specific variants across Ti elements, IDs, and classes, ensuring consistent layouts and properties for each platform.

Can I use utility classes for dynamic UI creation in Titanium controllers?

Dynamic UI creation is supported through programmatic APIs like $.UI.create. You can apply the same utility classes used in XML views to dynamically created Titanium elements, ensuring consistent styling across declarative and imperative UI code.

How do I configure custom colors, spacing, and typography for a Titanium design system?

You configure custom colors, spacing, typography, and layout utilities in the config.cjs file. PurgeTSS processes this configuration to generate a compact app.tss file, establishing a scalable design system tailored to your application's specific needs.

What is the best way to maintain cross-platform UI consistency in Titanium Alloy?

The best way to maintain cross-platform UI consistency is using a utility-first styling system that generates a size-optimized app.tss at build time. PurgeTSS coordinates layout, typography, and platform-specific variants centrally, replacing brittle hand-written TSS.

Why does my generated app.tss file need to be rebuilt when changing Alloy UI classes?

The generated app.tss file must be rebuilt because PurgeTSS scans XML class attributes and programmatic creation APIs at build time to purge unused utilities. This size-optimization process ensures only the required native Titanium properties are included in the final output.