apple-design-skill 0.0.2 → 0.0.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-design-skill",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Apple-style interface design with complete dropdown verification.",
5
5
  "author": {
6
6
  "name": "yqstar",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-design-skill",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Apple-style interface design with complete dropdown verification.",
5
5
  "author": {
6
6
  "name": "yqstar",
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.4
4
+
5
+ - Require whole-page visual inspection across supported layouts and relevant themes, including representative pages affected by shared component or token changes.
6
+ - Clarify completion and handoff: finish the requested work and relevant checks, then summarize results and limitations in the final response without extra delivery artifacts by default.
7
+ - Verify expanded dropdown appearance through direct visual inspection or temporary captures, without requiring retained screenshots; clean up task-created temporary files.
8
+
9
+ ## 0.0.3
10
+
11
+ - Default all CLI commands to user scope and the Codex, Claude Code and Cursor targets; keep `--global` and `--all` as explicit equivalents.
12
+ - Support `--project` for the current project and `--project PATH` for a specific project, with `--agent` limiting the selected tools in either scope.
13
+ - Document the default change from 0.0.2 and earlier, and verify user/project isolation across installation, activation, listing and uninstall.
14
+
3
15
  ## 0.0.2
4
16
 
5
17
  - Remove multi-agent collaboration guidance and related package and plugin descriptions.
package/README.md CHANGED
@@ -10,13 +10,13 @@
10
10
 
11
11
  [快速开始](#快速开始) · [使用前后对比](#使用前后对比) · [安装与版本管理](docs/installation.md) · [参与贡献](CONTRIBUTING.md)
12
12
 
13
- 在目标项目中安装给 CodexNode.js 22+):
13
+ 一条命令安装给当前用户的 Codex、Claude Code 和 Cursor,跨项目使用(Node.js 22+):
14
14
 
15
15
  ```sh
16
- npx apple-design-skill@latest install --agent codex
16
+ npx apple-design-skill@latest install
17
17
  ```
18
18
 
19
- 使用 Claude Code 或 Cursor?见[快速开始](#快速开始)。
19
+ 只安装给某个工具,或安装到项目目录?见[快速开始](#快速开始)。
20
20
 
21
21
  ## 使用前后对比
22
22
 
@@ -46,20 +46,25 @@ python3 -m http.server 4177 --bind 127.0.0.1 --directory examples/agent-learning
46
46
 
47
47
  ## 快速开始
48
48
 
49
- 需要 **Node.js 22+**。在你要使用 Skill 的项目目录中执行:
49
+ 需要 **Node.js 22+**。默认安装到用户目录,可在任意目录执行:
50
50
 
51
51
  ```sh
52
- # Codex
53
- npx apple-design-skill@latest install --agent codex
52
+ # 默认:用户级安装,供 Codex、Claude Code、Cursor 使用
53
+ npx apple-design-skill@latest install
54
54
 
55
- # Claude Code
55
+ # 只安装给指定工具
56
+ npx apple-design-skill@latest install --agent codex
56
57
  npx apple-design-skill@latest install --agent claude
57
-
58
- # Cursor
59
58
  npx apple-design-skill@latest install --agent cursor
59
+
60
+ # 仅安装到当前项目
61
+ npx apple-design-skill@latest install --project
62
+
63
+ # 安装到指定项目,也可同时选择工具
64
+ npx apple-design-skill@latest install --project ./my-project --agent codex
60
65
  ```
61
66
 
62
- 选择你使用的工具执行一条即可。需要同时安装给三个工具时使用 `install --all`;先查看目标路径可追加 `--dry-run`。npm 下载本包不会自动写入技能目录,`install` 命令才会执行安装。
67
+ 默认目标为 `~/.agents/skills`(Codex)、`~/.claude/skills`(Claude Code)、`~/.cursor/skills`(Cursor)中的 `apple-design-skill`。`--global` 和 `--all` 可显式声明默认行为;`--agent` 限定工具,`--project [路径]` 切换到项目目录。先查看目标路径可追加 `--dry-run`。npm 下载本包不会自动写入技能目录,`install` 命令才会执行安装。
63
68
 
64
69
  安装后,在新会话中给出具体任务:
65
70
 
@@ -69,7 +74,7 @@ npx apple-design-skill@latest install --agent cursor
69
74
  特别检查下拉按钮与展开菜单,并验证键盘选择、关闭方式和窄屏布局。
70
75
  ```
71
76
 
72
- Codex 可显式调用 `$apple-design-skill`,Claude Code 可调用 `/apple-design-skill`。固定版本、用户级安装、重复入口、升级与回退见[安装指南](docs/installation.md)。
77
+ Codex 可显式调用 `$apple-design-skill`,Claude Code 可调用 `/apple-design-skill`。固定版本、项目级安装、重复入口、升级与回退见[安装指南](docs/installation.md)。
73
78
 
74
79
  ## 适合哪些任务
75
80
 
@@ -82,6 +87,10 @@ Codex 可显式调用 `$apple-design-skill`,Claude Code 可调用 `/apple-desi
82
87
 
83
88
  技能正文见 [SKILL.md](skills/apple-design-skill/SKILL.md)。普通静态布局无需引入手势实现;玻璃、模糊和弹跳都是可选设计手段。
84
89
 
90
+ 交付以完成请求的实现或审查及必要验证为准,最终回复说明改动、结果、检查和剩余限制。视觉验证需实际查看受影响页面的整体效果,并滚动检查全页,覆盖支持的桌面与窄屏布局、相关主题及组件展开状态;共享组件或设计变量变更时,检查有代表性的受影响页面。
91
+
92
+ 默认不额外生成或保留报告、截图、录像、演示页等交付文件;可临时截图验证,完成后清理。用户明确要求的产物按要求提供。
93
+
85
94
  这是基于 Apple 设计资料的 Web 实践指南,不是 Apple 官方规范或官方产品。技能提供工作指引,无运行时依赖;使用宿主工具现有的模型与权限,不附带模型服务或 API。
86
95
 
87
96
  ## 项目组织
@@ -7,6 +7,7 @@ import { execute, resolveTargets, validateName, validateVersion } from '../lib/i
7
7
 
8
8
  const packageRoot = fileURLToPath(new URL('../', import.meta.url));
9
9
  const pkg = JSON.parse(readFileSync(new URL('../package.json', import.meta.url), 'utf8'));
10
+ const defaultAgents = ['codex', 'claude', 'cursor'];
10
11
  const help = `apple-design-skill ${pkg.version}
11
12
 
12
13
  Usage:
@@ -17,9 +18,9 @@ Usage:
17
18
 
18
19
  Options:
19
20
  --agent NAME[,NAME] codex, claude, cursor, universal (repeatable)
20
- --all Codex + Claude Code + Cursor
21
- --project PATH Project scope (default: current directory)
22
- --global User scope, in your home directory
21
+ --all Codex + Claude Code + Cursor (default)
22
+ --global User scope, in your home directory (default)
23
+ --project [PATH] Project scope; omit PATH to use the current directory
23
24
  --name NAME Skill name; use a distinct name for side-by-side versions
24
25
  --force Back up and replace existing or locally modified files
25
26
  --dry-run Show planned changes without writing files
@@ -27,12 +28,19 @@ Options:
27
28
  -v, --version Print npm package version
28
29
  -h, --help Show help
29
30
 
30
- Default target: universal (.agents/skills), also discovered by Codex and Cursor.
31
+ Default: install for Codex, Claude Code and Cursor in your home directory.
32
+ Codex: ~/.agents/skills
33
+ Claude Code: ~/.claude/skills
34
+ Cursor: ~/.cursor/skills
35
+ Use --agent to select tools, or --agent universal for only .agents/skills.
36
+ All commands use the same scope and target defaults; use --project for project copies.
31
37
  No files are installed by npm postinstall; run the install command explicitly.
32
38
 
33
39
  Examples:
34
- npx apple-design-skill@${pkg.version} install --all --project .
35
- npx apple-design-skill@${pkg.version} install --agent claude --global
40
+ npx apple-design-skill@${pkg.version} install
41
+ npx apple-design-skill@${pkg.version} install --agent claude
42
+ npx apple-design-skill@${pkg.version} install --project
43
+ npx apple-design-skill@${pkg.version} install --agent codex --project ./my-project
36
44
  npx apple-design-skill@${pkg.version} install --name apple-design-pinned
37
45
  npx apple-design-skill@latest use ${pkg.version} --all
38
46
  `;
@@ -49,7 +57,7 @@ try {
49
57
  if (!['install', 'use', 'list', 'uninstall'].includes(command)) throw new Error(`Unknown command: ${command}`);
50
58
  const requestedVersion = command === 'use' ? argv.shift() : pkg.version;
51
59
  if (command === 'use') validateVersion(requestedVersion);
52
- let scopeRoot = process.cwd();
60
+ let scopeRoot = homedir();
53
61
  let scopeFlag;
54
62
  const agents = [];
55
63
  const options = { command, packageRoot, version: requestedVersion, name: 'apple-design-skill', force: false, dryRun: false };
@@ -61,11 +69,14 @@ try {
61
69
  for (let i = 0; i < argv.length; i++) {
62
70
  const arg = argv[i];
63
71
  if (arg === '--agent') { agents.push(...next(arg, i++).split(',')); }
64
- else if (arg === '--all') { agents.push('codex', 'claude', 'cursor'); }
72
+ else if (arg === '--all') { agents.push(...defaultAgents); }
65
73
  else if (arg === '--project' || arg === '--global') {
66
74
  if (scopeFlag) throw new Error('Choose one of --project or --global');
67
75
  scopeFlag = arg;
68
- scopeRoot = arg === '--project' ? resolve(next(arg, i++)) : homedir();
76
+ if (arg === '--project') {
77
+ const path = argv[i + 1] && !argv[i + 1].startsWith('-') ? argv[++i] : '.';
78
+ scopeRoot = resolve(path);
79
+ } else scopeRoot = homedir();
69
80
  } else if (arg === '--name') { options.name = next(arg, i++); }
70
81
  else if (arg === '--force') options.force = true;
71
82
  else if (arg === '--dry-run') options.dryRun = true;
@@ -74,7 +85,7 @@ try {
74
85
  }
75
86
  validateName(options.name);
76
87
  options.scopeRoot = resolve(scopeRoot);
77
- options.targets = resolveTargets(options.scopeRoot, agents.length ? agents : ['universal'], options.name);
88
+ options.targets = resolveTargets(options.scopeRoot, agents.length ? agents : defaultAgents, options.name);
78
89
  const result = execute(options);
79
90
  if (json) process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
80
91
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apple-design-skill",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Apple-style interface design skills for Codex, Claude Code, Cursor and Agent Skills hosts, with versioned installation.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -18,7 +18,7 @@ These instructions are portable across Agent Skills hosts, including Codex, Clau
18
18
  1. Inspect affected components, shared tokens, installed dependencies, and actual behavior. Identify the primary task, input methods, states, and affected variants. For a review, report findings without unsolicited edits.
19
19
  2. Prioritize correct operation, semantics, focus, and recovery; then continuity and visual consistency; then optional effects. Fix shared components or purposeful variants within scope.
20
20
  3. Reuse accessible primitives and existing tools. CSS usually suffices for hover, press, and simple visibility changes; playback control may use Web Animations. Dragging and velocity handoff need readable presentation values, cancellation, and retargeting. Preserve native scrolling and suitable scroll snap; do not add a framework just to apply this skill.
21
- 4. Verify relevant states and input paths before delivery. Report the change, observable result, checks performed, and remaining limitations. Review findings should give location, trigger, impact, evidence, and a minimal correction.
21
+ 4. Complete the requested implementation or review, inspect the affected pages as a whole, and verify relevant states and input paths before delivery. Follow the verification and handoff guidance below. Review findings should give location, trigger, impact, evidence, and a minimal correction.
22
22
 
23
23
  ## Dropdowns — required when affected
24
24
 
@@ -53,7 +53,7 @@ Use shared tokens and documented variants across affected screens; avoid isolate
53
53
  ### Verify the expanded menu
54
54
 
55
55
  - Inspect each affected variant beside surrounding controls, closed and open, including selected and distinct active/hovered rows where supported. Cover long options, many results, relevant themes, the narrowest target viewport, and containing dialogs/iframes.
56
- - **For visual dropdown work, retain an image that actually shows the expanded popup.** An “expanded” accessibility state, successful selection, or screenshot omitting the OS menu cannot establish visual integration. If capture is unavailable, report appearance as unverified.
56
+ - **For visual dropdown work, directly inspect the actual expanded popup** in a live browser view or a temporary screenshot. An “expanded” accessibility state, successful selection, or screenshot omitting the OS menu cannot establish visual integration. Retaining an image is not required. If visual inspection is unavailable, report appearance as unverified.
57
57
  - Exercise pattern-appropriate keyboard navigation and selection. For a select-only combobox, include arrows, Home/End, typeahead, Enter/Space, Escape cancellation, and Tab/Shift+Tab exit. Check pointer selection, outside dismissal, focus return/exit, disabled behavior, and one relevant interruption; read back the real value or resulting application behavior.
58
58
 
59
59
  ## Visual design and accessibility
@@ -93,6 +93,14 @@ Use for dragging, swiping, inertia, directly manipulated sheets, and spring hand
93
93
 
94
94
  Select checks for the affected behavior; spacing changes do not require the gesture suite. Use existing project checks and browser interactions. Add tests for meaningful state/input defects, not wording or animation constants.
95
95
 
96
+ ### Whole-page visual inspection
97
+
98
+ - For interface changes and visual reviews, inspect the actual rendered affected pages as a whole in a live browser view or temporary screenshots. Review the overall composition, then scroll through the full page at a readable scale to check navigation, content hierarchy, typography, spacing, alignment, surface consistency, and clipping or overlap. A component crop or the first viewport alone is insufficient.
99
+ - Check the supported desktop and narrow layouts and relevant themes. View affected controls and expanded overlays in their page context, including their relationship to surrounding content. When shared components or tokens change, inspect representative affected pages and distinct layout variants for consistency.
100
+ - Code review, DOM assertions, and successful interactions do not replace visual inspection. If the page cannot be rendered or visually inspected, identify the unverified pages or states in the final response. After visual corrections, recheck the affected page as a whole. Report unrelated findings without expanding the implementation scope.
101
+
102
+ ### Behavior and state checks
103
+
96
104
  | Change | Relevant checks |
97
105
  | --- | --- |
98
106
  | Visual/layout | Equivalent affected controls, supported themes, long/localized labels, enlarged text, narrow viewports, contrast, and material fallbacks. |
@@ -101,7 +109,13 @@ Select checks for the affected behavior; spacing changes do not require the gest
101
109
  | Accessibility | Primary task by keyboard, focus/naming/states, relevant modal dismissal, reduced motion at startup and during motion, and immediate completion. |
102
110
  | Performance | When affected, inspect sustained input, long tasks, layout/paint, and expensive filters before tuning effects. |
103
111
 
104
- Record browser/device, operations, outcomes, and simulation limits. Distinguish runtime observations, automated checks, static risks, and unverified conditions. Screenshots show appearance; interaction checks show behavior. DOM assertions or emulation do not establish real-device, actual browser zoom, OS-preference, or screen-reader coverage.
112
+ Distinguish runtime observations, automated checks, static risks, and unverified conditions. Screenshots show appearance; interaction checks show behavior. DOM assertions or emulation do not establish real-device, actual browser zoom, OS-preference, or screen-reader coverage.
113
+
114
+ ### Completion and handoff
115
+
116
+ - Deliver the requested project changes or review, with applicable checks completed. In the final response, concisely explain the change or findings, observable result, checks performed, and remaining limitations. Include browser/device, key operations, outcomes, and simulation limits when relevant to interpreting the checks. State unavailable checks explicitly; do not claim unverified behavior passed.
117
+ - **Do not create or retain extra delivery artifacts by default.** Unless requested, do not generate standalone reports, checklists, design documents, demo pages, screenshots, recordings, or output folders solely to document completion. The requested implementation and the final response are sufficient; saved evidence is not a completion requirement.
118
+ - Use temporary captures only as needed for verification and clean up task-created temporary files afterward. Preserve existing project assets and any deliverables the user explicitly requested.
105
119
 
106
120
  ## Sources
107
121