ma-agents 1.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/CONTRIBUTING.md +96 -0
- package/LICENSE +20 -0
- package/QUICK_START.md +148 -0
- package/README.md +420 -0
- package/bin/cli.js +198 -0
- package/examples/programmatic-usage.js +62 -0
- package/index.js +20 -0
- package/lib/agents.js +131 -0
- package/lib/installer.js +120 -0
- package/package.json +35 -0
- package/skills/README.md +312 -0
- package/skills/code-review/claude-code.md +64 -0
- package/skills/code-review/cline.md +55 -0
- package/skills/code-review/generic.md +39 -0
- package/skills/code-review/skill.json +7 -0
- package/skills/commit-message/generic.md +75 -0
- package/skills/commit-message/skill.json +7 -0
- package/skills/create-hardened-docker-skill/README.md +85 -0
- package/skills/create-hardened-docker-skill/SKILL.md +638 -0
- package/skills/create-hardened-docker-skill/scripts/create-all.sh +489 -0
- package/skills/create-hardened-docker-skill/skill.json +7 -0
- package/skills/git-workflow-skill/README.md +135 -0
- package/skills/git-workflow-skill/SKILL.md +182 -0
- package/skills/git-workflow-skill/hooks/commit-msg +61 -0
- package/skills/git-workflow-skill/hooks/pre-commit +38 -0
- package/skills/git-workflow-skill/hooks/prepare-commit-msg +56 -0
- package/skills/git-workflow-skill/scripts/finish-feature.sh +192 -0
- package/skills/git-workflow-skill/scripts/install-hooks.sh +55 -0
- package/skills/git-workflow-skill/scripts/start-feature.sh +110 -0
- package/skills/git-workflow-skill/scripts/validate-workflow.sh +229 -0
- package/skills/git-workflow-skill/skill.json +7 -0
- package/skills/js-ts-security-skill/README.md +28 -0
- package/skills/js-ts-security-skill/SKILL.md +64 -0
- package/skills/js-ts-security-skill/scripts/verify-security.sh +136 -0
- package/skills/js-ts-security-skill/skill.json +7 -0
- package/skills/skill-creator/claude-code.md +66 -0
- package/skills/skill-creator/generic.md +197 -0
- package/skills/skill-creator/references/output-patterns.md +82 -0
- package/skills/skill-creator/references/workflows.md +28 -0
- package/skills/skill-creator/scripts/init_skill.py +208 -0
- package/skills/skill-creator/scripts/package_skill.py +99 -0
- package/skills/skill-creator/scripts/quick_validate.py +113 -0
- package/skills/skill-creator/skill.json +8 -0
- package/skills/test-generator/claude-code.md +103 -0
- package/skills/test-generator/cline.md +69 -0
- package/skills/test-generator/generic.md +61 -0
- package/skills/test-generator/skill.json +7 -0
- package/skills/vercel-react-best-practices/claude-code.md +80 -0
- package/skills/vercel-react-best-practices/generic.md +105 -0
- package/skills/vercel-react-best-practices/skill.json +8 -0
- package/skills/verify-hardened-docker-skill/README.md +85 -0
- package/skills/verify-hardened-docker-skill/SKILL.md +443 -0
- package/skills/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh +439 -0
- package/skills/verify-hardened-docker-skill/skill.json +7 -0
package/skills/README.md
ADDED
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
# Development Skills
|
|
2
|
+
|
|
3
|
+
This directory contains reusable skills for development workflows.
|
|
4
|
+
|
|
5
|
+
## Available Skills
|
|
6
|
+
|
|
7
|
+
### 1. Git Workflow Skill
|
|
8
|
+
**Directory:** `git-workflow-skill/`
|
|
9
|
+
|
|
10
|
+
Mandatory feature branch workflow for Git operations. Enforces branch creation from dev, conventional commits, automatic PR creation, and returns to dev branch after push.
|
|
11
|
+
|
|
12
|
+
**Usage:**
|
|
13
|
+
```bash
|
|
14
|
+
# Start a new feature
|
|
15
|
+
./git-workflow-skill/scripts/start-feature.sh feature my-feature-name
|
|
16
|
+
|
|
17
|
+
# Finish, push, create PR, and return to dev (all automatic)
|
|
18
|
+
./git-workflow-skill/scripts/finish-feature.sh
|
|
19
|
+
|
|
20
|
+
# Validate workflow
|
|
21
|
+
./git-workflow-skill/scripts/validate-workflow.sh
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
**Key Features:**
|
|
25
|
+
- ✅ Enforces feature branch workflow
|
|
26
|
+
- ✅ Prevents commits to dev/main
|
|
27
|
+
- ✅ Conventional commit validation
|
|
28
|
+
- ✅ **Automatic PR creation** (via `gh` CLI)
|
|
29
|
+
- ✅ **Auto-switch to dev** after push
|
|
30
|
+
- ✅ Git hooks for automation
|
|
31
|
+
|
|
32
|
+
**Requirements:**
|
|
33
|
+
- Git
|
|
34
|
+
- GitHub CLI (`gh`) - For automatic PR creation (optional but recommended)
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### 2. Verify Hardened Docker Skill
|
|
39
|
+
**Directory:** `verify-hardened-docker-skill/`
|
|
40
|
+
|
|
41
|
+
Comprehensive security verification for Docker configurations against CIS Docker Benchmark, OWASP, and NIST SP 800-190 standards.
|
|
42
|
+
|
|
43
|
+
**Usage:**
|
|
44
|
+
```bash
|
|
45
|
+
# Verify all Docker security configurations
|
|
46
|
+
./verify-hardened-docker-skill/scripts/verify-docker-hardening.sh [image-name]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**What It Checks:**
|
|
50
|
+
- ✅ Image security (version tags, non-root user, no secrets)
|
|
51
|
+
- ✅ Dockerfile hardening (multi-stage, permissions)
|
|
52
|
+
- ✅ docker-compose.yml security (read-only, capabilities)
|
|
53
|
+
- ✅ Runtime security (non-root execution, health checks)
|
|
54
|
+
- ✅ Vulnerability scanning (Trivy integration)
|
|
55
|
+
- ✅ Secret leakage detection
|
|
56
|
+
|
|
57
|
+
**Exit Codes:**
|
|
58
|
+
- `0` - All checks passed
|
|
59
|
+
- `1` - CRITICAL vulnerabilities
|
|
60
|
+
- `2` - Hardening failures
|
|
61
|
+
- `3` - Secret leakage
|
|
62
|
+
- `4` - Runtime violations
|
|
63
|
+
- `5` - Missing files
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### 4. JS/TS Security Skill
|
|
68
|
+
**Directory:** `js-ts-security-skill/`
|
|
69
|
+
|
|
70
|
+
Comprehensive security verification for JavaScript and TypeScript codebases following OWASP Top 10 standards. Detects dangerous patterns, hardcoded secrets, and vulnerable dependencies.
|
|
71
|
+
|
|
72
|
+
**Usage:**
|
|
73
|
+
```bash
|
|
74
|
+
# Verify security of the current project
|
|
75
|
+
./js-ts-security-skill/scripts/verify-security.sh
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
**Key Features:**
|
|
79
|
+
- ✅ **Dependency Auditing**: Checks for known vulnerabilities in `node_modules`.
|
|
80
|
+
- ✅ **Static Analysis**: Detects dangerous code patterns (eval, unsafe regex, etc.).
|
|
81
|
+
- ✅ **Secret Scanning**: Finds hardcoded credentials and API keys.
|
|
82
|
+
- ✅ **OWASP Compliance**: Maps findings to OWASP Top 10 categories.
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
### 3. Create Hardened Docker Skill
|
|
87
|
+
**Directory:** `create-hardened-docker-skill/`
|
|
88
|
+
|
|
89
|
+
Creates production-ready hardened Docker configurations following security best practices.
|
|
90
|
+
|
|
91
|
+
**Usage:**
|
|
92
|
+
```bash
|
|
93
|
+
# Create all hardened Docker files
|
|
94
|
+
./create-hardened-docker-skill/scripts/create-all.sh [app-name] [node-version] [nginx-version]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**What It Creates:**
|
|
98
|
+
- ✅ **Dockerfile** - Multi-stage, non-root, Alpine-based
|
|
99
|
+
- ✅ **docker-compose.yml** - Read-only filesystem, capability controls
|
|
100
|
+
- ✅ **nginx.conf** - Security headers, TLS 1.2+, gzip compression
|
|
101
|
+
- ✅ **.dockerignore** - Optimized build context
|
|
102
|
+
- ✅ **.env.example** - Environment variable template
|
|
103
|
+
|
|
104
|
+
**Security Features:**
|
|
105
|
+
- ✅ Non-root user execution (nginx)
|
|
106
|
+
- ✅ Read-only root filesystem
|
|
107
|
+
- ✅ Tmpfs mounts for writable directories
|
|
108
|
+
- ✅ All capabilities dropped (minimal additions)
|
|
109
|
+
- ✅ No privilege escalation
|
|
110
|
+
- ✅ Resource limits (512MB memory, 1.0 CPU)
|
|
111
|
+
- ✅ TLS 1.2+ only with strong ciphers
|
|
112
|
+
- ✅ Security headers (CSP, HSTS, X-Frame-Options)
|
|
113
|
+
|
|
114
|
+
**Compliance:**
|
|
115
|
+
- ✅ CIS Docker Benchmark v1.6.0
|
|
116
|
+
- ✅ OWASP Docker Security Cheat Sheet
|
|
117
|
+
- ✅ NIST Application Container Security Guide (SP 800-190)
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Recommended Workflow
|
|
122
|
+
|
|
123
|
+
### For New Docker Projects
|
|
124
|
+
|
|
125
|
+
1. **Create hardened configuration:**
|
|
126
|
+
```bash
|
|
127
|
+
./create-hardened-docker-skill/scripts/create-all.sh my-app
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
2. **Configure environment:**
|
|
131
|
+
```bash
|
|
132
|
+
cp .env.example .env
|
|
133
|
+
# Edit .env with your credentials
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
3. **Build and test:**
|
|
137
|
+
```bash
|
|
138
|
+
docker build -t my-app .
|
|
139
|
+
docker-compose up -d
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
4. **Verify security:**
|
|
143
|
+
```bash
|
|
144
|
+
./verify-hardened-docker-skill/scripts/verify-docker-hardening.sh my-app
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
5. **Fix any issues found and re-verify**
|
|
148
|
+
|
|
149
|
+
### For Existing Docker Projects
|
|
150
|
+
|
|
151
|
+
1. **Verify current configuration:**
|
|
152
|
+
```bash
|
|
153
|
+
./verify-hardened-docker-skill/scripts/verify-docker-hardening.sh my-app
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
2. **Review failed checks and warnings**
|
|
157
|
+
|
|
158
|
+
3. **Apply hardening fixes manually or regenerate:**
|
|
159
|
+
```bash
|
|
160
|
+
./create-hardened-docker-skill/scripts/create-all.sh my-app
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
4. **Re-verify after changes:**
|
|
164
|
+
```bash
|
|
165
|
+
./verify-hardened-docker-skill/scripts/verify-docker-hardening.sh my-app
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### For Feature Development
|
|
169
|
+
|
|
170
|
+
1. **Start feature branch:**
|
|
171
|
+
```bash
|
|
172
|
+
./git-workflow-skill/scripts/start-feature.sh feature docker-hardening
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
2. **Make changes (e.g., update Dockerfile)**
|
|
176
|
+
|
|
177
|
+
3. **Verify hardening before commit:**
|
|
178
|
+
```bash
|
|
179
|
+
./verify-hardened-docker-skill/scripts/verify-docker-hardening.sh my-app
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
4. **Commit, push, and create PR:**
|
|
183
|
+
```bash
|
|
184
|
+
./git-workflow-skill/scripts/finish-feature.sh
|
|
185
|
+
# This will:
|
|
186
|
+
# - Rebase on dev
|
|
187
|
+
# - Push the branch
|
|
188
|
+
# - Create PR automatically
|
|
189
|
+
# - Switch back to dev branch
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Requirements
|
|
195
|
+
|
|
196
|
+
### All Skills
|
|
197
|
+
- Bash shell
|
|
198
|
+
- Git
|
|
199
|
+
|
|
200
|
+
### Git Workflow Skill
|
|
201
|
+
- Git
|
|
202
|
+
- GitHub CLI (`gh`) - For automatic PR creation (optional but recommended)
|
|
203
|
+
```bash
|
|
204
|
+
# Install
|
|
205
|
+
brew install gh # macOS
|
|
206
|
+
winget install GitHub.cli # Windows
|
|
207
|
+
apt install gh # Linux
|
|
208
|
+
|
|
209
|
+
# Authenticate
|
|
210
|
+
gh auth login
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
### Docker Skills
|
|
214
|
+
- Docker installed
|
|
215
|
+
- docker-compose installed
|
|
216
|
+
- Trivy scanner (optional, for vulnerability scanning)
|
|
217
|
+
```bash
|
|
218
|
+
# macOS
|
|
219
|
+
brew install aquasecurity/trivy/trivy
|
|
220
|
+
|
|
221
|
+
# Linux
|
|
222
|
+
apt-get install trivy
|
|
223
|
+
|
|
224
|
+
# Windows
|
|
225
|
+
choco install trivy
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Skill Structure
|
|
231
|
+
|
|
232
|
+
Each skill follows this structure:
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
skill-name/
|
|
236
|
+
├── SKILL.md # Skill definition and documentation
|
|
237
|
+
├── README.md # Quick start guide
|
|
238
|
+
└── scripts/ # Executable scripts
|
|
239
|
+
├── script1.sh
|
|
240
|
+
└── script2.sh
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## Security Standards Reference
|
|
246
|
+
|
|
247
|
+
### CIS Docker Benchmark v1.6.0
|
|
248
|
+
Key controls implemented:
|
|
249
|
+
- 4.1: Create user for container
|
|
250
|
+
- 4.3: Verify file permissions
|
|
251
|
+
- 4.5: Enable Content trust
|
|
252
|
+
- 5.7: Don't map privileged ports
|
|
253
|
+
- 5.10: Set memory limit
|
|
254
|
+
- 5.11: Set CPU priority
|
|
255
|
+
- 5.12: Read-only root filesystem
|
|
256
|
+
- 5.25: No new privileges
|
|
257
|
+
|
|
258
|
+
### OWASP Docker Security
|
|
259
|
+
- Run containers as non-root
|
|
260
|
+
- Use minimal base images (Alpine)
|
|
261
|
+
- Scan for vulnerabilities
|
|
262
|
+
- Limit container resources
|
|
263
|
+
- Read-only filesystem
|
|
264
|
+
- Drop unnecessary capabilities
|
|
265
|
+
- Use security options
|
|
266
|
+
- Specific image tags (not :latest)
|
|
267
|
+
|
|
268
|
+
### NIST SP 800-190
|
|
269
|
+
- Image security and integrity
|
|
270
|
+
- Runtime configuration
|
|
271
|
+
- Resource protection
|
|
272
|
+
- Network isolation
|
|
273
|
+
- Data protection
|
|
274
|
+
|
|
275
|
+
### OWASP Top 10 2025
|
|
276
|
+
- A01: Broken Access Control (includes SSRF)
|
|
277
|
+
- A02: Security Misconfiguration
|
|
278
|
+
- A03: Software Supply Chain Failures
|
|
279
|
+
- A04: Cryptographic Failures
|
|
280
|
+
- A05: Injection
|
|
281
|
+
- A06: Insecure Design
|
|
282
|
+
- A07: Authentication Failures
|
|
283
|
+
- A08: Software or Data Integrity Failures
|
|
284
|
+
- A09: Logging & Alerting Failures
|
|
285
|
+
- A10: Mishandling of Exceptional Conditions
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Contributing
|
|
290
|
+
|
|
291
|
+
To add a new skill:
|
|
292
|
+
|
|
293
|
+
1. Create a new directory: `your-skill-name/`
|
|
294
|
+
2. Add `SKILL.md` with frontmatter:
|
|
295
|
+
```yaml
|
|
296
|
+
---
|
|
297
|
+
name: your-skill
|
|
298
|
+
description: Brief description
|
|
299
|
+
---
|
|
300
|
+
```
|
|
301
|
+
3. Add `README.md` for quick reference
|
|
302
|
+
4. Add scripts in `scripts/` directory
|
|
303
|
+
5. Update this README with the new skill
|
|
304
|
+
|
|
305
|
+
---
|
|
306
|
+
|
|
307
|
+
## References
|
|
308
|
+
|
|
309
|
+
- [Docker Security Best Practices](https://docs.docker.com/develop/security-best-practices/)
|
|
310
|
+
- [CIS Docker Benchmark](https://www.cisecurity.org/benchmark/docker)
|
|
311
|
+
- [OWASP Docker Security](https://cheatsheetseries.owasp.org/cheatsheets/Docker_Security_Cheat_Sheet.html)
|
|
312
|
+
- [NIST SP 800-190](https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-190.pdf)
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Code Review Skill
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
Perform comprehensive code reviews following industry best practices and security guidelines.
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
Invoke this skill by typing `/code-review` or asking for a code review.
|
|
8
|
+
|
|
9
|
+
## Instructions
|
|
10
|
+
|
|
11
|
+
When performing a code review, you should:
|
|
12
|
+
|
|
13
|
+
1. **Code Quality Analysis**
|
|
14
|
+
- Check for code clarity and readability
|
|
15
|
+
- Identify potential bugs or logical errors
|
|
16
|
+
- Review variable and function naming conventions
|
|
17
|
+
- Assess code organization and structure
|
|
18
|
+
|
|
19
|
+
2. **Best Practices**
|
|
20
|
+
- Verify adherence to language-specific best practices
|
|
21
|
+
- Check for proper error handling
|
|
22
|
+
- Review code for performance considerations
|
|
23
|
+
- Identify code duplication and suggest refactoring
|
|
24
|
+
|
|
25
|
+
3. **Security Review**
|
|
26
|
+
- Look for common security vulnerabilities (OWASP Top 10)
|
|
27
|
+
- Check for SQL injection, XSS, CSRF vulnerabilities
|
|
28
|
+
- Verify input validation and sanitization
|
|
29
|
+
- Review authentication and authorization logic
|
|
30
|
+
|
|
31
|
+
4. **Testing & Documentation**
|
|
32
|
+
- Assess test coverage
|
|
33
|
+
- Check for edge cases
|
|
34
|
+
- Review inline comments and documentation
|
|
35
|
+
- Suggest improvements to documentation
|
|
36
|
+
|
|
37
|
+
5. **Output Format**
|
|
38
|
+
Present findings in this format:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
## Code Review Summary
|
|
42
|
+
|
|
43
|
+
### ✅ Strengths
|
|
44
|
+
- [List positive aspects]
|
|
45
|
+
|
|
46
|
+
### ⚠️ Issues Found
|
|
47
|
+
- **[Severity]** [Description]
|
|
48
|
+
- Location: [file:line]
|
|
49
|
+
- Recommendation: [how to fix]
|
|
50
|
+
|
|
51
|
+
### 💡 Suggestions
|
|
52
|
+
- [Improvement suggestions]
|
|
53
|
+
|
|
54
|
+
### 📊 Overall Assessment
|
|
55
|
+
[Brief summary and rating]
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Examples
|
|
59
|
+
|
|
60
|
+
**User**: "Review this authentication function"
|
|
61
|
+
**Assistant**: [Performs thorough review following the structure above]
|
|
62
|
+
|
|
63
|
+
**User**: "/code-review"
|
|
64
|
+
**Assistant**: "I'll review the code in your current selection/file. What would you like me to focus on?"
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Code Review Skill for Cline
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
Comprehensive code review capability for analyzing code quality, security, and best practices.
|
|
5
|
+
|
|
6
|
+
## When to Use
|
|
7
|
+
- User requests code review
|
|
8
|
+
- Before merging code changes
|
|
9
|
+
- During development for quality checks
|
|
10
|
+
|
|
11
|
+
## Review Checklist
|
|
12
|
+
|
|
13
|
+
### Code Quality
|
|
14
|
+
- [ ] Clear and readable code
|
|
15
|
+
- [ ] Proper naming conventions
|
|
16
|
+
- [ ] Well-organized structure
|
|
17
|
+
- [ ] No obvious bugs
|
|
18
|
+
|
|
19
|
+
### Best Practices
|
|
20
|
+
- [ ] Follows language conventions
|
|
21
|
+
- [ ] Proper error handling
|
|
22
|
+
- [ ] Performance optimized
|
|
23
|
+
- [ ] No code duplication
|
|
24
|
+
|
|
25
|
+
### Security
|
|
26
|
+
- [ ] No SQL injection vulnerabilities
|
|
27
|
+
- [ ] No XSS vulnerabilities
|
|
28
|
+
- [ ] Proper input validation
|
|
29
|
+
- [ ] Secure authentication/authorization
|
|
30
|
+
|
|
31
|
+
### Testing & Docs
|
|
32
|
+
- [ ] Adequate test coverage
|
|
33
|
+
- [ ] Edge cases handled
|
|
34
|
+
- [ ] Well-documented code
|
|
35
|
+
- [ ] Clear comments
|
|
36
|
+
|
|
37
|
+
## Response Template
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
## 🔍 Code Review Results
|
|
41
|
+
|
|
42
|
+
### ✅ Strengths
|
|
43
|
+
[List what's done well]
|
|
44
|
+
|
|
45
|
+
### ⚠️ Issues
|
|
46
|
+
**[Severity]** [Issue]
|
|
47
|
+
- File: [path:line]
|
|
48
|
+
- Fix: [solution]
|
|
49
|
+
|
|
50
|
+
### 💡 Recommendations
|
|
51
|
+
[Suggestions for improvement]
|
|
52
|
+
|
|
53
|
+
### 📈 Score
|
|
54
|
+
[Overall quality rating]
|
|
55
|
+
```
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Code Review
|
|
2
|
+
|
|
3
|
+
Perform comprehensive code reviews following industry best practices.
|
|
4
|
+
|
|
5
|
+
## What to Review
|
|
6
|
+
|
|
7
|
+
1. **Code Quality**: Readability, naming conventions, structure
|
|
8
|
+
2. **Best Practices**: Language-specific patterns, error handling, performance
|
|
9
|
+
3. **Security**: Common vulnerabilities (SQL injection, XSS, CSRF, etc.)
|
|
10
|
+
4. **Testing**: Coverage, edge cases, test quality
|
|
11
|
+
5. **Documentation**: Comments, API docs, clarity
|
|
12
|
+
|
|
13
|
+
## Review Process
|
|
14
|
+
|
|
15
|
+
- Analyze code for bugs and logical errors
|
|
16
|
+
- Check adherence to coding standards
|
|
17
|
+
- Identify security vulnerabilities
|
|
18
|
+
- Suggest refactoring opportunities
|
|
19
|
+
- Assess test coverage and documentation
|
|
20
|
+
|
|
21
|
+
## Output Format
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
## Code Review Summary
|
|
25
|
+
|
|
26
|
+
### Strengths
|
|
27
|
+
- [Positive aspects]
|
|
28
|
+
|
|
29
|
+
### Issues Found
|
|
30
|
+
- **[High/Medium/Low]** [Issue description]
|
|
31
|
+
- Location: [file:line]
|
|
32
|
+
- Fix: [recommendation]
|
|
33
|
+
|
|
34
|
+
### Suggestions
|
|
35
|
+
- [Improvements]
|
|
36
|
+
|
|
37
|
+
### Overall Assessment
|
|
38
|
+
[Summary and rating]
|
|
39
|
+
```
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# Commit Message Generator
|
|
2
|
+
|
|
3
|
+
Generate meaningful commit messages following Conventional Commits specification.
|
|
4
|
+
|
|
5
|
+
## Format
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
<type>(<scope>): <subject>
|
|
9
|
+
|
|
10
|
+
<body>
|
|
11
|
+
|
|
12
|
+
<footer>
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Types
|
|
16
|
+
|
|
17
|
+
- `feat`: New feature
|
|
18
|
+
- `fix`: Bug fix
|
|
19
|
+
- `docs`: Documentation changes
|
|
20
|
+
- `style`: Code style/formatting
|
|
21
|
+
- `refactor`: Code refactoring
|
|
22
|
+
- `test`: Adding/updating tests
|
|
23
|
+
- `chore`: Maintenance tasks
|
|
24
|
+
- `perf`: Performance improvements
|
|
25
|
+
- `ci`: CI/CD changes
|
|
26
|
+
- `build`: Build system changes
|
|
27
|
+
- `revert`: Revert previous commit
|
|
28
|
+
|
|
29
|
+
## Guidelines
|
|
30
|
+
|
|
31
|
+
1. **Subject line** (max 50 chars):
|
|
32
|
+
- Use imperative mood ("Add" not "Added")
|
|
33
|
+
- Don't capitalize first letter
|
|
34
|
+
- No period at the end
|
|
35
|
+
|
|
36
|
+
2. **Body** (optional):
|
|
37
|
+
- Explain what and why, not how
|
|
38
|
+
- Wrap at 72 characters
|
|
39
|
+
|
|
40
|
+
3. **Footer** (optional):
|
|
41
|
+
- Breaking changes: `BREAKING CHANGE: description`
|
|
42
|
+
- Issue references: `Fixes #123`
|
|
43
|
+
|
|
44
|
+
## Examples
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
feat(auth): add JWT token refresh mechanism
|
|
48
|
+
|
|
49
|
+
Implement automatic token refresh to improve user experience
|
|
50
|
+
and reduce re-authentication prompts.
|
|
51
|
+
|
|
52
|
+
Fixes #456
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
fix(api): resolve memory leak in user service
|
|
57
|
+
|
|
58
|
+
The user cache was not being cleared properly, causing
|
|
59
|
+
memory to grow over time.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
docs: update installation instructions
|
|
64
|
+
|
|
65
|
+
Add steps for Windows users and clarify dependency requirements.
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Process
|
|
69
|
+
|
|
70
|
+
1. Analyze the code changes
|
|
71
|
+
2. Determine the type of change
|
|
72
|
+
3. Identify the scope (component/module affected)
|
|
73
|
+
4. Write clear, concise subject
|
|
74
|
+
5. Add body if changes need explanation
|
|
75
|
+
6. Add footer for breaking changes or issue refs
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
# Create Hardened Docker Skill
|
|
2
|
+
|
|
3
|
+
Creates production-ready hardened Docker configurations.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Create all hardened Docker files
|
|
9
|
+
./scripts/create-all.sh [app-name] [node-version] [nginx-version]
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## What It Creates
|
|
13
|
+
|
|
14
|
+
✅ **Dockerfile** - Multi-stage, non-root, Alpine-based
|
|
15
|
+
✅ **docker-compose.yml** - Read-only filesystem, capability controls
|
|
16
|
+
✅ **nginx.conf** - Security headers, TLS 1.2+, gzip compression
|
|
17
|
+
✅ **.dockerignore** - Optimized build context
|
|
18
|
+
✅ **.env.example** - Environment variable template
|
|
19
|
+
|
|
20
|
+
## Usage Examples
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Create with defaults (contacts-app, node:18.20.4, nginx:1.27.3)
|
|
24
|
+
./scripts/create-all.sh
|
|
25
|
+
|
|
26
|
+
# Create for custom app
|
|
27
|
+
./scripts/create-all.sh my-app
|
|
28
|
+
|
|
29
|
+
# Create with specific versions
|
|
30
|
+
./scripts/create-all.sh my-app 20.11.1-alpine3.19 1.25.3-alpine3.18
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Generated Configuration Features
|
|
34
|
+
|
|
35
|
+
### Security Hardening
|
|
36
|
+
- ✅ Non-root user (nginx)
|
|
37
|
+
- ✅ Read-only filesystem
|
|
38
|
+
- ✅ Tmpfs for writable dirs
|
|
39
|
+
- ✅ All capabilities dropped
|
|
40
|
+
- ✅ No privilege escalation
|
|
41
|
+
- ✅ Resource limits (512MB, 1 CPU)
|
|
42
|
+
|
|
43
|
+
### Network Security
|
|
44
|
+
- ✅ TLS 1.2+ only
|
|
45
|
+
- ✅ HSTS headers
|
|
46
|
+
- ✅ CSP headers
|
|
47
|
+
- ✅ Server version hidden
|
|
48
|
+
- ✅ Gzip compression
|
|
49
|
+
|
|
50
|
+
### Image Optimization
|
|
51
|
+
- ✅ Multi-stage builds
|
|
52
|
+
- ✅ Alpine base images
|
|
53
|
+
- ✅ Build cache cleanup
|
|
54
|
+
- ✅ < 50MB final image
|
|
55
|
+
|
|
56
|
+
## After Creation
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# 1. Configure environment
|
|
60
|
+
cp .env.example .env
|
|
61
|
+
# Edit .env with your credentials
|
|
62
|
+
|
|
63
|
+
# 2. Build image
|
|
64
|
+
docker build -t my-app .
|
|
65
|
+
|
|
66
|
+
# 3. Verify security
|
|
67
|
+
./.agent/develop/verify-hardened-docker-skill/scripts/verify-docker-hardening.sh my-app
|
|
68
|
+
|
|
69
|
+
# 4. Start container
|
|
70
|
+
docker-compose up -d
|
|
71
|
+
|
|
72
|
+
# 5. Test
|
|
73
|
+
curl http://localhost
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Compliance
|
|
77
|
+
|
|
78
|
+
- ✅ CIS Docker Benchmark v1.6.0
|
|
79
|
+
- ✅ OWASP Docker Security Cheat Sheet
|
|
80
|
+
- ✅ NIST SP 800-190
|
|
81
|
+
|
|
82
|
+
## See Also
|
|
83
|
+
|
|
84
|
+
- [SKILL.md](SKILL.md) - Full documentation
|
|
85
|
+
- [verify-hardened-docker-skill](../verify-hardened-docker-skill) - Verify hardening
|