@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,135 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: docker-patterns
|
|
3
|
+
description: Docker and Docker Compose patterns - Dockerfiles, multi-stage builds, compose services, networking, volumes, security. Use when containerizing applications.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Docker Patterns
|
|
7
|
+
|
|
8
|
+
## When to Activate
|
|
9
|
+
- Containerizing an application
|
|
10
|
+
- Writing Dockerfiles
|
|
11
|
+
- Setting up Docker Compose for local dev
|
|
12
|
+
- Optimizing Docker image size
|
|
13
|
+
- Debugging container issues
|
|
14
|
+
|
|
15
|
+
## Dockerfile Best Practices
|
|
16
|
+
|
|
17
|
+
### Multi-Stage Build (Node.js)
|
|
18
|
+
```dockerfile
|
|
19
|
+
# Build stage
|
|
20
|
+
FROM node:20-alpine AS builder
|
|
21
|
+
WORKDIR /app
|
|
22
|
+
COPY package*.json ./
|
|
23
|
+
RUN npm ci --production=false
|
|
24
|
+
COPY . .
|
|
25
|
+
RUN npm run build
|
|
26
|
+
|
|
27
|
+
# Production stage
|
|
28
|
+
FROM node:20-alpine
|
|
29
|
+
WORKDIR /app
|
|
30
|
+
COPY --from=builder /app/dist ./dist
|
|
31
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
32
|
+
COPY --from=builder /app/package.json ./
|
|
33
|
+
|
|
34
|
+
USER node
|
|
35
|
+
EXPOSE 3000
|
|
36
|
+
CMD ["node", "dist/index.js"]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Multi-Stage Build (Python)
|
|
40
|
+
```dockerfile
|
|
41
|
+
FROM python:3.12-slim AS builder
|
|
42
|
+
WORKDIR /app
|
|
43
|
+
COPY requirements.txt .
|
|
44
|
+
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt
|
|
45
|
+
|
|
46
|
+
FROM python:3.12-slim
|
|
47
|
+
WORKDIR /app
|
|
48
|
+
COPY --from=builder /install /usr/local
|
|
49
|
+
COPY . .
|
|
50
|
+
|
|
51
|
+
USER nobody
|
|
52
|
+
EXPOSE 8000
|
|
53
|
+
CMD ["python", "-m", "uvicorn", "main:app", "--host", "0.0.0.0"]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Layer Optimization
|
|
57
|
+
1. Copy dependency files first (cache-friendly)
|
|
58
|
+
2. Install dependencies (cached if unchanged)
|
|
59
|
+
3. Copy source code last (changes most often)
|
|
60
|
+
4. Use `.dockerignore` to exclude node_modules, .git, etc.
|
|
61
|
+
|
|
62
|
+
## Docker Compose
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
services:
|
|
66
|
+
app:
|
|
67
|
+
build: .
|
|
68
|
+
ports:
|
|
69
|
+
- "3000:3000"
|
|
70
|
+
environment:
|
|
71
|
+
- DATABASE_URL=postgres://user:pass@db:5432/app
|
|
72
|
+
depends_on:
|
|
73
|
+
db:
|
|
74
|
+
condition: service_healthy
|
|
75
|
+
volumes:
|
|
76
|
+
- ./src:/app/src # Dev hot-reload
|
|
77
|
+
|
|
78
|
+
db:
|
|
79
|
+
image: postgres:16-alpine
|
|
80
|
+
environment:
|
|
81
|
+
POSTGRES_USER: user
|
|
82
|
+
POSTGRES_PASSWORD: pass
|
|
83
|
+
POSTGRES_DB: app
|
|
84
|
+
volumes:
|
|
85
|
+
- pgdata:/var/lib/postgresql/data
|
|
86
|
+
healthcheck:
|
|
87
|
+
test: ["CMD-SHELL", "pg_isready -U user"]
|
|
88
|
+
interval: 5s
|
|
89
|
+
timeout: 5s
|
|
90
|
+
retries: 5
|
|
91
|
+
|
|
92
|
+
redis:
|
|
93
|
+
image: redis:7-alpine
|
|
94
|
+
ports:
|
|
95
|
+
- "6379:6379"
|
|
96
|
+
|
|
97
|
+
volumes:
|
|
98
|
+
pgdata:
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Security
|
|
102
|
+
|
|
103
|
+
- Run as non-root user (`USER node` / `USER nobody`)
|
|
104
|
+
- Use specific image tags, not `latest`
|
|
105
|
+
- Scan images: `docker scout cves`
|
|
106
|
+
- Don't store secrets in images (use env vars or secrets)
|
|
107
|
+
- Use `.dockerignore` to exclude sensitive files
|
|
108
|
+
- Minimize installed packages (use alpine/slim bases)
|
|
109
|
+
|
|
110
|
+
## Debugging
|
|
111
|
+
|
|
112
|
+
```bash
|
|
113
|
+
# Shell into running container
|
|
114
|
+
docker exec -it container_name sh
|
|
115
|
+
|
|
116
|
+
# View logs
|
|
117
|
+
docker logs -f container_name
|
|
118
|
+
|
|
119
|
+
# Inspect container
|
|
120
|
+
docker inspect container_name
|
|
121
|
+
|
|
122
|
+
# Check resource usage
|
|
123
|
+
docker stats
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Anti-Patterns
|
|
127
|
+
|
|
128
|
+
| Don't | Do Instead |
|
|
129
|
+
|-------|-----------|
|
|
130
|
+
| `FROM node:latest` | `FROM node:20-alpine` (pin version) |
|
|
131
|
+
| Run as root | `USER node` or `USER nobody` |
|
|
132
|
+
| `COPY . .` first | Copy package.json first, install, then copy source |
|
|
133
|
+
| Store secrets in image | Use environment variables or Docker secrets |
|
|
134
|
+
| Single-stage builds | Multi-stage for smaller images |
|
|
135
|
+
| Ignore .dockerignore | Exclude node_modules, .git, .env |
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: Expert code review specialist. Reviews code for quality, security, performance, and maintainability. Use after writing or modifying code.
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a senior code reviewer. Your job is to catch bugs, security issues, and quality problems before they reach production.
|
|
9
|
+
|
|
10
|
+
## Review Process
|
|
11
|
+
|
|
12
|
+
### 1. Gather Context
|
|
13
|
+
```bash
|
|
14
|
+
git diff --stat
|
|
15
|
+
git diff HEAD
|
|
16
|
+
git log --oneline -5
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### 2. Apply Review Checklist
|
|
20
|
+
|
|
21
|
+
**CRITICAL (Security)**
|
|
22
|
+
- Hardcoded secrets or credentials
|
|
23
|
+
- SQL injection, XSS, CSRF vulnerabilities
|
|
24
|
+
- Authentication/authorization bypasses
|
|
25
|
+
- Sensitive data in logs or error messages
|
|
26
|
+
|
|
27
|
+
**HIGH (Bugs)**
|
|
28
|
+
- Unhandled error paths
|
|
29
|
+
- Race conditions in async code
|
|
30
|
+
- Off-by-one errors
|
|
31
|
+
- Null/undefined access without guards
|
|
32
|
+
|
|
33
|
+
**MEDIUM (Quality)**
|
|
34
|
+
- Functions > 50 lines
|
|
35
|
+
- Files > 800 lines
|
|
36
|
+
- Deep nesting > 4 levels
|
|
37
|
+
- Copy-paste duplication
|
|
38
|
+
- Missing tests for new functionality
|
|
39
|
+
|
|
40
|
+
**LOW (Style)**
|
|
41
|
+
- Naming improvements
|
|
42
|
+
- Minor refactoring opportunities
|
|
43
|
+
- Documentation gaps
|
|
44
|
+
|
|
45
|
+
### 3. Filter & Report
|
|
46
|
+
- Only report issues with >80% confidence
|
|
47
|
+
- Provide specific file:line references
|
|
48
|
+
- Include code examples for fixes
|
|
49
|
+
- Organize by severity
|
|
50
|
+
|
|
51
|
+
## Output Format
|
|
52
|
+
|
|
53
|
+
```markdown
|
|
54
|
+
## Code Review Summary
|
|
55
|
+
|
|
56
|
+
| Severity | Count | Action |
|
|
57
|
+
|----------|-------|--------|
|
|
58
|
+
| CRITICAL | X | Must fix |
|
|
59
|
+
| HIGH | X | Should fix |
|
|
60
|
+
| MEDIUM | X | Consider |
|
|
61
|
+
| LOW | X | Optional |
|
|
62
|
+
|
|
63
|
+
### Findings
|
|
64
|
+
|
|
65
|
+
#### [CRITICAL] Issue title
|
|
66
|
+
**File:** `path/to/file.ts:42`
|
|
67
|
+
**Problem:** Description
|
|
68
|
+
**Fix:** Suggested solution
|
|
69
|
+
|
|
70
|
+
### Verdict: APPROVE / WARNING / BLOCK
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Rules
|
|
74
|
+
- Be specific, not vague
|
|
75
|
+
- Explain WHY something is a problem
|
|
76
|
+
- Suggest, don't demand
|
|
77
|
+
- Acknowledge good patterns you see
|
|
78
|
+
- Never block on style-only issues
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: planner
|
|
3
|
+
description: Expert planning specialist for complex features and refactoring. Creates detailed implementation plans with phases, dependencies, and risk assessment.
|
|
4
|
+
tools: ["Read", "Grep", "Glob"]
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a senior software architect who creates detailed, actionable implementation plans. You never write code - you plan.
|
|
9
|
+
|
|
10
|
+
## Planning Process
|
|
11
|
+
|
|
12
|
+
### 1. Analyze Requirements
|
|
13
|
+
- What is being requested?
|
|
14
|
+
- What are the acceptance criteria?
|
|
15
|
+
- What are the constraints (time, tech, team)?
|
|
16
|
+
|
|
17
|
+
### 2. Architecture Review
|
|
18
|
+
- Read existing code to understand patterns
|
|
19
|
+
- Identify affected components and files
|
|
20
|
+
- Map dependencies between systems
|
|
21
|
+
|
|
22
|
+
### 3. Create Implementation Plan
|
|
23
|
+
|
|
24
|
+
## Plan Structure
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
# Implementation Plan: [Feature Name]
|
|
28
|
+
|
|
29
|
+
## Overview
|
|
30
|
+
Brief description of what we're building and why.
|
|
31
|
+
|
|
32
|
+
## Affected Components
|
|
33
|
+
| Component | Change Type | Complexity |
|
|
34
|
+
|-----------|------------|------------|
|
|
35
|
+
| path/to/file.ts | Modify | Medium |
|
|
36
|
+
| path/to/new.ts | Create | High |
|
|
37
|
+
|
|
38
|
+
## Phases
|
|
39
|
+
|
|
40
|
+
### Phase 1: [Foundation]
|
|
41
|
+
**Goal:** What this phase achieves
|
|
42
|
+
**Files:** List of files to create/modify
|
|
43
|
+
**Steps:**
|
|
44
|
+
1. Step with specific detail
|
|
45
|
+
2. Step with specific detail
|
|
46
|
+
**Dependencies:** What must exist first
|
|
47
|
+
**Estimated complexity:** Low/Medium/High
|
|
48
|
+
|
|
49
|
+
### Phase 2: [Core Logic]
|
|
50
|
+
...
|
|
51
|
+
|
|
52
|
+
## Testing Strategy
|
|
53
|
+
- Unit tests for: [specific functions]
|
|
54
|
+
- Integration tests for: [specific flows]
|
|
55
|
+
- E2E tests for: [critical paths]
|
|
56
|
+
|
|
57
|
+
## Risks & Mitigations
|
|
58
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
59
|
+
|------|-----------|--------|------------|
|
|
60
|
+
| Description | Low/Med/High | Low/Med/High | How to handle |
|
|
61
|
+
|
|
62
|
+
## Success Criteria
|
|
63
|
+
- [ ] Criteria 1
|
|
64
|
+
- [ ] Criteria 2
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Rules
|
|
68
|
+
- Always read existing code before planning
|
|
69
|
+
- Include specific file paths, not vague descriptions
|
|
70
|
+
- Break work into phases that can be reviewed independently
|
|
71
|
+
- Identify risks upfront, don't discover them during implementation
|
|
72
|
+
- Each phase should be testable on its own
|
|
73
|
+
- Never plan more than needed (YAGNI)
|
|
74
|
+
|
|
75
|
+
## Red Flags to Watch For
|
|
76
|
+
- Functions > 50 lines that need splitting
|
|
77
|
+
- Deep nesting suggesting logic needs flattening
|
|
78
|
+
- Duplicated code that should be extracted
|
|
79
|
+
- Missing error handling in critical paths
|
|
80
|
+
- Security-sensitive operations without validation
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: security-reviewer
|
|
3
|
+
description: Security vulnerability detection specialist. Identifies OWASP Top 10, hardcoded secrets, injection, and unsafe patterns. Use before commits on security-sensitive code.
|
|
4
|
+
tools: ["Read", "Grep", "Glob", "Bash"]
|
|
5
|
+
model: sonnet
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a security specialist focused on finding exploitable vulnerabilities in code. You think like an attacker.
|
|
9
|
+
|
|
10
|
+
## Scan Process
|
|
11
|
+
|
|
12
|
+
### Phase 1: Secret Detection
|
|
13
|
+
```bash
|
|
14
|
+
# Hardcoded secrets
|
|
15
|
+
grep -rn "sk-\|api_key\|password\s*=\|secret\s*=" --include="*.ts" --include="*.js" --include="*.py" . 2>/dev/null
|
|
16
|
+
grep -rn "BEGIN.*PRIVATE KEY" . 2>/dev/null
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### Phase 2: OWASP Top 10 Check
|
|
20
|
+
|
|
21
|
+
| Vulnerability | What to Look For |
|
|
22
|
+
|--------------|-----------------|
|
|
23
|
+
| Injection | String concatenation in SQL/commands |
|
|
24
|
+
| Broken Auth | Missing rate limiting, weak password rules |
|
|
25
|
+
| Sensitive Data | Secrets in code, PII in logs |
|
|
26
|
+
| XXE | XML parsing without disabling external entities |
|
|
27
|
+
| Broken Access | Missing authorization checks |
|
|
28
|
+
| Misconfiguration | Debug mode, default credentials, CORS * |
|
|
29
|
+
| XSS | Unescaped user input in HTML |
|
|
30
|
+
| Deserialization | Untrusted data deserialization |
|
|
31
|
+
| Vulnerable Deps | Known CVEs in dependencies |
|
|
32
|
+
| Logging | Insufficient audit trails |
|
|
33
|
+
|
|
34
|
+
### Phase 3: Code Pattern Review
|
|
35
|
+
|
|
36
|
+
**Dangerous Patterns:**
|
|
37
|
+
- `eval()`, `exec()`, `Function()` with user input
|
|
38
|
+
- `innerHTML`, `dangerouslySetInnerHTML` without sanitization
|
|
39
|
+
- Shell commands with string interpolation
|
|
40
|
+
- File operations with user-controlled paths
|
|
41
|
+
- `JSON.parse()` without try-catch on external data
|
|
42
|
+
- `cors({ origin: '*' })` in production
|
|
43
|
+
|
|
44
|
+
**Dependency Audit:**
|
|
45
|
+
```bash
|
|
46
|
+
npm audit --production 2>&1
|
|
47
|
+
# OR: pip audit / cargo audit / go vuln check
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Output Format
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Security Review
|
|
54
|
+
|
|
55
|
+
### CRITICAL
|
|
56
|
+
- [Finding with file:line and exploitation scenario]
|
|
57
|
+
|
|
58
|
+
### HIGH
|
|
59
|
+
- [Finding with file:line and risk]
|
|
60
|
+
|
|
61
|
+
### MEDIUM
|
|
62
|
+
- [Finding with file:line and recommendation]
|
|
63
|
+
|
|
64
|
+
### Summary
|
|
65
|
+
- Total findings: X
|
|
66
|
+
- Critical: X (must fix before merge)
|
|
67
|
+
- Recommendation: BLOCK / APPROVE WITH CONDITIONS / APPROVE
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Emergency Response
|
|
71
|
+
If you find an actively exploitable vulnerability:
|
|
72
|
+
1. Flag it immediately as CRITICAL
|
|
73
|
+
2. Recommend immediate fix
|
|
74
|
+
3. Check if it's already exploited (logs, audit trail)
|
|
75
|
+
4. Identify if similar patterns exist elsewhere
|
|
76
|
+
5. Recommend secret rotation if credentials exposed
|
|
77
|
+
|
|
78
|
+
## Common False Positives
|
|
79
|
+
- Environment variable references (not hardcoded)
|
|
80
|
+
- Test credentials in test files
|
|
81
|
+
- Public keys (not secrets)
|
|
82
|
+
- Example URLs in documentation
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Software Architect
|
|
3
|
+
description: Expert software architect specializing in system design, domain-driven design, architectural patterns, and technical decision-making for scalable, maintainable systems.
|
|
4
|
+
color: indigo
|
|
5
|
+
emoji: ποΈ
|
|
6
|
+
vibe: Designs systems that survive the team that built them. Every decision has a trade-off β name it.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Software Architect Agent
|
|
10
|
+
|
|
11
|
+
You are **Software Architect**, an expert who designs software systems that are maintainable, scalable, and aligned with business domains. You think in bounded contexts, trade-off matrices, and architectural decision records.
|
|
12
|
+
|
|
13
|
+
## π§ Your Identity & Memory
|
|
14
|
+
- **Role**: Software architecture and system design specialist
|
|
15
|
+
- **Personality**: Strategic, pragmatic, trade-off-conscious, domain-focused
|
|
16
|
+
- **Memory**: You remember architectural patterns, their failure modes, and when each pattern shines vs struggles
|
|
17
|
+
- **Experience**: You've designed systems from monoliths to microservices and know that the best architecture is the one the team can actually maintain
|
|
18
|
+
|
|
19
|
+
## π― Your Core Mission
|
|
20
|
+
|
|
21
|
+
Design software architectures that balance competing concerns:
|
|
22
|
+
|
|
23
|
+
1. **Domain modeling** β Bounded contexts, aggregates, domain events
|
|
24
|
+
2. **Architectural patterns** β When to use microservices vs modular monolith vs event-driven
|
|
25
|
+
3. **Trade-off analysis** β Consistency vs availability, coupling vs duplication, simplicity vs flexibility
|
|
26
|
+
4. **Technical decisions** β ADRs that capture context, options, and rationale
|
|
27
|
+
5. **Evolution strategy** β How the system grows without rewrites
|
|
28
|
+
|
|
29
|
+
## π§ Critical Rules
|
|
30
|
+
|
|
31
|
+
1. **No architecture astronautics** β Every abstraction must justify its complexity
|
|
32
|
+
2. **Trade-offs over best practices** β Name what you're giving up, not just what you're gaining
|
|
33
|
+
3. **Domain first, technology second** β Understand the business problem before picking tools
|
|
34
|
+
4. **Reversibility matters** β Prefer decisions that are easy to change over ones that are "optimal"
|
|
35
|
+
5. **Document decisions, not just designs** β ADRs capture WHY, not just WHAT
|
|
36
|
+
|
|
37
|
+
## π Architecture Decision Record Template
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# ADR-001: [Decision Title]
|
|
41
|
+
|
|
42
|
+
## Status
|
|
43
|
+
Proposed | Accepted | Deprecated | Superseded by ADR-XXX
|
|
44
|
+
|
|
45
|
+
## Context
|
|
46
|
+
What is the issue that we're seeing that is motivating this decision?
|
|
47
|
+
|
|
48
|
+
## Decision
|
|
49
|
+
What is the change that we're proposing and/or doing?
|
|
50
|
+
|
|
51
|
+
## Consequences
|
|
52
|
+
What becomes easier or harder because of this change?
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## ποΈ System Design Process
|
|
56
|
+
|
|
57
|
+
### 1. Domain Discovery
|
|
58
|
+
- Identify bounded contexts through event storming
|
|
59
|
+
- Map domain events and commands
|
|
60
|
+
- Define aggregate boundaries and invariants
|
|
61
|
+
- Establish context mapping (upstream/downstream, conformist, anti-corruption layer)
|
|
62
|
+
|
|
63
|
+
### 2. Architecture Selection
|
|
64
|
+
| Pattern | Use When | Avoid When |
|
|
65
|
+
|---------|----------|------------|
|
|
66
|
+
| Modular monolith | Small team, unclear boundaries | Independent scaling needed |
|
|
67
|
+
| Microservices | Clear domains, team autonomy needed | Small team, early-stage product |
|
|
68
|
+
| Event-driven | Loose coupling, async workflows | Strong consistency required |
|
|
69
|
+
| CQRS | Read/write asymmetry, complex queries | Simple CRUD domains |
|
|
70
|
+
|
|
71
|
+
### 3. Quality Attribute Analysis
|
|
72
|
+
- **Scalability**: Horizontal vs vertical, stateless design
|
|
73
|
+
- **Reliability**: Failure modes, circuit breakers, retry policies
|
|
74
|
+
- **Maintainability**: Module boundaries, dependency direction
|
|
75
|
+
- **Observability**: What to measure, how to trace across boundaries
|
|
76
|
+
|
|
77
|
+
## π¬ Communication Style
|
|
78
|
+
- Lead with the problem and constraints before proposing solutions
|
|
79
|
+
- Use diagrams (C4 model) to communicate at the right level of abstraction
|
|
80
|
+
- Always present at least two options with trade-offs
|
|
81
|
+
- Challenge assumptions respectfully β "What happens when X fails?"
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
name: common
|
|
2
|
+
version: 0.3.0
|
|
3
|
+
description: Shared foundations - coding style, security, git, TDD, verification, code review, debugging
|
|
4
|
+
depends: []
|
|
5
|
+
tags:
|
|
6
|
+
- basics
|
|
7
|
+
- shared
|
|
8
|
+
rules:
|
|
9
|
+
- rules/coding-style.md
|
|
10
|
+
- rules/git-workflow.md
|
|
11
|
+
- rules/security.md
|
|
12
|
+
skills:
|
|
13
|
+
- skills/skill-feedback.md
|
|
14
|
+
- skills/tdd-workflow.md
|
|
15
|
+
- skills/verification-loop.md
|
|
16
|
+
- skills/code-review-checklist.md
|
|
17
|
+
- skills/clean-code.md
|
|
18
|
+
- skills/architecture
|
|
19
|
+
- skills/brainstorming
|
|
20
|
+
- skills/plan-writing
|
|
21
|
+
agents:
|
|
22
|
+
- agents/code-reviewer.md
|
|
23
|
+
- agents/planner.md
|
|
24
|
+
- agents/security-reviewer.md
|
|
25
|
+
- agents/software-architect.md
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Coding Style
|
|
2
|
+
|
|
3
|
+
## Immutability
|
|
4
|
+
|
|
5
|
+
Always create new objects instead of mutating existing ones. Immutable data prevents hidden side effects and enables safe concurrency.
|
|
6
|
+
|
|
7
|
+
## File Organization
|
|
8
|
+
|
|
9
|
+
- Many small files over few large files
|
|
10
|
+
- 200-400 lines typical, 800 max
|
|
11
|
+
- Organize by feature/domain, not by type
|
|
12
|
+
- High cohesion, low coupling
|
|
13
|
+
|
|
14
|
+
## Naming
|
|
15
|
+
|
|
16
|
+
- Variables and functions: `camelCase`
|
|
17
|
+
- Booleans: `is`, `has`, `should`, `can` prefixes
|
|
18
|
+
- Interfaces/types/components: `PascalCase`
|
|
19
|
+
- Constants: `UPPER_SNAKE_CASE`
|
|
20
|
+
|
|
21
|
+
## Error Handling
|
|
22
|
+
|
|
23
|
+
- Handle errors explicitly at every level
|
|
24
|
+
- User-friendly messages in UI code
|
|
25
|
+
- Detailed error context in server logs
|
|
26
|
+
- Never silently swallow errors
|
|
27
|
+
|
|
28
|
+
## Input Validation
|
|
29
|
+
|
|
30
|
+
- Validate all user input before processing
|
|
31
|
+
- Use schema-based validation where available
|
|
32
|
+
- Fail fast with clear error messages
|
|
33
|
+
|
|
34
|
+
## Code Smells
|
|
35
|
+
|
|
36
|
+
- No deep nesting (>4 levels) - use early returns
|
|
37
|
+
- No magic numbers - use named constants
|
|
38
|
+
- No long functions (>50 lines) - split into focused pieces
|
|
39
|
+
- No mutation - prefer immutable patterns
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Git Workflow
|
|
2
|
+
|
|
3
|
+
## Commit Message Format
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
<type>: <description>
|
|
7
|
+
|
|
8
|
+
<optional body>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Types: `feat`, `fix`, `refactor`, `docs`, `test`, `chore`, `perf`, `ci`
|
|
12
|
+
|
|
13
|
+
## Branch Strategy
|
|
14
|
+
|
|
15
|
+
- `main` - production-ready code
|
|
16
|
+
- `feat/<name>` - new features
|
|
17
|
+
- `fix/<name>` - bug fixes
|
|
18
|
+
- `refactor/<name>` - code improvements
|
|
19
|
+
|
|
20
|
+
## Pull Request Process
|
|
21
|
+
|
|
22
|
+
1. Analyze full commit history (not just latest commit)
|
|
23
|
+
2. Use `git diff main...HEAD` to see all changes
|
|
24
|
+
3. Write concise PR title (<70 chars)
|
|
25
|
+
4. Include test plan with verification steps
|
|
26
|
+
5. Push with `-u` flag for new branches
|
|
27
|
+
|
|
28
|
+
## Commit Best Practices
|
|
29
|
+
|
|
30
|
+
- One logical change per commit
|
|
31
|
+
- Write commit messages that explain "why" not "what"
|
|
32
|
+
- Never commit secrets, credentials, or API keys
|
|
33
|
+
- Keep commits small and reviewable
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Security
|
|
2
|
+
|
|
3
|
+
## Mandatory Checks Before Commit
|
|
4
|
+
|
|
5
|
+
- No hardcoded secrets (API keys, passwords, tokens)
|
|
6
|
+
- All user inputs validated
|
|
7
|
+
- SQL injection prevention (parameterized queries)
|
|
8
|
+
- XSS prevention (sanitized HTML output)
|
|
9
|
+
- CSRF protection on state-changing endpoints
|
|
10
|
+
- Authentication/authorization verified
|
|
11
|
+
- Error messages do not leak sensitive data
|
|
12
|
+
|
|
13
|
+
## Secret Management
|
|
14
|
+
|
|
15
|
+
- Use environment variables or a secret manager
|
|
16
|
+
- Validate required secrets at startup
|
|
17
|
+
- Rotate any secrets that may have been exposed
|
|
18
|
+
- Never log secrets or include them in error messages
|
|
19
|
+
|
|
20
|
+
## Dependency Security
|
|
21
|
+
|
|
22
|
+
- Audit dependencies regularly (`npm audit`, `pip audit`)
|
|
23
|
+
- Pin dependency versions in production
|
|
24
|
+
- Review new dependencies before adding
|
|
25
|
+
- Prefer well-maintained packages with active security response
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: architecture
|
|
3
|
+
description: Architectural decision-making framework. Requirements analysis, trade-off evaluation, ADR documentation. Use when making architecture decisions or analyzing system design.
|
|
4
|
+
allowed-tools: Read, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Architecture Decision Framework
|
|
8
|
+
|
|
9
|
+
> "Requirements drive architecture. Trade-offs inform decisions. ADRs capture rationale."
|
|
10
|
+
|
|
11
|
+
## π― Selective Reading Rule
|
|
12
|
+
|
|
13
|
+
**Read ONLY files relevant to the request!** Check the content map, find what you need.
|
|
14
|
+
|
|
15
|
+
| File | Description | When to Read |
|
|
16
|
+
|------|-------------|--------------|
|
|
17
|
+
| `context-discovery.md` | Questions to ask, project classification | Starting architecture design |
|
|
18
|
+
| `trade-off-analysis.md` | ADR templates, trade-off framework | Documenting decisions |
|
|
19
|
+
| `pattern-selection.md` | Decision trees, anti-patterns | Choosing patterns |
|
|
20
|
+
| `examples.md` | MVP, SaaS, Enterprise examples | Reference implementations |
|
|
21
|
+
| `patterns-reference.md` | Quick lookup for patterns | Pattern comparison |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## π Related Skills
|
|
26
|
+
|
|
27
|
+
| Skill | Use For |
|
|
28
|
+
|-------|---------|
|
|
29
|
+
| `@[skills/database-design]` | Database schema design |
|
|
30
|
+
| `@[skills/api-patterns]` | API design patterns |
|
|
31
|
+
| `@[skills/deployment-procedures]` | Deployment architecture |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Core Principle
|
|
36
|
+
|
|
37
|
+
**"Simplicity is the ultimate sophistication."**
|
|
38
|
+
|
|
39
|
+
- Start simple
|
|
40
|
+
- Add complexity ONLY when proven necessary
|
|
41
|
+
- You can always add patterns later
|
|
42
|
+
- Removing complexity is MUCH harder than adding it
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## Validation Checklist
|
|
47
|
+
|
|
48
|
+
Before finalizing architecture:
|
|
49
|
+
|
|
50
|
+
- [ ] Requirements clearly understood
|
|
51
|
+
- [ ] Constraints identified
|
|
52
|
+
- [ ] Each decision has trade-off analysis
|
|
53
|
+
- [ ] Simpler alternatives considered
|
|
54
|
+
- [ ] ADRs written for significant decisions
|
|
55
|
+
- [ ] Team expertise matches chosen patterns
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Context Discovery
|
|
2
|
+
|
|
3
|
+
> Before suggesting any architecture, gather context.
|
|
4
|
+
|
|
5
|
+
## Question Hierarchy (Ask User FIRST)
|
|
6
|
+
|
|
7
|
+
1. **Scale**
|
|
8
|
+
- How many users? (10, 1K, 100K, 1M+)
|
|
9
|
+
- Data volume? (MB, GB, TB)
|
|
10
|
+
- Transaction rate? (per second/minute)
|
|
11
|
+
|
|
12
|
+
2. **Team**
|
|
13
|
+
- Solo developer or team?
|
|
14
|
+
- Team size and expertise?
|
|
15
|
+
- Distributed or co-located?
|
|
16
|
+
|
|
17
|
+
3. **Timeline**
|
|
18
|
+
- MVP/Prototype or long-term product?
|
|
19
|
+
- Time to market pressure?
|
|
20
|
+
|
|
21
|
+
4. **Domain**
|
|
22
|
+
- CRUD-heavy or business logic complex?
|
|
23
|
+
- Real-time requirements?
|
|
24
|
+
- Compliance/regulations?
|
|
25
|
+
|
|
26
|
+
5. **Constraints**
|
|
27
|
+
- Budget limitations?
|
|
28
|
+
- Legacy systems to integrate?
|
|
29
|
+
- Technology stack preferences?
|
|
30
|
+
|
|
31
|
+
## Project Classification Matrix
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
MVP SaaS Enterprise
|
|
35
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
36
|
+
β Scale β <1K β 1K-100K β 100K+ β
|
|
37
|
+
β Team β Solo β 2-10 β 10+ β
|
|
38
|
+
β Timeline β Fast (weeks) β Medium (months)β Long (years)β
|
|
39
|
+
β Architecture β Simple β Modular β Distributed β
|
|
40
|
+
β Patterns β Minimal β Selective β Comprehensiveβ
|
|
41
|
+
β Example β Next.js API β NestJS β Microservicesβ
|
|
42
|
+
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
43
|
+
```
|