mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-30 22:13:28 +08:00
fix: clarify configure-ecc skill copy roots
This commit is contained in:
committed by
Affaan Mustafa
parent
e1d6d853f7
commit
803abe52a5
@@ -130,9 +130,20 @@ Options:
|
|||||||
|
|
||||||
### 2c: インストールの実行
|
### 2c: インストールの実行
|
||||||
|
|
||||||
選択された各スキルについて、スキルディレクトリ全体をコピーします:
|
選択された各スキルについて、正しいソースルートからスキルディレクトリ全体をコピーします:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp -r $ECC_ROOT/skills/<skill-name> $TARGET/skills/
|
# ステップ 2a で選択したコアスキルは .agents/skills/ 配下にあります
|
||||||
|
cp -R "$ECC_ROOT/.agents/skills/<skill-name>" "$TARGET/skills/"
|
||||||
|
|
||||||
|
# ステップ 2b/2c で選択したニッチスキルは skills/ 配下にあります
|
||||||
|
cp -R "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
|
||||||
|
```
|
||||||
|
|
||||||
|
glob で取得したソースディレクトリを処理するときは、trailing slash 付きのソースをそのまま `cp` に渡さないでください。宛先名にディレクトリ名を明示します:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -R "${src%/}" "$TARGET/skills/$(basename "${src%/}")"
|
||||||
```
|
```
|
||||||
|
|
||||||
注: `continuous-learning` と `continuous-learning-v2` には追加ファイル(config.json、フック、スクリプト)があります — SKILL.md だけでなく、ディレクトリ全体がコピーされることを確認してください。
|
注: `continuous-learning` と `continuous-learning-v2` には追加ファイル(config.json、フック、スクリプト)があります — SKILL.md だけでなく、ディレクトリ全体がコピーされることを確認してください。
|
||||||
|
|||||||
@@ -199,10 +199,20 @@ mkdir -p $TARGET/skills $TARGET/rules
|
|||||||
|
|
||||||
### 2d: 执行安装
|
### 2d: 执行安装
|
||||||
|
|
||||||
对于每个选定的技能,复制整个技能目录:
|
对于每个选定的技能,请从正确的源目录复制整个技能目录:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp -r $ECC_ROOT/skills/<skill-name> $TARGET/skills/
|
# 步骤 2a 选中的核心技能位于 .agents/skills/
|
||||||
|
cp -R "$ECC_ROOT/.agents/skills/<skill-name>" "$TARGET/skills/"
|
||||||
|
|
||||||
|
# 步骤 2b/2c 选中的细分技能位于 skills/
|
||||||
|
cp -R "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
|
||||||
|
```
|
||||||
|
|
||||||
|
遍历 glob 得到的源目录时,不要把带 trailing slash 的源路径直接传给 `cp`。显式使用目录名作为目标名:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -R "${src%/}" "$TARGET/skills/$(basename "${src%/}")"
|
||||||
```
|
```
|
||||||
|
|
||||||
注意:`continuous-learning` 和 `continuous-learning-v2` 有额外的文件(config.json、钩子、脚本)——确保复制整个目录,而不仅仅是 SKILL.md。
|
注意:`continuous-learning` 和 `continuous-learning-v2` 有额外的文件(config.json、钩子、脚本)——确保复制整个目录,而不仅仅是 SKILL.md。
|
||||||
|
|||||||
@@ -195,9 +195,20 @@ For each selected category, print the full list of skills below and ask the user
|
|||||||
|
|
||||||
### 2d: Execute Installation
|
### 2d: Execute Installation
|
||||||
|
|
||||||
For each selected skill, copy the entire skill directory:
|
For each selected skill, copy the entire skill directory from the correct source root:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cp -r $ECC_ROOT/skills/<skill-name> $TARGET/skills/
|
# Core skills selected from Step 2a live under .agents/skills/
|
||||||
|
cp -R "$ECC_ROOT/.agents/skills/<skill-name>" "$TARGET/skills/"
|
||||||
|
|
||||||
|
# Niche skills selected from Step 2b/2c live under skills/
|
||||||
|
cp -R "$ECC_ROOT/skills/<skill-name>" "$TARGET/skills/"
|
||||||
|
```
|
||||||
|
|
||||||
|
When iterating over globbed source directories, never pass a trailing-slash source directly to `cp`. Use the directory path as the destination name explicitly:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cp -R "${src%/}" "$TARGET/skills/$(basename "${src%/}")"
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: `continuous-learning` and `continuous-learning-v2` have extra files (config.json, hooks, scripts) — ensure the entire directory is copied, not just SKILL.md.
|
Note: `continuous-learning` and `continuous-learning-v2` have extra files (config.json, hooks, scripts) — ensure the entire directory is copied, not just SKILL.md.
|
||||||
|
|||||||
63
tests/docs/configure-ecc-install-paths.test.js
Normal file
63
tests/docs/configure-ecc-install-paths.test.js
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const assert = require('assert');
|
||||||
|
const fs = require('fs');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const repoRoot = path.resolve(__dirname, '..', '..');
|
||||||
|
|
||||||
|
const configureEccDocs = [
|
||||||
|
'skills/configure-ecc/SKILL.md',
|
||||||
|
'docs/zh-CN/skills/configure-ecc/SKILL.md',
|
||||||
|
'docs/ja-JP/skills/configure-ecc/SKILL.md',
|
||||||
|
];
|
||||||
|
|
||||||
|
let passed = 0;
|
||||||
|
let failed = 0;
|
||||||
|
|
||||||
|
function test(name, fn) {
|
||||||
|
try {
|
||||||
|
fn();
|
||||||
|
console.log(` ✓ ${name}`);
|
||||||
|
passed++;
|
||||||
|
} catch (error) {
|
||||||
|
console.log(` ✗ ${name}`);
|
||||||
|
console.log(` Error: ${error.message}`);
|
||||||
|
failed++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('\n=== Testing configure-ecc install path guidance ===\n');
|
||||||
|
|
||||||
|
for (const relativePath of configureEccDocs) {
|
||||||
|
const content = fs.readFileSync(path.join(repoRoot, relativePath), 'utf8');
|
||||||
|
|
||||||
|
test(`${relativePath} separates core and niche skill source roots`, () => {
|
||||||
|
assert.ok(
|
||||||
|
content.includes('$ECC_ROOT/.agents/skills/<skill-name>'),
|
||||||
|
'Expected configure-ecc to document the core skill source root'
|
||||||
|
);
|
||||||
|
assert.ok(
|
||||||
|
content.includes('$ECC_ROOT/skills/<skill-name>'),
|
||||||
|
'Expected configure-ecc to document the niche skill source root'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test(`${relativePath} documents defensive copy form for trailing slash sources`, () => {
|
||||||
|
assert.ok(
|
||||||
|
content.includes('${src%/}'),
|
||||||
|
'Expected configure-ecc to strip trailing slash before copying'
|
||||||
|
);
|
||||||
|
assert.ok(
|
||||||
|
content.includes('$(basename "${src%/}")'),
|
||||||
|
'Expected configure-ecc to preserve the skill directory name explicitly'
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (failed > 0) {
|
||||||
|
console.log(`\nFailed: ${failed}`);
|
||||||
|
process.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(`\nPassed: ${passed}`);
|
||||||
Reference in New Issue
Block a user