@codyswann/lisa 1.18.0 → 1.19.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/README.md +52 -1158
- package/all/copy-overwrite/.claude/commands/plan/add-test-coverage.md +8 -0
- package/all/copy-overwrite/.claude/commands/plan/fix-linter-error.md +8 -0
- package/all/copy-overwrite/.claude/commands/plan/local-code-review.md +6 -0
- package/all/copy-overwrite/.claude/commands/plan/lower-code-complexity.md +6 -0
- package/all/copy-overwrite/.claude/commands/plan/reduce-max-lines-per-function.md +8 -0
- package/all/copy-overwrite/.claude/commands/plan/reduce-max-lines.md +8 -0
- package/all/copy-overwrite/.claude/commands/project/add-test-coverage.md +4 -1
- package/all/copy-overwrite/.claude/commands/project/archive.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/bootstrap.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/debrief.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/document.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/execute.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/fix-linter-error.md +4 -1
- package/all/copy-overwrite/.claude/commands/project/implement.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/local-code-review.md +3 -0
- package/all/copy-overwrite/.claude/commands/project/lower-code-complexity.md +3 -0
- package/all/copy-overwrite/.claude/commands/project/plan.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/reduce-max-lines-per-function.md +4 -1
- package/all/copy-overwrite/.claude/commands/project/reduce-max-lines.md +4 -1
- package/all/copy-overwrite/.claude/commands/project/research.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/review.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/setup.md +4 -0
- package/all/copy-overwrite/.claude/commands/project/verify.md +4 -0
- package/all/copy-overwrite/.claude/skills/plan-add-test-coverage/SKILL.md +54 -0
- package/all/copy-overwrite/.claude/skills/plan-fix-linter-error/SKILL.md +63 -0
- package/all/copy-overwrite/.claude/skills/plan-local-code-review/SKILL.md +88 -0
- package/all/copy-overwrite/.claude/skills/plan-lower-code-complexity/SKILL.md +58 -0
- package/all/copy-overwrite/.claude/skills/plan-reduce-max-lines/SKILL.md +59 -0
- package/all/copy-overwrite/.claude/skills/plan-reduce-max-lines-per-function/SKILL.md +62 -0
- package/all/copy-overwrite/.claude/skills/project-add-test-coverage/SKILL.md +4 -1
- package/all/copy-overwrite/.claude/skills/project-archive/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-bootstrap/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-debrief/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-document/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-execute/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-fix-linter-error/SKILL.md +4 -1
- package/all/copy-overwrite/.claude/skills/project-implement/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-local-code-review/SKILL.md +3 -0
- package/all/copy-overwrite/.claude/skills/project-lower-code-complexity/SKILL.md +3 -0
- package/all/copy-overwrite/.claude/skills/project-plan/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-reduce-max-lines/SKILL.md +4 -1
- package/all/copy-overwrite/.claude/skills/project-reduce-max-lines-per-function/SKILL.md +4 -1
- package/all/copy-overwrite/.claude/skills/project-research/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-review/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-setup/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/project-verify/SKILL.md +4 -0
- package/all/copy-overwrite/.claude/skills/pull-request-review/SKILL.md +3 -7
- package/all/copy-overwrite/README.md +69 -0
- package/cdk/copy-overwrite/README.md +77 -0
- package/expo/copy-overwrite/README.md +85 -0
- package/nestjs/copy-overwrite/README.md +77 -0
- package/package.json +1 -1
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
description: "Increase test coverage to a specified threshold percentage"
|
|
3
3
|
allowed-tools: ["Skill"]
|
|
4
4
|
argument-hint: "<threshold-percentage>"
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **DEPRECATED**: This command is deprecated. Use `/plan:add-test-coverage` instead.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
8
11
|
Use the /project-add-test-coverage skill to increase test coverage. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-archive skill to archive the completed project. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<file-path|jira-issue|\"text description\">"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-bootstrap skill to set up, research, and execute a project. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-debrief skill to aggregate and apply project learnings. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-document skill to update all project documentation. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-execute skill to run the complete project workflow. $ARGUMENTS
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
description: "Fix all violations of one or more ESLint rules across the codebase"
|
|
3
3
|
allowed-tools: ["Skill"]
|
|
4
4
|
argument-hint: "<rule-1> [rule-2] [rule-3] ..."
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **DEPRECATED**: This command is deprecated. Use `/plan:fix-linter-error` instead.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
8
11
|
Use the /project-fix-linter-error skill to fix ESLint rule violations. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-implement skill to implement all planned tasks. $ARGUMENTS
|
|
@@ -4,4 +4,7 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use `/plan:local-code-review` instead.
|
|
8
|
+
> This command will be removed in a future release.
|
|
9
|
+
|
|
7
10
|
Use the /project-local-code-review skill to review local changes on the current branch. $ARGUMENTS
|
|
@@ -3,4 +3,7 @@ description: "Reduces the code complexity of the codebase by 2 on each run"
|
|
|
3
3
|
allowed-tools: ["Skill"]
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
+
> **DEPRECATED**: This command is deprecated. Use `/plan:lower-code-complexity` instead.
|
|
7
|
+
> This command will be removed in a future release.
|
|
8
|
+
|
|
6
9
|
Use the /project-lower-code-complexity skill to reduce cognitive complexity. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-plan skill to create implementation tasks from research and brief. $ARGUMENTS
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
description: "Reduce max lines per function threshold and fix violations"
|
|
3
3
|
allowed-tools: ["Skill"]
|
|
4
4
|
argument-hint: "<max-lines-per-function-value>"
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **DEPRECATED**: This command is deprecated. Use `/plan:reduce-max-lines-per-function` instead.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
8
11
|
Use the /project-reduce-max-lines-per-function skill to reduce function line limits. $ARGUMENTS
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
description: "Reduce max file lines threshold and fix violations"
|
|
3
3
|
allowed-tools: ["Skill"]
|
|
4
4
|
argument-hint: "<max-lines-value>"
|
|
5
|
-
|
|
5
|
+
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **DEPRECATED**: This command is deprecated. Use `/plan:reduce-max-lines` instead.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
8
11
|
Use the /project-reduce-max-lines skill to reduce file line limits. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-research skill to conduct comprehensive research for the project. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-review skill to perform code review and optimization. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<file-path|jira-issue|text-description>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-setup skill to initialize a new project. $ARGUMENTS
|
|
@@ -4,4 +4,8 @@ allowed-tools: ["Skill"]
|
|
|
4
4
|
argument-hint: "<project-directory>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
+
> **DEPRECATED**: This command is deprecated. Use Claude's native plan mode instead.
|
|
8
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
9
|
+
> This command will be removed in a future release.
|
|
10
|
+
|
|
7
11
|
Use the /project-verify skill to verify the project implementation. $ARGUMENTS
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-add-test-coverage
|
|
3
|
+
description: This skill should be used when increasing test coverage to a specified threshold percentage. It runs the coverage report, identifies files with the lowest coverage, generates a brief with coverage gaps, and creates a plan with tasks to add the missing tests.
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
|
+
argument-hint: "<threshold-percentage>"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Increase Test Coverage
|
|
10
|
+
|
|
11
|
+
Target threshold: $ARGUMENTS%
|
|
12
|
+
|
|
13
|
+
If no argument provided, prompt the user for a target.
|
|
14
|
+
|
|
15
|
+
## Step 1: Gather Requirements
|
|
16
|
+
|
|
17
|
+
1. **Find coverage config** (jest.config.js, vitest.config.ts, .nycrc, etc.)
|
|
18
|
+
2. **Run coverage report** to get current state:
|
|
19
|
+
```bash
|
|
20
|
+
bun run test:cov 2>&1 | head -100
|
|
21
|
+
```
|
|
22
|
+
3. **Identify the 20 files with lowest coverage**, noting:
|
|
23
|
+
- File path
|
|
24
|
+
- Current coverage % (lines, branches, functions)
|
|
25
|
+
- Which lines/branches are uncovered
|
|
26
|
+
|
|
27
|
+
## Step 2: Create Plan
|
|
28
|
+
|
|
29
|
+
In plan mode, create a plan that includes the following details:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
Increase test coverage from [current]% to $ARGUMENTS%.
|
|
33
|
+
|
|
34
|
+
## Files Needing Coverage (ordered by coverage gap)
|
|
35
|
+
|
|
36
|
+
1. src/services/user.ts - 23% coverage (target: $ARGUMENTS%)
|
|
37
|
+
- Uncovered: lines 45-67, 89-102
|
|
38
|
+
- Missing branch coverage: lines 34, 56
|
|
39
|
+
2. src/utils/helpers.ts - 34% coverage (target: $ARGUMENTS%)
|
|
40
|
+
- Uncovered: lines 12-45
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
## Configuration
|
|
44
|
+
- Config file: [path to coverage config]
|
|
45
|
+
- Update thresholds to $ARGUMENTS% for: lines, branches, functions, statements
|
|
46
|
+
|
|
47
|
+
## Acceptance Criteria
|
|
48
|
+
- All files meet $ARGUMENTS% coverage threshold
|
|
49
|
+
- `bun run test:cov` passes with no threshold violations
|
|
50
|
+
|
|
51
|
+
## Verification
|
|
52
|
+
Command: `bun run test:cov`
|
|
53
|
+
Expected: All thresholds pass at $ARGUMENTS%
|
|
54
|
+
```
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-fix-linter-error
|
|
3
|
+
description: This skill should be used when fixing all violations of one or more ESLint rules across the codebase. It runs the linter, groups violations by rule and file, generates a brief with fix strategies, and creates a plan with tasks to implement the fixes.
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
|
+
argument-hint: "<rule-1> [rule-2] [rule-3] ..."
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Fix Linter Errors
|
|
10
|
+
|
|
11
|
+
Target rules: $ARGUMENTS
|
|
12
|
+
|
|
13
|
+
If no arguments provided, prompt the user for at least one lint rule name.
|
|
14
|
+
|
|
15
|
+
## Step 1: Gather Requirements
|
|
16
|
+
|
|
17
|
+
1. **Parse rules** from $ARGUMENTS (space-separated)
|
|
18
|
+
2. **Run linter** to collect all violations:
|
|
19
|
+
```bash
|
|
20
|
+
bun run lint 2>&1
|
|
21
|
+
```
|
|
22
|
+
3. **Group violations** by rule, then by file, noting:
|
|
23
|
+
- File path and line numbers
|
|
24
|
+
- Violation count per file
|
|
25
|
+
- Sample error messages
|
|
26
|
+
|
|
27
|
+
## Step 2: Create Plan
|
|
28
|
+
|
|
29
|
+
In plan mode, create a plan that includes the following details:
|
|
30
|
+
|
|
31
|
+
```markdown
|
|
32
|
+
Fix ESLint violations for rules: $ARGUMENTS
|
|
33
|
+
|
|
34
|
+
## Violations by Rule
|
|
35
|
+
|
|
36
|
+
### [rule-name-1] (X total violations across Y files)
|
|
37
|
+
|
|
38
|
+
1. src/services/user.ts (5 violations)
|
|
39
|
+
- Line 23: [error message]
|
|
40
|
+
- Line 45: [error message]
|
|
41
|
+
- Line 67: [error message]
|
|
42
|
+
...
|
|
43
|
+
2. src/utils/helpers.ts (3 violations)
|
|
44
|
+
- Line 12: [error message]
|
|
45
|
+
...
|
|
46
|
+
|
|
47
|
+
### [rule-name-2] (X total violations across Y files)
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
## Fix Strategies
|
|
51
|
+
- **Complexity rules** (sonarjs/*): Extract functions, early returns, simplify conditions
|
|
52
|
+
- **Style rules** (prettier/*, import/order): Apply formatting fixes
|
|
53
|
+
- **Best practice rules** (react-hooks/*, prefer-const): Refactor to recommended pattern
|
|
54
|
+
- **Type rules** (@typescript-eslint/*): Add proper types, remove `any`
|
|
55
|
+
|
|
56
|
+
## Acceptance Criteria
|
|
57
|
+
- `bun run lint` passes with zero violations for: $ARGUMENTS
|
|
58
|
+
- Each rule's fixes committed separately: `fix(lint): resolve [rule-name] violations`
|
|
59
|
+
|
|
60
|
+
## Verification
|
|
61
|
+
Command: `bun run lint 2>&1 | grep -E "($ARGUMENTS)" | wc -l`
|
|
62
|
+
Expected: 0
|
|
63
|
+
```
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-local-code-review
|
|
3
|
+
description: This skill should be used when performing a code review on local changes on the current branch compared to the main branch. It uses multiple parallel agents to check for bugs, CLAUDE.md compliance, git history context, previous PR comments, and code comment adherence, then scores and filters findings by confidence level.
|
|
4
|
+
disable-model-invocation: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Provide a code review for the local changes on the current branch compared to the main branch.
|
|
8
|
+
|
|
9
|
+
To do this, follow these steps precisely:
|
|
10
|
+
|
|
11
|
+
1. Use a Haiku agent to check the current git state:
|
|
12
|
+
- Run `git branch --show-current` to get the current branch name
|
|
13
|
+
- Run `git log main..HEAD --oneline` to see commits on this branch
|
|
14
|
+
- Run `git diff main...HEAD --stat` to see changed files
|
|
15
|
+
- If the current branch IS main, or there are no commits/changes compared to main, do not proceed.
|
|
16
|
+
2. Use another Haiku agent to give you a list of file paths to (but not the contents of) any relevant CLAUDE.md files from the codebase: the root CLAUDE.md file (if one exists), as well as any CLAUDE.md files in the directories whose files were modified on this branch
|
|
17
|
+
3. Use a Haiku agent to analyze the branch changes:
|
|
18
|
+
- Run `git log main..HEAD --format="%s%n%b"` to get commit messages
|
|
19
|
+
- Run `git diff main...HEAD` to get the full diff
|
|
20
|
+
- Return a summary of the changes
|
|
21
|
+
4. Then, launch 5 parallel Sonnet agents to independently code review the change. The agents should do the following, then return a list of issues and the reason each issue was flagged (eg. CLAUDE.md adherence, bug, historical git context, etc.):
|
|
22
|
+
a. Agent #1: Audit the changes to make sure they comply with the CLAUDE.md. Note that CLAUDE.md is guidance for Claude as it writes code, so not all instructions will be applicable during code review.
|
|
23
|
+
b. Agent #2: Read the file changes (via `git diff main...HEAD`), then do a shallow scan for obvious bugs. Avoid reading extra context beyond the changes, focusing just on the changes themselves. Focus on large bugs, and avoid small issues and nitpicks. Ignore likely false positives.
|
|
24
|
+
c. Agent #3: Read the git blame and history of the code modified, to identify any bugs in light of that historical context
|
|
25
|
+
d. Agent #4: Read previous pull requests that touched these files, and check for any comments on those pull requests that may also apply to the current changes.
|
|
26
|
+
e. Agent #5: Read code comments in the modified files, and make sure the changes comply with any guidance in the comments.
|
|
27
|
+
5. For each issue found in #4, launch a parallel Haiku agent that takes the diff, issue description, and list of CLAUDE.md files (from step 2), and returns a score to indicate the agent's level of confidence for whether the issue is real or false positive. To do that, the agent should score each issue on a scale from 0-100, indicating its level of confidence. For issues that were flagged due to CLAUDE.md instructions, the agent should double check that the CLAUDE.md actually calls out that issue specifically. The scale is (give this rubric to the agent verbatim):
|
|
28
|
+
a. 0: Not confident at all. This is a false positive that doesn't stand up to light scrutiny, or is a pre-existing issue.
|
|
29
|
+
b. 25: Somewhat confident. This might be a real issue, but may also be a false positive. The agent wasn't able to verify that it's a real issue. If the issue is stylistic, it is one that was not explicitly called out in the relevant CLAUDE.md.
|
|
30
|
+
c. 50: Moderately confident. The agent was able to verify this is a real issue, but it might be a nitpick or not happen very often in practice. Relative to the rest of the changes, it's not very important.
|
|
31
|
+
d. 75: Highly confident. The agent double checked the issue, and verified that it is very likely it is a real issue that will be hit in practice. The existing approach is insufficient. The issue is very important and will directly impact the code's functionality, or it is an issue that is directly mentioned in the relevant CLAUDE.md.
|
|
32
|
+
e. 100: Absolutely certain. The agent double checked the issue, and confirmed that it is definitely a real issue, that will happen frequently in practice. The evidence directly confirms this.
|
|
33
|
+
6. Filter out any issues with a score less than 80.
|
|
34
|
+
7. Write the review to claude-review.md. When writing your review, keep in mind to:
|
|
35
|
+
a. Keep your output brief
|
|
36
|
+
b. Avoid emojis
|
|
37
|
+
c. Reference relevant files and line numbers
|
|
38
|
+
8. Briefly summarize claude-review.md as direct output to the user
|
|
39
|
+
|
|
40
|
+
Examples of false positives, for steps 4 and 5:
|
|
41
|
+
|
|
42
|
+
- Pre-existing issues
|
|
43
|
+
- Something that looks like a bug but is not actually a bug
|
|
44
|
+
- Pedantic nitpicks that a senior engineer wouldn't call out
|
|
45
|
+
- Issues that a linter, typechecker, or compiler would catch (eg. missing or incorrect imports, type errors, broken tests, formatting issues, pedantic style issues like newlines). No need to run these build steps yourself -- it is safe to assume that they will be run separately as part of CI.
|
|
46
|
+
- General code quality issues (eg. lack of test coverage, general security issues, poor documentation), unless explicitly required in CLAUDE.md
|
|
47
|
+
- Issues that are called out in CLAUDE.md, but explicitly silenced in the code (eg. due to a lint ignore comment)
|
|
48
|
+
- Changes in functionality that are likely intentional or are directly related to the broader change
|
|
49
|
+
- Real issues, but on lines that were not modified in the current branch
|
|
50
|
+
|
|
51
|
+
Notes:
|
|
52
|
+
|
|
53
|
+
- Do not check build signal or attempt to build or typecheck the app. These will run separately, and are not relevant to your code review.
|
|
54
|
+
- Use git commands to analyze local changes (not `gh` commands for remote PRs)
|
|
55
|
+
- Make a todo list first
|
|
56
|
+
- You must cite each bug with file path and line number (eg. if referring to a CLAUDE.md, you must reference it)
|
|
57
|
+
- For your final output, follow the following format precisely (assuming for this example that you found 3 issues):
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### Code review for branch `<branch-name>`
|
|
62
|
+
|
|
63
|
+
Reviewed X commits with changes to Y files.
|
|
64
|
+
|
|
65
|
+
Found 3 issues:
|
|
66
|
+
|
|
67
|
+
1. **<brief description of bug>** (CLAUDE.md says "<...>")
|
|
68
|
+
- File: `path/to/file.ts:L10-L15`
|
|
69
|
+
|
|
70
|
+
2. **<brief description of bug>** (some/other/CLAUDE.md says "<...>")
|
|
71
|
+
- File: `path/to/other-file.ts:L25-L30`
|
|
72
|
+
|
|
73
|
+
3. **<brief description of bug>** (bug due to <reasoning>)
|
|
74
|
+
- File: `path/to/another-file.ts:L5-L8`
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
- Or, if you found no issues:
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
### Code review for branch `<branch-name>`
|
|
83
|
+
|
|
84
|
+
Reviewed X commits with changes to Y files.
|
|
85
|
+
|
|
86
|
+
No issues found. Checked for bugs and CLAUDE.md compliance.
|
|
87
|
+
|
|
88
|
+
---
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-lower-code-complexity
|
|
3
|
+
description: This skill should be used when reducing the cognitive complexity threshold of the codebase. It lowers the threshold by 2, identifies functions that exceed the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to fix all violations.
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Lower Code Complexity
|
|
8
|
+
|
|
9
|
+
Reduces the cognitive complexity threshold by 2 and fixes all violations.
|
|
10
|
+
|
|
11
|
+
## Step 1: Gather Requirements
|
|
12
|
+
|
|
13
|
+
1. **Read current threshold** from eslint config (cognitive-complexity rule)
|
|
14
|
+
2. **Calculate new threshold**: current - 2 (e.g., 15 -> 13)
|
|
15
|
+
3. **Run lint** with the new threshold to find violations:
|
|
16
|
+
```bash
|
|
17
|
+
bun run lint 2>&1 | grep "cognitive-complexity"
|
|
18
|
+
```
|
|
19
|
+
4. **Note for each violation**:
|
|
20
|
+
- File path and line number
|
|
21
|
+
- Function name
|
|
22
|
+
- Current complexity score
|
|
23
|
+
|
|
24
|
+
If no violations at new threshold, report success and exit.
|
|
25
|
+
|
|
26
|
+
## Step 2: Create Plan
|
|
27
|
+
|
|
28
|
+
In plan mode, create a plan that includes the following details:
|
|
29
|
+
|
|
30
|
+
```markdown
|
|
31
|
+
Reduce cognitive complexity threshold from [current] to [new].
|
|
32
|
+
|
|
33
|
+
## Functions Exceeding Threshold (ordered by complexity)
|
|
34
|
+
|
|
35
|
+
1. src/services/user.ts:processUser (complexity: 18, target: [new])
|
|
36
|
+
- Line 45, function spans lines 45-120
|
|
37
|
+
2. src/utils/helpers.ts:validateInput (complexity: 15, target: [new])
|
|
38
|
+
- Line 23, function spans lines 23-67
|
|
39
|
+
...
|
|
40
|
+
|
|
41
|
+
## Configuration Change
|
|
42
|
+
- File: [eslint config path]
|
|
43
|
+
- Change: cognitive-complexity threshold from [current] to [new]
|
|
44
|
+
|
|
45
|
+
## Refactoring Strategies
|
|
46
|
+
- **Extract functions**: Break complex logic into smaller, named functions
|
|
47
|
+
- **Early returns**: Reduce nesting with guard clauses
|
|
48
|
+
- **Extract conditions**: Move complex boolean logic into named variables
|
|
49
|
+
- **Use lookup tables**: Replace complex switch/if-else chains with object maps
|
|
50
|
+
|
|
51
|
+
## Acceptance Criteria
|
|
52
|
+
- All functions at or below complexity [new]
|
|
53
|
+
- `bun run lint` passes with no cognitive-complexity violations
|
|
54
|
+
|
|
55
|
+
## Verification
|
|
56
|
+
Command: `bun run lint 2>&1 | grep "cognitive-complexity" | wc -l`
|
|
57
|
+
Expected: 0
|
|
58
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-reduce-max-lines
|
|
3
|
+
description: This skill should be used when reducing the maximum file lines threshold and fixing all violations. It updates the eslint threshold configuration, identifies files exceeding the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to split oversized files.
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
|
+
argument-hint: "<max-lines-value>"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Reduce Max Lines
|
|
10
|
+
|
|
11
|
+
Target threshold: $ARGUMENTS lines per file
|
|
12
|
+
|
|
13
|
+
If no argument provided, prompt the user for a target.
|
|
14
|
+
|
|
15
|
+
## Step 1: Gather Requirements
|
|
16
|
+
|
|
17
|
+
1. **Read current config** from eslint thresholds (eslint.thresholds.json or similar)
|
|
18
|
+
2. **Run lint** with the new threshold to find violations:
|
|
19
|
+
```bash
|
|
20
|
+
bun run lint 2>&1 | grep "max-lines"
|
|
21
|
+
```
|
|
22
|
+
3. **Note for each violation**:
|
|
23
|
+
- File path
|
|
24
|
+
- Current line count
|
|
25
|
+
|
|
26
|
+
If no violations at $ARGUMENTS, report success and exit.
|
|
27
|
+
|
|
28
|
+
## Step 2: Create Plan
|
|
29
|
+
|
|
30
|
+
In plan mode, create a plan that includes the following details:
|
|
31
|
+
|
|
32
|
+
```markdown
|
|
33
|
+
Reduce max file lines threshold to $ARGUMENTS.
|
|
34
|
+
|
|
35
|
+
## Files Exceeding Threshold (ordered by line count)
|
|
36
|
+
|
|
37
|
+
1. src/services/user.ts (450 lines, target: $ARGUMENTS)
|
|
38
|
+
2. src/utils/helpers.ts (380 lines, target: $ARGUMENTS)
|
|
39
|
+
3. src/components/Dashboard.tsx (320 lines, target: $ARGUMENTS)
|
|
40
|
+
...
|
|
41
|
+
|
|
42
|
+
## Configuration Change
|
|
43
|
+
- File: eslint.thresholds.json
|
|
44
|
+
- Change: maxLines to $ARGUMENTS
|
|
45
|
+
|
|
46
|
+
## Refactoring Strategies
|
|
47
|
+
- **Extract modules**: Break file into smaller focused modules
|
|
48
|
+
- **Remove duplication**: Consolidate repeated logic
|
|
49
|
+
- **Delete dead code**: Remove unused functions/code paths
|
|
50
|
+
- **Simplify logic**: Use early returns, reduce nesting
|
|
51
|
+
|
|
52
|
+
## Acceptance Criteria
|
|
53
|
+
- All files at or below $ARGUMENTS lines
|
|
54
|
+
- `bun run lint` passes with no max-lines violations
|
|
55
|
+
|
|
56
|
+
## Verification
|
|
57
|
+
Command: `bun run lint 2>&1 | grep "max-lines" | wc -l`
|
|
58
|
+
Expected: 0
|
|
59
|
+
```
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: plan-reduce-max-lines-per-function
|
|
3
|
+
description: This skill should be used when reducing the maximum lines per function threshold and fixing all violations. It updates the eslint threshold configuration, identifies functions exceeding the new limit, generates a brief with refactoring strategies, and creates a plan with tasks to split oversized functions.
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
|
+
argument-hint: "<max-lines-per-function-value>"
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Reduce Max Lines Per Function
|
|
10
|
+
|
|
11
|
+
Target threshold: $ARGUMENTS lines per function
|
|
12
|
+
|
|
13
|
+
If no argument provided, prompt the user for a target.
|
|
14
|
+
|
|
15
|
+
## Step 1: Gather Requirements
|
|
16
|
+
|
|
17
|
+
1. **Read current config** from eslint thresholds (eslint.thresholds.json or similar)
|
|
18
|
+
2. **Run lint** with the new threshold to find violations:
|
|
19
|
+
```bash
|
|
20
|
+
bun run lint 2>&1 | grep "max-lines-per-function"
|
|
21
|
+
```
|
|
22
|
+
3. **Note for each violation**:
|
|
23
|
+
- File path and line number
|
|
24
|
+
- Function name
|
|
25
|
+
- Current line count
|
|
26
|
+
|
|
27
|
+
If no violations at $ARGUMENTS, report success and exit.
|
|
28
|
+
|
|
29
|
+
## Step 2: Create Plan
|
|
30
|
+
|
|
31
|
+
In plan mode, create a plan that includes the following details:
|
|
32
|
+
|
|
33
|
+
```markdown
|
|
34
|
+
Reduce max lines per function threshold to $ARGUMENTS.
|
|
35
|
+
|
|
36
|
+
## Functions Exceeding Threshold (ordered by line count)
|
|
37
|
+
|
|
38
|
+
1. src/services/user.ts:processUser (95 lines, target: $ARGUMENTS)
|
|
39
|
+
- Line 45, function spans lines 45-140
|
|
40
|
+
2. src/utils/helpers.ts:validateInput (82 lines, target: $ARGUMENTS)
|
|
41
|
+
- Line 23, function spans lines 23-105
|
|
42
|
+
...
|
|
43
|
+
|
|
44
|
+
## Configuration Change
|
|
45
|
+
- File: eslint.thresholds.json
|
|
46
|
+
- Change: maxLinesPerFunction to $ARGUMENTS
|
|
47
|
+
|
|
48
|
+
## Refactoring Strategies
|
|
49
|
+
- **Extract functions**: Break function into smaller named functions
|
|
50
|
+
- **Early returns**: Reduce nesting with guard clauses
|
|
51
|
+
- **Extract conditions**: Move complex boolean logic into named variables
|
|
52
|
+
- **Use lookup tables**: Replace complex switch/if-else chains with object maps
|
|
53
|
+
- **Consolidate logic**: Merge similar code paths
|
|
54
|
+
|
|
55
|
+
## Acceptance Criteria
|
|
56
|
+
- All functions at or below $ARGUMENTS lines
|
|
57
|
+
- `bun run lint` passes with no max-lines-per-function violations
|
|
58
|
+
|
|
59
|
+
## Verification
|
|
60
|
+
Command: `bun run lint 2>&1 | grep "max-lines-per-function" | wc -l`
|
|
61
|
+
Expected: 0
|
|
62
|
+
```
|
|
@@ -3,9 +3,12 @@ name: project-add-test-coverage
|
|
|
3
3
|
description: This skill should be used when increasing test coverage to a specified threshold percentage. It runs the coverage report, identifies files with the lowest coverage, generates a brief with coverage gaps, and bootstraps a project to add the missing tests.
|
|
4
4
|
allowed-tools: ["Read", "Bash", "Glob", "Grep"]
|
|
5
5
|
argument-hint: "<threshold-percentage>"
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
+
> **DEPRECATED**: This skill is deprecated. Use `/plan-add-test-coverage` instead, which integrates with Claude's native plan mode.
|
|
10
|
+
> This skill will be removed in a future release.
|
|
11
|
+
|
|
9
12
|
# Increase Test Coverage
|
|
10
13
|
|
|
11
14
|
Target threshold: $ARGUMENTS%
|
|
@@ -5,6 +5,10 @@ allowed-tools: ["Read", "Write", "Bash(git*)", "Glob", "Grep", "Task", "TaskCrea
|
|
|
5
5
|
argument-hint: "<project-directory>"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
|
+
> **DEPRECATED**: This skill is deprecated. Use Claude's native plan mode instead.
|
|
9
|
+
> Enter plan mode with `/plan`, describe your requirements, and Claude will create a plan with tasks automatically.
|
|
10
|
+
> This skill will be removed in a future release.
|
|
11
|
+
|
|
8
12
|
1. Move $ARGUMENTS to `projects/archive`
|
|
9
13
|
2. Clear the active project marker: `rm -f .claude-active-project`
|
|
10
14
|
3. Run /git-commit-and-submit-pr
|