maccesar/titanium-sdk-skills
Overview
This skill is the official reference for the Titanium Alloy MVC framework, focused on models, views, controllers, TSS styling, widgets, migrations, the Alloy CLI, and Backbone.js patterns. It auto-detects Alloy projects and delivers actionable guidance for reviewing, analyzing, and compiling Alloy apps. Use it when you need concrete rules, common patterns, and compilation insights for Alloy-based Titanium projects.
How this skill works
When invoked inside a workspace, the skill auto-detects an Alloy project by looking for the app/ folder and its MVC subfolders (views, controllers, models). It inspects common Alloy artifacts and explains conventions, data binding, sync adapters, TSS platform modifiers, widget usage, and the compilation pipeline. It provides targeted guidance or warns when the codebase is not an Alloy project.
When to use it
- Reviewing or refactoring an Alloy project to ensure conventions and structure are correct
- Diagnosing TSS styling or platform-specific compilation errors
- Understanding Backbone models/collections and sync adapter behavior in Alloy
- Generating or validating migrations and model definitions
- Building or debugging widgets and their MVC integration
Best practices
- Keep the standard app/ structure: controllers, views, models, styles, widgets, and migrations
- Use platform modifiers in TSS for any Ti.UI.iOS.* or Ti.UI.Android.* properties to avoid cross-platform failures
- Define models and collections using Backbone patterns and choose appropriate sync adapters (sql, properties)
- Bind collections to UI components via dataCollection and use attribute placeholders like {title} in XML
- Use OS_IOS / OS_ANDROID guards for platform-specific JS and prefer TSS modifiers for styling differences
Example use cases
- Fix a TSS compile error caused by an iOS-only property used without a [platform=ios] modifier
- Create a new model and SQL-backed collection using the alloy CLI generator
- Bind a book collection to a TableView with automatic row templating using dataCollection
- Examine the compiled output to understand how controllers and views are converted to app.js
- Replace duplicated UI code with a reusable widget and wire its events to a controller
FAQ
It looks for the app/ folder and common subfolders such as app/views, app/controllers, and app/models and then provides Alloy-specific guidance.
What causes TSS platform compilation failures?
Using Ti.UI.iOS.* or Ti.UI.Android.* properties in TSS without platform modifiers causes the compiler to inject platform-specific constants into projects for the wrong target; always scope them with [platform=ios] or [platform=android].
4 skills
This skill guides Alloy MVC development, helping you understand models, views, controllers, data binding, and platform-specific styling for Titanium apps.
This skill guides Titanium project teams to apply TiDev best practices for stability, performance, and cross-platform reliability.
This skill provides complete Titanium Alloy architecture guidance and automated project detection to design, review, and migrate Alloy projects.
This skill guides you through Titanium SDK UI patterns, performance, and platform-specific components to optimize layouts and interactions.