@maccesar/titools 2.5.0 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +832 -228
- package/bin/titools.js +8 -0
- package/lib/commands/list.js +105 -0
- package/lib/config.js +1 -0
- package/package.json +1 -1
- package/skills/alloy-guides/SKILL.md +1 -1
- package/skills/alloy-howtos/SKILL.md +1 -1
- package/skills/purgetss/SKILL.md +1 -1
- package/skills/ti-api/SKILL.md +1 -1
- package/skills/ti-branding/SKILL.md +225 -0
- package/skills/ti-branding/assets/ic_launcher.xml +6 -0
- package/skills/ti-branding/references/android-adaptive-icons.md +85 -0
- package/skills/ti-branding/references/cleanup-legacy.md +112 -0
- package/skills/ti-branding/references/ios-appiconset.md +62 -0
- package/skills/ti-branding/references/master-input-guidelines.md +84 -0
- package/skills/ti-branding/references/notification-icons.md +63 -0
- package/skills/ti-branding/references/splash-screen-api.md +81 -0
- package/skills/ti-branding/references/ti-icon-paths.md +84 -0
- package/skills/ti-branding/references/tiapp-xml-snippets.md +92 -0
- package/skills/ti-branding/scripts/lib/cleanup-legacy.sh +230 -0
- package/skills/ti-branding/scripts/lib/deps.sh +58 -0
- package/skills/ti-branding/scripts/lib/gen-android-adaptive.sh +52 -0
- package/skills/ti-branding/scripts/lib/gen-android-legacy.sh +36 -0
- package/skills/ti-branding/scripts/lib/gen-ios.sh +30 -0
- package/skills/ti-branding/scripts/lib/gen-marketplace.sh +40 -0
- package/skills/ti-branding/scripts/lib/gen-notification.sh +34 -0
- package/skills/ti-branding/scripts/lib/gen-splash-icon.sh +31 -0
- package/skills/ti-branding/scripts/lib/prepare-master.sh +48 -0
- package/skills/ti-branding/scripts/lib/validate.sh +67 -0
- package/skills/ti-branding/scripts/ti-branding +462 -0
- package/skills/ti-expert/SKILL.md +1 -1
- package/skills/ti-guides/SKILL.md +1 -1
- package/skills/ti-howtos/SKILL.md +1 -1
- package/skills/ti-ui/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -1,293 +1,791 @@
|
|
|
1
|
-
|
|
2
|
-
<img src="https://codigomovil.mx/images/logotipo-purgetss-gris.svg" height="230" width="230" alt="PurgeCSS logo"/>
|
|
3
|
-
</p>
|
|
1
|
+
# TiTools - Titanium CLI for AI coding assistants
|
|
4
2
|
|
|
5
3
|
<div align="center">
|
|
6
4
|
|
|
7
|
-

|
|
6
|
+

|
|
7
|
+

