@renkosky/lark-fe-skills 0.1.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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Renkosky
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,153 @@
1
+ # Lark FE Skills
2
+
3
+ English | [中文](#中文)
4
+
5
+ ## English
6
+
7
+ `@renkosky/lark-fe-skills` packages Codex skills for Lark-based frontend requirement workflows.
8
+
9
+ The first packaged skill is `lark-fe-task`, which reads a Lark/Feishu requirement document and generates a frontend task breakdown Markdown file.
10
+
11
+ ### Install
12
+
13
+ ```bash
14
+ npm install -g @renkosky/lark-fe-skills
15
+ lark-fe-skills install lark-fe-task
16
+ ```
17
+
18
+ Then use the installed skill from Codex:
19
+
20
+ ```text
21
+ [$lark-fe-task](~/.codex/skills/lark-fe-task/SKILL.md) +config
22
+ [$lark-fe-task](~/.codex/skills/lark-fe-task/SKILL.md) +plan <Lark document title, URL, or token>
23
+ ```
24
+
25
+ ### Prerequisites
26
+
27
+ Install and configure `lark-cli` before using the skill:
28
+
29
+ ```bash
30
+ npm install -g @larksuite/cli
31
+ lark-cli config init
32
+ lark-cli auth login --recommend
33
+ ```
34
+
35
+ Official lark-cli documentation: <https://github.com/larksuite/cli/tree/main>
36
+
37
+ ### CLI
38
+
39
+ ```bash
40
+ lark-fe-skills list
41
+ lark-fe-skills path
42
+ lark-fe-skills path lark-fe-task
43
+ lark-fe-skills install lark-fe-task
44
+ ```
45
+
46
+ ### Packaged Skills
47
+
48
+ - `lark-fe-task`: turn Lark/Feishu requirement documents into concrete frontend task breakdowns.
49
+
50
+ ### Roadmap
51
+
52
+ - [x] Phase 1: Generate frontend task breakdown Markdown from Lark requirement documents.
53
+ - [x] Configure repository root, frontend project paths, and output directory.
54
+ - [x] List configured repositories from the global registry.
55
+ - [x] Fetch Lark requirement documents by title, URL, or token.
56
+ - [x] Inspect configured frontend project paths lightly for code-location clues.
57
+ - [x] Generate ignored Markdown task files under the configured output directory.
58
+ - [ ] Phase 2: Create Lark schedule tasks from generated frontend task Markdown.
59
+ - [ ] Accept a Lark schedule Base URL or title, then read its table schema before mapping fields.
60
+ - [ ] Map Markdown tasks into schedule fields such as task name, task description, task status, start time, and end time.
61
+ - [ ] Read custom task status options from the Base instead of inventing status tags.
62
+ - [ ] First version should be dry-run only and show the records that would be created without modifying Lark.
63
+ - [ ] A later version can add user confirmation and then create records in the schedule Base.
64
+ - [ ] Phase 3: Implement frontend tasks from generated Markdown.
65
+ - [ ] Default to implementing one task at a time to keep human review small and manageable.
66
+ - [ ] After each task, stop and report changed files, verification results, remaining tasks, mocks used, and unresolved questions.
67
+ - [ ] Continue to the next task only when the user explicitly asks to continue, or when the user explicitly requests multiple tasks in one batch.
68
+ - [ ] If one task is too large, split it into smaller implementation batches before editing code.
69
+ - [ ] Reuse existing project APIs, hooks, stores, components, permissions, i18n, and mock patterns before adding new code.
70
+ - [ ] Do not perform real backend integration in this phase; use existing reusable data or the project's mock system when API behavior is unavailable.
71
+ - [ ] Ask the user when required API fields, permission keys, status enums, or core product behavior cannot be found in the codebase.
72
+ - [ ] Keep changes scoped to the affected project paths and modules from the task Markdown.
73
+ - [ ] Verify each completed task with the most relevant available static checks, and clearly report any unrelated existing failures.
74
+ - [ ] Phase 4: Backend integration and API handoff workflow.
75
+ - [ ] Treat this phase as TBD until the backend handoff format is standardized.
76
+ - [ ] Expected direction: use Lark as the API handoff and collaboration surface.
77
+ - [ ] Before implementation, align with backend engineers on the required document format, including endpoint, method, request params, response schema, error codes, mock examples, and owner.
78
+ - [ ] After the format is confirmed, extend this skill to read the API handoff document and update frontend tasks or implementation notes accordingly.
79
+
80
+ ## 中文
81
+
82
+ `@renkosky/lark-fe-skills` 用于分发基于 Lark/飞书的前端需求工作流 Codex skills。
83
+
84
+ 首个发布的 skill 是 `lark-fe-task`,用于读取 Lark/飞书需求文档,并生成前端任务拆分 Markdown。
85
+
86
+ ### 安装
87
+
88
+ ```bash
89
+ npm install -g @renkosky/lark-fe-skills
90
+ lark-fe-skills install lark-fe-task
91
+ ```
92
+
93
+ 然后在 Codex 中使用已安装的 skill:
94
+
95
+ ```text
96
+ [$lark-fe-task](~/.codex/skills/lark-fe-task/SKILL.md) +config
97
+ [$lark-fe-task](~/.codex/skills/lark-fe-task/SKILL.md) +plan <飞书文档标题、链接或 token>
98
+ ```
99
+
100
+ ### 前置条件
101
+
102
+ 使用 skill 前,需要先安装并配置 `lark-cli`:
103
+
104
+ ```bash
105
+ npm install -g @larksuite/cli
106
+ lark-cli config init
107
+ lark-cli auth login --recommend
108
+ ```
109
+
110
+ 官方 lark-cli 文档:<https://github.com/larksuite/cli/tree/main>
111
+
112
+ ### CLI
113
+
114
+ ```bash
115
+ lark-fe-skills list
116
+ lark-fe-skills path
117
+ lark-fe-skills path lark-fe-task
118
+ lark-fe-skills install lark-fe-task
119
+ ```
120
+
121
+ ### 已包含 Skills
122
+
123
+ - `lark-fe-task`:将 Lark/飞书需求文档拆解成可开发的前端任务。
124
+
125
+ ### 开发规划
126
+
127
+ - [x] Phase 1:根据 Lark 需求文档生成前端任务拆分 Markdown。
128
+ - [x] 配置仓库根目录、前端项目路径和输出目录。
129
+ - [x] 从全局 registry 查看已配置仓库。
130
+ - [x] 支持通过标题、链接或 token 读取 Lark 需求文档。
131
+ - [x] 轻量检查已配置前端项目路径,补充代码定位线索。
132
+ - [x] 在已配置输出目录下生成被 git 忽略的 Markdown 任务文件。
133
+ - [ ] Phase 2:把已生成的前端任务 Markdown 转成 Lark 排期任务。
134
+ - [ ] 支持用户提供 Lark 排期 Base 链接或名称,并在映射字段前读取表结构。
135
+ - [ ] 将 Markdown 任务映射到任务名称、任务描述、任务状态、开始时间、结束时间等排期字段。
136
+ - [ ] 从 Base 读取自定义任务状态选项,不臆造状态 tag。
137
+ - [ ] 第一版只做 dry-run 预览,展示将要创建的记录,不修改 Lark。
138
+ - [ ] 后续版本再增加用户确认步骤,并在确认后写入排期 Base。
139
+ - [ ] Phase 3:根据已生成的 Markdown 实际开发前端任务。
140
+ - [ ] 默认一次只实现一个 Task,控制代码改动粒度,方便人工 review。
141
+ - [ ] 每完成一个 Task 就暂停,并汇报改动文件、验证结果、剩余任务、使用的 mock 和未解决问题。
142
+ - [ ] 只有用户明确要求继续,或明确要求一次实现多个任务时,才继续处理后续 Task。
143
+ - [ ] 如果单个 Task 本身过大,先拆成更小的实现批次再改代码。
144
+ - [ ] 优先复用项目里已有的接口、hooks、stores、组件、权限、i18n 和 mock 模式,再考虑新增实现。
145
+ - [ ] 这一阶段不做真实后端联调;接口行为不可用时,优先使用已有可复用数据或项目 mock 体系。
146
+ - [ ] 如果 API 字段、权限 key、状态枚举或核心产品行为在代码里找不到,要先询问用户,不臆造。
147
+ - [ ] 代码改动只限制在任务 Markdown 标出的受影响项目路径和模块内。
148
+ - [ ] 每完成一个 Task 后运行最相关的静态检查,并明确说明是否存在无关历史失败。
149
+ - [ ] Phase 4:接口联调与后端交付文档工作流。
150
+ - [ ] 这部分在后端接口交付格式统一前保持待定。
151
+ - [ ] 预期方向:继续使用 Lark 作为接口交付和协作载体。
152
+ - [ ] 实施前需要先和后端约定文档格式,包括接口地址、请求方法、请求参数、响应结构、错误码、mock 示例和负责人。
153
+ - [ ] 格式确认后,再扩展 skill 读取接口交付文档,并同步更新前端任务或开发说明。
@@ -0,0 +1,98 @@
1
+ #!/usr/bin/env node
2
+
3
+ import { existsSync, mkdirSync, cpSync, rmSync, statSync } from 'node:fs'
4
+ import { dirname, join, resolve } from 'node:path'
5
+ import { fileURLToPath } from 'node:url'
6
+ import { homedir } from 'node:os'
7
+
8
+ const __dirname = dirname(fileURLToPath(import.meta.url))
9
+ const packageRoot = resolve(__dirname, '..')
10
+ const skillsRoot = join(packageRoot, 'skills')
11
+ const availableSkills = ['lark-fe-task']
12
+
13
+ function usage() {
14
+ console.log(`lark-fe-skills
15
+
16
+ Usage:
17
+ lark-fe-skills list
18
+ lark-fe-skills path [skill-name]
19
+ lark-fe-skills install [skill-name]
20
+
21
+ Commands:
22
+ list List packaged skills.
23
+ path Print the package skills directory or one skill path.
24
+ install Copy a packaged skill to $HOME/.codex/skills.
25
+
26
+ Examples:
27
+ lark-fe-skills list
28
+ lark-fe-skills path lark-fe-task
29
+ lark-fe-skills install lark-fe-task`)
30
+ }
31
+
32
+ function assertSkillName(skillName) {
33
+ if (!availableSkills.includes(skillName)) {
34
+ console.error(`Unknown skill: ${skillName}`)
35
+ console.error(`Available skills: ${availableSkills.join(', ')}`)
36
+ process.exit(1)
37
+ }
38
+ }
39
+
40
+ function listSkills() {
41
+ console.log('Available skills:')
42
+ for (const skillName of availableSkills) {
43
+ console.log(`- ${skillName}`)
44
+ }
45
+ }
46
+
47
+ function printPath(skillName) {
48
+ if (skillName) {
49
+ assertSkillName(skillName)
50
+ console.log(join(skillsRoot, skillName))
51
+ return
52
+ }
53
+ console.log(skillsRoot)
54
+ }
55
+
56
+ function installSkill(skillName = 'lark-fe-task') {
57
+ assertSkillName(skillName)
58
+
59
+ const source = join(skillsRoot, skillName)
60
+ if (!existsSync(source) || !statSync(source).isDirectory()) {
61
+ console.error(`Packaged skill not found: ${source}`)
62
+ process.exit(1)
63
+ }
64
+
65
+ const targetRoot = join(homedir(), '.codex', 'skills')
66
+ const target = join(targetRoot, skillName)
67
+ mkdirSync(targetRoot, { recursive: true })
68
+
69
+ if (existsSync(target)) {
70
+ rmSync(target, { recursive: true, force: true })
71
+ }
72
+ cpSync(source, target, { recursive: true, force: true })
73
+
74
+ console.log(`Installed ${skillName} to ${target}`)
75
+ }
76
+
77
+ const [command, skillName] = process.argv.slice(2)
78
+
79
+ switch (command) {
80
+ case 'list':
81
+ listSkills()
82
+ break
83
+ case 'path':
84
+ printPath(skillName)
85
+ break
86
+ case 'install':
87
+ installSkill(skillName)
88
+ break
89
+ case undefined:
90
+ case '-h':
91
+ case '--help':
92
+ usage()
93
+ break
94
+ default:
95
+ console.error(`Unknown command: ${command}`)
96
+ usage()
97
+ process.exit(1)
98
+ }
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@renkosky/lark-fe-skills",
3
+ "version": "0.1.0",
4
+ "description": "Codex skills for Lark-based frontend requirement planning workflows.",
5
+ "type": "module",
6
+ "bin": {
7
+ "lark-fe-skills": "bin/lark-fe-skills.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "skills",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "scripts": {
16
+ "check": "node ./bin/lark-fe-skills.js list",
17
+ "pack:dry": "npm pack --dry-run"
18
+ },
19
+ "keywords": [
20
+ "codex",
21
+ "skills",
22
+ "lark",
23
+ "feishu",
24
+ "frontend",
25
+ "prd"
26
+ ],
27
+ "author": "Renkosky",
28
+ "license": "MIT",
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+ssh://git@github.com/Renkosky/lark-fe-skills.git"
32
+ },
33
+ "bugs": {
34
+ "url": "https://github.com/Renkosky/lark-fe-skills/issues"
35
+ },
36
+ "homepage": "https://github.com/Renkosky/lark-fe-skills#readme"
37
+ }