@h1dr0n/skill-pool 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 +21 -0
- package/README.md +296 -0
- package/bin/cli.js +157 -0
- package/package.json +41 -0
- package/skills/api/agents/backend-specialist.md +69 -0
- package/skills/api/agents/database-optimizer.md +176 -0
- package/skills/api/manifest.yaml +20 -0
- package/skills/api/rules/auth-security.md +45 -0
- package/skills/api/skills/api-patterns/SKILL.md +81 -0
- package/skills/api/skills/api-patterns/api-style.md +42 -0
- package/skills/api/skills/api-patterns/auth.md +24 -0
- package/skills/api/skills/api-patterns/documentation.md +26 -0
- package/skills/api/skills/api-patterns/graphql.md +41 -0
- package/skills/api/skills/api-patterns/rate-limiting.md +31 -0
- package/skills/api/skills/api-patterns/response.md +37 -0
- package/skills/api/skills/api-patterns/rest.md +40 -0
- package/skills/api/skills/api-patterns/scripts/api_validator.py +211 -0
- package/skills/api/skills/api-patterns/security-testing.md +122 -0
- package/skills/api/skills/api-patterns/trpc.md +41 -0
- package/skills/api/skills/api-patterns/versioning.md +22 -0
- package/skills/api/skills/database-patterns.md +126 -0
- package/skills/api/skills/deployment-patterns.md +105 -0
- package/skills/api/skills/docker-patterns.md +135 -0
- package/skills/common/agents/code-reviewer.md +78 -0
- package/skills/common/agents/planner.md +80 -0
- package/skills/common/agents/security-reviewer.md +82 -0
- package/skills/common/agents/software-architect.md +81 -0
- package/skills/common/manifest.yaml +25 -0
- package/skills/common/rules/coding-style.md +39 -0
- package/skills/common/rules/git-workflow.md +33 -0
- package/skills/common/rules/security.md +25 -0
- package/skills/common/skills/architecture/SKILL.md +55 -0
- package/skills/common/skills/architecture/context-discovery.md +43 -0
- package/skills/common/skills/architecture/examples.md +94 -0
- package/skills/common/skills/architecture/pattern-selection.md +68 -0
- package/skills/common/skills/architecture/patterns-reference.md +50 -0
- package/skills/common/skills/architecture/trade-off-analysis.md +77 -0
- package/skills/common/skills/brainstorming/SKILL.md +163 -0
- package/skills/common/skills/brainstorming/dynamic-questioning.md +350 -0
- package/skills/common/skills/clean-code.md +99 -0
- package/skills/common/skills/code-review-checklist.md +86 -0
- package/skills/common/skills/plan-writing/SKILL.md +152 -0
- package/skills/common/skills/skill-feedback.md +94 -0
- package/skills/common/skills/tdd-workflow.md +130 -0
- package/skills/common/skills/verification-loop.md +112 -0
- package/skills/cpp/agents/cpp-build-resolver.md +90 -0
- package/skills/cpp/agents/cpp-reviewer.md +72 -0
- package/skills/cpp/manifest.yaml +15 -0
- package/skills/cpp/skills/cpp-coding-standards.md +722 -0
- package/skills/cpp/skills/cpp-testing.md +323 -0
- package/skills/devops/agents/devops-automator.md +376 -0
- package/skills/devops/agents/sre.md +90 -0
- package/skills/devops/manifest.yaml +20 -0
- package/skills/devops/skills/deployment-patterns.md +427 -0
- package/skills/devops/skills/deployment-procedures/SKILL.md +241 -0
- package/skills/devops/skills/docker-patterns.md +364 -0
- package/skills/devops/skills/e2e-testing.md +326 -0
- package/skills/devops/skills/github-ops.md +144 -0
- package/skills/django/manifest.yaml +16 -0
- package/skills/django/skills/django-patterns.md +734 -0
- package/skills/django/skills/django-security.md +593 -0
- package/skills/django/skills/django-tdd.md +729 -0
- package/skills/django/skills/django-verification.md +469 -0
- package/skills/dotnet/agents/csharp-reviewer.md +101 -0
- package/skills/dotnet/manifest.yaml +14 -0
- package/skills/dotnet/skills/csharp-testing.md +321 -0
- package/skills/dotnet/skills/dotnet-patterns.md +321 -0
- package/skills/go/agents/code-reviewer.md +76 -0
- package/skills/go/agents/go-build-resolver.md +94 -0
- package/skills/go/agents/go-reviewer.md +76 -0
- package/skills/go/manifest.yaml +17 -0
- package/skills/go/rules/go-style.md +55 -0
- package/skills/go/skills/golang-patterns.md +674 -0
- package/skills/go/skills/golang-testing.md +720 -0
- package/skills/java/agents/java-build-resolver.md +153 -0
- package/skills/java/agents/java-reviewer.md +92 -0
- package/skills/java/manifest.yaml +18 -0
- package/skills/java/skills/java-coding-standards.md +147 -0
- package/skills/java/skills/jpa-patterns.md +151 -0
- package/skills/java/skills/springboot-patterns.md +314 -0
- package/skills/java/skills/springboot-security.md +272 -0
- package/skills/kotlin/agents/kotlin-build-resolver.md +118 -0
- package/skills/kotlin/agents/kotlin-reviewer.md +159 -0
- package/skills/kotlin/manifest.yaml +17 -0
- package/skills/kotlin/skills/kotlin-coroutines-flows.md +284 -0
- package/skills/kotlin/skills/kotlin-patterns.md +711 -0
- package/skills/kotlin/skills/kotlin-testing.md +824 -0
- package/skills/laravel/manifest.yaml +15 -0
- package/skills/laravel/skills/laravel-patterns.md +409 -0
- package/skills/laravel/skills/laravel-security.md +279 -0
- package/skills/laravel/skills/laravel-tdd.md +277 -0
- package/skills/laravel/skills/laravel-verification.md +173 -0
- package/skills/mobile/agents/dart-build-resolver.md +201 -0
- package/skills/mobile/agents/flutter-reviewer.md +243 -0
- package/skills/mobile/manifest.yaml +19 -0
- package/skills/mobile/skills/android-clean-architecture.md +339 -0
- package/skills/mobile/skills/dart-flutter-patterns.md +563 -0
- package/skills/mobile/skills/swiftui-patterns.md +259 -0
- package/skills/nestjs/manifest.yaml +13 -0
- package/skills/nestjs/skills/nestjs-patterns.md +230 -0
- package/skills/perl/manifest.yaml +13 -0
- package/skills/perl/skills/perl-patterns.md +504 -0
- package/skills/perl/skills/perl-security.md +503 -0
- package/skills/perl/skills/perl-testing.md +475 -0
- package/skills/python/agents/python-reviewer.md +98 -0
- package/skills/python/manifest.yaml +18 -0
- package/skills/python/rules/python-style.md +69 -0
- package/skills/python/skills/python-patterns/SKILL.md +441 -0
- package/skills/python/skills/python-patterns.md +90 -0
- package/skills/python/skills/python-testing.md +81 -0
- package/skills/rust/agents/rust-build-resolver.md +148 -0
- package/skills/rust/agents/rust-reviewer.md +94 -0
- package/skills/rust/manifest.yaml +16 -0
- package/skills/rust/rules/rust-style.md +107 -0
- package/skills/rust/skills/rust-patterns.md +499 -0
- package/skills/rust/skills/rust-testing.md +500 -0
- package/skills/security/agents/accessibility-auditor.md +316 -0
- package/skills/security/agents/security-reviewer.md +108 -0
- package/skills/security/manifest.yaml +19 -0
- package/skills/security/skills/red-team-tactics/SKILL.md +199 -0
- package/skills/security/skills/security-bounty-hunter.md +99 -0
- package/skills/security/skills/security-review.md +495 -0
- package/skills/security/skills/security-scan.md +165 -0
- package/skills/security/skills/vulnerability-scanner/SKILL.md +276 -0
- package/skills/security/skills/vulnerability-scanner/checklists.md +121 -0
- package/skills/security/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/skills/swift/manifest.yaml +16 -0
- package/skills/swift/skills/swift-actor-persistence.md +142 -0
- package/skills/swift/skills/swift-concurrency.md +216 -0
- package/skills/swift/skills/swift-protocol-di-testing.md +190 -0
- package/skills/swift/skills/swiftui-patterns.md +259 -0
- package/skills/unity/agents/game-designer.md +167 -0
- package/skills/unity/agents/unity-architect.md +52 -0
- package/skills/unity/agents/unity-editor-tool-developer.md +310 -0
- package/skills/unity/agents/unity-multiplayer-engineer.md +321 -0
- package/skills/unity/agents/unity-shader-graph-artist.md +269 -0
- package/skills/unity/manifest.yaml +21 -0
- package/skills/unity/rules/csharp-patterns.md +48 -0
- package/skills/unity/rules/unity-specific.md +53 -0
- package/skills/unity/skills/systematic-debugging.md +92 -0
- package/skills/unity/skills/unity-architecture.md +173 -0
- package/skills/unreal/agents/level-designer.md +208 -0
- package/skills/unreal/agents/technical-artist.md +229 -0
- package/skills/unreal/agents/unreal-multiplayer-architect.md +313 -0
- package/skills/unreal/agents/unreal-systems-engineer.md +310 -0
- package/skills/unreal/agents/unreal-technical-artist.md +256 -0
- package/skills/unreal/agents/unreal-world-builder.md +273 -0
- package/skills/unreal/manifest.yaml +21 -0
- package/skills/unreal/skills/unreal-patterns.md +183 -0
- package/skills/web/agents/frontend-specialist.md +71 -0
- package/skills/web/agents/ui-designer.md +383 -0
- package/skills/web/agents/ux-architect.md +469 -0
- package/skills/web/manifest.yaml +22 -0
- package/skills/web/rules/accessibility.md +54 -0
- package/skills/web/rules/css-performance.md +52 -0
- package/skills/web/skills/e2e-testing.md +132 -0
- package/skills/web/skills/frontend-design/SKILL.md +452 -0
- package/skills/web/skills/frontend-design/animation-guide.md +331 -0
- package/skills/web/skills/frontend-design/color-system.md +311 -0
- package/skills/web/skills/frontend-design/decision-trees.md +418 -0
- package/skills/web/skills/frontend-design/motion-graphics.md +306 -0
- package/skills/web/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/skills/web/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/skills/web/skills/frontend-design/typography-system.md +345 -0
- package/skills/web/skills/frontend-design/ux-psychology.md +1116 -0
- package/skills/web/skills/frontend-design/visual-effects.md +383 -0
- package/skills/web/skills/react-nextjs.md +135 -0
- package/skills/web/skills/tailwind-patterns/SKILL.md +269 -0
- package/src/adapters/antigravity.js +164 -0
- package/src/adapters/claude.js +188 -0
- package/src/adapters/cursor.js +161 -0
- package/src/adapters/index.js +67 -0
- package/src/adapters/windsurf.js +158 -0
- package/src/commands/add.js +266 -0
- package/src/commands/create.js +127 -0
- package/src/commands/diff.js +78 -0
- package/src/commands/info.js +88 -0
- package/src/commands/init.js +224 -0
- package/src/commands/install.js +90 -0
- package/src/commands/list.js +54 -0
- package/src/commands/remove.js +101 -0
- package/src/commands/targets.js +32 -0
- package/src/commands/update.js +57 -0
- package/src/core/manifest.js +57 -0
- package/src/core/plugins.js +86 -0
- package/src/core/resolver.js +84 -0
- package/src/core/tracker.js +49 -0
- package/src/utils/fs.js +80 -0
- package/src/utils/git.js +52 -0
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: skill-feedback
|
|
3
|
+
description: Auto-report skill/agent issues to GitHub. Use when a skill gives wrong advice, an agent produces bad output, rules conflict, or user corrects AI behavior caused by installed skills.
|
|
4
|
+
priority: high
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Skill Feedback Reporter
|
|
8
|
+
|
|
9
|
+
## When to Activate
|
|
10
|
+
|
|
11
|
+
- User says a skill/rule gave wrong advice ("no, that's wrong", "don't do that", "this pattern is bad")
|
|
12
|
+
- An agent produces output that gets rejected or corrected by user
|
|
13
|
+
- Two rules/skills conflict with each other
|
|
14
|
+
- A skill references outdated APIs, deprecated patterns, or wrong syntax
|
|
15
|
+
- Agent self-detects that its output doesn't match expected behavior
|
|
16
|
+
- Installed skill causes build errors, test failures, or security issues
|
|
17
|
+
|
|
18
|
+
## What to Report
|
|
19
|
+
|
|
20
|
+
Create a GitHub issue at `https://github.com/h1dr0nn/agent-skill-pool` with:
|
|
21
|
+
|
|
22
|
+
### Issue Title
|
|
23
|
+
```
|
|
24
|
+
[<pack>/<type>/<filename>] <brief description>
|
|
25
|
+
```
|
|
26
|
+
Examples:
|
|
27
|
+
- `[unity/skill/unity-architecture] ScriptableObject pattern causes memory leak`
|
|
28
|
+
- `[web/agent/frontend-specialist] Recommends deprecated useEffect pattern`
|
|
29
|
+
- `[common/rule/security] Conflicts with django security rule on CSRF`
|
|
30
|
+
|
|
31
|
+
### Issue Body Template
|
|
32
|
+
```markdown
|
|
33
|
+
## Pack
|
|
34
|
+
- **Pack:** <pack name>
|
|
35
|
+
- **Type:** skill | agent | rule
|
|
36
|
+
- **File:** <filename>
|
|
37
|
+
|
|
38
|
+
## Problem
|
|
39
|
+
<What went wrong - be specific>
|
|
40
|
+
|
|
41
|
+
## Context
|
|
42
|
+
- **Project type:** <what kind of project was being worked on>
|
|
43
|
+
- **AI tool:** Claude Code | Cursor | Windsurf | Antigravity
|
|
44
|
+
- **User feedback:** <exact user correction if applicable>
|
|
45
|
+
|
|
46
|
+
## Expected Behavior
|
|
47
|
+
<What the skill/agent should have done instead>
|
|
48
|
+
|
|
49
|
+
## Suggested Fix
|
|
50
|
+
<If known, how to fix the content>
|
|
51
|
+
|
|
52
|
+
## Labels
|
|
53
|
+
- `bug` - skill gives wrong advice
|
|
54
|
+
- `conflict` - two skills contradict each other
|
|
55
|
+
- `outdated` - references deprecated APIs/patterns
|
|
56
|
+
- `enhancement` - skill could be improved
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## How to Create the Issue
|
|
60
|
+
|
|
61
|
+
Use `gh` CLI if available:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
gh issue create \
|
|
65
|
+
--repo h1dr0nn/agent-skill-pool \
|
|
66
|
+
--title "[pack/type/file] description" \
|
|
67
|
+
--body "issue body" \
|
|
68
|
+
--label "bug"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If `gh` is not available, output the issue content and tell the user to create it manually at:
|
|
72
|
+
`https://github.com/h1dr0nn/agent-skill-pool/issues/new`
|
|
73
|
+
|
|
74
|
+
## Detection Signals
|
|
75
|
+
|
|
76
|
+
### From User
|
|
77
|
+
- "that's wrong" / "don't do that" / "this is outdated"
|
|
78
|
+
- User reverts or significantly modifies AI output
|
|
79
|
+
- User explicitly says a rule/skill is bad
|
|
80
|
+
|
|
81
|
+
### From Agent (self-detect)
|
|
82
|
+
- Generated code fails to compile/build
|
|
83
|
+
- Generated code fails tests
|
|
84
|
+
- Agent output contradicts another installed skill
|
|
85
|
+
- Agent recommends a function/API that doesn't exist
|
|
86
|
+
- Pattern produces runtime errors
|
|
87
|
+
|
|
88
|
+
## Priority
|
|
89
|
+
|
|
90
|
+
This skill takes priority over other skills. When a problem is detected:
|
|
91
|
+
1. Stop following the problematic skill immediately
|
|
92
|
+
2. Follow the user's correction instead
|
|
93
|
+
3. Create the issue report
|
|
94
|
+
4. Continue work with corrected behavior
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: tdd-workflow
|
|
3
|
+
description: Test-Driven Development workflow - RED-GREEN-REFACTOR cycle, AAA pattern, test prioritization. Use when writing new features, fixing bugs, or refactoring.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# TDD Workflow
|
|
7
|
+
|
|
8
|
+
## When to Activate
|
|
9
|
+
- Writing new features or functionality
|
|
10
|
+
- Fixing bugs (write test that reproduces bug first)
|
|
11
|
+
- Refactoring existing code
|
|
12
|
+
- Creating new components or modules
|
|
13
|
+
|
|
14
|
+
## The TDD Cycle
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
RED → Write a failing test
|
|
18
|
+
↓
|
|
19
|
+
GREEN → Write minimal code to pass
|
|
20
|
+
↓
|
|
21
|
+
REFACTOR → Improve code quality
|
|
22
|
+
↓
|
|
23
|
+
Repeat...
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## The Three Laws
|
|
27
|
+
|
|
28
|
+
1. Write production code **only** to make a failing test pass
|
|
29
|
+
2. Write only enough test to demonstrate failure
|
|
30
|
+
3. Write only enough code to make the test pass
|
|
31
|
+
|
|
32
|
+
## RED Phase
|
|
33
|
+
|
|
34
|
+
### What to Test First
|
|
35
|
+
|
|
36
|
+
| Priority | Test Type | Example |
|
|
37
|
+
|----------|-----------|---------|
|
|
38
|
+
| 1 | Happy path | "should create user with valid data" |
|
|
39
|
+
| 2 | Error cases | "should throw for invalid email" |
|
|
40
|
+
| 3 | Edge cases | "should handle empty input" |
|
|
41
|
+
| 4 | Performance | "should process 1000 items under 100ms" |
|
|
42
|
+
|
|
43
|
+
### Rules
|
|
44
|
+
- Test MUST fail first (if it passes, something is wrong)
|
|
45
|
+
- Test name describes expected behavior
|
|
46
|
+
- One assertion per test (ideally)
|
|
47
|
+
- Test behavior, not implementation
|
|
48
|
+
|
|
49
|
+
## GREEN Phase
|
|
50
|
+
|
|
51
|
+
| Principle | Meaning |
|
|
52
|
+
|-----------|---------|
|
|
53
|
+
| **YAGNI** | You Aren't Gonna Need It |
|
|
54
|
+
| **Simplest thing** | Write the minimum to pass |
|
|
55
|
+
| **No optimization** | Just make it work |
|
|
56
|
+
|
|
57
|
+
### Rules
|
|
58
|
+
- Don't write unneeded code
|
|
59
|
+
- Don't optimize yet
|
|
60
|
+
- Pass the test, nothing more
|
|
61
|
+
|
|
62
|
+
## REFACTOR Phase
|
|
63
|
+
|
|
64
|
+
| Area | Action |
|
|
65
|
+
|------|--------|
|
|
66
|
+
| Duplication | Extract common code |
|
|
67
|
+
| Naming | Make intent clear |
|
|
68
|
+
| Structure | Improve organization |
|
|
69
|
+
| Complexity | Simplify logic |
|
|
70
|
+
|
|
71
|
+
### Rules
|
|
72
|
+
- All tests MUST stay green
|
|
73
|
+
- Small incremental changes
|
|
74
|
+
- Commit after each refactor
|
|
75
|
+
|
|
76
|
+
## AAA Pattern
|
|
77
|
+
|
|
78
|
+
Every test follows Arrange-Act-Assert:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
// Arrange - Set up test data and preconditions
|
|
82
|
+
const user = createTestUser({ role: "admin" });
|
|
83
|
+
|
|
84
|
+
// Act - Execute the code under test
|
|
85
|
+
const result = canDeletePost(user, post);
|
|
86
|
+
|
|
87
|
+
// Assert - Verify expected outcome
|
|
88
|
+
expect(result).toBe(true);
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Test Naming
|
|
92
|
+
|
|
93
|
+
Use descriptive names that explain behavior:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
test('returns empty array when no markets match query')
|
|
97
|
+
test('throws error when API key is missing')
|
|
98
|
+
test('falls back to substring search when Redis is unavailable')
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Coverage Requirements
|
|
102
|
+
|
|
103
|
+
| Type | Minimum |
|
|
104
|
+
|------|---------|
|
|
105
|
+
| Unit tests | 80% line coverage |
|
|
106
|
+
| Integration tests | Critical paths covered |
|
|
107
|
+
| E2E tests | Core user flows |
|
|
108
|
+
|
|
109
|
+
## Anti-Patterns
|
|
110
|
+
|
|
111
|
+
| Don't | Do Instead |
|
|
112
|
+
|-------|-----------|
|
|
113
|
+
| Skip the RED phase | Watch test fail first |
|
|
114
|
+
| Write tests after code | Write tests before code |
|
|
115
|
+
| Over-engineer initial implementation | Keep it simple (GREEN) |
|
|
116
|
+
| Multiple asserts per test | One behavior per test |
|
|
117
|
+
| Test implementation details | Test behavior and outcomes |
|
|
118
|
+
| Mock everything | Mock only at boundaries |
|
|
119
|
+
|
|
120
|
+
## AI-Augmented TDD
|
|
121
|
+
|
|
122
|
+
### Multi-Agent Pattern
|
|
123
|
+
|
|
124
|
+
| Agent | Role |
|
|
125
|
+
|-------|------|
|
|
126
|
+
| Agent A | Write failing tests (RED) |
|
|
127
|
+
| Agent B | Implement to pass (GREEN) |
|
|
128
|
+
| Agent C | Review and optimize (REFACTOR) |
|
|
129
|
+
|
|
130
|
+
This separation prevents the bias of writing tests to match existing code.
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verification-loop
|
|
3
|
+
description: Comprehensive verification system - build, type check, lint, test, security scan, diff review. Use after completing features, before PRs, after refactoring.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Verification Loop
|
|
7
|
+
|
|
8
|
+
## When to Activate
|
|
9
|
+
- After completing a feature or significant code change
|
|
10
|
+
- Before creating a PR
|
|
11
|
+
- After refactoring
|
|
12
|
+
- When you want to ensure quality gates pass
|
|
13
|
+
|
|
14
|
+
## Verification Phases
|
|
15
|
+
|
|
16
|
+
### Phase 1: Build Verification
|
|
17
|
+
```bash
|
|
18
|
+
# Check if project builds
|
|
19
|
+
npm run build 2>&1 | tail -20
|
|
20
|
+
# OR: pnpm build / cargo build / go build ./...
|
|
21
|
+
```
|
|
22
|
+
If build fails, STOP and fix before continuing.
|
|
23
|
+
|
|
24
|
+
### Phase 2: Type Check
|
|
25
|
+
```bash
|
|
26
|
+
# TypeScript
|
|
27
|
+
npx tsc --noEmit 2>&1 | head -30
|
|
28
|
+
|
|
29
|
+
# Python
|
|
30
|
+
pyright . 2>&1 | head -30
|
|
31
|
+
# OR: mypy src/
|
|
32
|
+
|
|
33
|
+
# Go
|
|
34
|
+
go vet ./...
|
|
35
|
+
|
|
36
|
+
# Rust
|
|
37
|
+
cargo check
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Phase 3: Lint Check
|
|
41
|
+
```bash
|
|
42
|
+
# JavaScript/TypeScript
|
|
43
|
+
npm run lint 2>&1 | head -30
|
|
44
|
+
|
|
45
|
+
# Python
|
|
46
|
+
ruff check . 2>&1 | head -30
|
|
47
|
+
|
|
48
|
+
# Go
|
|
49
|
+
golangci-lint run
|
|
50
|
+
|
|
51
|
+
# Rust
|
|
52
|
+
cargo clippy
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Phase 4: Test Suite
|
|
56
|
+
```bash
|
|
57
|
+
# Run tests with coverage
|
|
58
|
+
npm run test -- --coverage 2>&1 | tail -50
|
|
59
|
+
# Target: 80% minimum coverage
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Report:
|
|
63
|
+
- Total tests: X
|
|
64
|
+
- Passed: X
|
|
65
|
+
- Failed: X
|
|
66
|
+
- Coverage: X%
|
|
67
|
+
|
|
68
|
+
### Phase 5: Security Scan
|
|
69
|
+
```bash
|
|
70
|
+
# Check for hardcoded secrets
|
|
71
|
+
grep -rn "sk-\|api_key\|password\s*=" --include="*.ts" --include="*.js" src/ 2>/dev/null
|
|
72
|
+
|
|
73
|
+
# Check for console.log in production
|
|
74
|
+
grep -rn "console.log" --include="*.ts" --include="*.tsx" src/ 2>/dev/null
|
|
75
|
+
|
|
76
|
+
# Dependency audit
|
|
77
|
+
npm audit --production
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Phase 6: Diff Review
|
|
81
|
+
```bash
|
|
82
|
+
git diff --stat
|
|
83
|
+
git diff HEAD~1 --name-only
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Review each changed file for:
|
|
87
|
+
- Unintended changes
|
|
88
|
+
- Missing error handling
|
|
89
|
+
- Potential edge cases
|
|
90
|
+
|
|
91
|
+
## Output Format
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
## Verification Report
|
|
95
|
+
|
|
96
|
+
| Phase | Status | Details |
|
|
97
|
+
|-------|--------|---------|
|
|
98
|
+
| Build | PASS/FAIL | ... |
|
|
99
|
+
| Types | PASS/FAIL | X errors |
|
|
100
|
+
| Lint | PASS/FAIL | X warnings |
|
|
101
|
+
| Tests | PASS/FAIL | X/Y passed, Z% coverage |
|
|
102
|
+
| Security | PASS/FAIL | X issues |
|
|
103
|
+
| Diff Review | PASS/FAIL | X files changed |
|
|
104
|
+
|
|
105
|
+
**Verdict:** SHIP IT / NEEDS WORK
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## Rules
|
|
109
|
+
- Never skip a phase
|
|
110
|
+
- Fix build/type errors before running tests
|
|
111
|
+
- Security issues are always CRITICAL
|
|
112
|
+
- Coverage below 80% is a warning, below 60% is a blocker
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cpp-build-resolver
|
|
3
|
+
description: C++ build, CMake, and compilation error resolution specialist. Fixes build errors, linker issues, and template errors with minimal changes. Use when C++ builds fail.
|
|
4
|
+
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# C++ Build Error Resolver
|
|
9
|
+
|
|
10
|
+
You are an expert C++ build error resolution specialist. Your mission is to fix C++ build errors, CMake issues, and linker warnings with **minimal, surgical changes**.
|
|
11
|
+
|
|
12
|
+
## Core Responsibilities
|
|
13
|
+
|
|
14
|
+
1. Diagnose C++ compilation errors
|
|
15
|
+
2. Fix CMake configuration issues
|
|
16
|
+
3. Resolve linker errors (undefined references, multiple definitions)
|
|
17
|
+
4. Handle template instantiation errors
|
|
18
|
+
5. Fix include and dependency problems
|
|
19
|
+
|
|
20
|
+
## Diagnostic Commands
|
|
21
|
+
|
|
22
|
+
Run these in order:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cmake --build build 2>&1 | head -100
|
|
26
|
+
cmake -B build -S . 2>&1 | tail -30
|
|
27
|
+
clang-tidy src/*.cpp -- -std=c++17 2>/dev/null || echo "clang-tidy not available"
|
|
28
|
+
cppcheck --enable=all src/ 2>/dev/null || echo "cppcheck not available"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Resolution Workflow
|
|
32
|
+
|
|
33
|
+
```text
|
|
34
|
+
1. cmake --build build -> Parse error message
|
|
35
|
+
2. Read affected file -> Understand context
|
|
36
|
+
3. Apply minimal fix -> Only what's needed
|
|
37
|
+
4. cmake --build build -> Verify fix
|
|
38
|
+
5. ctest --test-dir build -> Ensure nothing broke
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Common Fix Patterns
|
|
42
|
+
|
|
43
|
+
| Error | Cause | Fix |
|
|
44
|
+
|-------|-------|-----|
|
|
45
|
+
| `undefined reference to X` | Missing implementation or library | Add source file or link library |
|
|
46
|
+
| `no matching function for call` | Wrong argument types | Fix types or add overload |
|
|
47
|
+
| `expected ';'` | Syntax error | Fix syntax |
|
|
48
|
+
| `use of undeclared identifier` | Missing include or typo | Add `#include` or fix name |
|
|
49
|
+
| `multiple definition of` | Duplicate symbol | Use `inline`, move to .cpp, or add include guard |
|
|
50
|
+
| `cannot convert X to Y` | Type mismatch | Add cast or fix types |
|
|
51
|
+
| `incomplete type` | Forward declaration used where full type needed | Add `#include` |
|
|
52
|
+
| `template argument deduction failed` | Wrong template args | Fix template parameters |
|
|
53
|
+
| `no member named X in Y` | Typo or wrong class | Fix member name |
|
|
54
|
+
| `CMake Error` | Configuration issue | Fix CMakeLists.txt |
|
|
55
|
+
|
|
56
|
+
## CMake Troubleshooting
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
cmake -B build -S . -DCMAKE_VERBOSE_MAKEFILE=ON
|
|
60
|
+
cmake --build build --verbose
|
|
61
|
+
cmake --build build --clean-first
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Key Principles
|
|
65
|
+
|
|
66
|
+
- **Surgical fixes only** -- don't refactor, just fix the error
|
|
67
|
+
- **Never** suppress warnings with `#pragma` without approval
|
|
68
|
+
- **Never** change function signatures unless necessary
|
|
69
|
+
- Fix root cause over suppressing symptoms
|
|
70
|
+
- One fix at a time, verify after each
|
|
71
|
+
|
|
72
|
+
## Stop Conditions
|
|
73
|
+
|
|
74
|
+
Stop and report if:
|
|
75
|
+
- Same error persists after 3 fix attempts
|
|
76
|
+
- Fix introduces more errors than it resolves
|
|
77
|
+
- Error requires architectural changes beyond scope
|
|
78
|
+
|
|
79
|
+
## Output Format
|
|
80
|
+
|
|
81
|
+
```text
|
|
82
|
+
[FIXED] src/handler/user.cpp:42
|
|
83
|
+
Error: undefined reference to `UserService::create`
|
|
84
|
+
Fix: Added missing method implementation in user_service.cpp
|
|
85
|
+
Remaining errors: 3
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Final: `Build Status: SUCCESS/FAILED | Errors Fixed: N | Files Modified: list`
|
|
89
|
+
|
|
90
|
+
For detailed C++ patterns and code examples, see `skill: cpp-coding-standards`.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cpp-reviewer
|
|
3
|
+
description: Expert C++ code reviewer specializing in memory safety, modern C++ idioms, concurrency, and performance. Use for all C++ code changes. MUST BE USED for C++ projects.
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a senior C++ code reviewer ensuring high standards of modern C++ and best practices.
|
|
9
|
+
|
|
10
|
+
When invoked:
|
|
11
|
+
1. Run `git diff -- '*.cpp' '*.hpp' '*.cc' '*.hh' '*.cxx' '*.h'` to see recent C++ file changes
|
|
12
|
+
2. Run `clang-tidy` and `cppcheck` if available
|
|
13
|
+
3. Focus on modified C++ files
|
|
14
|
+
4. Begin review immediately
|
|
15
|
+
|
|
16
|
+
## Review Priorities
|
|
17
|
+
|
|
18
|
+
### CRITICAL -- Memory Safety
|
|
19
|
+
- **Raw new/delete**: Use `std::unique_ptr` or `std::shared_ptr`
|
|
20
|
+
- **Buffer overflows**: C-style arrays, `strcpy`, `sprintf` without bounds
|
|
21
|
+
- **Use-after-free**: Dangling pointers, invalidated iterators
|
|
22
|
+
- **Uninitialized variables**: Reading before assignment
|
|
23
|
+
- **Memory leaks**: Missing RAII, resources not tied to object lifetime
|
|
24
|
+
- **Null dereference**: Pointer access without null check
|
|
25
|
+
|
|
26
|
+
### CRITICAL -- Security
|
|
27
|
+
- **Command injection**: Unvalidated input in `system()` or `popen()`
|
|
28
|
+
- **Format string attacks**: User input in `printf` format string
|
|
29
|
+
- **Integer overflow**: Unchecked arithmetic on untrusted input
|
|
30
|
+
- **Hardcoded secrets**: API keys, passwords in source
|
|
31
|
+
- **Unsafe casts**: `reinterpret_cast` without justification
|
|
32
|
+
|
|
33
|
+
### HIGH -- Concurrency
|
|
34
|
+
- **Data races**: Shared mutable state without synchronization
|
|
35
|
+
- **Deadlocks**: Multiple mutexes locked in inconsistent order
|
|
36
|
+
- **Missing lock guards**: Manual `lock()`/`unlock()` instead of `std::lock_guard`
|
|
37
|
+
- **Detached threads**: `std::thread` without `join()` or `detach()`
|
|
38
|
+
|
|
39
|
+
### HIGH -- Code Quality
|
|
40
|
+
- **No RAII**: Manual resource management
|
|
41
|
+
- **Rule of Five violations**: Incomplete special member functions
|
|
42
|
+
- **Large functions**: Over 50 lines
|
|
43
|
+
- **Deep nesting**: More than 4 levels
|
|
44
|
+
- **C-style code**: `malloc`, C arrays, `typedef` instead of `using`
|
|
45
|
+
|
|
46
|
+
### MEDIUM -- Performance
|
|
47
|
+
- **Unnecessary copies**: Pass large objects by value instead of `const&`
|
|
48
|
+
- **Missing move semantics**: Not using `std::move` for sink parameters
|
|
49
|
+
- **String concatenation in loops**: Use `std::ostringstream` or `reserve()`
|
|
50
|
+
- **Missing `reserve()`**: Known-size vector without pre-allocation
|
|
51
|
+
|
|
52
|
+
### MEDIUM -- Best Practices
|
|
53
|
+
- **`const` correctness**: Missing `const` on methods, parameters, references
|
|
54
|
+
- **`auto` overuse/underuse**: Balance readability with type deduction
|
|
55
|
+
- **Include hygiene**: Missing include guards, unnecessary includes
|
|
56
|
+
- **Namespace pollution**: `using namespace std;` in headers
|
|
57
|
+
|
|
58
|
+
## Diagnostic Commands
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
clang-tidy --checks='*,-llvmlibc-*' src/*.cpp -- -std=c++17
|
|
62
|
+
cppcheck --enable=all --suppress=missingIncludeSystem src/
|
|
63
|
+
cmake --build build 2>&1 | head -50
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Approval Criteria
|
|
67
|
+
|
|
68
|
+
- **Approve**: No CRITICAL or HIGH issues
|
|
69
|
+
- **Warning**: MEDIUM issues only
|
|
70
|
+
- **Block**: CRITICAL or HIGH issues found
|
|
71
|
+
|
|
72
|
+
For detailed C++ coding standards and anti-patterns, see `skill: cpp-coding-standards`.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name: cpp
|
|
2
|
+
version: 0.1.0
|
|
3
|
+
description: C++ development - coding standards, testing, code review, build error resolution
|
|
4
|
+
depends:
|
|
5
|
+
- common
|
|
6
|
+
tags:
|
|
7
|
+
- cpp
|
|
8
|
+
- cmake
|
|
9
|
+
rules: []
|
|
10
|
+
skills:
|
|
11
|
+
- skills/cpp-coding-standards.md
|
|
12
|
+
- skills/cpp-testing.md
|
|
13
|
+
agents:
|
|
14
|
+
- agents/cpp-reviewer.md
|
|
15
|
+
- agents/cpp-build-resolver.md
|