mobile-app-ux-auditor-skill 0.1.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/.claude-plugin/plugin.json +22 -0
- package/.codex-plugin/plugin.json +43 -0
- package/LICENSE +21 -0
- package/README.md +186 -0
- package/SKILL.md +60 -0
- package/agents/openai.yaml +4 -0
- package/bin/install.js +255 -0
- package/package.json +54 -0
- package/references/mobile-ux-audit-reference.md +253 -0
- package/scripts/mobile_ux_static_scan.py +318 -0
- package/skills/mobile-app-ux-auditor/SKILL.md +60 -0
- package/skills/mobile-app-ux-auditor/agents/openai.yaml +4 -0
- package/skills/mobile-app-ux-auditor/references/mobile-ux-audit-reference.md +253 -0
- package/skills/mobile-app-ux-auditor/scripts/mobile_ux_static_scan.py +318 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-app-ux-auditor",
|
|
3
|
+
"description": "Mobile app UI/UX audit skill for Flutter, React Native, iOS, Android, accessibility, onboarding, navigation, forms, retention, and platform-native flow improvements.",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Ajnas"
|
|
7
|
+
},
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"keywords": [
|
|
10
|
+
"mobile",
|
|
11
|
+
"ui",
|
|
12
|
+
"ux",
|
|
13
|
+
"accessibility",
|
|
14
|
+
"flutter",
|
|
15
|
+
"react-native",
|
|
16
|
+
"ios",
|
|
17
|
+
"android"
|
|
18
|
+
],
|
|
19
|
+
"skills": [
|
|
20
|
+
"./skills/mobile-app-ux-auditor"
|
|
21
|
+
]
|
|
22
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-app-ux-auditor",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent Skill for auditing and improving mobile app UI/UX flows across Flutter, React Native, iOS, and Android.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Ajnas",
|
|
7
|
+
"email": "ajnasnb@gmail.com",
|
|
8
|
+
"url": "https://github.com/AjnasNB"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/AjnasNB/mobile-app-ux-auditor-skill",
|
|
11
|
+
"repository": "https://github.com/AjnasNB/mobile-app-ux-auditor-skill",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"ux",
|
|
15
|
+
"ui",
|
|
16
|
+
"mobile",
|
|
17
|
+
"accessibility",
|
|
18
|
+
"flutter",
|
|
19
|
+
"react-native",
|
|
20
|
+
"ios",
|
|
21
|
+
"android"
|
|
22
|
+
],
|
|
23
|
+
"skills": "./skills",
|
|
24
|
+
"interface": {
|
|
25
|
+
"displayName": "Mobile App UX Auditor",
|
|
26
|
+
"shortDescription": "Audit mobile app UI/UX flows",
|
|
27
|
+
"longDescription": "Review and improve mobile app navigation, onboarding, accessibility, platform-native fit, forms, retention, and state handling across Flutter, React Native, iOS, and Android.",
|
|
28
|
+
"developerName": "Ajnas",
|
|
29
|
+
"category": "Development",
|
|
30
|
+
"capabilities": [
|
|
31
|
+
"Read",
|
|
32
|
+
"Write",
|
|
33
|
+
"Review"
|
|
34
|
+
],
|
|
35
|
+
"websiteURL": "https://github.com/AjnasNB/mobile-app-ux-auditor-skill",
|
|
36
|
+
"defaultPrompt": [
|
|
37
|
+
"Audit this mobile app UX flow.",
|
|
38
|
+
"Improve this mobile onboarding.",
|
|
39
|
+
"Review mobile accessibility."
|
|
40
|
+
],
|
|
41
|
+
"brandColor": "#2563EB"
|
|
42
|
+
}
|
|
43
|
+
}
|
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ajnas
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Mobile App UX Auditor Skill
|
|
2
|
+
|
|
3
|
+
A portable Agent Skill by Ajnas for auditing and improving mobile app UI/UX flows across Flutter, React Native, Swift/iOS, Kotlin, Java, Android Views, and Jetpack Compose.
|
|
4
|
+
|
|
5
|
+
Use it when you want an AI coding agent to inspect a mobile app, map real user flows, find UX friction, and propose or implement improvements with evidence instead of generic "make it cleaner" advice.
|
|
6
|
+
|
|
7
|
+
## What it helps with
|
|
8
|
+
|
|
9
|
+
- Navigation, back/close behavior, tabs, drawers, deep links, and re-entry flows.
|
|
10
|
+
- First launch, onboarding, sign-in, permissions, paywalls, subscriptions, and settings.
|
|
11
|
+
- Forms, validation, keyboard behavior, autofill, empty/loading/error/offline states.
|
|
12
|
+
- Accessibility: labels, roles, states, screen readers, focus order, touch targets, dynamic type, contrast, reduced motion.
|
|
13
|
+
- Platform fit for iOS and Android, including adaptive layout for tablets, foldables, landscape, and safe areas.
|
|
14
|
+
- Ethical retention through saved progress, useful reminders, trust, and repeated value.
|
|
15
|
+
- Static code triage with a bundled Python scanner.
|
|
16
|
+
|
|
17
|
+
## Install globally
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx mobile-app-ux-auditor-skill
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The installer asks where to install:
|
|
24
|
+
|
|
25
|
+
1. Global current user: Claude Code, Codex, and shared Agent Skills.
|
|
26
|
+
2. Current project: local skills plus adapter files for popular coding agents.
|
|
27
|
+
3. Both global and current project.
|
|
28
|
+
4. Custom project path.
|
|
29
|
+
|
|
30
|
+
Global install copies the skill for the current user into:
|
|
31
|
+
|
|
32
|
+
- `~/.claude/skills/mobile-app-ux-auditor`
|
|
33
|
+
- `~/.agents/skills/mobile-app-ux-auditor`
|
|
34
|
+
- `~/.codex/skills/mobile-app-ux-auditor`
|
|
35
|
+
|
|
36
|
+
Restart your agent app after installing.
|
|
37
|
+
|
|
38
|
+
## Use it
|
|
39
|
+
|
|
40
|
+
Claude Code:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
/mobile-app-ux-auditor
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Codex:
|
|
47
|
+
|
|
48
|
+
```text
|
|
49
|
+
$mobile-app-ux-auditor
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Example prompts:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
/mobile-app-ux-auditor audit the onboarding and permission flow in this React Native app
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```text
|
|
59
|
+
$mobile-app-ux-auditor review this Flutter checkout flow and fix the highest-impact UX issues
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Install into one project
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx mobile-app-ux-auditor-skill --project .
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Project install copies the canonical skill into `.claude/skills/` and `.agents/skills/`, then writes adapter rule files for common coding agents:
|
|
69
|
+
|
|
70
|
+
- Cursor
|
|
71
|
+
- Windsurf
|
|
72
|
+
- GitHub Copilot
|
|
73
|
+
- Gemini
|
|
74
|
+
- Continue
|
|
75
|
+
- Cline
|
|
76
|
+
- Roo Code
|
|
77
|
+
- Kiro
|
|
78
|
+
- Trae
|
|
79
|
+
- OpenCode
|
|
80
|
+
|
|
81
|
+
Copy only the skill folders and skip adapter files:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx mobile-app-ux-auditor-skill --project . --no-adapters
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Skip prompts and force global install:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx mobile-app-ux-auditor-skill --yes
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Static scanner
|
|
94
|
+
|
|
95
|
+
The skill includes a Python scanner for static mobile UX signals:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
python scripts/mobile_ux_static_scan.py /path/to/mobile-app
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The scanner detects review signals such as unlabeled custom controls, missing image labels, permission prompts, form-label risks, safe-area risks, and platform-specific accessibility gaps.
|
|
102
|
+
|
|
103
|
+
It is a triage tool, not a replacement for expert review. Confirm every finding in code, simulator/device, screenshots, accessibility tooling, or tests before changing behavior.
|
|
104
|
+
|
|
105
|
+
## Package layout
|
|
106
|
+
|
|
107
|
+
```text
|
|
108
|
+
mobile-app-ux-auditor/
|
|
109
|
+
SKILL.md
|
|
110
|
+
agents/openai.yaml
|
|
111
|
+
references/mobile-ux-audit-reference.md
|
|
112
|
+
scripts/mobile_ux_static_scan.py
|
|
113
|
+
skills/mobile-app-ux-auditor/
|
|
114
|
+
.codex-plugin/plugin.json
|
|
115
|
+
.claude-plugin/plugin.json
|
|
116
|
+
bin/install.js
|
|
117
|
+
package.json
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
The root `SKILL.md` supports direct skill installation. The `skills/mobile-app-ux-auditor/` copy supports plugin-style discovery.
|
|
121
|
+
|
|
122
|
+
## Publish to GitHub
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
gh auth login
|
|
126
|
+
gh repo create AjnasNB/mobile-app-ux-auditor-skill --public --source . --remote origin --push
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If the repo already exists:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
git remote add origin https://github.com/AjnasNB/mobile-app-ux-auditor-skill.git
|
|
133
|
+
git push -u origin main
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Download from npm
|
|
137
|
+
|
|
138
|
+
Install and run without keeping the package:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npx mobile-app-ux-auditor-skill
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Install the CLI globally:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm install -g mobile-app-ux-auditor-skill
|
|
148
|
+
mobile-app-ux-auditor
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Publish to npm
|
|
152
|
+
|
|
153
|
+
Log in once:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm adduser
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Check the package:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
npm publish --dry-run --access public
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Publish:
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
npm publish --access public
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
After publishing, users download and install it with:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
npx mobile-app-ux-auditor-skill
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Or install the CLI globally:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
npm install -g mobile-app-ux-auditor-skill
|
|
181
|
+
mobile-app-ux-auditor --global
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
## License
|
|
185
|
+
|
|
186
|
+
MIT
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mobile-app-ux-auditor
|
|
3
|
+
description: Use when reviewing, redesigning, or implementing mobile app UI/UX flows in Flutter, React Native, Swift, SwiftUI, UIKit, Kotlin, Jetpack Compose, Java, or Android Views; especially for navigation, onboarding, retention, accessibility, forms, engagement, screen hierarchy, or platform-native fit.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Mobile App UX Auditor
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
Audit mobile apps by mapping real user flows, finding friction with evidence, and proposing or implementing improvements that match iOS and Android platform expectations. Optimize for users reaching value quickly and returning willingly, not for manipulative time-on-device.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. State the design read: app category, audience, job-to-be-done, target platforms, product maturity, visual register, and risk level. For redesigns, preserve working navigation, copy, analytics names, and accessibility wins unless there is evidence they cause harm.
|
|
15
|
+
2. If code is available, run the static signal scan before judging:
|
|
16
|
+
```bash
|
|
17
|
+
python scripts/mobile_ux_static_scan.py <project-root>
|
|
18
|
+
```
|
|
19
|
+
In Claude Code, use `python ${CLAUDE_SKILL_DIR}/scripts/mobile_ux_static_scan.py <project-root>` when the skill is installed. Treat the script as evidence-gathering, not a replacement for expert review.
|
|
20
|
+
3. Inspect routing, screens, design system files, navigation components, analytics events, accessibility props, platform-specific UI primitives, tests, and screenshots before recommending changes.
|
|
21
|
+
4. Build a compact screen and flow map: first launch, onboarding, sign-in, home, primary task, search/discovery, settings, error states, empty states, permission requests, purchase/subscription, and re-entry flows.
|
|
22
|
+
5. Audit flows against platform conventions, accessibility, clarity, effort, trust, feedback, performance, adaptive layout, and ethical retention. Load `references/mobile-ux-audit-reference.md` for the detailed checklist and framework-specific code signals.
|
|
23
|
+
6. Rank issues by user impact:
|
|
24
|
+
- P0: Blocks core task, causes data loss, or creates severe accessibility failure.
|
|
25
|
+
- P1: Breaks navigation, trust, comprehension, or completion for many users.
|
|
26
|
+
- P2: Adds avoidable friction, inconsistency, or weak platform fit.
|
|
27
|
+
- P3: Polish, delight, or instrumentation improvement.
|
|
28
|
+
7. When editing code, preserve the app's existing architecture and design system. Prefer native platform components and established navigation/accessibility APIs over custom controls unless the product has a clear reason.
|
|
29
|
+
8. Verify with the best available evidence: emulator/simulator walkthrough, screenshots, accessibility scanner, VoiceOver/TalkBack, widget/UI tests, route tests, or static inspection. State any verification that could not be run.
|
|
30
|
+
|
|
31
|
+
## Quality Bar
|
|
32
|
+
|
|
33
|
+
Hold the output to a senior mobile product design engineer standard:
|
|
34
|
+
|
|
35
|
+
- The primary user can understand where they are, what changed, what to do next, and how to recover from mistakes.
|
|
36
|
+
- Core flows handle loading, empty, error, partial, disabled, offline, slow-network, auth-expired, permission-denied, interrupted, and resumed states.
|
|
37
|
+
- The UI has one coherent design system: typography scale, spacing rhythm, radius rules, color roles, interaction states, motion, density, and platform adaptation.
|
|
38
|
+
- Accessibility is built into labels, roles, states, focus order, target size, screen reader output, dynamic type/font scaling, contrast, and reduced-motion behavior.
|
|
39
|
+
- Mobile performance is UX: launch time, route transitions, jank, unnecessary re-renders, heavy images, blocked gestures, keyboard latency, and battery cost all matter.
|
|
40
|
+
- Retention comes from saved progress, useful reminders, reduced effort, trust, and repeated value. Do not optimize for addiction.
|
|
41
|
+
|
|
42
|
+
## Output Format
|
|
43
|
+
|
|
44
|
+
Start with findings, not praise. Include:
|
|
45
|
+
|
|
46
|
+
- A prioritized findings table: severity, screen/flow, evidence, user impact, recommended fix.
|
|
47
|
+
- A before/after flow summary when navigation or onboarding changes.
|
|
48
|
+
- Framework-specific implementation notes for Flutter, React Native, Swift/iOS, or Android as applicable.
|
|
49
|
+
- Static scan findings from `scripts/mobile_ux_static_scan.py` when code is available.
|
|
50
|
+
- Accessibility and adaptive-layout checks.
|
|
51
|
+
- Verification performed and remaining risks.
|
|
52
|
+
|
|
53
|
+
When asked to improve the app directly, implement the smallest high-impact changes first, then report changed files and validation.
|
|
54
|
+
|
|
55
|
+
## Non-Negotiables
|
|
56
|
+
|
|
57
|
+
- Do not recommend "make users stay longer" tactics that rely on confusion, forced continuity, hidden exits, guilt, dark patterns, or notification spam.
|
|
58
|
+
- Do not replace platform conventions with custom UI only for novelty.
|
|
59
|
+
- Do not audit from static screenshots alone when code or an app build is available.
|
|
60
|
+
- Do not give generic advice like "improve onboarding" without naming the exact screen, problem, and change.
|
package/bin/install.js
ADDED
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
const os = require("os");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
const readline = require("readline");
|
|
8
|
+
|
|
9
|
+
const SKILL_NAME = "mobile-app-ux-auditor";
|
|
10
|
+
const DISPLAY_NAME = "Mobile App UX Auditor";
|
|
11
|
+
const DESCRIPTION =
|
|
12
|
+
"Audit and improve mobile app UI/UX flows across Flutter, React Native, iOS, and Android.";
|
|
13
|
+
|
|
14
|
+
const PACKAGE_ROOT = path.resolve(__dirname, "..");
|
|
15
|
+
const COPY_ENTRIES = ["SKILL.md", "agents", "references", "scripts"];
|
|
16
|
+
|
|
17
|
+
function usage() {
|
|
18
|
+
console.log(`
|
|
19
|
+
${DISPLAY_NAME}
|
|
20
|
+
|
|
21
|
+
Usage:
|
|
22
|
+
npx mobile-app-ux-auditor-skill
|
|
23
|
+
mobile-app-ux-auditor --global
|
|
24
|
+
mobile-app-ux-auditor --project <path>
|
|
25
|
+
mobile-app-ux-auditor --targets claude,codex,agents
|
|
26
|
+
|
|
27
|
+
Default:
|
|
28
|
+
In an interactive terminal, asks where to install. In non-interactive shells, installs globally.
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
--global Install to current-user global skill folders. Default when no mode is passed.
|
|
32
|
+
--project <path> Install project-local skills and adapter rule files for popular coding agents.
|
|
33
|
+
--targets <list> Comma-separated global targets: claude,codex,agents,codex-legacy.
|
|
34
|
+
--yes Skip prompts and install globally.
|
|
35
|
+
--no-adapters With --project, skip non-skill adapter files.
|
|
36
|
+
--print-paths Print install locations and exit.
|
|
37
|
+
--help Show this help.
|
|
38
|
+
`);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function ensureDir(dir) {
|
|
42
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function rmIfExists(target) {
|
|
46
|
+
if (fs.existsSync(target)) {
|
|
47
|
+
fs.rmSync(target, { recursive: true, force: true });
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
function copyEntry(entry, targetDir) {
|
|
52
|
+
const source = path.join(PACKAGE_ROOT, entry);
|
|
53
|
+
if (!fs.existsSync(source)) return;
|
|
54
|
+
const target = path.join(targetDir, entry);
|
|
55
|
+
rmIfExists(target);
|
|
56
|
+
fs.cpSync(source, target, { recursive: true });
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function copySkillTo(root) {
|
|
60
|
+
const targetDir = path.join(root, SKILL_NAME);
|
|
61
|
+
ensureDir(targetDir);
|
|
62
|
+
for (const entry of COPY_ENTRIES) copyEntry(entry, targetDir);
|
|
63
|
+
return targetDir;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function globalTargets(selected) {
|
|
67
|
+
const home = os.homedir();
|
|
68
|
+
const all = {
|
|
69
|
+
claude: path.join(home, ".claude", "skills"),
|
|
70
|
+
agents: path.join(home, ".agents", "skills"),
|
|
71
|
+
codex: path.join(home, ".agents", "skills"),
|
|
72
|
+
"codex-legacy": path.join(home, ".codex", "skills")
|
|
73
|
+
};
|
|
74
|
+
const names = selected || ["claude", "agents", "codex-legacy"];
|
|
75
|
+
return [...new Set(names.map((name) => all[name]).filter(Boolean))];
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
function appendBlock(file, marker, body) {
|
|
79
|
+
ensureDir(path.dirname(file));
|
|
80
|
+
const existing = fs.existsSync(file) ? fs.readFileSync(file, "utf8") : "";
|
|
81
|
+
if (existing.includes(marker)) return false;
|
|
82
|
+
const prefix = existing.trim().length ? `${existing.trimEnd()}\n\n` : "";
|
|
83
|
+
fs.writeFileSync(file, `${prefix}${body.trimEnd()}\n`, "utf8");
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function writeFile(file, content) {
|
|
88
|
+
ensureDir(path.dirname(file));
|
|
89
|
+
fs.writeFileSync(file, content, "utf8");
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function adapterText(skillPath) {
|
|
93
|
+
return `# ${DISPLAY_NAME}
|
|
94
|
+
|
|
95
|
+
Use the ${SKILL_NAME} Agent Skill for mobile app UI/UX reviews, redesigns, navigation audits, onboarding, forms, accessibility, platform-native fit, retention, and flow improvements.
|
|
96
|
+
|
|
97
|
+
Canonical skill path in this project: ${skillPath}
|
|
98
|
+
|
|
99
|
+
Follow the skill workflow before recommending changes:
|
|
100
|
+
- inspect code, screens, routes, navigation, forms, states, accessibility props, and runtime behavior;
|
|
101
|
+
- run the bundled static scanner when code is available;
|
|
102
|
+
- rank findings by user impact;
|
|
103
|
+
- verify with simulator/device, screen reader, screenshots, tests, or static evidence.
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
function installProject(projectRoot, withAdapters) {
|
|
108
|
+
const root = path.resolve(projectRoot);
|
|
109
|
+
const claudeSkill = copySkillTo(path.join(root, ".claude", "skills"));
|
|
110
|
+
const agentsSkill = copySkillTo(path.join(root, ".agents", "skills"));
|
|
111
|
+
|
|
112
|
+
if (!withAdapters) return [claudeSkill, agentsSkill];
|
|
113
|
+
|
|
114
|
+
const marker = `<!-- ${SKILL_NAME}:start -->`;
|
|
115
|
+
const block = `${marker}
|
|
116
|
+
${adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`)}
|
|
117
|
+
<!-- ${SKILL_NAME}:end -->`;
|
|
118
|
+
|
|
119
|
+
writeFile(
|
|
120
|
+
path.join(root, ".cursor", "rules", `${SKILL_NAME}.mdc`),
|
|
121
|
+
`---
|
|
122
|
+
description: ${DESCRIPTION}
|
|
123
|
+
globs: **/*
|
|
124
|
+
alwaysApply: false
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
${adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`)}`
|
|
128
|
+
);
|
|
129
|
+
writeFile(path.join(root, ".windsurf", "rules", `${SKILL_NAME}.md`), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
130
|
+
writeFile(path.join(root, ".continue", "rules", `${SKILL_NAME}.md`), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
131
|
+
writeFile(path.join(root, ".clinerules", `${SKILL_NAME}.md`), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
132
|
+
writeFile(path.join(root, ".roo", "rules", `${SKILL_NAME}.md`), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
133
|
+
writeFile(path.join(root, ".kiro", "steering", `${SKILL_NAME}.md`), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
134
|
+
writeFile(path.join(root, ".trae", "rules", `${SKILL_NAME}.md`), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
135
|
+
writeFile(path.join(root, ".opencode", "AGENTS.md"), adapterText(`.agents/skills/${SKILL_NAME}/SKILL.md`));
|
|
136
|
+
|
|
137
|
+
appendBlock(path.join(root, "AGENTS.md"), marker, block);
|
|
138
|
+
appendBlock(path.join(root, ".gemini", "GEMINI.md"), marker, block);
|
|
139
|
+
appendBlock(path.join(root, ".github", "copilot-instructions.md"), marker, block);
|
|
140
|
+
|
|
141
|
+
return [claudeSkill, agentsSkill];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
function parseArgs(argv) {
|
|
145
|
+
const result = {
|
|
146
|
+
global: false,
|
|
147
|
+
project: null,
|
|
148
|
+
targets: null,
|
|
149
|
+
adapters: true,
|
|
150
|
+
printPaths: false,
|
|
151
|
+
help: false,
|
|
152
|
+
yes: false,
|
|
153
|
+
explicitMode: false
|
|
154
|
+
};
|
|
155
|
+
for (let i = 0; i < argv.length; i += 1) {
|
|
156
|
+
const arg = argv[i];
|
|
157
|
+
if (arg === "--help" || arg === "-h") result.help = true;
|
|
158
|
+
else if (arg === "--global") {
|
|
159
|
+
result.global = true;
|
|
160
|
+
result.explicitMode = true;
|
|
161
|
+
}
|
|
162
|
+
else if (arg === "--project") {
|
|
163
|
+
result.project = argv[++i] || ".";
|
|
164
|
+
result.explicitMode = true;
|
|
165
|
+
}
|
|
166
|
+
else if (arg.startsWith("--project=")) {
|
|
167
|
+
result.project = arg.split("=")[1] || ".";
|
|
168
|
+
result.explicitMode = true;
|
|
169
|
+
}
|
|
170
|
+
else if (arg === "--targets") result.targets = (argv[++i] || "").split(",").map((s) => s.trim()).filter(Boolean);
|
|
171
|
+
else if (arg.startsWith("--targets=")) result.targets = arg.split("=")[1].split(",").map((s) => s.trim()).filter(Boolean);
|
|
172
|
+
else if (arg === "--no-adapters") result.adapters = false;
|
|
173
|
+
else if (arg === "--print-paths") result.printPaths = true;
|
|
174
|
+
else if (arg === "--yes" || arg === "-y") result.yes = true;
|
|
175
|
+
}
|
|
176
|
+
if (result.yes && !result.explicitMode) result.global = true;
|
|
177
|
+
if (!result.global && !result.project && !process.stdin.isTTY) result.global = true;
|
|
178
|
+
return result;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function ask(question) {
|
|
182
|
+
const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
|
|
183
|
+
return new Promise((resolve) => {
|
|
184
|
+
rl.question(question, (answer) => {
|
|
185
|
+
rl.close();
|
|
186
|
+
resolve(answer.trim());
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
async function chooseInstallMode(args) {
|
|
192
|
+
if (args.global || args.project || args.printPaths || args.help) return args;
|
|
193
|
+
if (!process.stdin.isTTY || !process.stdout.isTTY) {
|
|
194
|
+
args.global = true;
|
|
195
|
+
return args;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
console.log(`${DISPLAY_NAME}`);
|
|
199
|
+
console.log("");
|
|
200
|
+
console.log("Where should this skill be installed?");
|
|
201
|
+
console.log("1. Global current user: Claude Code, Codex, and shared Agent Skills");
|
|
202
|
+
console.log("2. Current project: .claude/.agents skills plus adapters for Cursor, Windsurf, Copilot, Gemini, Continue, Cline, Roo, Kiro, Trae, OpenCode");
|
|
203
|
+
console.log("3. Both global current user and current project");
|
|
204
|
+
console.log("4. Custom project path");
|
|
205
|
+
console.log("");
|
|
206
|
+
|
|
207
|
+
const choice = await ask("Choose 1, 2, 3, or 4 [1]: ");
|
|
208
|
+
const selected = choice || "1";
|
|
209
|
+
if (selected === "2") args.project = process.cwd();
|
|
210
|
+
else if (selected === "3") {
|
|
211
|
+
args.global = true;
|
|
212
|
+
args.project = process.cwd();
|
|
213
|
+
} else if (selected === "4") {
|
|
214
|
+
const customPath = await ask("Project path: ");
|
|
215
|
+
args.project = customPath || process.cwd();
|
|
216
|
+
} else {
|
|
217
|
+
args.global = true;
|
|
218
|
+
}
|
|
219
|
+
return args;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async function main() {
|
|
223
|
+
const args = parseArgs(process.argv.slice(2));
|
|
224
|
+
await chooseInstallMode(args);
|
|
225
|
+
if (args.help) {
|
|
226
|
+
usage();
|
|
227
|
+
return;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
if (args.printPaths) {
|
|
231
|
+
console.log(globalTargets(args.targets).join("\n"));
|
|
232
|
+
return;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
const installed = [];
|
|
236
|
+
if (args.global) {
|
|
237
|
+
for (const target of globalTargets(args.targets)) {
|
|
238
|
+
installed.push(copySkillTo(target));
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
if (args.project) {
|
|
242
|
+
installed.push(...installProject(args.project, args.adapters));
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
console.log(`${DISPLAY_NAME} installed:`);
|
|
246
|
+
for (const target of installed) console.log(`- ${target}`);
|
|
247
|
+
console.log("");
|
|
248
|
+
console.log("Claude Code: invoke with /mobile-app-ux-auditor");
|
|
249
|
+
console.log("Codex: invoke with $mobile-app-ux-auditor or let Codex choose it automatically.");
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
main().catch((error) => {
|
|
253
|
+
console.error(error && error.stack ? error.stack : String(error));
|
|
254
|
+
process.exitCode = 1;
|
|
255
|
+
});
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mobile-app-ux-auditor-skill",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Agent Skill for auditing and improving mobile app UI/UX flows across Flutter, React Native, iOS, and Android.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Ajnas",
|
|
8
|
+
"email": "ajnasnb@gmail.com"
|
|
9
|
+
},
|
|
10
|
+
"type": "commonjs",
|
|
11
|
+
"bin": {
|
|
12
|
+
"mobile-app-ux-auditor": "bin/install.js",
|
|
13
|
+
"mobile-app-ux-auditor-skill": "bin/install.js"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"SKILL.md",
|
|
17
|
+
"agents/",
|
|
18
|
+
"references/",
|
|
19
|
+
"scripts/",
|
|
20
|
+
"skills/",
|
|
21
|
+
"bin/",
|
|
22
|
+
".codex-plugin/",
|
|
23
|
+
".claude-plugin/",
|
|
24
|
+
"README.md",
|
|
25
|
+
"LICENSE"
|
|
26
|
+
],
|
|
27
|
+
"keywords": [
|
|
28
|
+
"agent-skill",
|
|
29
|
+
"claude-code",
|
|
30
|
+
"codex",
|
|
31
|
+
"ux",
|
|
32
|
+
"ui",
|
|
33
|
+
"mobile",
|
|
34
|
+
"flutter",
|
|
35
|
+
"react-native",
|
|
36
|
+
"ios",
|
|
37
|
+
"android",
|
|
38
|
+
"accessibility"
|
|
39
|
+
],
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/AjnasNB/mobile-app-ux-auditor-skill.git"
|
|
43
|
+
},
|
|
44
|
+
"bugs": {
|
|
45
|
+
"url": "https://github.com/AjnasNB/mobile-app-ux-auditor-skill/issues"
|
|
46
|
+
},
|
|
47
|
+
"homepage": "https://github.com/AjnasNB/mobile-app-ux-auditor-skill#readme",
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"access": "public"
|
|
50
|
+
},
|
|
51
|
+
"engines": {
|
|
52
|
+
"node": ">=16"
|
|
53
|
+
}
|
|
54
|
+
}
|