@robot-inventor/agent-skills 1.3.1 → 1.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robot-inventor/agent-skills",
3
- "version": "1.3.1",
3
+ "version": "1.4.0",
4
4
  "description": "Roboin's personal collection of Agent Skills.",
5
5
  "homepage": "https://github.com/Robot-Inventor/agent-skills#readme",
6
6
  "bugs": {
@@ -8,7 +8,7 @@ metadata:
8
8
 
9
9
  # Review Loop Skill
10
10
 
11
- This skill involves thoroughly improving code quality by repeatedly requesting a review from a sub-agent after editing and improving the code based on the results. Humans typically improve code quality by creating a pull request after editing code and having it reviewed by a reviewer. Such reviews are important because they can identify problems that might be missed through self-review alone.
11
+ This skill involves thoroughly improving code quality by repeatedly requesting a review from a sub-agent after editing and improving the code based on the results. Humans typically improve code quality by creating a pull request after editing code and having it reviewed by a reviewer. Such reviews are important because they can identify problems that might be missed through self-review alone. Ignore this skill when the user explicitly instructs to skip the review-loop.
12
12
 
13
13
  ## When to apply
14
14
 
@@ -139,6 +139,33 @@ const parsed = Person(externalValue);
139
139
  parsed instanceof type.errors ? "Unknown" : parsed;
140
140
  ```
141
141
 
142
+ ### Do not omit curly braces
143
+
144
+ Unless otherwise specified in project documentation or formatters, do not omit curly braces except in early returns. Also, group the code by its logical content using blank lines, just as a human would.
145
+
146
+ ```ts
147
+ // Incorrect
148
+
149
+ const main = (value) => {
150
+ if (!Array.isArray(value)) return null;
151
+ for (const item of value) console.log(item);
152
+ if (value.length > 0) console.log("Array is not empty");
153
+ }
154
+
155
+ // Correct
156
+ const main = (value) => {
157
+ if (!Array.isArray(value)) return null;
158
+
159
+ for (const item of value) {
160
+ console.log(item);
161
+ }
162
+
163
+ if (value.length > 0) {
164
+ console.log("Array is not empty");
165
+ }
166
+ }
167
+ ```
168
+
142
169
  ## CSS
143
170
 
144
171
  ### Define only the necessary styles
@@ -205,6 +232,8 @@ Do not mock application-owned modules. Prefer real implementations and test obse
205
232
 
206
233
  Test the behavior from an external perspective, not the internal implementation. In other words, tests that require changes when refactoring are bad tests. Test the project's code, not the browser or external libraries. For example, it's obvious that a button element will be displayed in the browser when you write it; this tests the browser's behavior, not the project's code.
207
234
 
235
+ Add only the necessary tests. Ensure that your tests verify the correct operation of the code and are capable of detecting when the code breaks. Testing outcomes that are already expected to occur is pointless, and tests that fail to detect when the code is broken are worthless. Test the externally observable behavior of the code when provided with normal, boundary, and anomalous input values.
236
+
208
237
  ### Do not export for testing purposes
209
238
 
210
239
  You should not export functions, values, or other data solely for testing purposes. When testing things that are not used outside of the file except for testing, use [in-source testing](https://vitest.dev/guide/in-source) instead of exporting them and creating a separate test file.