skill-author-card 1.6.1 → 1.6.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
  #!/bin/bash
2
2
  # Standalone Author Card - Bundled with your skill, no external dependencies
3
- # Version: 1.5.0
3
+ # Version: 1.6.3
4
4
  # Generated by: skill-author-card
5
5
 
6
6
  SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
@@ -16,6 +16,44 @@ truncate_str() {
16
16
  fi
17
17
  }
18
18
 
19
+ state_slug() {
20
+ local raw="${REPO:-$SKILL_NAME}"
21
+ local slug
22
+ slug=$(printf "%s" "$raw" | tr '/: ' '---' | tr -cd '[:alnum:]._-')
23
+ if [ -z "$slug" ]; then
24
+ slug="skill-author-card"
25
+ fi
26
+ echo "$slug"
27
+ }
28
+
29
+ state_root_dir() {
30
+ if [ -n "$AUTHOR_CARD_STATE_DIR" ]; then
31
+ echo "$AUTHOR_CARD_STATE_DIR"
32
+ return 0
33
+ fi
34
+
35
+ if [ -n "$XDG_STATE_HOME" ]; then
36
+ echo "$XDG_STATE_HOME/author-card"
37
+ return 0
38
+ fi
39
+
40
+ if [ -n "$XDG_CONFIG_HOME" ]; then
41
+ echo "$XDG_CONFIG_HOME/author-card"
42
+ return 0
43
+ fi
44
+
45
+ echo "$HOME/.config/author-card"
46
+ }
47
+
48
+ shown_file_path() {
49
+ if [ -n "$AUTHOR_CARD_SHOWN" ]; then
50
+ echo "$AUTHOR_CARD_SHOWN"
51
+ return 0
52
+ fi
53
+
54
+ echo "$(state_root_dir)/shown/$(state_slug).shown"
55
+ }
56
+
19
57
  # Parse arguments
20
58
  MESSAGE=""
21
59
  NO_PROMPT=false
@@ -33,7 +71,7 @@ done
33
71
  # Hardcoded configuration (injected during skill setup)
34
72
  # These values are replaced by inject-to-skill.sh
35
73
  SKILL_NAME="skill-author-card"
36
- VERSION="1.6.0"
74
+ VERSION="1.6.3"
37
75
  REPO="Yonsun-w/skill-author-card"
38
76
  NAME="yonsun_W"
39
77
  GITHUB="Yonsun-w"
@@ -51,9 +89,10 @@ SHOW_PROMOTION="true"
51
89
  # Exit early if frequency is "never"
52
90
  [ "$FREQUENCY" = "never" ] && exit 0
53
91
 
92
+ SHOWN_FILE="$(shown_file_path)"
93
+
54
94
  # For "once" frequency, check if already shown
55
95
  if [ "$FREQUENCY" = "once" ]; then
56
- SHOWN_FILE="$SCRIPT_DIR/.shown"
57
96
  if [ -f "$SHOWN_FILE" ]; then
58
97
  # Already shown, exit silently
59
98
  exit 0
@@ -105,7 +144,7 @@ echo "│ │"
105
144
 
106
145
  # Message
107
146
  if [ -n "$MESSAGE" ]; then
108
- printf "│ ⭐ %-50s │\n" "$MESSAGE"
147
+ printf "│ ⭐ %-50s │\n" "$(truncate_str "$MESSAGE" 50)"
109
148
  else
110
149
  [ -n "$REPO" ] && printf "│ ⭐ %-50s │\n" "喜欢?去 GitHub 点个 star!"
111
150
  fi
@@ -137,5 +176,6 @@ fi
137
176
  # ============================================================================
138
177
 
139
178
  if [ "$FREQUENCY" = "once" ]; then
140
- touch "$SCRIPT_DIR/.shown"
179
+ mkdir -p "$(dirname "$SHOWN_FILE")"
180
+ touch "$SHOWN_FILE"
141
181
  fi
package/README.md CHANGED
@@ -1,425 +1,162 @@
1
- <div align="center">
1
+ # skill-author-card
2
2
 
3
- # Skill Author Card
3
+ skill 或项目源码注入一个本地作者卡片。
4
+ Inject a local author card into a skill or project source tree.
4
5
 
5
- **把每个 Skill 变成你的个人 IP 入口**
6
+ 它会在目标项目里生成 `.author-card/show-card.sh`,并把一条调用命令追加到目标 `SKILL.md` `skill.md` 末尾。作者信息和 once 状态都保存在当前用户本机,不会写入远端服务,也不会污染项目仓库。
7
+ It generates `.author-card/show-card.sh` inside the target project and appends a command to the target `SKILL.md` or `skill.md`. Author data and once-state stay on the current user's machine, are not uploaded to any remote service, and do not pollute the project repository.
6
8
 
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)
9
+ ## 功能 | Features
10
10
 
