@cliphijack/santaclaude 0.9.4 → 0.9.5
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/package.json +1 -1
- package/santaclaude.js +5 -2
package/package.json
CHANGED
package/santaclaude.js
CHANGED
|
@@ -123,7 +123,10 @@ async function run(conf) {
|
|
|
123
123
|
// 그 창의 작업 폴더 (없으면 홈)
|
|
124
124
|
let cwd = os.homedir();
|
|
125
125
|
try { const pc = execFileSync('tmux', ['display-message', '-t', w, '-p', '#{pane_current_path}'], { encoding: 'utf8' }).trim(); if (pc) cwd = pc; } catch (e) {}
|
|
126
|
-
|
|
126
|
+
// 폴더 네임스페이스 — santa-{퍼블리셔}-{스킬}: 충돌 방지 + 마켓 출처 식별. SKILL.md 파일명은 표준 고정
|
|
127
|
+
const pub = String(sk.publisher || 'me').replace(/[^a-zA-Z0-9-]/g, '').toLowerCase() || 'me';
|
|
128
|
+
const folder = ('santa-' + pub + '-' + sk.name).replace(/[^a-zA-Z0-9._-]/g, '-').slice(0, 80);
|
|
129
|
+
const sdir = path.join(cwd, '.claude', 'skills', folder);
|
|
127
130
|
let cnt = 0;
|
|
128
131
|
for (const f of (sk.files || [])) {
|
|
129
132
|
const safe = String(f.path || '').replace(/\\/g, '/').replace(/(^|\/)\.\.(\/|$)/g, '/').replace(/^\/+/, '');
|
|
@@ -133,7 +136,7 @@ async function run(conf) {
|
|
|
133
136
|
try { fs.mkdirSync(path.dirname(fp), { recursive: true }); fs.writeFileSync(fp, String(f.content || '')); cnt++; } catch (e) {}
|
|
134
137
|
}
|
|
135
138
|
console.log(` 🧩 스킬 "${sk.name}" ${cnt}개 파일 이식 → ${sdir}`);
|
|
136
|
-
const msg = sk.prompt && sk.prompt.trim() ? sk.prompt.trim() : (
|
|
139
|
+
const msg = (sk.prompt && sk.prompt.trim() ? sk.prompt.trim() + ' ' : '') + '(스킬 "' + sk.name + '"이 .claude/skills/' + folder + '/ 에 이식됨 — SKILL.md 읽고 적용)';
|
|
137
140
|
execFileSync('tmux', ['send-keys', '-t', w, '-l', msg]);
|
|
138
141
|
setTimeout(() => { try { execFileSync('tmux', ['send-keys', '-t', w, 'Enter']); } catch (e) {} }, 300);
|
|
139
142
|
return;
|