|
|
10
8
|
|
|
11
9
|
</div>
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
TiTools is a Titanium SDK toolkit for AI coding assistants. It provides 9 skills, a research agent, and 100+ reference files for Titanium SDK, Alloy MVC, and PurgeTSS.
|
|
12
|
+
|
|
13
|
+
The reference files are maintained against official documentation whenever an official source exists, so the assistant can retrieve current framework behavior instead of guessing from generic training data.
|
|
14
|
+
|
|
15
|
+
Without TiTools, assistants rely on general training data. That data can be outdated or too generic for Titanium work. With TiTools, the assistant can look up Alloy architecture, memory cleanup patterns, PurgeTSS utility classes, and platform-specific APIs.
|
|
16
|
+
|
|
17
|
+
Vercel's AGENTS.md evaluation reports a 100% pass rate for the knowledge index approach, compared to 53-79% using skills alone.
|
|
14
18
|
|
|
15
19
|
---
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
21
|
+
## Safety and disclaimer
|
|
22
|
+
|
|
23
|
+
TiTools modifies files in your Titanium project. In particular, the `ti-branding` skill can write branding assets into `app/platform/android/res/` and, when invoked with the `--cleanup-legacy` flag, **delete** obsolete branding artifacts (iOS launch images, Android legacy splash, density fossil folders, etc.).
|
|
24
|
+
|
|
25
|
+
Recommendations before running destructive operations:
|
|
26
|
+
|
|
27
|
+
- **Commit your project with git** so you can `git restore` if anything looks wrong.
|
|
28
|
+
- **Always run with `--dry-run` first** when using `--cleanup-legacy` or replacing icons. The skill prints every target and its safety reasoning before touching anything.
|
|
29
|
+
- **Review the staging directory** (`.ti-branding/`) before copying generated assets into your project.
|
|
30
|
+
|
|
31
|
+
The maintainers of TiTools accept no responsibility for data loss, build breakage, or any other damage caused by the use of the CLI, skills, or generated scripts. The tool is provided AS IS under the MIT License — see [`LICENSE`](./LICENSE) for the full terms. Use at your own risk.
|
|
25
32
|
|
|
26
33
|
---
|
|
27
34
|
|
|
28
|
-
##
|
|
35
|
+
## Installation
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
### Option A: Plugin Marketplace (Claude Code only)
|
|
31
38
|
|
|
32
|
-
|
|
39
|
+
The fastest way to get started with Claude Code. One command to add the marketplace, one to install:
|
|
33
40
|
|
|
34
|
-
```
|
|
35
|
-
|
|
41
|
+
```bash
|
|
42
|
+
/plugin marketplace add macCesar/titools
|
|
43
|
+
/plugin install titools@maccesar-titools
|
|
36
44
|
```
|
|
37
45
|
|
|
38
|
-
|
|
46
|
+
What you get:
|
|
47
|
+
- All 9 Titanium skills
|
|
48
|
+
- ti-pro research agent
|
|
49
|
+
- Session hook that auto-detects Titanium projects (`tiapp.xml`, Alloy, PurgeTSS)
|
|
50
|
+
- Slash commands: `/ti-check`, `/ti-new-screen`, `/ti-audit`
|
|
51
|
+
- Auto-updates via marketplace
|
|
39
52
|
|
|
40
|
-
###
|
|
53
|
+
### Option B: CLI (Claude Code, Gemini CLI, Codex CLI)
|
|
41
54
|
|
|
42
|
-
|
|
43
|
-
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
-
| `play(views, cb)` / `toggle(views, cb)` | Animate views from current state to the animation state. Toggles `open`/`close` on each call. |
|
|
45
|
-
| `open(views, cb)` | Explicitly run the `open` state animation. |
|
|
46
|
-
| `close(views, cb)` | Explicitly run the `close` state animation. |
|
|
47
|
-
| `apply(views, cb)` | Apply properties instantly without animation. |
|
|
48
|
-
| `draggable(views)` | Make a view or array of views draggable inside their parent. |
|
|
49
|
-
| `undraggable(views)` | Remove draggable behavior and clean up all listeners. |
|
|
50
|
-
| `detectCollisions(views, dragCB, dropCB)` | Enable collision detection on draggable views with hover and drop callbacks. |
|
|
51
|
-
| `swap(view1, view2)` | Animate two views exchanging positions. Auto-normalizes position from margins/right/center via `view.rect`. Inherits `duration`, `delay`, `curve`; fallback: 200ms. |
|
|
52
|
-
| `sequence(views, cb)` | Animate views one after another. Callback fires after the last view. |
|
|
53
|
-
| `shake(view, intensity)` | Bidirectional shake animation for error feedback. Inherits `duration`, `delay`; fallback: 400ms. Default intensity: 10px. |
|
|
54
|
-
| `pulse(view, count)` | Scale-up-and-back pulse animation. Scale from Animation object (default 1.2x). Count: number of pulses (default 1). |
|
|
55
|
-
| `snapTo(view, targets)` | Snap a view to the nearest target by center distance. Auto-normalizes target position. Inherits `duration`, `delay`, `curve`; fallback: 200ms. |
|
|
56
|
-
| `reorder(views, newOrder)` | Animate views to new positions based on index mapping. Auto-normalizes positions. Inherits `duration`, `delay`, `curve`; fallback: 200ms. |
|
|
57
|
-
| `transition(views, layouts)` | Multi-view layout transitions using `Matrix2D.translate().rotate().scale()`. Layout properties: `translation`, `rotate`, `scale`, `zIndex`. Compatible with TiDesigner presets. Views without a layout entry fade out; returning views fade in. |
|
|
55
|
+
Cross-platform installation via npm. Works with all three AI coding assistants:
|
|
58
56
|
|
|
59
|
-
|
|
57
|
+
```bash
|
|
58
|
+
# 1) Install the CLI
|
|
59
|
+
npm install -g @maccesar/titools
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
# 2) Install skills globally
|
|
62
|
+
titools install
|
|
62
63
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
type: String, // event type ('complete' or 'applied')
|
|
66
|
-
bubbles: Boolean,
|
|
67
|
-
cancelBubble: Boolean,
|
|
68
|
-
action: String, // 'play' or 'apply'
|
|
69
|
-
state: String, // 'open' or 'close'
|
|
70
|
-
id: String, // Animation object ID
|
|
71
|
-
targetId: String, // ID of the animated view
|
|
72
|
-
index: Number, // position in array (0-based)
|
|
73
|
-
total: Number, // total views in array
|
|
74
|
-
getTarget: Function // returns the animated view object
|
|
75
|
-
}
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
When animating an **array of views**, the callback is called once per view with the corresponding `index` and `total` values.
|
|
64
|
+
# 3) Go to your Titanium project
|
|
65
|
+
cd /path/to/your/project
|
|
79
66
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
# 4) Sync the knowledge index into your project files
|
|
68
|
+
titools sync
|
|
69
|
+
|
|
70
|
+
# 5) Start your AI coding assistant
|
|
71
|
+
claude # or gemini, or codex
|
|
72
|
+
|
|
73
|
+
# 6) Ask away!
|
|
74
|
+
# "How should I structure a new app with login, signup, and a dashboard?"
|
|
75
|
+
# "My ListView with 500 items scrolls poorly on Android. How do I fix it?"
|
|
87
76
|
```
|
|
88
77
|
|
|
89
|
-
|
|
78
|
+
What gets installed:
|
|
79
|
+
- All 9 titanium-related skills to `~/.agents/skills/`
|
|
80
|
+
- ti-pro agent for Claude Code
|
|
81
|
+
- Platform symlinks (Claude Code, Gemini CLI, Codex CLI)
|
|
82
|
+
- Knowledge index in your project's `AGENTS.md`/`CLAUDE.md`/`GEMINI.md`
|
|
83
|
+
- Claude Code SessionStart hook for auto-updates
|
|
90
84
|
|
|
91
|
-
|
|
85
|
+
Why NPM?
|
|
86
|
+
- Cross-platform (macOS, Linux, Windows)
|
|
87
|
+
- No sudo required
|
|
88
|
+
- Auto-updates via Claude Code hook (checks once per day)
|
|
92
89
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
90
|
+
### Which option should I use?
|
|
91
|
+
|
|
92
|
+
| | Plugin (Option A) | CLI (Option B) |
|
|
93
|
+
|---|---|---|
|
|
94
|
+
| **Claude Code** | Recommended | Supported |
|
|
95
|
+
| **Gemini CLI** | Not available | Supported |
|
|
96
|
+
| **Codex CLI** | Not available | Supported |
|
|
97
|
+
| **Knowledge Index** | Not included | Included (`titools sync`) |
|
|
98
|
+
| **Auto-updates** | Via marketplace | Via SessionStart hook |
|
|
99
|
+
| **Slash commands** | `/ti-check`, `/ti-new-screen`, `/ti-audit` | Not available |
|
|
100
|
+
| **Session hook** | Auto-detects Titanium projects | Auto-update only |
|
|
101
|
+
|
|
102
|
+
Use **Option A** if you only use Claude Code. Use **Option B** if you use multiple AI assistants or want the Knowledge Index feature.
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
## Compatible platforms
|
|
107
|
+
|
|
108
|
+
| Platform | Status | Installation Path |
|
|
109
|
+
| --------------------------------------------------------- | ---------------- | ------------------- |
|
|
110
|
+
| [Claude Code](https://claude.ai/claude-code) | Fully Compatible | `~/.claude/skills/` |
|
|
111
|
+
| [Gemini CLI](https://github.com/google-gemini/gemini-cli) | Fully Compatible | `~/.gemini/skills/` |
|
|
112
|
+
| [Codex CLI](https://developers.openai.com/codex/cli/) | Fully Compatible | `~/.codex/skills/` |
|
|
113
|
+
|
|
114
|
+
All three platforms use the Agent Skills open standard: a `SKILL.md` file with YAML frontmatter.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## Knowledge index
|
|
119
|
+
|
|
120
|
+
The knowledge index is a compressed documentation map that gets injected into your project's instruction files. It tells the AI where Titanium reference docs are, so it can pull accurate information from the installed references instead of relying on general training data.
|
|
121
|
+
|
|
122
|
+
### Why it works
|
|
123
|
+
|
|
124
|
+
| Approach | Reported Pass Rate |
|
|
125
|
+
| ---------------- | ------------------ |
|
|
126
|
+
| No documentation | 53% |
|
|
127
|
+
| Skills only | 53-79% |
|
|
128
|
+
| Knowledge index | 100% |
|
|
129
|
+
|
|
130
|
+
Per Vercel's evaluation:
|
|
131
|
+
- No decision point: information is present without needing to invoke skills
|
|
132
|
+
- Consistent availability: available in every turn, not async-loaded
|
|
133
|
+
- No ordering issues: avoids "read docs first vs explore project first"
|
|
134
|
+
|
|
135
|
+
For details, see `AGENTS-VERCEL-RESEARCH.md`.
|
|
136
|
+
|
|
137
|
+
### What gets generated
|
|
138
|
+
|
|
139
|
+
The `titools sync` command generates a block like this inside your project files:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
[Titanium SDK Docs Index]|root: ~/.agents/skills
|
|
143
|
+
|MANDATORY: Your training data for Titanium SDK, Alloy, and PurgeTSS is OUTDATED and INCOMPLETE. These reference files are the SINGLE SOURCE OF TRUTH. Prefer retrieval-led reasoning over pre-training-led reasoning. ALWAYS read the relevant files below BEFORE writing any code.
|
|
144
|
+
|ti-expert/references:{alloy-structure.md,anti-patterns.md,...}
|
|
145
|
+
|purgetss/references:{animation-system.md,class-index.md,...}
|
|
146
|
+
|ti-ui/references:{layouts-and-positioning.md,listviews-and-performance.md,...}
|
|
147
|
+
...
|
|
100
148
|
```
|
|
101
149
|
|
|
102
|
-
|
|
150
|
+
Note: The index is injected as direct content (no code blocks) so the model treats it as an active instruction, not illustrative text.
|
|
103
151
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
152
|
+
File selection per assistant:
|
|
153
|
+
- Claude Code -> `CLAUDE.md`
|
|
154
|
+
- Gemini CLI -> `GEMINI.md`
|
|
155
|
+
- Codex CLI / others -> `AGENTS.md`
|
|
156
|
+
|
|
157
|
+
### How skills and the knowledge index work together
|
|
158
|
+
|
|
159
|
+
The knowledge index provides always-available context (the documentation map). Skills provide specialized, on-demand expertise (the actual knowledge).
|
|
160
|
+
|
|
161
|
+
Together they work like this:
|
|
162
|
+
|
|
163
|
+
| Your Question | Knowledge Index Provides | Skills Activate |
|
|
164
|
+
| ------------------------------- | ------------------------------- | ----------------------------- |
|
|
165
|
+
| "Create a login screen" | Context about project structure | `ti-expert`, `ti-ui` |
|
|
166
|
+
| "Optimize ListView performance" | Points to docs location | `ti-ui` reads specific files |
|
|
167
|
+
| "Implement push notifications" | API reference paths | `ti-howtos` provides workflow |
|
|
168
|
+
|
|
169
|
+
You do not need to explicitly invoke skills. The AI detects when to use them based on your question.
|
|
170
|
+
|
|
171
|
+
### Version notice
|
|
172
|
+
|
|
173
|
+
The knowledge index is based on the latest Titanium SDK documentation. If your project uses an older version, the command will warn you about potential API differences.
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Skills overview
|
|
178
|
+
|
|
179
|
+
| Skill | Purpose | Best For |
|
|
180
|
+
| ------------ | ------------------------------- | --------------------------------------- |
|
|
181
|
+
| alloy-guides | Alloy MVC reference | Models, Views, Controllers, Widgets |
|
|
182
|
+
| alloy-howtos | Alloy CLI and debugging | Project setup, CLI commands, errors |
|
|
183
|
+
| purgetss | Utility-first styling | UI styling and animations |
|
|
184
|
+
| ti-api | Complete API reference | Properties, methods, events, constants |
|
|
185
|
+
| ti-branding | Icon and splash generator | App icons, adaptive icons, splash, notifications, store artwork, legacy cleanup |
|
|
186
|
+
| ti-expert | Architecture and implementation | Starting point for most tasks |
|
|
187
|
+
| ti-guides | SDK fundamentals | Hyperloop, distribution, configuration |
|
|
188
|
+
| ti-howtos | Native feature integration | Location, Push, Media, Platform APIs |
|
|
189
|
+
| ti-ui | UI/UX patterns | Complex layouts, ListViews, platform UI |
|
|
190
|
+
|
|
191
|
+
Note: `ti-guides`, `ti-howtos`, `ti-ui`, `alloy-guides`, and `alloy-howtos` are based on official Titanium SDK and Alloy documentation. `purgetss` is opinionated in workflow and conventions, but its reference files are audited against the official PurgeTSS documentation for verifiable classes and behavior. `ti-expert` and `purgetss` reflect personal coding conventions (biased toward PurgeTSS).
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
## Agents (Claude Code only)
|
|
196
|
+
|
|
197
|
+
In addition to skills, this repository includes sub-agents for Claude Code. Sub-agents run in isolated contexts and are useful for research tasks that produce verbose output.
|
|
198
|
+
|
|
199
|
+
### ti-pro
|
|
200
|
+
|
|
201
|
+
Deep-dive research specialist that preloads all 8 titanium-related documentation skills.
|
|
202
|
+
|
|
203
|
+
| Aspect | Details |
|
|
204
|
+
| ---------------- | ------------------------------------------------- |
|
|
205
|
+
| Location | `~/.claude/agents/ti-pro.md` |
|
|
206
|
+
| Model | Sonnet (comprehensive analysis) |
|
|
207
|
+
| Tools | Read-only (Read, Grep, Glob) |
|
|
208
|
+
| Preloaded Skills | All 8 Titanium documentation skills injected at startup |
|
|
209
|
+
|
|
210
|
+
When to use the agent vs skills:
|
|
211
|
+
|
|
212
|
+
| Use Case | Use This | Why |
|
|
213
|
+
| ---------------------------- | ------------------------------- | ---------------------------------------------------- |
|
|
214
|
+
| Quick inline reference | `/ti-expert`, `/purgetss`, etc. | Runs in main conversation, interactive |
|
|
215
|
+
| Analyzing an entire codebase | `ti-pro` agent | Isolates verbose output, cross-references all skills |
|
|
216
|
+
| Multi-feature research | `ti-pro` agent | Preloads all skills for comprehensive answers |
|
|
217
|
+
| Step-by-step implementation | Skills directly | Task-oriented guidance |
|
|
218
|
+
| Architecture review | `ti-pro` agent | Read-only analysis across all documentation |
|
|
219
|
+
|
|
220
|
+
Example prompts for the agent:
|
|
221
|
+
|
|
222
|
+
```
|
|
223
|
+
"Can you use the ti-pro agent to analyze this Alloy codebase's architecture?"
|
|
224
|
+
"Can you research how to combine location, push, and background sync in Titanium?"
|
|
225
|
+
"Can you compare ListView vs TableView performance for my use case?"
|
|
226
|
+
"Review this Titanium mobile app and identify anti-patterns."
|
|
108
227
|
```
|
|
109
228
|
|
|
110
|
-
|
|
229
|
+
Tip: For automatic activation, include words like "Titanium", "Alloy", or "mobile app" in your prompt to ensure the specialized agent is used instead of generic code analysis.
|
|
111
230
|
|
|
112
|
-
|
|
231
|
+
Key difference:
|
|
232
|
+
- Skills = interactive help during development (inline, conversational)
|
|
233
|
+
- Agents = isolated research tasks (returns summary, keeps verbose output separate)
|
|
113
234
|
|
|
114
|
-
|
|
235
|
+
---
|
|
236
|
+
|
|
237
|
+
## Slash Commands (Plugin only)
|
|
238
|
+
|
|
239
|
+
When installed as a plugin, TiTools provides slash commands for common tasks:
|
|
240
|
+
|
|
241
|
+
| Command | Description |
|
|
242
|
+
|---|---|
|
|
243
|
+
| `/ti-check` | Verify project setup: SDK version, Alloy structure, PurgeTSS config, common issues |
|
|
244
|
+
| `/ti-new-screen <name>` | Create a new Alloy screen (controller + view + style) following project conventions |
|
|
245
|
+
| `/ti-audit` | Audit project for anti-patterns, memory leaks, and best practice violations |
|
|
246
|
+
|
|
247
|
+
These commands automatically invoke the relevant skills:
|
|
248
|
+
- `/ti-check` reads `tiapp.xml` and reports project health
|
|
249
|
+
- `/ti-new-screen` uses `alloy-guides` + `purgetss` to create properly structured files
|
|
250
|
+
- `/ti-audit` uses `ti-expert` + `ti-ui` + `purgetss` + `alloy-guides` for comprehensive review
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
## Session Hook (Plugin only)
|
|
255
|
+
|
|
256
|
+
The plugin includes a session start hook that auto-detects Titanium projects. When you open Claude Code in a directory with `tiapp.xml`, it automatically reports:
|
|
115
257
|
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
$.myAnimation.detectCollisions(views, onHover, onDrop)
|
|
258
|
+
```
|
|
259
|
+
Titanium Alloy + PurgeTSS project detected. TiTools skills are available and MUST be used...
|
|
119
260
|
```
|
|
120
261
|
|
|
121
|
-
|
|
122
|
-
- `target` is the view under the drag center, or `null` when leaving all targets
|
|
123
|
-
- Use this to show visual feedback (highlights, borders, scaling)
|
|
262
|
+
This ensures Claude knows it's a Titanium project from the first prompt, preventing it from writing generic code.
|
|
124
263
|
|
|
125
|
-
|
|
126
|
-
- `target` is the view where the source was released
|
|
127
|
-
- If no target is found, the source automatically snaps back to its original position with a 200ms animation
|
|
264
|
+
---
|
|
128
265
|
|
|
129
|
-
|
|
266
|
+
## How skills work
|
|
130
267
|
|
|
131
|
-
|
|
268
|
+
Skills are automatically activated based on your questions. Just ask naturally:
|
|
132
269
|
|
|
133
|
-
```
|
|
134
|
-
|
|
270
|
+
```
|
|
271
|
+
"Can you create a login screen with email validation and animations?"
|
|
135
272
|
```
|
|
136
273
|
|
|
137
|
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
- Updates internal `_originLeft`/`_originTop` for subsequent drag operations
|
|
274
|
+
The AI will automatically use:
|
|
275
|
+
- `ti-expert` -> Architecture and controller structure
|
|
276
|
+
- `purgetss` -> Styling classes and animations (if PurgeTSS detected)
|
|
277
|
+
- `ti-howtos` -> Secure token storage
|
|
142
278
|
|
|
143
|
-
|
|
279
|
+
You do not need to call skills explicitly. The AI reads skill descriptions and loads the appropriate knowledge when needed.
|
|
144
280
|
|
|
145
|
-
|
|
281
|
+
### Project detection
|
|
146
282
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
283
|
+
All skills include automatic project detection to ensure compatibility:
|
|
284
|
+
|
|
285
|
+
| Skill | What It Detects | How It Works |
|
|
286
|
+
| ------------ | --------------------- | ------------------------------------------------------------- |
|
|
287
|
+
| purgetss | PurgeTSS installation | Checks for `purgetss/` folder, `config.cjs`, `utilities.tss` |
|
|
288
|
+
| ti-expert | Alloy vs Classic | Checks for `app/` (Alloy) vs `Resources/` (Classic) structure |
|
|
289
|
+
| alloy-guides | Alloy projects | Checks for `app/views/`, `app/controllers/` |
|
|
290
|
+
| alloy-howtos | Alloy projects | Checks for `alloy.jmk`, `config.json` |
|
|
291
|
+
| ti-ui | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
|
|
292
|
+
| ti-guides | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
|
|
293
|
+
| ti-howtos | Titanium projects | Checks for `tiapp.xml` (both Alloy and Classic) |
|
|
294
|
+
|
|
295
|
+
Why this matters:
|
|
296
|
+
- PurgeTSS suggestions are only provided if PurgeTSS is installed
|
|
297
|
+
- Alloy-specific patterns are only suggested for Alloy projects
|
|
298
|
+
- Classic Titanium projects will not receive inappropriate Alloy advice
|
|
299
|
+
|
|
300
|
+
### Skill hierarchy
|
|
301
|
+
|
|
302
|
+
`ti-expert` acts as the orchestrator, delegating to specialized skills when needed:
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
┌─────────────────┐
|
|
306
|
+
│ ti-expert │
|
|
307
|
+
│ (Start Here) │
|
|
308
|
+
└────────┬────────┘
|
|
309
|
+
│
|
|
310
|
+
┌────────────────────┼────────────────────┐
|
|
311
|
+
│ │ │
|
|
312
|
+
▼ ▼ ▼
|
|
313
|
+
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
|
314
|
+
│ purgetss │ │ ti-ui │ │ ti-howtos │
|
|
315
|
+
│ (Styling) │ │ (UI/UX) │ │ (Native) │
|
|
316
|
+
└───────────────┘ └───────────────┘ └───────────────┘
|
|
317
|
+
│ │ │
|
|
318
|
+
└────────────────────┼────────────────────┘
|
|
319
|
+
│
|
|
320
|
+
┌────────────────────┼────────────────────┐
|
|
321
|
+
│ │ │
|
|
322
|
+
▼ ▼ ▼
|
|
323
|
+
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
|
|
324
|
+
│ ti-guides │ │ alloy-guides │ │ alloy-howtos │
|
|
325
|
+
│ (SDK) │ │ (MVC) │ │ (CLI) │
|
|
326
|
+
└───────────────┘ └───────────────┘ └───────────────┘
|
|
151
327
|
```
|
|
152
328
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Skill details
|
|
156
332
|
|
|
157
|
-
###
|
|
333
|
+
### ti-expert
|
|
158
334
|
|
|
159
|
-
|
|
335
|
+
The primary skill for Titanium Alloy development. Start here for most tasks.
|
|
160
336
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
337
|
+
When it activates:
|
|
338
|
+
- Designing project structure
|
|
339
|
+
- Implementing controllers, views, services
|
|
340
|
+
- Choosing data strategies (Models vs Collections)
|
|
341
|
+
- Writing clean ES6+ code
|
|
342
|
+
- Memory management and cleanup patterns
|
|
343
|
+
- Performance optimization
|
|
344
|
+
- Security patterns
|
|
345
|
+
- Migrating legacy apps
|
|
346
|
+
|
|
347
|
+
Example prompts:
|
|
348
|
+
```
|
|
349
|
+
"How should I structure a new Titanium Alloy app with authentication?"
|
|
350
|
+
"Create a user service that fetches data from an API."
|
|
351
|
+
"What's the best pattern for navigation between screens?"
|
|
352
|
+
"Prevent memory leaks in my controllers."
|
|
353
|
+
"Migrate classic Titanium code to modern Alloy patterns."
|
|
354
|
+
"What's a clean way to organize services in an Alloy app?"
|
|
165
355
|
```
|
|
166
356
|
|
|
167
|
-
|
|
357
|
+
Key features:
|
|
358
|
+
- Quick decision matrix for common questions
|
|
359
|
+
- 18 reference guides for deep dives
|
|
360
|
+
- Delegates to specialized skills when needed
|
|
168
361
|
|
|
169
|
-
|
|
362
|
+
---
|
|
170
363
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
364
|
+
### purgetss
|
|
365
|
+
|
|
366
|
+
Utility-first styling toolkit for Titanium/Alloy.
|
|
367
|
+
|
|
368
|
+
When it activates:
|
|
369
|
+
- Setting up PurgeTSS in a project
|
|
370
|
+
- Complex layouts (Grid system)
|
|
371
|
+
- Declarative animations (`<Animation>` component)
|
|
372
|
+
- Icon fonts (Font Awesome, Material Icons)
|
|
373
|
+
- Custom color palettes
|
|
374
|
+
- Platform-specific styling
|
|
375
|
+
- config.cjs configuration
|
|
376
|
+
|
|
377
|
+
Example prompts:
|
|
176
378
|
```
|
|
379
|
+
"How do I set up PurgeTSS in my existing Alloy project?"
|
|
380
|
+
"Create a responsive 12-column grid layout."
|
|
381
|
+
"Add a fade-in animation when my view appears."
|
|
382
|
+
"How do I configure custom colors in config.cjs?"
|
|
383
|
+
"How do I use Font Awesome 7 icons?"
|
|
384
|
+
"Style this button differently on iOS vs Android."
|
|
385
|
+
```
|
|
386
|
+
|
|
387
|
+
Rules:
|
|
388
|
+
- Platform-specific properties require modifiers (e.g., `[platform=ios]`) to prevent cross-platform build failures
|
|
389
|
+
- No flexbox (`flex-row`, `justify-between`) -> use `horizontal`/`vertical`
|
|
390
|
+
- No `w-full` -> use `w-screen`
|
|
391
|
+
- No `p-*` on Views -> use `m-*` on children
|
|
392
|
+
- Arbitrary values use parentheses: `w-(100px)`, not `w-[100px]`
|
|
177
393
|
|
|
178
|
-
|
|
394
|
+
---
|
|
179
395
|
|
|
180
|
-
|
|
396
|
+
### ti-ui
|
|
181
397
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
398
|
+
UI/UX expert for layouts and platform components.
|
|
399
|
+
|
|
400
|
+
When it activates:
|
|
401
|
+
- Layout systems (composite, vertical, horizontal)
|
|
402
|
+
- ListView/TableView optimization
|
|
403
|
+
- Event handling and bubbling
|
|
404
|
+
- Animations and transforms
|
|
405
|
+
- Gestures (swipe, pinch, longpress)
|
|
406
|
+
- Orientation handling
|
|
407
|
+
- App icons and splash screens
|
|
408
|
+
- Android Action Bar / iOS Navigation patterns
|
|
409
|
+
- Accessibility (VoiceOver, TalkBack)
|
|
410
|
+
|
|
411
|
+
Example prompts:
|
|
412
|
+
```
|
|
413
|
+
"How do I create a high-performance ListView with custom templates?"
|
|
414
|
+
"Handle swipe gestures on table rows."
|
|
415
|
+
"Set up app icons for all iOS and Android densities."
|
|
416
|
+
"Implement pull-to-refresh on a ScrollView."
|
|
417
|
+
"How do I make my app accessible for VoiceOver users?"
|
|
418
|
+
"How do I configure the Android Action Bar with custom menu items?"
|
|
185
419
|
```
|
|
186
420
|
|
|
187
|
-
|
|
188
|
-
-
|
|
421
|
+
Key rules:
|
|
422
|
+
- No `Ti.UI.SIZE` in ListView items (causes jerky scrolling)
|
|
423
|
+
- Prefer ListView over TableView for large datasets
|
|
424
|
+
- Use `dp` units for cross-platform consistency
|
|
425
|
+
- Remove global listeners on pause
|
|
189
426
|
|
|
190
|
-
|
|
427
|
+
---
|
|
191
428
|
|
|
192
|
-
|
|
429
|
+
### ti-howtos
|
|
430
|
+
|
|
431
|
+
Native feature integration expert.
|
|
432
|
+
|
|
433
|
+
When it activates:
|
|
434
|
+
- Location services and Maps
|
|
435
|
+
- Push notifications (APNs/FCM)
|
|
436
|
+
- Local notifications
|
|
437
|
+
- Camera and Gallery
|
|
438
|
+
- Audio/Video playback
|
|
439
|
+
- File system operations
|
|
440
|
+
- SQLite databases
|
|
441
|
+
- HTTPClient networking
|
|
442
|
+
- WebView integration
|
|
443
|
+
- Android Intents and Services
|
|
444
|
+
- iOS Background Services, iCloud, Keychain
|
|
445
|
+
- Core Motion, WatchKit
|
|
446
|
+
|
|
447
|
+
Example prompts:
|
|
448
|
+
```
|
|
449
|
+
"How do I implement battery-efficient GPS tracking?"
|
|
450
|
+
"How do I set up push notifications for iOS and Android?"
|
|
451
|
+
"How do I capture and resize photos from the camera?"
|
|
452
|
+
"Download files with a progress indicator."
|
|
453
|
+
"How should I store sensitive data in iOS Keychain?"
|
|
454
|
+
"Create an Android background service."
|
|
455
|
+
"Integrate with Apple Watch using WatchKit."
|
|
456
|
+
"Handle background location updates on iOS."
|
|
457
|
+
```
|
|
193
458
|
|
|
194
|
-
|
|
195
|
-
|
|
459
|
+
Key rules:
|
|
460
|
+
- Always handle both `onload` and `onerror` for HTTPClient
|
|
461
|
+
- Always close database handles and result sets
|
|
462
|
+
- Use `imageAsResized` to avoid memory exhaustion
|
|
463
|
+
- Configure proper permissions in tiapp.xml
|
|
464
|
+
|
|
465
|
+
---
|
|
466
|
+
|
|
467
|
+
### ti-guides
|
|
468
|
+
|
|
469
|
+
SDK fundamentals and advanced configuration.
|
|
470
|
+
|
|
471
|
+
When it activates:
|
|
472
|
+
- Hyperloop native access
|
|
473
|
+
- Native module development
|
|
474
|
+
- App distribution (Play Store, App Store)
|
|
475
|
+
- tiapp.xml configuration
|
|
476
|
+
- CLI commands and options
|
|
477
|
+
- Memory and bridge optimization
|
|
478
|
+
- CommonJS module patterns
|
|
479
|
+
- Coding best practices
|
|
480
|
+
|
|
481
|
+
Example prompts:
|
|
482
|
+
```
|
|
483
|
+
"How do I access native iOS APIs using Hyperloop?"
|
|
484
|
+
"Configure tiapp.xml for a production build."
|
|
485
|
+
"What do I need for Google Play submission?"
|
|
486
|
+
"How do I create a native Android module?"
|
|
487
|
+
"Optimize bridge crossings for better performance."
|
|
488
|
+
"List reserved words I should avoid."
|
|
196
489
|
```
|
|
197
490
|
|
|
198
|
-
|
|
491
|
+
---
|
|
199
492
|
|
|
200
|
-
|
|
493
|
+
### alloy-guides
|
|
201
494
|
|
|
202
|
-
|
|
203
|
-
|
|
495
|
+
Complete Alloy MVC framework reference.
|
|
496
|
+
|
|
497
|
+
When it activates:
|
|
498
|
+
- MVC architecture concepts
|
|
499
|
+
- Backbone.js models and collections
|
|
500
|
+
- Data binding patterns
|
|
501
|
+
- XML markup elements
|
|
502
|
+
- TSS styling syntax
|
|
503
|
+
- Widget development
|
|
504
|
+
- Sync adapters (sql, properties)
|
|
505
|
+
- Migrations
|
|
506
|
+
|
|
507
|
+
Example prompts:
|
|
508
|
+
```
|
|
509
|
+
"Explain how Alloy data binding works."
|
|
510
|
+
"How do I create a model with the SQLite adapter?"
|
|
511
|
+
"Bind a collection to a TableView."
|
|
512
|
+
"How do I build a reusable widget?"
|
|
513
|
+
"Show the TSS syntax for platform-specific styles."
|
|
514
|
+
"How does the Alloy compilation process work?"
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
---
|
|
518
|
+
|
|
519
|
+
### alloy-howtos
|
|
520
|
+
|
|
521
|
+
Alloy CLI, configuration, and debugging.
|
|
522
|
+
|
|
523
|
+
When it activates:
|
|
524
|
+
- Alloy CLI commands (new, generate, compile)
|
|
525
|
+
- Configuration files (alloy.jmk, config.json)
|
|
526
|
+
- Debugging compilation errors
|
|
527
|
+
- Conditional views
|
|
528
|
+
- Custom XML tags
|
|
529
|
+
- Best practices and naming conventions
|
|
530
|
+
- Backbone.Events patterns
|
|
531
|
+
|
|
532
|
+
Example prompts:
|
|
533
|
+
```
|
|
534
|
+
"How do I generate a new model with the CLI?"
|
|
535
|
+
"Configure alloy.jmk build hooks."
|
|
536
|
+
"How do I fix "No app.js found"?"
|
|
537
|
+
"Create conditional views based on user state."
|
|
538
|
+
"How do I build a custom XML tag without widgets?"
|
|
539
|
+
"Set up Backbone.Events for global communication."
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Key rules:
|
|
543
|
+
- Use Backbone.Events instead of Ti.App.fireEvent
|
|
544
|
+
- Never use double underscore prefixes (`__foo`)
|
|
545
|
+
- Access config at runtime with `Alloy.CFG.yourKey`
|
|
546
|
+
|
|
547
|
+
---
|
|
548
|
+
|
|
549
|
+
## Usage examples and best practices
|
|
550
|
+
|
|
551
|
+
### Example prompts
|
|
552
|
+
|
|
553
|
+
Starting a new project:
|
|
554
|
+
```
|
|
555
|
+
"I'm starting a new Titanium Alloy app for a food delivery service.
|
|
556
|
+
Can you help me set up the project structure?"
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
UI development:
|
|
560
|
+
```
|
|
561
|
+
"Can you create a product listing screen with:
|
|
562
|
+
- Pull-to-refresh
|
|
563
|
+
- Infinite scroll pagination
|
|
564
|
+
- Image caching
|
|
565
|
+
- Swipe-to-delete"
|
|
204
566
|
```
|
|
205
567
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
568
|
+
API integration:
|
|
569
|
+
```
|
|
570
|
+
"Can you build a complete authentication flow with:
|
|
571
|
+
- Login/Register screens
|
|
572
|
+
- JWT token management
|
|
573
|
+
- Secure storage
|
|
574
|
+
- Auto-refresh tokens"
|
|
575
|
+
```
|
|
213
576
|
|
|
214
|
-
|
|
577
|
+
Performance optimization:
|
|
578
|
+
```
|
|
579
|
+
"My app is slow - the ListView scrolls poorly and memory usage is high. How do I optimize it?"
|
|
580
|
+
```
|
|
215
581
|
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
582
|
+
Migration:
|
|
583
|
+
```
|
|
584
|
+
"I have a legacy Titanium classic app from 2015. Can you help me migrate it to modern Alloy?"
|
|
585
|
+
```
|
|
219
586
|
|
|
220
|
-
|
|
587
|
+
Platform-specific features:
|
|
588
|
+
```
|
|
589
|
+
"How do I implement Apple Sign-In for iOS and Google Sign-In for Android?"
|
|
590
|
+
```
|
|
221
591
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
| `rotate-{n}` | 2D rotation in degrees |
|
|
227
|
-
| `scale-{n}` | Scale factor |
|
|
228
|
-
| `repeat-{n}` | Number of repeats |
|
|
229
|
-
| `ease-in`, `ease-out`, `ease-linear`, `ease-in-out` | Timing curve |
|
|
230
|
-
| `zoom-in-{n}`, `zoom-out-{n}` | Zoom animations |
|
|
231
|
-
| `drag-apply`, `drag-animate` | Drag interaction style |
|
|
232
|
-
| `vertical-constraint`, `horizontal-constraint` | Constrain drag axis |
|
|
592
|
+
Debugging:
|
|
593
|
+
```
|
|
594
|
+
"How do I fix "Alloy is not defined" in my lib file?"
|
|
595
|
+
```
|
|
233
596
|
|
|
234
|
-
|
|
597
|
+
Codebase analysis (using agent):
|
|
598
|
+
```
|
|
599
|
+
"Use the ti-pro agent to analyze this project and:
|
|
600
|
+
- review the overall architecture
|
|
601
|
+
- identify memory leak patterns
|
|
602
|
+
- check for common anti-patterns
|
|
603
|
+
- suggest improvements"
|
|
604
|
+
```
|
|
235
605
|
|
|
236
|
-
|
|
237
|
-
| -------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
238
|
-
| `deviceInfo()` | Logs detailed platform and display information to the console. Works in both Alloy and Classic projects. |
|
|
239
|
-
| `saveComponent({ source, directory })` | Saves a view snapshot as PNG to the photo gallery. |
|
|
606
|
+
### Tips for better results
|
|
240
607
|
|
|
241
|
-
|
|
608
|
+
1. Be specific. Instead of "Make a list", try "Can you create a ListView with user avatars, names, and swipe actions?"
|
|
609
|
+
2. Provide context. Instead of "How do I fix this error?", try "I'm getting this error when compiling: [error message]. Here's my code: [code]"
|
|
610
|
+
3. Ask for architecture first. For complex features, start with "How should I architect a real-time chat feature?" then follow up with implementation details.
|
|
611
|
+
4. Mention constraints. "Build a settings screen. Must work offline and sync when connected."
|
|
612
|
+
5. Reference existing code. "Here's my current controller. How can I improve memory management?"
|
|
613
|
+
|
|
614
|
+
More examples: See [Example Prompts](EXAMPLE-PROMPTS.md) for detailed prompts that test each skill's capabilities.
|
|
242
615
|
|
|
243
616
|
---
|
|
244
617
|
|
|
245
|
-
##
|
|
618
|
+
## CLI reference
|
|
246
619
|
|
|
247
|
-
|
|
620
|
+
### titools install
|
|
248
621
|
|
|
249
|
-
|
|
250
|
-
| ----------- | --------------------------------------- |
|
|
251
|
-
| `Window` | `backgroundColor: '#FFFFFF'` |
|
|
252
|
-
| `View` | `width: Ti.UI.SIZE, height: Ti.UI.SIZE` |
|
|
253
|
-
| `ImageView` | `hires: true` (iOS only) |
|
|
622
|
+
Installs Titanium skills, agents, and platform symlinks.
|
|
254
623
|
|
|
255
|
-
|
|
624
|
+
```bash
|
|
625
|
+
titools install [options]
|
|
626
|
+
```
|
|
256
627
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
628
|
+
Options:
|
|
629
|
+
| Option | Description |
|
|
630
|
+
| --------------- | ------------------------------------------------------------------- |
|
|
631
|
+
| `-l, --local` | Install skills locally in the current project (`./.agents/skills/`) |
|
|
632
|
+
| `-a, --all` | Install to all detected platforms without prompting |
|
|
633
|
+
| `--path <path>` | Install to a custom path (skips symlink setup) |
|
|
634
|
+
|
|
635
|
+
Behavior depends on where you run it:
|
|
636
|
+
|
|
637
|
+
| Context | Behavior |
|
|
638
|
+
| -------------------------- | --------------------------------------------------------------------- |
|
|
639
|
+
| Outside a Titanium project | Installs skills globally to `~/.agents/skills/` |
|
|
640
|
+
| Inside a Titanium project | Prompts you to choose: Global or Local installation |
|
|
641
|
+
| With `--local` flag | Installs skills locally to `./.agents/skills/` in the current project |
|
|
642
|
+
|
|
643
|
+
What it does:
|
|
644
|
+
- Installs all 7 titanium-related skills (global or local depending on context)
|
|
645
|
+
- Installs ti-pro agent for Claude Code
|
|
646
|
+
- Detects installed AI platforms and lets you choose which to link
|
|
647
|
+
- Creates symlinks from platform directories to central skills
|
|
648
|
+
- Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
|
|
649
|
+
- If run inside a Titanium project, prompts to run `titools sync` afterward
|
|
650
|
+
- Warns Gemini users if local skills override existing global Gemini skills
|
|
651
|
+
- Installs Claude Code SessionStart hook for auto-updates
|
|
652
|
+
|
|
653
|
+
### titools auto-update
|
|
654
|
+
|
|
655
|
+
Checks for updates and applies them silently. Designed to run from the Claude Code SessionStart hook, but can also be used manually.
|
|
656
|
+
|
|
657
|
+
```bash
|
|
658
|
+
titools auto-update # Show progress
|
|
659
|
+
titools auto-update --silent # No output (for hooks)
|
|
267
660
|
```
|
|
268
661
|
|
|
269
|
-
|
|
662
|
+
Options:
|
|
663
|
+
| Option | Description |
|
|
664
|
+
| -------------- | ---------------------------------- |
|
|
665
|
+
| `-s, --silent` | Suppress all output except errors |
|
|
270
666
|
|
|
271
|
-
|
|
667
|
+
What it does:
|
|
668
|
+
1. Checks a local cache (`~/.titools/last-check.json`) — if already checked today, exits immediately
|
|
669
|
+
2. Queries npm for the latest version
|
|
670
|
+
3. If a new version is available, runs `npm update -g @maccesar/titools`
|
|
671
|
+
4. Syncs skills and refreshes platform symlinks
|
|
672
|
+
5. If inside a Titanium project, updates existing Knowledge Index files
|
|
673
|
+
6. Writes the cache so it won't check again for 24 hours
|
|
272
674
|
|
|
273
|
-
|
|
675
|
+
The hook is installed automatically by `titools install` when Claude Code is selected. It runs `titools auto-update --silent` at the start of every Claude Code session.
|
|
274
676
|
|
|
275
|
-
|
|
276
|
-
// Shorthand
|
|
277
|
-
Window: { apply: 'exit-on-close-false' }
|
|
677
|
+
### titools status
|
|
278
678
|
|
|
279
|
-
|
|
280
|
-
|
|
679
|
+
Shows a quick overview of your installation.
|
|
680
|
+
|
|
681
|
+
```bash
|
|
682
|
+
titools status
|
|
281
683
|
```
|
|
282
684
|
|
|
283
|
-
|
|
685
|
+
Displays: version, skills count, agent, hook status, last update check, platform symlinks, and project Knowledge Index status (if inside a Titanium project).
|
|
284
686
|
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
687
|
+
### titools doctor
|
|
688
|
+
|
|
689
|
+
Diagnoses installation health.
|
|
690
|
+
|
|
691
|
+
```bash
|
|
692
|
+
titools doctor
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
Checks: skill directories exist, symlinks are valid (not broken), agent is installed, hook is configured, cache is readable, Knowledge Index version matches CLI version. Reports issues with fix suggestions.
|
|
696
|
+
|
|
697
|
+
### titools sync
|
|
698
|
+
|
|
699
|
+
Generates a compressed knowledge index inside your project's instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`).
|
|
700
|
+
|
|
701
|
+
Important: This command only works inside a Titanium project (requires `tiapp.xml`). The knowledge index is project-specific. It detects your SDK version and points to the installed skill references.
|
|
702
|
+
|
|
703
|
+
```bash
|
|
704
|
+
titools sync [path] [options]
|
|
705
|
+
```
|
|
706
|
+
|
|
707
|
+
Arguments:
|
|
708
|
+
| Argument | Description |
|
|
709
|
+
| -------- | -------------------------------------------- |
|
|
710
|
+
| `[path]` | Project path (defaults to current directory) |
|
|
711
|
+
|
|
712
|
+
Options:
|
|
713
|
+
| Option | Description |
|
|
714
|
+
| --------------- | ------------------------------------------ |
|
|
715
|
+
| `-f, --force` | Overwrite existing files without prompting |
|
|
716
|
+
| `-v, --verbose` | Show detailed diagnostics |
|
|
717
|
+
|
|
718
|
+
What it does:
|
|
719
|
+
- Verifies you're inside a Titanium project (`tiapp.xml`)
|
|
720
|
+
- Detects Titanium SDK version from `tiapp.xml`
|
|
721
|
+
- Prompts you to select which files to sync: `AGENTS.md`, `CLAUDE.md`, `GEMINI.md`
|
|
722
|
+
- Inserts or updates a compressed knowledge index block in selected files
|
|
723
|
+
- Removes knowledge blocks from unselected files
|
|
724
|
+
- Creates files if they don't exist
|
|
725
|
+
|
|
726
|
+
### titools update
|
|
727
|
+
|
|
728
|
+
Checks whether a newer `titools` CLI version is available on npm, then syncs installed skills and agents from the currently installed package.
|
|
729
|
+
|
|
730
|
+
```bash
|
|
731
|
+
titools update [options]
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
Options:
|
|
735
|
+
| Option | Description |
|
|
736
|
+
| ------------- | ------------------------------------------ |
|
|
737
|
+
| `-l, --local` | Update local skills in the current project |
|
|
738
|
+
|
|
739
|
+
Behavior depends on where you run it:
|
|
740
|
+
|
|
741
|
+
| Context | Behavior |
|
|
742
|
+
| --------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
743
|
+
| Outside a Titanium project | Updates global skills in `~/.agents/skills/` (if installed) |
|
|
744
|
+
| Inside a Titanium project (local skills only) | Updates local skills automatically |
|
|
745
|
+
| Inside a Titanium project (both local and global) | Prompts you to choose: Global or Local |
|
|
746
|
+
| Inside a Titanium project (with existing knowledge index files) | Also refreshes `AGENTS.md`/`CLAUDE.md`/`GEMINI.md` |
|
|
747
|
+
|
|
748
|
+
What it does:
|
|
749
|
+
1. Checks npm for the latest CLI version
|
|
750
|
+
2. If a newer version exists, it shows the update command `npm update -g @maccesar/titools`
|
|
751
|
+
3. It exits without changing skills, agents, or knowledge files until the CLI is updated
|
|
752
|
+
4. If the CLI is current, it syncs skills and agents from the installed package (no download needed)
|
|
753
|
+
5. Updates platform symlinks only for platforms that already have them
|
|
754
|
+
6. Cleans up legacy artifacts (`alloy-expert` skill, `ti-researcher` agent)
|
|
755
|
+
7. Auto-syncs knowledge index files if they exist in the current project
|
|
756
|
+
|
|
757
|
+
Note: This command syncs knowledge packages and agents from your installed CLI. To get new features, first update the CLI with `npm update -g @maccesar/titools`, then run `titools update` again.
|
|
758
|
+
|
|
759
|
+
### titools remove
|
|
760
|
+
|
|
761
|
+
Removes skills, agents, symlinks, and knowledge index blocks.
|
|
762
|
+
|
|
763
|
+
```bash
|
|
764
|
+
titools remove [options]
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
Options:
|
|
768
|
+
| Option | Description |
|
|
769
|
+
| ------------- | -------------------------------------------- |
|
|
770
|
+
| `-l, --local` | Remove local skills from the current project |
|
|
771
|
+
|
|
772
|
+
What it does:
|
|
773
|
+
- Detects all installed components (skills, agents, symlinks, knowledge blocks)
|
|
774
|
+
- Prompts you to select what to remove:
|
|
775
|
+
- ti-pro agent for Claude Code
|
|
776
|
+
- Knowledge index blocks from instruction files (`AGENTS.md`, `CLAUDE.md`, `GEMINI.md`)
|
|
777
|
+
- Skills from global (`~/.agents/skills/`) or project directory
|
|
778
|
+
- Platform symlinks from global or project directory
|
|
779
|
+
- Removes both current and legacy artifacts
|
|
780
|
+
- Removes Claude Code auto-update hook
|
|
781
|
+
- Cleans up cache directory (`~/.titools/`)
|
|
782
|
+
|
|
783
|
+
### Verify installation
|
|
784
|
+
|
|
785
|
+
```bash
|
|
786
|
+
titools status # Quick overview of everything
|
|
787
|
+
titools doctor # Diagnose any issues
|
|
788
|
+
titools --version # CLI version only
|
|
291
789
|
```
|
|
292
790
|
|
|
293
791
|
---
|
|
@@ -334,34 +832,140 @@ This pattern is documented across four skills: `ti-ui`, `ti-expert`, `ti-api`, a
|
|
|
334
832
|
|
|
335
833
|
---
|
|
336
834
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
-
|
|
342
|
-
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
-
|
|
348
|
-
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
835
|
+
## Skill contents summary
|
|
836
|
+
|
|
837
|
+
| Skill | SKILL.md | References |
|
|
838
|
+
| ------------ | ----------------------------- | ----------------------------------------------------- |
|
|
839
|
+
| alloy-guides | MVC Quick Start | 10 files (models, views, widgets, etc.) |
|
|
840
|
+
| alloy-howtos | Best Practices | 6 files (CLI, config, debugging, etc.) |
|
|
841
|
+
| purgetss | Setup + Critical Rules | 21 files (grid, animations, icons, class-index, etc.) |
|
|
842
|
+
| ti-api | API Quick Reference | 14 files (windows, views, lists, media, etc.) |
|
|
843
|
+
| ti-expert | Architecture + Implementation | 19 refs + 1 asset (patterns, testing, security, etc.) |
|
|
844
|
+
| ti-guides | Core Workflow | 14 files (hyperloop, distribution, etc.) |
|
|
845
|
+
| ti-howtos | Integration Workflow | 18 files (location, media, maps, automation, etc.) |
|
|
846
|
+
| ti-ui | UI Rules + Platform Diffs | 14 files (layouts, lists, gestures, etc.) |
|
|
847
|
+
|
|
848
|
+
---
|
|
849
|
+
|
|
850
|
+
## Troubleshooting
|
|
851
|
+
|
|
852
|
+
### Skill not activating?
|
|
853
|
+
|
|
854
|
+
If the AI doesn't seem to use Titanium knowledge:
|
|
855
|
+
1. Mention "Titanium" or "Alloy" explicitly in your prompt
|
|
856
|
+
2. Be more specific about what you're building
|
|
857
|
+
3. Reference the technology stack
|
|
858
|
+
4. Try explicit invocation: "Use the purgetss skill for styling questions"
|
|
859
|
+
|
|
860
|
+
### Getting wrong suggestions?
|
|
861
|
+
|
|
862
|
+
If the AI suggests patterns you don't use (for example, PurgeTSS when you're not using it):
|
|
863
|
+
1. The skill may not have detected your project type correctly
|
|
864
|
+
2. Explicitly mention your stack: "I'm using Classic Titanium, not Alloy"
|
|
865
|
+
3. Be more specific about what you're building
|
|
866
|
+
|
|
867
|
+
### PurgeTSS not detected?
|
|
868
|
+
|
|
869
|
+
If the purgetss skill doesn't activate for your PurgeTSS project:
|
|
870
|
+
1. Verify `purgetss/` folder exists in project root
|
|
871
|
+
2. Check that `purgetss/config.cjs` exists
|
|
872
|
+
3. Mention "PurgeTSS" explicitly in your prompt
|
|
873
|
+
|
|
874
|
+
### Wrong advice?
|
|
875
|
+
|
|
876
|
+
If the AI suggests incorrect patterns (like flexbox):
|
|
877
|
+
1. Remind it you're using PurgeTSS
|
|
878
|
+
2. Reference the correct pattern from memory
|
|
879
|
+
3. Ask to check the PurgeTSS rules
|
|
880
|
+
|
|
881
|
+
### Need more detail?
|
|
882
|
+
|
|
883
|
+
Ask the AI to:
|
|
884
|
+
```
|
|
885
|
+
"Show me the reference documentation for ListView performance"
|
|
886
|
+
"What does the ti-expert skill say about memory cleanup?"
|
|
887
|
+
```
|
|
888
|
+
|
|
889
|
+
### titools command not found?
|
|
890
|
+
|
|
891
|
+
If the command is not found:
|
|
892
|
+
```bash
|
|
893
|
+
# Verify installation
|
|
894
|
+
npm list -g @maccesar/titools
|
|
895
|
+
|
|
896
|
+
# Re-install
|
|
897
|
+
npm install -g @maccesar/titools
|
|
898
|
+
```
|
|
899
|
+
|
|
900
|
+
### Knowledge index not working?
|
|
901
|
+
|
|
902
|
+
If your AI doesn't use the knowledge index information:
|
|
903
|
+
1. Verify AGENTS.md/CLAUDE.md/GEMINI.md exists in your project root
|
|
904
|
+
2. Check that your AI supports these files
|
|
905
|
+
3. Try explicitly referencing: "Check the AGENTS.md documentation"
|
|
906
|
+
|
|
907
|
+
### Version mismatch warning?
|
|
908
|
+
|
|
909
|
+
The knowledge index is based on the latest documentation. Be cautious when using newer APIs in older projects.
|
|
910
|
+
|
|
911
|
+
---
|
|
912
|
+
|
|
913
|
+
## Uninstall
|
|
914
|
+
|
|
915
|
+
```bash
|
|
916
|
+
# Remove the CLI
|
|
917
|
+
npm uninstall -g @maccesar/titools
|
|
918
|
+
|
|
919
|
+
# Remove knowledge packages and agent
|
|
920
|
+
titools remove
|
|
921
|
+
```
|
|
922
|
+
|
|
923
|
+
Note: `titools remove` can remove the knowledge index blocks from your project files, but it does not delete the files themselves.
|
|
924
|
+
|
|
925
|
+
---
|
|
926
|
+
|
|
927
|
+
## Contributing
|
|
928
|
+
|
|
929
|
+
1. Fork the repository
|
|
930
|
+
2. Improve SKILL.md or reference files
|
|
931
|
+
3. Test with your preferred AI coding assistant
|
|
932
|
+
4. Submit a pull request
|
|
933
|
+
|
|
934
|
+
### Guidelines
|
|
935
|
+
- Keep SKILL.md concise (<500 lines)
|
|
936
|
+
- Use progressive disclosure (details in references)
|
|
937
|
+
- Include concrete examples
|
|
938
|
+
- Test with real sessions
|
|
939
|
+
|
|
940
|
+
---
|
|
941
|
+
|
|
942
|
+
## Legacy installation (not recommended)
|
|
943
|
+
|
|
944
|
+
The bash installer is maintained for backward compatibility but NPM installation is recommended.
|
|
945
|
+
|
|
946
|
+
```bash
|
|
947
|
+
curl -fsSL https://raw.githubusercontent.com/macCesar/titools/main/install.sh | bash
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
Use this only if you cannot use NPM for any reason.
|
|
951
|
+
|
|
952
|
+
---
|
|
953
|
+
|
|
954
|
+
## Credits
|
|
955
|
+
|
|
956
|
+
Created by César Estrada ([@macCesar](https://github.com/macCesar)), creator of [PurgeTSS](https://github.com/macCesar/purgeTSS).
|
|
957
|
+
|
|
958
|
+
## License
|
|
959
|
+
|
|
960
|
+
MIT License - Free to use, modify, and distribute.
|
|
961
|
+
|
|
962
|
+
---
|
|
963
|
+
|
|
964
|
+
## Resources
|
|
965
|
+
|
|
966
|
+
- [Titanium SDK](https://titaniumsdk.com/)
|
|
967
|
+
- [PurgeTSS](https://purgetss.com/)
|
|
968
|
+
- [TiDev Community](https://tidev.io/)
|
|
969
|
+
- [Claude Code Skills](https://docs.anthropic.com/en/docs/claude-code)
|
|
970
|
+
- [Gemini CLI Skills](https://geminicli.com/docs/cli/skills/)
|
|
971
|
+
- [Codex CLI Skills](https://developers.openai.com/codex/skills/)
|