11
- *一个 Skill,1000 个潜在粉丝*
11
+ - 初始化本地作者信息 / Initialize local author profile data
12
+ - 给 skill 或项目源码注入作者卡片 / Inject an author card into a skill or project source tree
13
+ - 自动读取 git remote 或项目元数据中的 GitHub 仓库地址 / Auto-detect the GitHub repository from git remote or project metadata
14
+ - 支持 `Claude Code`、`Cursor`、`Windsurf`、`Codex` 和 generic shell 环境 / Support `Claude Code`, `Cursor`, `Windsurf`, `Codex`, and generic shell environments
12
15
 
13
- [快速开始](#-如何使用) [真实案例](#-真实数据) • [安装](#第一步安装框架)
16
+ ## 安装 | Installation
14
17
 
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
- 品牌合作 / 工作机会 / 付费咨询 💰
18
+ ```bash
19
+ npm install -g skill-author-card
144
20
  ```
145
21
 
146
- **这是完整的个人 IP 变现路径。**
22
+ 安装后会暴露 `skill-author-card` CLI,并包含以下脚本。
23
+ After installation, the package exposes the `skill-author-card` CLI and includes these scripts:
147
24
 
148
- ---
25
+ - `init-profile.sh`
26
+ - `inject-to-skill.sh`
27
+ - `show-card.sh`
149
28
 
150
- ## 🚀 如何使用?
29
+ ## 快速开始 | Quick Start
151
30
 
152
- ### 第一步:安装框架
31
+ ### 1. 初始化作者信息 | Initialize the author profile
153
32
 
154
33
  ```bash
155
- npm install -g skill-author-card
34
+ init-profile.sh
156
35
  ```
157
36
 
158
- 自动支持:
159
- - Claude Code
160
- - ✅ Cursor
161
- - ✅ Windsurf
162
- - ✅ Codex
37
+ 会在本地配置目录写入作者资料。常见位置如下。
38
+ This writes author data to a local config directory. Common locations:
163
39
 
164
- ### 第二步:配置你的全平台信息
40
+ - Claude Code: `~/.claude/skills/.author-profile.json`
41
+ - Cursor: `~/.cursor/.author-profile.json`
42
+ - Windsurf: `~/.windsurf/.author-profile.json`
43
+ - Codex: `~/.codex/.author-profile.json`
44
+ - Generic: `~/.config/author-card/profile.json`
165
45
 
166
- Claude Code 中说:
46
+ ### 2. 注入到目标项目 | Inject into a target project
167
47
 
48
+ ```bash
49
+ inject-to-skill.sh /absolute/path/to/your-project
168
50
  ```
169
- "初始化我的作者信息"
170
- ```
171
-
172
- 会问你:
173
- - 姓名
174
- - GitHub
175
- - 小红书、抖音
176
- - Twitter、LinkedIn
177
- - 知乎、B站
178
- - 个人网站
179
- - ...
180
51
 
181
- ### 第三步:给你的 Skill 添加
52
+ 注入器会执行以下操作。
53
+ The injector will:
182
54
 
183
- ```
184
- "给 ~/projects/my-awesome-skill 添加 author card"
185
- ```
55
+ - 创建 `.author-card/show-card.sh` / Create `.author-card/show-card.sh`
56
+ - 在目标 `SKILL.md` 或 `skill.md` 末尾添加 `Author Card` 段落 / Append an `Author Card` section to the target `SKILL.md` or `skill.md`
186
57
 
187
- 框架自动:
188
- - 创建 `.author-card/` 目录
189
- - ✅ 嵌入全平台信息
190
- - ✅ 添加展示代码
191
- - ✅ 配置感谢信息
58
+ 它不会再修改目标项目的 `package.json`,也不会在目标项目里写入 once 状态文件。
59
+ It no longer modifies the target project's `package.json`, and it does not store once-state inside the target project.
192
60
 
193
- ### 第四步:发布
61
+ ### 3. 预览卡片 | Preview the card
194
62
 
195
63
  ```bash
196
- cd ~/projects/my-awesome-skill
197
- git add .
198
- git commit -m "feat: add author card"
199
- git push
200
- npm publish
64
+ /absolute/path/to/your-project/.author-card/show-card.sh --no-prompt --frequency always
201
65
  ```
202
66
 
203
- **完成!** 用户安装 使用 → 看到你 → 成为粉丝 🎉
204
-
205
- ---
206
-
207
- ## 💡 为什么这么强大?
208
-
209
- ### 🎯 精准流量
210
-
211
- <div align="center">
212
-
213
- | 流量来源 | 转化率 | 成本 |
214
- |---------|-------|------|
215
- | 随机推荐算法 | < 1% | 免费 |
216
- | 付费广告 | 2-5% | ¥¥¥ |
217
- | **Skill 用户** | **30%+** | **免费** ✨ |
67
+ `--frequency always` 适合预览;默认注入命令使用 `--frequency once`,避免重复打扰用户。
68
+ Use `--frequency always` for previews. The injected command defaults to `--frequency once` to avoid repeatedly interrupting users.
218
69
 
219
- </div>
70
+ ## 生成后的调用 | Injected Command
220
71
 
221
- 使用你 Skill 的人 = **对你的领域感兴趣的人**
72
+ 注入后的目标 skill 文件末尾会追加以下命令。
73
+ The target skill file will receive this command near the end:
222
74
 
223
- 这是最精准的流量!
224
-
225
- ### 🌊 复利效应
226
-
227
- ```
228
- 1 个 Skill → 500 用户 → 150 人访问 → 50 个粉丝
229
-
230
- 3 个 Skill → 1500 用户 → 450 人访问 → 150 个粉丝
231
-
232
- 6 个月后 → 5000 个粉丝 → 品牌合作找上门 💼
75
+ ```bash
76
+ .author-card/show-card.sh --frequency once
233
77
  ```
234
78
 
235
- ### 🔄 自动化增长
236
-
237
- 你不需要:
238
- - ❌ 每天发内容
239
- - ❌ 做 SEO 优化
240
- - ❌ 买广告投放
79
+ 这条命令应该保留在主任务逻辑之后,让作者卡片只在任务成功完成后展示。
80
+ Keep this command after the main task logic so the author card only appears after the task succeeds.
241
81
 
242
- 你只需要:
243
- - ✅ 做好 Skill
244
- - ✅ 加 Author Card
245
- - ✅ 用户自动来
82
+ ## Once 状态设计 | Once-State Design
246
83
 
247
- **这是被动收入的流量版本。** 💰
84
+ `--frequency once` 的状态不再写入项目目录,也不会生成 `.author-card/.shown`。
85
+ The `--frequency once` state is no longer stored in the project tree, and it does not create `.author-card/.shown`.
248
86
 
249
- ---
87
+ 状态会写到当前用户的本地配置或状态目录,例如:
88
+ The state is written to the current user's local config/state directory, for example:
250
89
 
251
- ## 🎁 真实卡片示例
90
+ - `~/.config/author-card/shown/...`
91
+ - `$XDG_STATE_HOME/author-card/shown/...`
92
+ - 自定义环境变量 `AUTHOR_CARD_STATE_DIR` 或 `AUTHOR_CARD_SHOWN` / Custom `AUTHOR_CARD_STATE_DIR` or `AUTHOR_CARD_SHOWN`
252
93
 
253
- ### Yonsun-w 的项目卡片
94
+ 这意味着你可以先在本机预览卡片,再把源码推到远端;其他用户下载、安装或打包后,仍然会在他们自己的机器上看到第一次展示。
95
+ This means you can preview the card locally before pushing. Other users who download, install, or package the project will still get their own first-time display on their own machines.
254
96
 
255
- <table>
256
- <tr>
257
- <td width="50%">
97
+ ## 仓库检测 | Repository Detection
258
98
 
259
- #### rush-find-skills(技术工具)
99
+ 作者卡片会优先从下面几种来源提取仓库地址。
100
+ The author card tries these sources in order:
260
101
 
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
- ```
102
+ 1. `git remote get-url origin`
103
+ 2. `package.json.repository`
104
+ 3. `pyproject.toml`
105
+ 4. `Cargo.toml`
106
+ 5. `go.mod`
289
107
 
290
- </td>
291
- </tr>
292
- <tr>
293
- <td width="50%">
108
+ 如果没有检测到 GitHub 仓库,卡片仍然会生成,只是不会显示仓库链接。
109
+ If no GitHub repository is detected, the card is still generated, but the repository link is omitted.
294
110
 
295
- #### openclaw-wechat(自动化工具)
111
+ ## 示例输出 | Example Output
296
112
 
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
- └──────────────────────────────────────┘
113
+ ```text
114
+ ┌─────────────────────────────────────────────────────────┐
115
+ │ 📦 my-skill v1.0.0
116
+ │ 👤 by Yon Sun
117
+ 📧 yonsun_w@qq.com
118
+ 🔗 github.com/Yonsun-w/my-skill
119
+
120
+ ⭐ 喜欢?去 GitHub 点个 star!
121
+
122
+ │ 💡 你也想要 skill 水印? │
123
+ │ https://github.com/Yonsun-w/skill-author-card │
124
+ └─────────────────────────────────────────────────────────┘
307
125
  ```
308
126
 
309
- </td>
310
- <td width="50%">
127
+ ## 开发 | Development
311
128
 
312
- #### multi-repo-dev(开发工具)
129
+ 运行测试:
130
+ Run the test suite:
313
131
 
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
- └──────────────────────────────────────┘
132
+ ```bash
133
+ npm test
324
134
  ```
325
135
 
326
- </td>
327
- </tr>
328
- </table>
136
+ 当前测试覆盖以下内容。
137
+ The current test suite covers:
329
138
 
330
- ---
139
+ - 注入命令是否正确写入目标 `SKILL.md` / Whether the injected command is written correctly to the target `SKILL.md`
140
+ - 平台与配置路径检测 / Platform and config path detection
141
+ - `show-card.sh` 对对象格式 `package.json.repository` 的解析 / Parsing object-style `package.json.repository` values in `show-card.sh`
142
+ - once 状态不会写回目标项目目录 / Ensuring once-state is not written back into the target project tree
143
+ - npm 打包不会带上本地 once 状态文件 / Ensuring npm packages do not include local once-state artifacts
331
144
 
332
- ## 🎯 三步开始
145
+ ## 发布 | Release
333
146
 
334
- <div align="center">
147
+ 发布前建议执行:
148
+ Recommended steps before publishing:
335
149
 
336
- ### 1️⃣ 安装
337
150
  ```bash
338
- npm install -g skill-author-card
339
- ```
340
-
341
- ### 2️⃣ 配置
342
- ```
343
- "初始化我的全平台信息"
344
- ```
345
-
346
- ### 3️⃣ 添加
151
+ npm test
152
+ git status
153
+ git push origin main
154
+ npm publish --access public
347
155
  ```
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
156
 
421
- **如果这帮你涨了粉,给它一个 Star**
157
+ 如果旧版本不再推荐使用,优先用 `npm deprecate` 标记,不要随意 `unpublish` 已存在的稳定版本。
158
+ If older versions should no longer be used, prefer `npm deprecate` instead of unpublishing stable versions.
422
159
 
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)
160
+ ## License
424
161
 
