alloy-expert_skill

This skill provides complete Titanium Alloy architecture guidance and automated project detection to design, review, and migrate Alloy projects.
  • Shell

1

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill maccesar/titanium-sdk-skills --skill alloy-expert

  • SKILL.md10.8 KB

Overview

This skill is a Titanium Alloy architecture and implementation expert for designing, reviewing, analyzing, and migrating Alloy projects. It auto-detects Alloy vs Classic projects and adapts guidance accordingly. Use it to create controllers, views, services, styling (PurgeTSS), and memory-cleanup patterns. Advice focuses on scalable, testable, and maintainable Alloy code.

How this skill works

The skill scans your project structure to detect Alloy indicators (app/, app/controllers/, app/views/, alloy.jmk or config.json) and Classic indicators (Resources/, app.js). For Alloy projects it returns actionable architecture patterns, folder structure recommendations, controller/service examples, and PurgeTSS rules. For Classic projects it highlights incompatibilities and recommends migration steps or Classic-specific resources. Unknown projects prompt a clarification request.

When to use it

  • Designing app architecture, folder layout, and service boundaries
  • Reviewing controllers/views/services for maintainability and memory leaks
  • Choosing between Models (SQLite) and Collections (API) for data strategy
  • Implementing communication patterns, navigation, and automated cleanup
  • Migrating legacy Classic apps to Alloy or auditing migration risks

Best practices

  • Favor thin controllers (≤100 lines); extract business logic to lib/services
  • Always implement cleanup() on controllers that register global listeners
  • Use PurgeTSS utilities; apply platform modifiers for Ti.UI.iOS/Ti.UI.Android properties
  • Use Navigation service for routing to centralize open/close and auto-cleanup
  • Inject dependencies and avoid hard coupling for testability

Example use cases

  • Create a Navigation service that opens controllers and invokes controller.cleanup on close
  • Convert a large controller to a service + small view/controller pair to reduce lines and improve tests
  • Audit project for PurgeTSS mistakes (platform constants used without modifiers) and fix TSS selectors
  • Decide Models vs Collections for a feature: choose Models for local SQLite persistence, Collections for API-driven data
  • Migrate a Classic Resources/ app.js app to Alloy by mapping views/controllers and extracting services

FAQ

It checks for app/ folders and alloy.jmk/config.json to identify Alloy; Resources/ and root app.js indicate Classic; if neither is present it asks you to confirm.

What if my controller has global listeners?

Add a cleanup() that removes listeners and call $.destroy(); assign $.cleanup = cleanup and ensure Navigation service invokes it on view close.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational