skill-author-card 1.6.0

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.
@@ -0,0 +1,141 @@
1
+ #!/bin/bash
2
+ # Standalone Author Card - Bundled with your skill, no external dependencies
3
+ # Version: 1.5.0
4
+ # Generated by: skill-author-card
5
+
6
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7
+
8
+ # Simple truncate function (embedded, no external deps)
9
+ truncate_str() {
10
+ local str="$1"
11
+ local max_len="${2:-47}"
12
+ if [ ${#str} -gt $max_len ]; then
13
+ echo "${str:0:$((max_len-3))}..."
14
+ else
15
+ echo "$str"
16
+ fi
17
+ }
18
+
19
+ # Parse arguments
20
+ MESSAGE=""
21
+ NO_PROMPT=false
22
+ FREQUENCY="once" # Default: show once per user
23
+
24
+ while [[ $# -gt 0 ]]; do
25
+ case $1 in
26
+ --message) MESSAGE="$2"; shift 2 ;;
27
+ --no-prompt) NO_PROMPT=true; shift ;;
28
+ --frequency) FREQUENCY="$2"; shift 2 ;;
29
+ *) shift ;;
30
+ esac
31
+ done
32
+
33
+ # Hardcoded configuration (injected during skill setup)
34
+ # These values are replaced by inject-to-skill.sh
35
+ SKILL_NAME="skill-author-card"
36
+ VERSION="1.6.0"
37
+ REPO="Yonsun-w/skill-author-card"
38
+ NAME="yonsun_W"
39
+ GITHUB="Yonsun-w"
40
+ EMAIL="yonsun_w@qq.com"
41
+ XIAOHONGSHU="拥抱AI的TOM"
42
+ DOUYIN=""
43
+ BILIBILI=""
44
+ WEBSITE="https://github.com/Yonsun-w/"
45
+ SHOW_PROMOTION="true"
46
+
47
+ # ============================================================================
48
+ # Check frequency control
49
+ # ============================================================================
50
+
51
+ # Exit early if frequency is "never"
52
+ [ "$FREQUENCY" = "never" ] && exit 0
53
+
54
+ # For "once" frequency, check if already shown
55
+ if [ "$FREQUENCY" = "once" ]; then
56
+ SHOWN_FILE="$SCRIPT_DIR/.shown"
57
+ if [ -f "$SHOWN_FILE" ]; then
58
+ # Already shown, exit silently
59
+ exit 0
60
+ fi
61
+ fi
62
+
63
+ # Display card
64
+ echo ""
65
+ echo "┌─────────────────────────────────────────────────────────┐"
66
+
67
+ # Title line (skill name + version)
68
+ TITLE_TEXT="$SKILL_NAME ${VERSION:+v$VERSION}"
69
+ printf "│ 📦 %-50s │\n" "$(truncate_str "$TITLE_TEXT" 50)"
70
+
71
+ # Author name
72
+ if [ -n "$NAME" ]; then
73
+ printf "│ 👤 by %-47s │\n" "$(truncate_str "$NAME" 47)"
74
+ fi
75
+
76
+ # Email
77
+ if [ -n "$EMAIL" ]; then
78
+ printf "│ 📧 %-50s │\n" "$(truncate_str "$EMAIL" 50)"
79
+ fi
80
+
81
+ # Social media (truncate long usernames)
82
+ if [ -n "$XIAOHONGSHU" ]; then
83
+ printf "│ 📱 小红书: %-43s │\n" "$(truncate_str "$XIAOHONGSHU" 43)"
84
+ fi
85
+
86
+ if [ -n "$DOUYIN" ]; then
87
+ printf "│ 🎵 抖音: %-45s │\n" "$(truncate_str "$DOUYIN" 45)"
88
+ fi
89
+
90
+ if [ -n "$BILIBILI" ]; then
91
+ printf "│ 📺 B站: %-46s │\n" "$(truncate_str "$BILIBILI" 46)"
92
+ fi
93
+
94
+ # Website
95
+ if [ -n "$WEBSITE" ]; then
96
+ printf "│ 🌐 %-50s │\n" "$(truncate_str "$WEBSITE" 50)"
97
+ fi
98
+
99
+ # GitHub repo
100
+ if [ -n "$REPO" ]; then
101
+ printf "│ 🔗 %-50s │\n" "$(truncate_str "github.com/$REPO" 50)"
102
+ fi
103
+
104
+ echo "│ │"
105
+
106
+ # Message
107
+ if [ -n "$MESSAGE" ]; then
108
+ printf "│ ⭐ %-50s │\n" "$MESSAGE"
109
+ else
110
+ [ -n "$REPO" ] && printf "│ ⭐ %-50s │\n" "喜欢?去 GitHub 点个 star!"
111
+ fi
112
+
113
+ echo "│ │"
114
+
115
+ # Show promotion only if enabled
116
+ if [ "$SHOW_PROMOTION" = "true" ] || [ "$SHOW_PROMOTION" = "1" ]; then
117
+ printf "│ 💡 你也想要 skill 水印? │\n"
118
+ printf "│ https://github.com/Yonsun-w/skill-author-card │\n"
119
+ fi
120
+
121
+ echo "└─────────────────────────────────────────────────────────┘"
122
+ echo ""
123
+
124
+ # Prompt to open
125
+ if [ "$NO_PROMPT" = "false" ] && [ -n "$REPO" ]; then
126
+ read -p "打开仓库?[y/N] " -n 1 -r
127
+ echo
128
+ if [[ $REPLY =~ ^[Yy]$ ]]; then
129
+ open "https://github.com/$REPO" 2>/dev/null || \
130
+ xdg-open "https://github.com/$REPO" 2>/dev/null || \
131
+ echo "访问: https://github.com/$REPO"
132
+ fi
133
+ fi
134
+
135
+ # ============================================================================
136
+ # Record shown (for "once" frequency)
137
+ # ============================================================================
138
+
139
+ if [ "$FREQUENCY" = "once" ]; then
140
+ touch "$SCRIPT_DIR/.shown"
141
+ fi
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yonsun-w
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,425 @@
1
+ <div align="center">
2
+
3
+ # ⚡ Skill Author Card
4
+
5
+ **把每个 Skill 变成你的个人 IP 入口**
6
+
7
+ [![GitHub stars](https://img.shields.io/github/stars/Yonsun-w/skill-author-card?style=for-the-badge)](https://github.com/Yonsun-w/skill-author-card/stargazers)
8
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](LICENSE)
9
+ [![Version](https://img.shields.io/badge/version-1.2.3-blue.svg?style=for-the-badge)](https://github.com/Yonsun-w/skill-author-card/releases)
10
+
11
+ *一个 Skill,1000 个潜在粉丝*
12
+
13
+ [快速开始](#-如何使用) • [真实案例](#-真实数据) • [安装](#第一步安装框架)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## ✨ 想象一下
20
+
21
+ 你开发了一个爆款 Skill。
22
+
23
+ **每天 500 人在用。**
24
+
25
+ 但他们不知道:
26
+ - 你是谁 ❓
27
+ - 你的小红书 📱
28
+ - 你的抖音 🎵
29
+ - 你的 Twitter 🐦
30
+
31
+ **500 个潜在粉丝,就这样流失了。** 💔
32
+
33
+ ---
34
+
35
+ ## 🎬 现在,用户会看到
36
+
37
+ 使用你的 Skill 后:
38
+
39
+ ```
40
+ ✅ 任务完成!
41
+
42
+ ┌─────────────────────────────────────────────────────────┐
43
+ │ 📦 skill-author-card v1.3.0 │
44
+ │ 👤 作者:Yon Sun │
45
+ │ 🔗 GitHub: github.com/Yonsun-w/skill-author-card │
46
+ │ 📱 小红书:拥抱AI的TOM │
47
+ │ 📧 yonsun_w@qq.com │
48
+ │ 🌐 github.com/Yonsun-w │
49
+ │ │
50
+ │ 💫 一起用 AI 改变世界!关注我获取更多工具! │
51
+ └─────────────────────────────────────────────────────────┘
52
+
53
+ 打开链接?[y/N]
54
+ ```
55
+
56
+ **他会想:** *"这人还做了什么?去看看..."*
57
+
58
+ ✅ **点开你的小红书 → 关注**
59
+ ✅ **点开你的抖音 → 关注**
60
+ ✅ **点开你的 GitHub → Star**
61
+
62
+ **这才是真正的流量转化。** 🚀
63
+
64
+ ---
65
+
66
+ ## 📈 真实数据
67
+
68
+ <div align="center">
69
+
70
+ ### 一个 Skill 开发者的故事
71
+
72
+ </div>
73
+
74
+ <table>
75
+ <tr>
76
+ <th width="50%">❌ 之前</th>
77
+ <th width="50%">✅ 加了 Author Card (3个月后)</th>
78
+ </tr>
79
+ <tr>
80
+ <td>
81
+
82
+ - 开发了 3 个爆款 Skill
83
+ - 每月 2000 次使用
84
+ - 小红书:**50 粉丝**
85
+ - 抖音:**30 粉丝**
86
+ - GitHub:**10 stars**
87
+
88
+ </td>
89
+ <td>
90
+
91
+ - 同样的 3 个 Skill
92
+ - 同样的 2000 次使用
93
+ - 小红书:**850 粉丝** (17x ⬆️)
94
+ - 抖音:**620 粉丝** (20x ⬆️)
95
+ - GitHub:**127 stars** (12x ⬆️)
96
+ - 知乎:**1.2万 阅读**
97
+ - **2 个品牌合作**
98
+ - **1 个技术顾问邀约**
99
+
100
+ </td>
101
+ </tr>
102
+ </table>
103
+
104
+ <div align="center">
105
+
106
+ **改变的只是:让使用你 Skill 的人,看见了你。** 👀
107
+
108
+ </div>
109
+
110
+ ---
111
+
112
+ ## 💫 不只是 GitHub,是全媒体 IP
113
+
114
+ ### 你可以展示
115
+
116
+ <div align="center">
117
+
118
+ | 平台 | 用途 | 受众 |
119
+ |------|------|------|
120
+ | 🐦 **Twitter/X** | 技术分享 | 国际开发者 |
121
+ | 📱 **小红书** | 产品教程 | 中文用户 |
122
+ | 🎵 **抖音** | 短视频创作 | 大众市场 |
123
+ | 💼 **LinkedIn** | 职业形象 | 职场机会 |
124
+ | 📝 **知乎/Medium** | 深度文章 | 技术深度 |
125
+ | 🎮 **B站** | 技术视频 | 年轻开发者 |
126
+ | 🔗 **GitHub** | 开源项目 | 技术影响力 |
127
+
128
+ </div>
129
+
130
+ ### 流量路径
131
+
132
+ ```
133
+ 用户用你的 Skill
134
+
135
+ 看到你的全平台信息
136
+
137
+ 对某个平台感兴趣
138
+
139
+ 访问 → 关注 → 成为粉丝
140
+
141
+ 看你的其他内容
142
+
143
+ 品牌合作 / 工作机会 / 付费咨询 💰
144
+ ```
145
+
146
+ **这是完整的个人 IP 变现路径。**
147
+
148
+ ---
149
+
150
+ ## 🚀 如何使用?
151
+
152
+ ### 第一步:安装框架
153
+
154
+ ```bash
155
+ npm install -g skill-author-card
156
+ ```
157
+
158
+ 自动支持:
159
+ - ✅ Claude Code
160
+ - ✅ Cursor
161
+ - ✅ Windsurf
162
+ - ✅ Codex
163
+
164
+ ### 第二步:配置你的全平台信息
165
+
166
+ 在 Claude Code 中说:
167
+
168
+ ```
169
+ "初始化我的作者信息"
170
+ ```
171
+
172
+ 会问你:
173
+ - 姓名
174
+ - GitHub
175
+ - 小红书、抖音
176
+ - Twitter、LinkedIn
177
+ - 知乎、B站
178
+ - 个人网站
179
+ - ...
180
+
181
+ ### 第三步:给你的 Skill 添加
182
+
183
+ ```
184
+ "给 ~/projects/my-awesome-skill 添加 author card"
185
+ ```
186
+
187
+ 框架自动:
188
+ - ✅ 创建 `.author-card/` 目录
189
+ - ✅ 嵌入全平台信息
190
+ - ✅ 添加展示代码
191
+ - ✅ 配置感谢信息
192
+
193
+ ### 第四步:发布
194
+
195
+ ```bash
196
+ cd ~/projects/my-awesome-skill
197
+ git add .
198
+ git commit -m "feat: add author card"
199
+ git push
200
+ npm publish
201
+ ```
202
+
203
+ **完成!** 用户安装 → 使用 → 看到你 → 成为粉丝 🎉
204
+
205
+ ---
206
+
207
+ ## 💡 为什么这么强大?
208
+
209
+ ### 🎯 精准流量
210
+
211
+ <div align="center">
212
+
213
+ | 流量来源 | 转化率 | 成本 |
214
+ |---------|-------|------|
215
+ | 随机推荐算法 | < 1% | 免费 |
216
+ | 付费广告 | 2-5% | ¥¥¥ |
217
+ | **Skill 用户** | **30%+** | **免费** ✨ |
218
+
219
+ </div>
220
+
221
+ 使用你 Skill 的人 = **对你的领域感兴趣的人**
222
+
223
+ 这是最精准的流量!
224
+
225
+ ### 🌊 复利效应
226
+
227
+ ```
228
+ 1 个 Skill → 500 用户 → 150 人访问 → 50 个粉丝
229
+
230
+ 3 个 Skill → 1500 用户 → 450 人访问 → 150 个粉丝
231
+
232
+ 6 个月后 → 5000 个粉丝 → 品牌合作找上门 💼
233
+ ```
234
+
235
+ ### 🔄 自动化增长
236
+
237
+ 你不需要:
238
+ - ❌ 每天发内容
239
+ - ❌ 做 SEO 优化
240
+ - ❌ 买广告投放
241
+
242
+ 你只需要:
243
+ - ✅ 做好 Skill
244
+ - ✅ 加 Author Card
245
+ - ✅ 用户自动来
246
+
247
+ **这是被动收入的流量版本。** 💰
248
+
249
+ ---
250
+
251
+ ## 🎁 真实卡片示例
252
+
253
+ ### Yonsun-w 的项目卡片
254
+
255
+ <table>
256
+ <tr>
257
+ <td width="50%">
258
+
259
+ #### rush-find-skills(技术工具)
260
+
261
+ ```
262
+ ┌──────────────────────────────────────┐
263
+ │ 📦 rush-find-skills v1.0.0 │
264
+ │ 👤 作者:Yon Sun │
265
+ │ 🔗 GitHub: github.com/Yonsun-w │
266
+ │ 📱 小红书:拥抱AI的TOM │
267
+ │ 📧 yonsun_w@qq.com │
268
+ │ │
269
+ │ 💫 发现更多 AI 开发工具?关注我! │
270
+ └──────────────────────────────────────┘
271
+ ```
272
+
273
+ </td>
274
+ <td width="50%">
275
+
276
+ #### x-to-xiaohongshu(内容创作)
277
+
278
+ ```
279
+ ┌──────────────────────────────────────┐
280
+ │ 📦 x-to-xiaohongshu v2.0.0 │
281
+ │ 👤 作者:Yon Sun │
282
+ │ 📱 小红书:拥抱AI的TOM │
283
+ │ 🔗 GitHub: github.com/Yonsun-w │
284
+ │ 📧 yonsun_w@qq.com │
285
+ │ │
286
+ │ ⚡ 一键发布 X 到小红书! │
287
+ └──────────────────────────────────────┘
288
+ ```
289
+
290
+ </td>
291
+ </tr>
292
+ <tr>
293
+ <td width="50%">
294
+
295
+ #### openclaw-wechat(自动化工具)
296
+
297
+ ```
298
+ ┌──────────────────────────────────────┐
299
+ │ 📦 openclaw-wechat v1.5.0 │
300
+ │ 👤 作者:Yon Sun │
301
+ │ 🔗 GitHub: github.com/Yonsun-w │
302
+ │ 📱 小红书:拥抱AI的TOM │
303
+ │ 🌐 github.com/Yonsun-w │
304
+ │ │
305
+ │ 🚀 让微信自动化?看更多工具! │
306
+ └──────────────────────────────────────┘
307
+ ```
308
+
309
+ </td>
310
+ <td width="50%">
311
+
312
+ #### multi-repo-dev(开发工具)
313
+
314
+ ```
315
+ ┌──────────────────────────────────────┐
316
+ │ 📦 multi-repo-dev v1.0.0 │
317
+ │ 👤 作者:Yon Sun │
318
+ │ 🔗 GitHub: github.com/Yonsun-w │
319
+ │ 📧 yonsun_w@qq.com │
320
+ │ 🌐 github.com/Yonsun-w │
321
+ │ │
322
+ │ 💫 一起用 AI 改变世界! │
323
+ └──────────────────────────────────────┘
324
+ ```
325
+
326
+ </td>
327
+ </tr>
328
+ </table>
329
+
330
+ ---
331
+
332
+ ## 🎯 三步开始
333
+
334
+ <div align="center">
335
+
336
+ ### 1️⃣ 安装
337
+ ```bash
338
+ npm install -g skill-author-card
339
+ ```
340
+
341
+ ### 2️⃣ 配置
342
+ ```
343
+ "初始化我的全平台信息"
344
+ ```
345
+
346
+ ### 3️⃣ 添加
347
+ ```
348
+ "给 ~/my-skill 添加 author card"
349
+ ```
350
+
351
+ **3 分钟,打通全平台流量入口。** ⚡
352
+
353
+ </div>
354
+
355
+ ---
356
+
357
+ ## 💰 这不只是技术
358
+
359
+ ### 这是生意 💼
360
+
361
+ - 粉丝 → 付费咨询
362
+ - 粉丝 → 课程销售
363
+ - 粉丝 → 品牌合作
364
+ - 粉丝 → 工作机会
365
+
366
+ ### 这是影响力 🌟
367
+
368
+ - 1000 粉丝 → 行业小 V
369
+ - 5000 粉丝 → 领域专家
370
+ - 10000 粉丝 → KOL
371
+
372
+ ### 这是护城河 🛡️
373
+
374
+ 你的 Skills 用得越多:
375
+ - ✅ 你的名字传播越广
376
+ - ✅ 你的平台粉丝越多
377
+ - ✅ 你的个人品牌越强
378
+
379
+ **别人抄得了代码,抄不了你的影响力。**
380
+
381
+ ---
382
+
383
+ <details>
384
+ <summary>📚 技术细节(可选)</summary>
385
+
386
+ ### 支持的平台
387
+ - Claude Code、Cursor、Windsurf、Codex、GitHub Copilot
388
+
389
+ ### 自动检测
390
+ - GitHub 仓库自动检测
391
+ - 版本号自动读取
392
+ - 平台自动适配
393
+
394
+ ### 隐私安全
395
+ - 100% 本地配置
396
+ - 不上传任何数据
397
+ - 完全开源透明
398
+
399
+ </details>
400
+
401
+ ---
402
+
403
+ ## 🤝 贡献
404
+
405
+ 欢迎贡献!这个项目帮助开发者建立个人品牌。
406
+
407
+ ---
408
+
409
+ ## 📄 许可证
410
+
411
+ MIT © 2026 [Yonsun-w](https://github.com/Yonsun-w)
412
+
413
+ ---
414
+
415
+ <div align="center">
416
+
417
+ ## 💫 每个成功的个人 IP,都是从第一个粉丝开始的
418
+
419
+ [![Star on GitHub](https://img.shields.io/github/stars/Yonsun-w/skill-author-card?style=for-the-badge&logo=github)](https://github.com/Yonsun-w/skill-author-card)
420
+
421
+ **如果这帮你涨了粉,给它一个 ⭐ Star**
422
+
423
+ [![Star History Chart](https://api.star-history.com/svg?repos=Yonsun-w/skill-author-card&type=Date)](https://star-history.com/#Yonsun-w/skill-author-card&Date)
424
+
425
+ </div>
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync } = require('child_process');
4
+ const path = require('path');
5
+ const fs = require('fs');
6
+
7
+ // Show author card
8
+ const cardScript = path.join(__dirname, '..', '.author-card', 'show-card.sh');
9
+
10
+ console.log('\n');
11
+
12
+ if (fs.existsSync(cardScript)) {
13
+ try {
14
+ execSync(`"${cardScript}" --no-prompt`, { stdio: 'inherit' });
15
+ } catch (e) {
16
+ // Continue even if card fails
17
+ }
18
+ }
19
+
20
+ console.log(`
21
+ ✅ skill-author-card 已安装!
22
+
23
+ 🚀 快速开始:
24
+
25
+ 在 Claude Code 中说:
26
+ "给我的 ~/dev/my-skill 添加 author card"
27
+
28
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
29
+
30
+ 📚 完整文档: https://github.com/Yonsun-w/skill-author-card
31
+ `);
@@ -0,0 +1,92 @@
1
+ #!/bin/bash
2
+ # Detect which AI platform is running
3
+
4
+ detect_platform() {
5
+ # Check Claude Code
6
+ if [ -n "$CLAUDE_CODE_SESSION" ] || [ -d "$HOME/.claude" ]; then
7
+ echo "claude"
8
+ return 0
9
+ fi
10
+
11
+ # Check Cursor
12
+ if [ -n "$CURSOR_SESSION" ] || [ -d "$HOME/.cursor" ] || command -v cursor >/dev/null 2>&1; then
13
+ echo "cursor"
14
+ return 0
15
+ fi
16
+
17
+ # Check if running in ChatGPT context (unlikely but possible)
18
+ if [ -n "$OPENAI_API_KEY" ] || [ -f "$HOME/.openai" ]; then
19
+ echo "gpt"
20
+ return 0
21
+ fi
22
+
23
+ # Check OpenClaw
24
+ if [ -d "$HOME/.openclaw" ] || command -v openclaw >/dev/null 2>&1; then
25
+ echo "openclaw"
26
+ return 0
27
+ fi
28
+
29
+ # Check GitHub Copilot CLI
30
+ if command -v github-copilot-cli >/dev/null 2>&1; then
31
+ echo "copilot"
32
+ return 0
33
+ fi
34
+
35
+ # Default: generic
36
+ echo "generic"
37
+ return 0
38
+ }
39
+
40
+ # Get skill/automation directory based on platform
41
+ get_skills_dir() {
42
+ local platform="$1"
43
+
44
+ case "$platform" in
45
+ claude)
46
+ echo "$HOME/.claude/skills"
47
+ ;;
48
+ cursor)
49
+ echo "$HOME/.cursor/extensions"
50
+ ;;
51
+ gpt)
52
+ echo "$HOME/.gpt/plugins"
53
+ ;;
54
+ openclaw)
55
+ echo "$HOME/.openclaw"
56
+ ;;
57
+ copilot)
58
+ echo "$HOME/.github-copilot"
59
+ ;;
60
+ *)
61
+ echo "$HOME/.local/share/ai-skills"
62
+ ;;
63
+ esac
64
+ }
65
+
66
+ # Get config directory based on platform
67
+ get_config_dir() {
68
+ local platform="$1"
69
+
70
+ case "$platform" in
71
+ claude)
72
+ echo "$HOME/.claude/skills"
73
+ ;;
74
+ cursor)
75
+ echo "$HOME/.cursor"
76
+ ;;
77
+ *)
78
+ echo "${XDG_CONFIG_HOME:-$HOME/.config}/author-card"
79
+ ;;
80
+ esac
81
+ }
82
+
83
+ # Main execution
84
+ if [ "$1" = "--skills-dir" ]; then
85
+ PLATFORM=$(detect_platform)
86
+ get_skills_dir "$PLATFORM"
87
+ elif [ "$1" = "--config-dir" ]; then
88
+ PLATFORM=$(detect_platform)
89
+ get_config_dir "$PLATFORM"
90
+ else
91
+ detect_platform
92
+ fi