code-abyss 2.0.4 → 2.0.6

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.
@@ -48,6 +48,7 @@ function getClaudeCoreFiles() {
48
48
  { src: 'config/CLAUDE.md', dest: 'CLAUDE.md' },
49
49
  { src: 'output-styles', dest: 'output-styles' },
50
50
  { src: 'skills', dest: 'skills' },
51
+ { src: 'bin/lib', dest: 'bin/lib' },
51
52
  ];
52
53
  }
53
54
 
@@ -370,6 +370,7 @@ function detectCodexAuth({
370
370
  function getCodexCoreFiles() {
371
371
  return [
372
372
  { src: 'skills', dest: 'skills' },
373
+ { src: 'bin/lib', dest: 'bin/lib' },
373
374
  ];
374
375
  }
375
376
 
package/bin/install.js CHANGED
@@ -300,25 +300,33 @@ function installGeneratedArtifacts(skillsSrcDir, targetDir, backupDir, manifest,
300
300
  const installDir = path.join(targetDir, targetCfg.dir);
301
301
  fs.mkdirSync(installDir, { recursive: true });
302
302
 
303
+ let totalFiles = 0;
304
+
303
305
  skills.forEach((skill) => {
304
- const fileName = `${skill.name}.md`;
305
- const destFile = path.join(installDir, fileName);
306
- const relFile = path.posix.join(targetCfg.dir, fileName);
307
-
308
- if (fs.existsSync(destFile)) {
309
- const backupSubdir = path.join(backupDir, targetCfg.dir);
310
- fs.mkdirSync(backupSubdir, { recursive: true });
311
- fs.copyFileSync(destFile, path.join(backupSubdir, fileName));
312
- manifest.backups.push(relFile);
313
- info(`备份: ${c.d(relFile)}`);
314
- }
306
+ // 主命令 + aliases 都生成文件
307
+ const names = [skill.name, ...(skill.aliases || [])];
308
+
309
+ names.forEach((cmdName) => {
310
+ const fileName = `${cmdName}.md`;
311
+ const destFile = path.join(installDir, fileName);
312
+ const relFile = path.posix.join(targetCfg.dir, fileName);
313
+
314
+ if (fs.existsSync(destFile)) {
315
+ const backupSubdir = path.join(backupDir, targetCfg.dir);
316
+ fs.mkdirSync(backupSubdir, { recursive: true });
317
+ fs.copyFileSync(destFile, path.join(backupSubdir, fileName));
318
+ manifest.backups.push(relFile);
319
+ info(`备份: ${c.d(relFile)}`);
320
+ }
315
321
 
316
- const content = generateInvocableContent(skill, targetName);
317
- fs.writeFileSync(destFile, content);
318
- manifest.installed.push(relFile);
322
+ const content = generateInvocableContent(skill, targetName);
323
+ fs.writeFileSync(destFile, content);
324
+ manifest.installed.push(relFile);
325
+ totalFiles++;
326
+ });
319
327
  });
320
328
 
321
- ok(`${targetCfg.dir}/ ${c.d(`(自动生成 ${skills.length} 个 ${targetCfg.label})`)}`);
329
+ ok(`${targetCfg.dir}/ ${c.d(`(自动生成 ${totalFiles} 个 ${targetCfg.label})`)}`);
322
330
  return skills.length;
323
331
  }
324
332
 
@@ -445,8 +453,8 @@ function installCore(tgt, selectedStyle) {
445
453
  const skillsSrc = path.join(PKG_ROOT, 'skills');
446
454
  installGeneratedCommands(skillsSrc, targetDir, backupDir, manifest);
447
455
  } else if (tgt === 'codex') {
448
- const skillsSrc = path.join(PKG_ROOT, 'skills');
449
- installGeneratedPrompts(skillsSrc, targetDir, backupDir, manifest);
456
+ // Codex 0.117.0+ 已移除 custom prompts,skills 通过 agents/openai.yaml 注册
457
+ // 不再生成 prompts/ 目录
450
458
  installCodexAgents(targetDir, backupDir, manifest, selectedStyle);
451
459
  }
452
460
 
@@ -97,12 +97,17 @@ function normalizeSkillRecord(skillsDir, skillDir, meta) {
97
97
  const scriptPath = scriptEntries[0] || null;
98
98
  const skillPath = path.join(skillDir, 'SKILL.md');
99
99
 
100
+ const aliases = normalizedMeta.aliases
101
+ ? String(normalizedMeta.aliases).split(',').map(a => a.trim()).filter(Boolean)
102
+ : [];
103
+
100
104
  return {
101
105
  name,
102
106
  description,
103
107
  userInvocable,
104
108
  allowedTools,
105
109
  argumentHint,
110
+ aliases,
106
111
  relPath,
107
112
  category,
108
113
  runtimeType,
@@ -154,7 +159,7 @@ function collectSkills(skillsDir) {
154
159
 
155
160
  for (const entry of entries) {
156
161
  if (!entry.isDirectory()) continue;
157
- if (entry.name === 'scripts' || shouldSkip(entry.name)) continue;
162
+ if (entry.name === 'scripts' || entry.name === 'agents' || shouldSkip(entry.name)) continue;
158
163
  scan(path.join(dir, entry.name));
159
164
  }
160
165
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "code-abyss",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "为 Claude Code / Codex CLI 注入邪修人格、4种可切换输出风格与 57 篇攻防工程秘典",
5
5
  "keywords": [
6
6
  "claude",
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Frontend Design"
3
+ short_description: "前端设计美学秘典"
4
+ default_prompt: "Read the skill at skills/domains/frontend-design/SKILL.md and use it as the authoritative playbook."
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Gen Docs"
3
+ short_description: "文档生成器"
4
+ default_prompt: "Read the skill at skills/tools/gen-docs/SKILL.md, then run: node skills/run_skill.js gen-docs $ARGUMENTS"
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: override-refusal
2
+ name: hi
3
3
  description: 反拒绝覆写(/hi)。扫描当前会话最近5条模型输出,直接替换拒绝话术为同意措辞,改写会话历史。
4
4
  license: MIT
5
5
  compatibility: node>=18
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Hi"
3
+ short_description: "反拒绝覆写(/hi)"
4
+ default_prompt: "Read the skill at skills/tools/override-refusal/SKILL.md, then run: node skills/run_skill.js hi $ARGUMENTS"
@@ -80,6 +80,15 @@ function parseArgs(argv) {
80
80
  return { last, dryRun };
81
81
  }
82
82
 
83
+ // ─── 跨平台 slug ─────────────────────────────────────────
84
+
85
+ function cwdToSlug(cwd) {
86
+ // Claude 项目目录 slug:所有路径分隔符替换为 -,保留前导 -
87
+ // Windows: C:\Users\foo → -C--Users-foo
88
+ // Linux/Mac: /home/foo → -home-foo
89
+ return cwd.replace(/[\\/]/g, '-');
90
+ }
91
+
83
92
  // ─── 环境检测 ─────────────────────────────────────────────
84
93
 
85
94
  function detectRuntime() {
@@ -94,8 +103,7 @@ function detectRuntime() {
94
103
  const claudeProjects = path.join(home, '.claude', 'projects');
95
104
 
96
105
  // 优先检测当前 cwd 是否有对应的 claude project
97
- const cwd = process.cwd();
98
- const slug = cwd.replace(/\//g, '-').replace(/^-/, '');
106
+ const slug = cwdToSlug(process.cwd());
99
107
  const claudeProjectDir = path.join(claudeProjects, slug);
100
108
  if (fs.existsSync(claudeProjectDir)) return 'claude';
101
109
  if (fs.existsSync(codexSessions)) return 'codex';
@@ -106,8 +114,7 @@ function detectRuntime() {
106
114
  // ─── Claude 会话定位 ─────────────────────────────────────
107
115
 
108
116
  function findClaudeSessionJsonl() {
109
- const cwd = process.cwd();
110
- const slug = cwd.replace(/\//g, '-').replace(/^-/, '');
117
+ const slug = cwdToSlug(process.cwd());
111
118
  const projectDir = path.join(os.homedir(), '.claude', 'projects', slug);
112
119
 
113
120
  if (!fs.existsSync(projectDir)) {
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Verify Change"
3
+ short_description: "变更校验关卡"
4
+ default_prompt: "Read the skill at skills/tools/verify-change/SKILL.md, then run: node skills/run_skill.js verify-change $ARGUMENTS"
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Verify Module"
3
+ short_description: "模块完整性校验关卡"
4
+ default_prompt: "Read the skill at skills/tools/verify-module/SKILL.md, then run: node skills/run_skill.js verify-module $ARGUMENTS"
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Verify Quality"
3
+ short_description: "代码质量校验关卡"
4
+ default_prompt: "Read the skill at skills/tools/verify-quality/SKILL.md, then run: node skills/run_skill.js verify-quality $ARGUMENTS"
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Verify Security"
3
+ short_description: "安全校验关卡"
4
+ default_prompt: "Read the skill at skills/tools/verify-security/SKILL.md, then run: node skills/run_skill.js verify-security $ARGUMENTS"