@intentsolutionsio/cli-ux-tester 3.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 +10 -0
- package/LICENSE +21 -0
- package/README.md +140 -0
- package/agents/cli-ux-tester.md +517 -0
- package/package.json +40 -0
- package/skills/cli-ux-tester/SKILL.md +145 -0
- package/skills/cli-ux-tester/scripts/example-test.sh +202 -0
- package/skills/cli-ux-tester/test-scenarios.md +1003 -0
- package/skills/cli-ux-tester/testing-checklist.md +418 -0
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intentsolutionsio/cli-ux-tester",
|
|
3
|
+
"version": "3.1.0",
|
|
4
|
+
"description": "Expert UX evaluator for command-line interfaces, CLIs, terminal tools, shell scripts, and developer APIs",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cli",
|
|
7
|
+
"ux",
|
|
8
|
+
"testing",
|
|
9
|
+
"developer-experience",
|
|
10
|
+
"terminal",
|
|
11
|
+
"usability",
|
|
12
|
+
"claude-code",
|
|
13
|
+
"claude-plugin",
|
|
14
|
+
"tonsofskills"
|
|
15
|
+
],
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/jeremylongshore/claude-code-plugins-plus-skills.git",
|
|
19
|
+
"directory": "plugins/testing/cli-ux-tester"
|
|
20
|
+
},
|
|
21
|
+
"homepage": "https://tonsofskills.com/plugins/cli-ux-tester",
|
|
22
|
+
"bugs": "https://github.com/jeremylongshore/claude-code-plugins-plus-skills/issues",
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "Alister Lewis-Bowen",
|
|
26
|
+
"url": "https://github.com/ali5ter"
|
|
27
|
+
},
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"files": [
|
|
32
|
+
"README.md",
|
|
33
|
+
".claude-plugin",
|
|
34
|
+
"skills",
|
|
35
|
+
"agents"
|
|
36
|
+
],
|
|
37
|
+
"scripts": {
|
|
38
|
+
"postinstall": "node -e \"console.log(\\\"\\\\n→ This npm package is a tracking/proof artifact. Install the plugin via:\\\\n ccpi install cli-ux-tester\\\\n or /plugin install cli-ux-tester@claude-code-plugins-plus in Claude Code\\\\n\\\")\""
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli-ux-tester
|
|
3
|
+
description: Expert UX evaluator for CLIs, terminal tools, and developer APIs. Use when reviewing command usability, error messages, help systems, or developer experience.
|
|
4
|
+
version: 3.0.0
|
|
5
|
+
allowed-tools: Read, Bash, AskUserQuestion, Agent
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# CLI UX Tester
|
|
9
|
+
|
|
10
|
+
This skill evaluates the usability of command-line interfaces and developer tools. It identifies the target CLI,
|
|
11
|
+
asks clarifying questions if needed, runs three evaluation agents in parallel, then passes the collected results
|
|
12
|
+
to a synthesizer agent to produce artifacts.
|
|
13
|
+
|
|
14
|
+
**Architecture:** The skill spawns all evaluation sub-agents directly (one Explore agent and two test agents in
|
|
15
|
+
parallel). This works around the platform constraint that sub-agents cannot spawn further sub-agents. The
|
|
16
|
+
`cli-ux-tester:cli-ux-tester` agent acts as a pure synthesizer — it receives the pre-collected test data and
|
|
17
|
+
produces the scored report and artifacts.
|
|
18
|
+
|
|
19
|
+
## Step 1: Detect target CLI
|
|
20
|
+
|
|
21
|
+
Try to identify the CLI to evaluate from the user's message and current directory context.
|
|
22
|
+
|
|
23
|
+
**From the user's message:**
|
|
24
|
+
|
|
25
|
+
- If the user names a specific command or tool (e.g., "review my-tool"), use that as the target.
|
|
26
|
+
|
|
27
|
+
**From the current directory:**
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Check for executable entry points
|
|
31
|
+
ls -la *.sh bin/ scripts/ 2>/dev/null | head -20
|
|
32
|
+
|
|
33
|
+
# Check for package.json with a bin field (Node.js CLI)
|
|
34
|
+
cat package.json 2>/dev/null | grep -A5 '"bin"'
|
|
35
|
+
|
|
36
|
+
# Check for Python CLI setup
|
|
37
|
+
cat setup.py pyproject.toml 2>/dev/null | grep -A5 'console_scripts\|entry_points' | head -20
|
|
38
|
+
|
|
39
|
+
# Check for Go main package
|
|
40
|
+
ls main.go cmd/ 2>/dev/null
|
|
41
|
+
|
|
42
|
+
# Check README for CLI name and usage
|
|
43
|
+
head -50 README.md 2>/dev/null
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Step 2: Ask clarifying questions if needed
|
|
47
|
+
|
|
48
|
+
Skip this step if the target CLI was already identified from the user's message in Step 1.
|
|
49
|
+
|
|
50
|
+
Otherwise, ask exactly one AskUserQuestion using the appropriate form below:
|
|
51
|
+
|
|
52
|
+
**Entry point(s) detected in current directory** → ask which to evaluate:
|
|
53
|
+
|
|
54
|
+
```text
|
|
55
|
+
Question: "Which CLI should I evaluate?"
|
|
56
|
+
Options:
|
|
57
|
+
- [Each detected entry point]
|
|
58
|
+
- A different installed command (provide the name)
|
|
59
|
+
- A different path (provide the path)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**No entry points detected** → ask the user to specify:
|
|
63
|
+
|
|
64
|
+
```text
|
|
65
|
+
Question: "Which CLI tool should I evaluate?"
|
|
66
|
+
Options:
|
|
67
|
+
- An installed command available in $PATH (provide the name)
|
|
68
|
+
- A path to an executable (provide the path)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Proceed directly to Step 3 with whatever the user provides.
|
|
72
|
+
|
|
73
|
+
## Step 3: Run evaluation agents in parallel
|
|
74
|
+
|
|
75
|
+
Locate the reference files first:
|
|
76
|
+
|
|
77
|
+
- Use Glob (`**/testing-checklist.md`) to find `testing-checklist.md`; note the path
|
|
78
|
+
- Use Glob (`**/test-scenarios.md`) to find `test-scenarios.md`; note the path
|
|
79
|
+
|
|
80
|
+
Then spawn these three agents simultaneously, substituting the actual `{cli_command}` and `{working_dir}`:
|
|
81
|
+
|
|
82
|
+
**Explore agent** — codebase mapping:
|
|
83
|
+
|
|
84
|
+
```text
|
|
85
|
+
subagent_type: Explore
|
|
86
|
+
prompt: "Map the {cli_command} CLI codebase in {working_dir}. Find: all commands and subcommands,
|
|
87
|
+
help text locations, error handling code, version output, README and docs files, entry point(s),
|
|
88
|
+
flag/argument parsing. Return a structured summary: command tree, key file locations, patterns
|
|
89
|
+
observed."
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Test agent A** — discovery and help:
|
|
93
|
+
|
|
94
|
+
```text
|
|
95
|
+
subagent_type: general-purpose
|
|
96
|
+
prompt: "Test {cli_command}'s help system and discoverability (run from {working_dir}).
|
|
97
|
+
Run: {cli_command} --help, {cli_command} -h, {cli_command} help, {cli_command} (no args),
|
|
98
|
+
{cli_command} --version, {cli_command} -v, {cli_command} version, {cli_command} invalid-subcommand,
|
|
99
|
+
{cli_command} --invalid-flag. For each subcommand found, also run: {cli_command} subcommand --help.
|
|
100
|
+
Capture exact output. Note: what works, what fails, what's missing."
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
**Test agent B** — error handling and consistency:
|
|
104
|
+
|
|
105
|
+
```text
|
|
106
|
+
subagent_type: general-purpose
|
|
107
|
+
prompt: "Test {cli_command}'s error handling and consistency (run from {working_dir}).
|
|
108
|
+
Run: commands with missing required args, invalid flag values, nonexistent files, wrong syntax.
|
|
109
|
+
Check whether flag names are consistent across subcommands (--verbose always means the same thing).
|
|
110
|
+
Check exit codes with echo $?. Capture exact outputs. Note every inconsistency."
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Wait for all three agents to complete and collect their full outputs before proceeding.
|
|
114
|
+
|
|
115
|
+
## Step 4: Launch synthesizer agent
|
|
116
|
+
|
|
117
|
+
Once all evaluation results are collected, launch the `cli-ux-tester:cli-ux-tester` agent.
|
|
118
|
+
|
|
119
|
+
Pass:
|
|
120
|
+
|
|
121
|
+
- The working directory
|
|
122
|
+
- The CLI entry point (command name, script path, or executable)
|
|
123
|
+
- Any relevant context from the user's message (e.g., "focus on error messages")
|
|
124
|
+
- The full output from all three evaluation agents (Explore, Test A, Test B)
|
|
125
|
+
- Path to `testing-checklist.md`
|
|
126
|
+
- Path to `test-scenarios.md`
|
|
127
|
+
|
|
128
|
+
## Step 5: Report results
|
|
129
|
+
|
|
130
|
+
When the agent completes, inform the user:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
✅ Evaluation complete!
|
|
134
|
+
📁 Results saved to: {timestamped_directory}
|
|
135
|
+
📊 Overall score: {overall_score}/5
|
|
136
|
+
🔍 Top issues: {brief_summary}
|
|
137
|
+
|
|
138
|
+
Clean up with: rm -rf CLI_UX_EVALUATION_*/
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Error handling
|
|
142
|
+
|
|
143
|
+
- **CLI not found**: Ask the user to confirm the command name or path
|
|
144
|
+
- **Permission denied**: Note the issue and ask if they want to test a different entry point
|
|
145
|
+
- **No CLI in current directory**: Ask the user to specify which tool to evaluate
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
|
|
3
|
+
# @file example-test.sh
|
|
4
|
+
# @brief This script demonstrates how to test a CLI tool for UX issues.
|
|
5
|
+
# Adapt this template for your specific tool.
|
|
6
|
+
# @usage ./example-test.sh
|
|
7
|
+
# @author Alister Lewis-Bowen <alister@lewis-bowen.org>
|
|
8
|
+
|
|
9
|
+
set -e
|
|
10
|
+
|
|
11
|
+
RED='\033[0;31m'
|
|
12
|
+
GREEN='\033[0;32m'
|
|
13
|
+
YELLOW='\033[1;33m'
|
|
14
|
+
BLUE='\033[0;34m'
|
|
15
|
+
NC='\033[0m' # No Color
|
|
16
|
+
|
|
17
|
+
# Test counter
|
|
18
|
+
TESTS_RUN=0
|
|
19
|
+
TESTS_PASSED=0
|
|
20
|
+
TESTS_FAILED=0
|
|
21
|
+
|
|
22
|
+
# Function to print test results
|
|
23
|
+
print_result() {
|
|
24
|
+
local test_name="$1"
|
|
25
|
+
local result="$2"
|
|
26
|
+
local details="${3:-}"
|
|
27
|
+
|
|
28
|
+
TESTS_RUN=$((TESTS_RUN + 1))
|
|
29
|
+
|
|
30
|
+
if [[ "$result" == "PASS" ]]; then
|
|
31
|
+
echo -e "${GREEN}✓${NC} $test_name"
|
|
32
|
+
TESTS_PASSED=$((TESTS_PASSED + 1))
|
|
33
|
+
elif [[ "$result" == "FAIL" ]]; then
|
|
34
|
+
echo -e "${RED}✗${NC} $test_name"
|
|
35
|
+
if [[ -n "$details" ]]; then
|
|
36
|
+
echo -e " ${YELLOW}Details:${NC} $details"
|
|
37
|
+
fi
|
|
38
|
+
TESTS_FAILED=$((TESTS_FAILED + 1))
|
|
39
|
+
else
|
|
40
|
+
echo -e "${BLUE}•${NC} $test_name"
|
|
41
|
+
fi
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Function to run a command and capture output
|
|
45
|
+
run_test() {
|
|
46
|
+
local description="$1"
|
|
47
|
+
local command="$2"
|
|
48
|
+
local expected_pattern="${3:-}"
|
|
49
|
+
|
|
50
|
+
echo -e "\n${BLUE}Testing:${NC} $description"
|
|
51
|
+
echo -e "${BLUE}Command:${NC} $command"
|
|
52
|
+
|
|
53
|
+
# Run command and capture output and exit code
|
|
54
|
+
set +e
|
|
55
|
+
read -ra cmd_array <<< "$command"
|
|
56
|
+
output=$("${cmd_array[@]}" 2>&1)
|
|
57
|
+
exit_code=$?
|
|
58
|
+
set -e
|
|
59
|
+
|
|
60
|
+
echo -e "${BLUE}Exit code:${NC} $exit_code"
|
|
61
|
+
echo -e "${BLUE}Output:${NC}"
|
|
62
|
+
echo "$output" | head -20
|
|
63
|
+
|
|
64
|
+
# Check against expected pattern if provided
|
|
65
|
+
if [[ -n "$expected_pattern" ]]; then
|
|
66
|
+
if echo "$output" | grep -q "$expected_pattern"; then
|
|
67
|
+
print_result "$description" "PASS"
|
|
68
|
+
else
|
|
69
|
+
print_result "$description" "FAIL" "Expected pattern '$expected_pattern' not found"
|
|
70
|
+
fi
|
|
71
|
+
fi
|
|
72
|
+
|
|
73
|
+
return $exit_code
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
# ==============================================================================
|
|
77
|
+
# Test Suite Configuration
|
|
78
|
+
# ==============================================================================
|
|
79
|
+
|
|
80
|
+
# Set your CLI command here
|
|
81
|
+
CLI_COMMAND="${CLI_COMMAND:-mytool}"
|
|
82
|
+
|
|
83
|
+
# Path to the CLI tool (if it needs to be sourced)
|
|
84
|
+
CLI_SOURCE="${CLI_SOURCE:-}"
|
|
85
|
+
|
|
86
|
+
echo "========================================================================"
|
|
87
|
+
echo "CLI UX Testing Suite"
|
|
88
|
+
echo "========================================================================"
|
|
89
|
+
echo "Command: $CLI_COMMAND"
|
|
90
|
+
echo "Time: $(date)"
|
|
91
|
+
echo "========================================================================"
|
|
92
|
+
echo ""
|
|
93
|
+
|
|
94
|
+
# Source the CLI if needed
|
|
95
|
+
if [[ -n "$CLI_SOURCE" ]]; then
|
|
96
|
+
echo "Sourcing: $CLI_SOURCE"
|
|
97
|
+
source "$CLI_SOURCE"
|
|
98
|
+
echo ""
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
# ==============================================================================
|
|
102
|
+
# Test 1: Help Discovery
|
|
103
|
+
# ==============================================================================
|
|
104
|
+
|
|
105
|
+
echo -e "\n${YELLOW}=== Test Group: Help Discovery ===${NC}\n"
|
|
106
|
+
|
|
107
|
+
run_test "Help flag --help" "$CLI_COMMAND --help" "Usage:"
|
|
108
|
+
run_test "Help flag -h" "$CLI_COMMAND -h" "Usage:"
|
|
109
|
+
run_test "Help command" "$CLI_COMMAND help" ""
|
|
110
|
+
|
|
111
|
+
# ==============================================================================
|
|
112
|
+
# Test 2: Version Information
|
|
113
|
+
# ==============================================================================
|
|
114
|
+
|
|
115
|
+
echo -e "\n${YELLOW}=== Test Group: Version Information ===${NC}\n"
|
|
116
|
+
|
|
117
|
+
run_test "Version flag --version" "$CLI_COMMAND --version" ""
|
|
118
|
+
run_test "Version flag -v" "$CLI_COMMAND -v" ""
|
|
119
|
+
|
|
120
|
+
# ==============================================================================
|
|
121
|
+
# Test 3: Error Handling
|
|
122
|
+
# ==============================================================================
|
|
123
|
+
|
|
124
|
+
echo -e "\n${YELLOW}=== Test Group: Error Handling ===${NC}\n"
|
|
125
|
+
|
|
126
|
+
run_test "No arguments" "$CLI_COMMAND" ""
|
|
127
|
+
run_test "Invalid command" "$CLI_COMMAND invalid_command_xyz" "Error:"
|
|
128
|
+
run_test "Invalid flag" "$CLI_COMMAND --invalid-flag-xyz" "Error:"
|
|
129
|
+
run_test "Missing required argument" "$CLI_COMMAND command" ""
|
|
130
|
+
|
|
131
|
+
# ==============================================================================
|
|
132
|
+
# Test 4: Basic Functionality
|
|
133
|
+
# ==============================================================================
|
|
134
|
+
|
|
135
|
+
echo -e "\n${YELLOW}=== Test Group: Basic Functionality ===${NC}\n"
|
|
136
|
+
|
|
137
|
+
# Add your specific command tests here
|
|
138
|
+
# Example:
|
|
139
|
+
# run_test "Info message" "$CLI_COMMAND info 'test'" "test"
|
|
140
|
+
# run_test "Warning message" "$CLI_COMMAND warn 'test'" "test"
|
|
141
|
+
|
|
142
|
+
# ==============================================================================
|
|
143
|
+
# Test 5: Interactive Features
|
|
144
|
+
# ==============================================================================
|
|
145
|
+
|
|
146
|
+
echo -e "\n${YELLOW}=== Test Group: Interactive Features ===${NC}\n"
|
|
147
|
+
|
|
148
|
+
# Note: Interactive features require special handling
|
|
149
|
+
echo "ℹ️ Interactive features require manual testing or expect/pexpect"
|
|
150
|
+
|
|
151
|
+
# ==============================================================================
|
|
152
|
+
# Test 6: Output Formats
|
|
153
|
+
# ==============================================================================
|
|
154
|
+
|
|
155
|
+
echo -e "\n${YELLOW}=== Test Group: Output Formats ===${NC}\n"
|
|
156
|
+
|
|
157
|
+
# Test different output formats if your tool supports them
|
|
158
|
+
# Example:
|
|
159
|
+
# run_test "JSON output" "$CLI_COMMAND list --format json" "{"
|
|
160
|
+
# run_test "YAML output" "$CLI_COMMAND list --format yaml" ""
|
|
161
|
+
|
|
162
|
+
# ==============================================================================
|
|
163
|
+
# Test 7: Performance
|
|
164
|
+
# ==============================================================================
|
|
165
|
+
|
|
166
|
+
echo -e "\n${YELLOW}=== Test Group: Performance ===${NC}\n"
|
|
167
|
+
|
|
168
|
+
# Test startup performance
|
|
169
|
+
start_time=$(date +%s%N)
|
|
170
|
+
$CLI_COMMAND --help > /dev/null 2>&1 || true
|
|
171
|
+
end_time=$(date +%s%N)
|
|
172
|
+
duration_ms=$(( (end_time - start_time) / 1000000 ))
|
|
173
|
+
|
|
174
|
+
echo "Help command response time: ${duration_ms}ms"
|
|
175
|
+
if [[ $duration_ms -lt 100 ]]; then
|
|
176
|
+
print_result "Help response time (<100ms)" "PASS"
|
|
177
|
+
elif [[ $duration_ms -lt 500 ]]; then
|
|
178
|
+
print_result "Help response time (<500ms)" "INFO" "${duration_ms}ms"
|
|
179
|
+
else
|
|
180
|
+
print_result "Help response time" "FAIL" "${duration_ms}ms (too slow)"
|
|
181
|
+
fi
|
|
182
|
+
|
|
183
|
+
# ==============================================================================
|
|
184
|
+
# Summary
|
|
185
|
+
# ==============================================================================
|
|
186
|
+
|
|
187
|
+
echo ""
|
|
188
|
+
echo "========================================================================"
|
|
189
|
+
echo "Test Summary"
|
|
190
|
+
echo "========================================================================"
|
|
191
|
+
echo -e "Total tests: $TESTS_RUN"
|
|
192
|
+
echo -e "${GREEN}Passed:${NC} $TESTS_PASSED"
|
|
193
|
+
echo -e "${RED}Failed:${NC} $TESTS_FAILED"
|
|
194
|
+
echo ""
|
|
195
|
+
|
|
196
|
+
if [[ $TESTS_FAILED -eq 0 ]]; then
|
|
197
|
+
echo -e "${GREEN}All tests passed!${NC}"
|
|
198
|
+
exit 0
|
|
199
|
+
else
|
|
200
|
+
echo -e "${RED}Some tests failed${NC}"
|
|
201
|
+
exit 1
|
|
202
|
+
fi
|