@patricio0312rev/skillset 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/CHANGELOG.md +29 -0
- package/LICENSE +21 -0
- package/README.md +176 -0
- package/bin/cli.js +37 -0
- package/package.json +55 -0
- package/src/commands/init.js +301 -0
- package/src/index.js +168 -0
- package/src/lib/config.js +200 -0
- package/src/lib/generator.js +166 -0
- package/src/utils/display.js +95 -0
- package/src/utils/readme.js +196 -0
- package/src/utils/tool-specific.js +233 -0
- package/templates/ai-engineering/agent-orchestration-planner/ SKILL.md +266 -0
- package/templates/ai-engineering/cost-latency-optimizer/ SKILL.md +270 -0
- package/templates/ai-engineering/doc-to-vector-dataset-generator/ SKILL.md +239 -0
- package/templates/ai-engineering/evaluation-harness/ SKILL.md +219 -0
- package/templates/ai-engineering/guardrails-safety-filter-builder/ SKILL.md +226 -0
- package/templates/ai-engineering/llm-debugger/ SKILL.md +283 -0
- package/templates/ai-engineering/prompt-regression-tester/ SKILL.md +216 -0
- package/templates/ai-engineering/prompt-template-builder/ SKILL.md +393 -0
- package/templates/ai-engineering/rag-pipeline-builder/ SKILL.md +244 -0
- package/templates/ai-engineering/tool-function-schema-designer/ SKILL.md +219 -0
- package/templates/architecture/adr-writer/ SKILL.md +250 -0
- package/templates/architecture/api-versioning-deprecation-planner/ SKILL.md +331 -0
- package/templates/architecture/domain-model-boundaries-mapper/ SKILL.md +300 -0
- package/templates/architecture/migration-planner/ SKILL.md +376 -0
- package/templates/architecture/performance-budget-setter/ SKILL.md +318 -0
- package/templates/architecture/reliability-strategy-builder/ SKILL.md +286 -0
- package/templates/architecture/rfc-generator/ SKILL.md +362 -0
- package/templates/architecture/scalability-playbook/ SKILL.md +279 -0
- package/templates/architecture/system-design-generator/ SKILL.md +339 -0
- package/templates/architecture/tech-debt-prioritizer/ SKILL.md +329 -0
- package/templates/backend/api-contract-normalizer/ SKILL.md +487 -0
- package/templates/backend/api-endpoint-generator/ SKILL.md +415 -0
- package/templates/backend/auth-module-builder/ SKILL.md +99 -0
- package/templates/backend/background-jobs-designer/ SKILL.md +166 -0
- package/templates/backend/caching-strategist/ SKILL.md +190 -0
- package/templates/backend/error-handling-standardizer/ SKILL.md +174 -0
- package/templates/backend/rate-limiting-abuse-protection/ SKILL.md +147 -0
- package/templates/backend/rbac-permissions-builder/ SKILL.md +158 -0
- package/templates/backend/service-layer-extractor/ SKILL.md +269 -0
- package/templates/backend/webhook-receiver-hardener/ SKILL.md +211 -0
- package/templates/ci-cd/artifact-sbom-publisher/ SKILL.md +236 -0
- package/templates/ci-cd/caching-strategy-optimizer/ SKILL.md +195 -0
- package/templates/ci-cd/deployment-checklist-generator/ SKILL.md +381 -0
- package/templates/ci-cd/github-actions-pipeline-creator/ SKILL.md +348 -0
- package/templates/ci-cd/monorepo-ci-optimizer/ SKILL.md +298 -0
- package/templates/ci-cd/preview-environments-builder/ SKILL.md +187 -0
- package/templates/ci-cd/quality-gates-enforcer/ SKILL.md +342 -0
- package/templates/ci-cd/release-automation-builder/ SKILL.md +281 -0
- package/templates/ci-cd/rollback-workflow-builder/ SKILL.md +372 -0
- package/templates/ci-cd/secrets-env-manager/ SKILL.md +242 -0
- package/templates/db-management/backup-restore-runbook-generator/ SKILL.md +505 -0
- package/templates/db-management/data-integrity-auditor/ SKILL.md +505 -0
- package/templates/db-management/data-retention-archiving-planner/ SKILL.md +430 -0
- package/templates/db-management/data-seeding-fixtures-builder/ SKILL.md +375 -0
- package/templates/db-management/db-performance-watchlist/ SKILL.md +425 -0
- package/templates/db-management/etl-sync-job-builder/ SKILL.md +457 -0
- package/templates/db-management/multi-tenant-safety-checker/ SKILL.md +398 -0
- package/templates/db-management/prisma-migration-assistant/ SKILL.md +379 -0
- package/templates/db-management/schema-consistency-checker/ SKILL.md +440 -0
- package/templates/db-management/sql-query-optimizer/ SKILL.md +324 -0
- package/templates/foundation/changelog-writer/ SKILL.md +431 -0
- package/templates/foundation/code-formatter-installer/ SKILL.md +320 -0
- package/templates/foundation/codebase-summarizer/ SKILL.md +360 -0
- package/templates/foundation/dependency-doctor/ SKILL.md +163 -0
- package/templates/foundation/dev-environment-bootstrapper/ SKILL.md +259 -0
- package/templates/foundation/dev-onboarding-builder/ SKILL.md +556 -0
- package/templates/foundation/docs-starter-kit/ SKILL.md +574 -0
- package/templates/foundation/explaining-code/SKILL.md +13 -0
- package/templates/foundation/git-hygiene-enforcer/ SKILL.md +455 -0
- package/templates/foundation/project-scaffolder/ SKILL.md +65 -0
- package/templates/foundation/project-scaffolder/references/templates.md +126 -0
- package/templates/foundation/repo-structure-linter/ SKILL.md +0 -0
- package/templates/foundation/repo-structure-linter/references/conventions.md +98 -0
- package/templates/frontend/animation-micro-interaction-pack/ SKILL.md +41 -0
- package/templates/frontend/component-scaffold-generator/ SKILL.md +562 -0
- package/templates/frontend/design-to-component-translator/ SKILL.md +547 -0
- package/templates/frontend/form-wizard-builder/ SKILL.md +553 -0
- package/templates/frontend/frontend-refactor-planner/ SKILL.md +37 -0
- package/templates/frontend/i18n-frontend-implementer/ SKILL.md +44 -0
- package/templates/frontend/modal-drawer-system/ SKILL.md +377 -0
- package/templates/frontend/page-layout-builder/ SKILL.md +630 -0
- package/templates/frontend/state-ux-flow-builder/ SKILL.md +23 -0
- package/templates/frontend/table-builder/ SKILL.md +350 -0
- package/templates/performance/alerting-dashboard-builder/ SKILL.md +162 -0
- package/templates/performance/backend-latency-profiler-helper/ SKILL.md +108 -0
- package/templates/performance/caching-cdn-strategy-planner/ SKILL.md +150 -0
- package/templates/performance/capacity-planning-helper/ SKILL.md +242 -0
- package/templates/performance/core-web-vitals-tuner/ SKILL.md +126 -0
- package/templates/performance/incident-runbook-generator/ SKILL.md +162 -0
- package/templates/performance/load-test-scenario-builder/ SKILL.md +256 -0
- package/templates/performance/observability-setup/ SKILL.md +232 -0
- package/templates/performance/postmortem-writer/ SKILL.md +203 -0
- package/templates/performance/structured-logging-standardizer/ SKILL.md +122 -0
- package/templates/security/auth-security-reviewer/ SKILL.md +428 -0
- package/templates/security/dependency-vulnerability-triage/ SKILL.md +495 -0
- package/templates/security/input-validation-sanitization-auditor/ SKILL.md +76 -0
- package/templates/security/pii-redaction-logging-policy-builder/ SKILL.md +65 -0
- package/templates/security/rbac-policy-tester/ SKILL.md +80 -0
- package/templates/security/secrets-scanner/ SKILL.md +462 -0
- package/templates/security/secure-headers-csp-builder/ SKILL.md +404 -0
- package/templates/security/security-incident-playbook-generator/ SKILL.md +76 -0
- package/templates/security/security-pr-checklist-skill/ SKILL.md +62 -0
- package/templates/security/threat-model-generator/ SKILL.md +394 -0
- package/templates/testing/contract-testing-builder/ SKILL.md +492 -0
- package/templates/testing/coverage-strategist/ SKILL.md +436 -0
- package/templates/testing/e2e-test-builder/ SKILL.md +382 -0
- package/templates/testing/flaky-test-detective/ SKILL.md +416 -0
- package/templates/testing/integration-test-builder/ SKILL.md +525 -0
- package/templates/testing/mocking-assistant/ SKILL.md +383 -0
- package/templates/testing/snapshot-test-refactorer/ SKILL.md +375 -0
- package/templates/testing/test-data-factory-builder/ SKILL.md +449 -0
- package/templates/testing/test-reporting-triage-skill/ SKILL.md +469 -0
- package/templates/testing/unit-test-generator/ SKILL.md +548 -0
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: secrets-env-manager
|
|
3
|
+
description: Validates environment variables in CI, prevents secret leaks, enforces masking, and provides fail-fast validation with clear documentation. Use for "secrets management", "env var validation", "credential security", or "secret masking".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Secrets & Env Manager
|
|
7
|
+
|
|
8
|
+
Secure secrets handling and environment variable validation in CI/CD.
|
|
9
|
+
|
|
10
|
+
## Environment Variable Validation
|
|
11
|
+
|
|
12
|
+
```yaml
|
|
13
|
+
validate-env:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
|
|
18
|
+
- name: Validate required environment variables
|
|
19
|
+
run: |
|
|
20
|
+
REQUIRED_VARS=(
|
|
21
|
+
"DATABASE_URL"
|
|
22
|
+
"API_KEY"
|
|
23
|
+
"AWS_REGION"
|
|
24
|
+
"STRIPE_SECRET_KEY"
|
|
25
|
+
)
|
|
26
|
+
|
|
27
|
+
MISSING=()
|
|
28
|
+
for var in "${REQUIRED_VARS[@]}"; do
|
|
29
|
+
if [ -z "${!var}" ]; then
|
|
30
|
+
MISSING+=("$var")
|
|
31
|
+
fi
|
|
32
|
+
done
|
|
33
|
+
|
|
34
|
+
if [ ${#MISSING[@]} -ne 0 ]; then
|
|
35
|
+
echo "❌ Missing required environment variables:"
|
|
36
|
+
printf '%s\n' "${MISSING[@]}"
|
|
37
|
+
exit 1
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
echo "✅ All required environment variables are set"
|
|
41
|
+
env:
|
|
42
|
+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
43
|
+
API_KEY: ${{ secrets.API_KEY }}
|
|
44
|
+
AWS_REGION: ${{ secrets.AWS_REGION }}
|
|
45
|
+
STRIPE_SECRET_KEY: ${{ secrets.STRIPE_SECRET_KEY }}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Secret Masking
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
- name: Mask sensitive values
|
|
52
|
+
run: |
|
|
53
|
+
# Automatically masked in GitHub Actions
|
|
54
|
+
echo "::add-mask::${{ secrets.API_KEY }}"
|
|
55
|
+
echo "::add-mask::${{ secrets.DATABASE_PASSWORD }}"
|
|
56
|
+
|
|
57
|
+
# Safe to use in commands
|
|
58
|
+
curl -H "Authorization: Bearer ${{ secrets.API_KEY }}" https://api.example.com
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Leak Prevention
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
- name: Check for leaked secrets
|
|
65
|
+
uses: trufflesecurity/trufflehog@main
|
|
66
|
+
with:
|
|
67
|
+
path: ./
|
|
68
|
+
base: ${{ github.event.repository.default_branch }}
|
|
69
|
+
head: HEAD
|
|
70
|
+
|
|
71
|
+
- name: Detect hardcoded secrets
|
|
72
|
+
uses: reviewdog/action-detect-secrets@master
|
|
73
|
+
with:
|
|
74
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
75
|
+
reporter: github-pr-review
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
## Environment-specific Secrets
|
|
79
|
+
|
|
80
|
+
```yaml
|
|
81
|
+
deploy:
|
|
82
|
+
runs-on: ubuntu-latest
|
|
83
|
+
environment:
|
|
84
|
+
name: ${{ github.event.inputs.environment }}
|
|
85
|
+
steps:
|
|
86
|
+
- name: Deploy
|
|
87
|
+
run: |
|
|
88
|
+
# Environment-specific secrets are automatically scoped
|
|
89
|
+
echo "Deploying to ${{ github.event.inputs.environment }}"
|
|
90
|
+
env:
|
|
91
|
+
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
92
|
+
API_KEY: ${{ secrets.API_KEY }}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Secret Validation Script
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
// scripts/validate-env.ts
|
|
99
|
+
import * as fs from "fs";
|
|
100
|
+
|
|
101
|
+
interface EnvConfig {
|
|
102
|
+
required: string[];
|
|
103
|
+
optional: string[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
const config: EnvConfig = {
|
|
107
|
+
required: ["DATABASE_URL", "JWT_SECRET", "STRIPE_SECRET_KEY"],
|
|
108
|
+
optional: ["SENTRY_DSN", "LOG_LEVEL"],
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
function validateEnv(): boolean {
|
|
112
|
+
const missing: string[] = [];
|
|
113
|
+
|
|
114
|
+
config.required.forEach((key) => {
|
|
115
|
+
if (!process.env[key]) {
|
|
116
|
+
missing.push(key);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
if (missing.length > 0) {
|
|
121
|
+
console.error("❌ Missing required environment variables:");
|
|
122
|
+
missing.forEach((key) => console.error(` - ${key}`));
|
|
123
|
+
return false;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
console.log("✅ All required environment variables are set");
|
|
127
|
+
return true;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
if (!validateEnv()) {
|
|
131
|
+
process.exit(1);
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## .env.example Template
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
# .env.example - Check into git
|
|
139
|
+
# Copy to .env and fill in values
|
|
140
|
+
|
|
141
|
+
# Database
|
|
142
|
+
DATABASE_URL=postgresql://user:password@localhost:5432/mydb
|
|
143
|
+
|
|
144
|
+
# Authentication
|
|
145
|
+
JWT_SECRET=your-secret-here
|
|
146
|
+
JWT_EXPIRY=24h
|
|
147
|
+
|
|
148
|
+
# External APIs
|
|
149
|
+
STRIPE_SECRET_KEY=sk_test_...
|
|
150
|
+
SENDGRID_API_KEY=SG....
|
|
151
|
+
|
|
152
|
+
# AWS
|
|
153
|
+
AWS_ACCESS_KEY_ID=AKIA...
|
|
154
|
+
AWS_SECRET_ACCESS_KEY=...
|
|
155
|
+
AWS_REGION=us-east-1
|
|
156
|
+
|
|
157
|
+
# Optional
|
|
158
|
+
SENTRY_DSN=https://...
|
|
159
|
+
LOG_LEVEL=info
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Documentation Template
|
|
163
|
+
|
|
164
|
+
```markdown
|
|
165
|
+
# Environment Variables
|
|
166
|
+
|
|
167
|
+
## Required Variables
|
|
168
|
+
|
|
169
|
+
### DATABASE_URL
|
|
170
|
+
|
|
171
|
+
**Description:** PostgreSQL connection string
|
|
172
|
+
**Format:** `postgresql://user:password@host:5432/database`
|
|
173
|
+
**Example:** `postgresql://app:secret@localhost:5432/myapp`
|
|
174
|
+
**Where to get:** Create database on Heroku/RDS
|
|
175
|
+
|
|
176
|
+
### STRIPE_SECRET_KEY
|
|
177
|
+
|
|
178
|
+
**Description:** Stripe API secret key
|
|
179
|
+
**Format:** `sk_test_...` or `sk_live_...`
|
|
180
|
+
**Example:** `sk_test_51abc123...`
|
|
181
|
+
**Where to get:** Stripe Dashboard → Developers → API Keys
|
|
182
|
+
**⚠️ Never commit to git**
|
|
183
|
+
|
|
184
|
+
## Optional Variables
|
|
185
|
+
|
|
186
|
+
### LOG_LEVEL
|
|
187
|
+
|
|
188
|
+
**Description:** Logging verbosity
|
|
189
|
+
**Format:** `error | warn | info | debug`
|
|
190
|
+
**Default:** `info`
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Fail-Fast Validation
|
|
194
|
+
|
|
195
|
+
```yaml
|
|
196
|
+
jobs:
|
|
197
|
+
validate:
|
|
198
|
+
runs-on: ubuntu-latest
|
|
199
|
+
steps:
|
|
200
|
+
- uses: actions/checkout@v4
|
|
201
|
+
|
|
202
|
+
- name: Validate secrets exist
|
|
203
|
+
run: |
|
|
204
|
+
if [ -z "${{ secrets.DATABASE_URL }}" ]; then
|
|
205
|
+
echo "::error::DATABASE_URL secret not set"
|
|
206
|
+
exit 1
|
|
207
|
+
fi
|
|
208
|
+
|
|
209
|
+
if [ -z "${{ secrets.API_KEY }}" ]; then
|
|
210
|
+
echo "::error::API_KEY secret not set"
|
|
211
|
+
exit 1
|
|
212
|
+
fi
|
|
213
|
+
|
|
214
|
+
deploy:
|
|
215
|
+
needs: validate
|
|
216
|
+
runs-on: ubuntu-latest
|
|
217
|
+
steps:
|
|
218
|
+
- name: Deploy
|
|
219
|
+
run: echo "Deploying..."
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Best Practices
|
|
223
|
+
|
|
224
|
+
1. **Never log secrets**: Always mask sensitive values
|
|
225
|
+
2. **Validate early**: Check secrets before deployment
|
|
226
|
+
3. **Use GitHub Secrets**: Never hardcode in workflows
|
|
227
|
+
4. **Environment separation**: Dev/staging/prod secrets
|
|
228
|
+
5. **Rotate regularly**: Update secrets periodically
|
|
229
|
+
6. **Principle of least privilege**: Minimal permissions
|
|
230
|
+
7. **Document clearly**: Where to get each secret
|
|
231
|
+
8. **Scan for leaks**: Automated detection
|
|
232
|
+
|
|
233
|
+
## Output Checklist
|
|
234
|
+
|
|
235
|
+
- [ ] Required env vars validated
|
|
236
|
+
- [ ] Secret masking configured
|
|
237
|
+
- [ ] Leak detection enabled
|
|
238
|
+
- [ ] .env.example template
|
|
239
|
+
- [ ] Environment variables documented
|
|
240
|
+
- [ ] Fail-fast validation
|
|
241
|
+
- [ ] Environment-specific secrets
|
|
242
|
+
- [ ] Rotation policy documented
|