jue-preset-base 1.0.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/index.js +1 -0
- package/package.json +28 -0
- package/prompts/default/index.json +4 -0
- package/prompts/default/prompt.md +6 -0
- package/skills/code-review/index.json +4 -0
- package/skills/code-review/prompt.en.md +1 -0
- package/skills/code-review/prompt.md +8 -0
- package/skills/explain-code/index.json +4 -0
- package/skills/explain-code/prompt.md +8 -0
- package/skills/optimize-performance/index.json +4 -0
- package/skills/optimize-performance/prompt.md +7 -0
- package/skills/refactor-code/index.json +4 -0
- package/skills/refactor-code/prompt.md +4 -0
- package/skills/security-audit/index.json +4 -0
- package/skills/security-audit/prompt.md +8 -0
- package/skills/write-docs/index.json +4 -0
- package/skills/write-docs/prompt.md +8 -0
- package/skills/write-tests/index.json +4 -0
- package/skills/write-tests/prompt.md +10 -0
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = {};
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "jue-preset-base",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Base preset for ai-jue, providing common best-practice skills.",
|
|
5
|
+
"files": [
|
|
6
|
+
"prompts",
|
|
7
|
+
"skills",
|
|
8
|
+
"index.js",
|
|
9
|
+
"META.json"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [
|
|
12
|
+
"jue-preset"
|
|
13
|
+
],
|
|
14
|
+
"author": "AI-Jue Team <contact@ai-jue.dev>",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/ai-jue/ai-jue.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/ai-jue/ai-jue/issues"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/ai-jue/ai-jue#readme",
|
|
24
|
+
"publishConfig": {
|
|
25
|
+
"access": "public"
|
|
26
|
+
},
|
|
27
|
+
"main": "index.js"
|
|
28
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
作为一名顶级的软件架构师和资深开发者,请在后续的所有交互中遵循以下原则:
|
|
2
|
+
1. **深度思考**:在给出答案前,先分步思考,形成清晰的逻辑链。
|
|
3
|
+
2. **权衡利弊**:对于任何技术选型或方案,都要主动分析其优缺点和潜在风险。
|
|
4
|
+
3. **代码即艺术**:提供的所有代码示例都必须遵循“整洁代码”(Clean Code)的原则:清晰、可读、易于维护。
|
|
5
|
+
4. **举一反三**:在解释概念或提供解决方案时,如果可能,请提供相关的反面模式(Anti-Patterns)或可替代方案作为对比。
|
|
6
|
+
5. **追问澄清**:如果我的问题模糊不清,请主动追问以澄清需求,而不是直接猜测。
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
As a "Code Review Expert", please conduct a comprehensive review of the following code.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
请为以下代码片段生成详细的文档。请使用 JSDoc/TSDoc 格式(如果适用,或 markdown 格式),并包含以下内容:
|
|
2
|
+
|
|
3
|
+
1. **摘要**:对函数、类或模块的功能进行简要概述。
|
|
4
|
+
2. **描述**:更详细地解释其用途、工作原理和设计理念。
|
|
5
|
+
3. **参数 (`@param`)**:清晰地描述每个参数的类型、名称和用途。
|
|
6
|
+
4. **返回值 (`@returns`)**:描述返回值的类型、含义和可能的值。
|
|
7
|
+
5. **示例 (`@example`)**:提供一个清晰、可直接运行的代码示例。
|
|
8
|
+
6. **错误处理 (`@throws`)**:如果函数可能抛出错误,请说明错误类型和条件。
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
请为以下代码编写一套全面的单元测试用例。你的回答应包含:
|
|
2
|
+
|
|
3
|
+
1. **测试策略**:简要说明你将采用的测试思路和覆盖范围。
|
|
4
|
+
2. **测试用例**:
|
|
5
|
+
* 覆盖正常输入(Happy Path)。
|
|
6
|
+
* 覆盖已知的边界条件和边缘情况(例如空值、负数、最大最小值、空集合等)。
|
|
7
|
+
* 覆盖潜在的错误或异常情况(例如无效输入、抛出异常)。
|
|
8
|
+
3. **断言**:测试中应包含清晰的断言,验证代码行为是否符合预期。
|
|
9
|
+
|
|
10
|
+
请使用主流的测试框架语法(例如 Jest, Vitest, Mocha, Go Test 等,请根据代码语言自行判断)。
|