425
- </div>
162
+ MIT
@@ -2,6 +2,12 @@
2
2
  # Detect which AI platform is running
3
3
 
4
4
  detect_platform() {
5
+ # Check Codex
6
+ if [ -n "$CODEX_HOME" ] || [ -d "$HOME/.codex" ]; then
7
+ echo "codex"
8
+ return 0
9
+ fi
10
+
5
11
  # Check Claude Code
6
12
  if [ -n "$CLAUDE_CODE_SESSION" ] || [ -d "$HOME/.claude" ]; then
7
13
  echo "claude"
@@ -14,6 +20,12 @@ detect_platform() {
14
20
  return 0
15
21
  fi
16
22
 
23
+ # Check Windsurf
24
+ if [ -n "$WINDSURF_SESSION" ] || [ -d "$HOME/.windsurf" ] || command -v windsurf >/dev/null 2>&1; then
25
+ echo "windsurf"
26
+ return 0
27
+ fi
28
+
17
29
  # Check if running in ChatGPT context (unlikely but possible)
18
30
  if [ -n "$OPENAI_API_KEY" ] || [ -f "$HOME/.openai" ]; then
19
31
  echo "gpt"
@@ -48,6 +60,12 @@ get_skills_dir() {
48
60
  cursor)
49
61
  echo "$HOME/.cursor/extensions"
50
62
  ;;
63
+ windsurf)
64
+ echo "$HOME/.windsurf/skills"
65
+ ;;
66
+ codex)
67
+ echo "$HOME/.codex/skills"
68
+ ;;
51
69
  gpt)
52
70
  echo "$HOME/.gpt/plugins"
53
71
  ;;
@@ -74,6 +92,12 @@ get_config_dir() {
74
92
  cursor)
75
93
  echo "$HOME/.cursor"
76
94
  ;;
95
+ windsurf)
96
+ echo "$HOME/.windsurf"
97
+ ;;
98
+ codex)
99
+ echo "$HOME/.codex"
100
+ ;;
77
101
  *)
78
102
  echo "${XDG_CONFIG_HOME:-$HOME/.config}/author-card"
79
103
  ;;