apple-design-skill 0.0.2 → 0.0.3

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.3",
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.3",
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,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.3
4
+
5
+ - Default all CLI commands to user scope and the Codex, Claude Code and Cursor targets; keep `--global` and `--all` as explicit equivalents.
6
+ - Support `--project` for the current project and `--project PATH` for a specific project, with `--agent` limiting the selected tools in either scope.
7
+ - Document the default change from 0.0.2 and earlier, and verify user/project isolation across installation, activation, listing and uninstall.
8
+
3
9
  ## 0.0.2
4
10
 
5
11
  - 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
 
@@ -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.3",
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": {