@sisu-ai/skill-code-review 0.2.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 +6 -0
- package/README.md +34 -0
- package/SKILL.md +51 -0
- package/package.json +30 -0
- package/resources/review-checklist.md +31 -0
package/LICENSE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# @sisu-ai/skill-code-review
|
|
2
|
+
|
|
3
|
+
Structured code review skill for safety, correctness, and maintainability.
|
|
4
|
+
|
|
5
|
+
Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add @sisu-ai/skill-code-review
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Usage
|
|
12
|
+
|
|
13
|
+
Point the skills middleware directly at the installed package:
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
skillsMiddleware({
|
|
17
|
+
directories: ["node_modules/@sisu-ai/skill-code-review"],
|
|
18
|
+
});
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Or copy the skill into your project skills directory (explicitly configured in middleware):
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
mkdir -p .sisu/skills/code-review
|
|
25
|
+
cp -R node_modules/@sisu-ai/skill-code-review/* .sisu/skills/code-review/
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Resources
|
|
29
|
+
|
|
30
|
+
- `resources/review-checklist.md`
|
|
31
|
+
|
|
32
|
+
License
|
|
33
|
+
|
|
34
|
+
Apache-2.0
|
package/SKILL.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-review
|
|
3
|
+
description: Perform a structured code review for safety, correctness, and maintainability
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
author: sisu
|
|
6
|
+
tags: [review, quality, security, typescript]
|
|
7
|
+
requires: [read_file, grep, bash]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Code Review
|
|
11
|
+
|
|
12
|
+
Use this skill to perform a systematic code review focused on correctness, safety, and maintainability.
|
|
13
|
+
|
|
14
|
+
## Goals
|
|
15
|
+
|
|
16
|
+
- Validate behavior against requirements and edge cases
|
|
17
|
+
- Identify security risks and unsafe patterns
|
|
18
|
+
- Ensure error handling and logging are correct
|
|
19
|
+
- Check performance hotspots and unnecessary allocations
|
|
20
|
+
- Confirm code aligns with SISU guidelines (explicit, composable, testable)
|
|
21
|
+
|
|
22
|
+
## Review Steps
|
|
23
|
+
|
|
24
|
+
1. **Scope the change**
|
|
25
|
+
- Identify files changed and related components
|
|
26
|
+
- Read relevant docs/specs/tests if available
|
|
27
|
+
|
|
28
|
+
2. **Behavior & correctness**
|
|
29
|
+
- Walk through main flows and edge cases
|
|
30
|
+
- Verify invariants and error handling
|
|
31
|
+
|
|
32
|
+
3. **Safety & security**
|
|
33
|
+
- Look for unsafe file access, command injection, secrets handling
|
|
34
|
+
- Validate input validation and schema enforcement
|
|
35
|
+
|
|
36
|
+
4. **Performance**
|
|
37
|
+
- Check for unbounded loops or O(n^2) pitfalls
|
|
38
|
+
- Validate caching and I/O patterns
|
|
39
|
+
|
|
40
|
+
5. **Tests**
|
|
41
|
+
- Ensure tests cover happy path, edge cases, invalid input, and cancellation
|
|
42
|
+
|
|
43
|
+
## Output Format
|
|
44
|
+
|
|
45
|
+
- **Summary**: 2–4 bullets
|
|
46
|
+
- **Issues**: Prioritized list with severity and fix guidance
|
|
47
|
+
- **Suggestions**: Optional refactors or follow-ups
|
|
48
|
+
|
|
49
|
+
## Resources
|
|
50
|
+
|
|
51
|
+
See `resources/review-checklist.md` for a detailed checklist.
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sisu-ai/skill-code-review",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"SKILL.md",
|
|
8
|
+
"resources"
|
|
9
|
+
],
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "https://github.com/finger-gun/sisu",
|
|
16
|
+
"directory": "packages/skills/skill-code-review"
|
|
17
|
+
},
|
|
18
|
+
"homepage": "https://github.com/finger-gun/sisu#readme",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/finger-gun/sisu/issues"
|
|
21
|
+
},
|
|
22
|
+
"keywords": [
|
|
23
|
+
"sisu",
|
|
24
|
+
"ai",
|
|
25
|
+
"ai-agent",
|
|
26
|
+
"agentic",
|
|
27
|
+
"skill",
|
|
28
|
+
"code-review"
|
|
29
|
+
]
|
|
30
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Code Review Checklist
|
|
2
|
+
|
|
3
|
+
## Correctness
|
|
4
|
+
|
|
5
|
+
- Inputs validated and schema enforced
|
|
6
|
+
- Edge cases handled (empty data, nulls, malformed input)
|
|
7
|
+
- Error messages are actionable and consistent
|
|
8
|
+
|
|
9
|
+
## Safety & Security
|
|
10
|
+
|
|
11
|
+
- No direct shell execution without validation
|
|
12
|
+
- No secrets logged or stored in outputs
|
|
13
|
+
- File paths sanitized and constrained
|
|
14
|
+
|
|
15
|
+
## Performance
|
|
16
|
+
|
|
17
|
+
- No unnecessary O(n^2) loops on hot paths
|
|
18
|
+
- I/O operations are bounded and cached when appropriate
|
|
19
|
+
- Avoid large in-memory buffers for streaming data
|
|
20
|
+
|
|
21
|
+
## Type Safety
|
|
22
|
+
|
|
23
|
+
- No `any` usage in public APIs
|
|
24
|
+
- Narrowed `unknown` where needed
|
|
25
|
+
- Zod schemas align with runtime behavior
|
|
26
|
+
|
|
27
|
+
## Observability
|
|
28
|
+
|
|
29
|
+
- Logs use ctx.log; no console.\*
|
|
30
|
+
- Errors include context and cause
|
|
31
|
+
- Tracing hooks preserved
|