@neyugn/agent-kits 0.5.1 → 0.5.4
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/common/skills/filter-agent/SKILL.md +33 -45
- package/common/skills/filter-skill/SKILL.md +51 -73
- package/common/skills/scan-techstack/SKILL.md +30 -36
- package/kits/coder/agents/ai-engineer.md +27 -39
- package/kits/coder/agents/backend-specialist.md +31 -45
- package/kits/coder/agents/cloud-architect.md +31 -45
- package/kits/coder/agents/code-reviewer.md +45 -67
- package/kits/coder/agents/data-engineer.md +22 -32
- package/kits/coder/agents/database-specialist.md +30 -44
- package/kits/coder/agents/debugger.md +28 -42
- package/kits/coder/agents/devops-engineer.md +35 -53
- package/kits/coder/agents/documentation-writer.md +48 -68
- package/kits/coder/agents/frontend-specialist.md +30 -46
- package/kits/coder/agents/i18n-specialist.md +37 -51
- package/kits/coder/agents/integration-specialist.md +38 -54
- package/kits/coder/agents/mobile-developer.md +37 -53
- package/kits/coder/agents/multi-tenant-architect.md +25 -37
- package/kits/coder/agents/orchestrator.md +20 -32
- package/kits/coder/agents/performance-analyst.md +43 -65
- package/kits/coder/agents/project-planner.md +25 -39
- package/kits/coder/agents/queue-specialist.md +26 -38
- package/kits/coder/agents/realtime-specialist.md +44 -64
- package/kits/coder/agents/security-auditor.md +44 -64
- package/kits/coder/agents/test-engineer.md +30 -44
- package/kits/coder/agents/ux-researcher.md +26 -38
- package/kits/coder/rules/AGENTS.md +3 -1
- package/kits/coder/rules/CLAUDE.md +3 -1
- package/kits/coder/rules/CURSOR.md +8 -1
- package/kits/coder/rules/GEMINI.md +6 -1
- package/kits/coder/rules/OPENCODE.md +3 -1
- package/kits/coder/rules/sections/classifier.md +11 -7
- package/kits/coder/rules/sections/code.md +5 -4
- package/kits/coder/rules/sections/routing.md +10 -2
- package/kits/coder/rules/sections/universal.md +2 -0
- package/kits/coder/skills/accessibility-patterns/SKILL.md +67 -81
- package/kits/coder/skills/ai-rag-patterns/SKILL.md +27 -23
- package/kits/coder/skills/api-patterns/SKILL.md +40 -43
- package/kits/coder/skills/auth-patterns/SKILL.md +47 -51
- package/kits/coder/skills/aws-patterns/SKILL.md +52 -57
- package/kits/coder/skills/brainstorming/SKILL.md +26 -23
- package/kits/coder/skills/clean-code/SKILL.md +74 -90
- package/kits/coder/skills/database-design/SKILL.md +32 -31
- package/kits/coder/skills/docker-patterns/SKILL.md +46 -49
- package/kits/coder/skills/documentation-templates/SKILL.md +21 -13
- package/kits/coder/skills/e2e-testing/SKILL.md +52 -58
- package/kits/coder/skills/flutter-patterns/SKILL.md +44 -46
- package/kits/coder/skills/frontend-design/SKILL.md +28 -24
- package/kits/coder/skills/github-actions/SKILL.md +43 -45
- package/kits/coder/skills/gitlab-ci-patterns/SKILL.md +35 -33
- package/kits/coder/skills/graphql-patterns/SKILL.md +35 -33
- package/kits/coder/skills/i18n-localization/SKILL.md +37 -35
- package/kits/coder/skills/kubernetes-patterns/SKILL.md +35 -33
- package/kits/coder/skills/mermaid-diagrams/SKILL.md +54 -60
- package/kits/coder/skills/mobile-design/SKILL.md +51 -61
- package/kits/coder/skills/monitoring-observability/SKILL.md +32 -30
- package/kits/coder/skills/multi-tenancy/SKILL.md +16 -8
- package/kits/coder/skills/nodejs-best-practices/SKILL.md +19 -14
- package/kits/coder/skills/performance-profiling/SKILL.md +31 -29
- package/kits/coder/skills/plan-writing/SKILL.md +52 -59
- package/kits/coder/skills/postgres-patterns/SKILL.md +39 -39
- package/kits/coder/skills/prompt-engineering/SKILL.md +40 -42
- package/kits/coder/skills/queue-patterns/SKILL.md +22 -16
- package/kits/coder/skills/react-native-patterns/SKILL.md +35 -33
- package/kits/coder/skills/react-patterns/SKILL.md +46 -52
- package/kits/coder/skills/realtime-patterns/SKILL.md +44 -46
- package/kits/coder/skills/redis-patterns/SKILL.md +35 -33
- package/kits/coder/skills/security-fundamentals/SKILL.md +45 -46
- package/kits/coder/skills/seo-patterns/SKILL.md +56 -62
- package/kits/coder/skills/systematic-debugging/SKILL.md +38 -39
- package/kits/coder/skills/tailwind-patterns/SKILL.md +21 -13
- package/kits/coder/skills/terraform-patterns/SKILL.md +53 -57
- package/kits/coder/skills/testing-patterns/SKILL.md +42 -47
- package/kits/coder/skills/typescript-patterns/SKILL.md +54 -68
- package/kits/coder/skills/ui-ux-pro-max/SKILL.md +362 -364
- package/package.json +1 -1
|
@@ -8,19 +8,27 @@ priority: HIGH
|
|
|
8
8
|
|
|
9
9
|
# GitHub Actions - CI/CD Automation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## ⚡ Quick Reference
|
|
12
|
+
|
|
13
|
+
- **Triggers**: `on: push/pull_request/workflow_dispatch` · Use `branches: [main]` not `*`
|
|
14
|
+
- **Order**: Lint → Test → Build → Security scan → Deploy (staging) → Deploy (prod)
|
|
15
|
+
- **Jobs**: `needs: [test]` for dependencies · `if: github.ref == 'refs/heads/main'` for prod
|
|
16
|
+
- **Secrets**: `${{ secrets.MY_SECRET }}` never hardcode · `environment:` for scoped secrets
|
|
17
|
+
- **Caching**: `actions/cache` for node_modules · `pnpm/action-setup` + `--frozen-lockfile`
|
|
18
|
+
- **Security**: `permissions: contents: read` minimal · Pin action versions with SHA
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
12
22
|
|
|
13
23
|
---
|
|
14
24
|
|
|
15
25
|
## Core Principles
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| **Secure** | Secrets in vault, least privilege, scan dependencies |
|
|
23
|
-
| **Fail fast** | Stop pipeline on first failure, don't waste resources |
|
|
27
|
+
- **Automate**: If it can be automated, automate it
|
|
28
|
+
- **Fast feedback**: Tests should run in minutes, not hours
|
|
29
|
+
- **Reproducible**: Same commit = same result, always
|
|
30
|
+
- **Secure**: Secrets in vault, least privilege, scan dependencies
|
|
31
|
+
- **Fail fast**: Stop pipeline on first failure, don't waste resources
|
|
24
32
|
|
|
25
33
|
---
|
|
26
34
|
|
|
@@ -155,12 +163,10 @@ jobs:
|
|
|
155
163
|
|
|
156
164
|
## Caching Strategies
|
|
157
165
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
| **pip** | `cache: 'pip'` in setup-python |
|
|
163
|
-
| **Docker** | `cache-from/to: type=gha` |
|
|
166
|
+
- **pnpm**: `cache: 'pnpm'` in setup-node
|
|
167
|
+
- **npm**: `cache: 'npm'` in setup-node
|
|
168
|
+
- **pip**: `cache: 'pip'` in setup-python
|
|
169
|
+
- **Docker**: `cache-from/to: type=gha`
|
|
164
170
|
|
|
165
171
|
### Custom Cache
|
|
166
172
|
|
|
@@ -244,13 +250,11 @@ jobs:
|
|
|
244
250
|
|
|
245
251
|
## Security Best Practices
|
|
246
252
|
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
| **Scan dependencies** | Trivy, Snyk, Dependabot |
|
|
253
|
-
| **Review third-party actions** | Check source before using |
|
|
253
|
+
- **Pin action versions**: `@v4` not `@latest` or `@main`
|
|
254
|
+
- **Least privilege permissions**: Set `permissions:` explicitly
|
|
255
|
+
- **Use secrets**: `${{ secrets.MY_SECRET }}`
|
|
256
|
+
- **Scan dependencies**: Trivy, Snyk, Dependabot
|
|
257
|
+
- **Review third-party actions**: Check source before using
|
|
254
258
|
|
|
255
259
|
### Security Scanning Job
|
|
256
260
|
|
|
@@ -297,16 +301,14 @@ Need to test multiple versions/platforms?
|
|
|
297
301
|
|
|
298
302
|
## Anti-Patterns (DON'T)
|
|
299
303
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
| Skip tests on main branch | Always test, especially on main |
|
|
309
|
-
| `continue-on-error: true` everywhere | Only where truly necessary |
|
|
304
|
+
- `@latest` or `@main` for actions: Pin specific version `@v4`
|
|
305
|
+
- No caching: Cache dependencies and builds
|
|
306
|
+
- Secrets in workflow files: Use repository/environment secrets
|
|
307
|
+
- Single job does everything: Split into focused jobs
|
|
308
|
+
- No `permissions:` block: Explicit least-privilege permissions
|
|
309
|
+
- Hardcoded versions: Use matrix or variables
|
|
310
|
+
- Skip tests on main branch: Always test, especially on main
|
|
311
|
+
- `continue-on-error: true` everywhere: Only where truly necessary
|
|
310
312
|
|
|
311
313
|
---
|
|
312
314
|
|
|
@@ -324,25 +326,21 @@ Need to test multiple versions/platforms?
|
|
|
324
326
|
|
|
325
327
|
## 🔴 Self-Check Before Completing
|
|
326
328
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
| ✅ **Tests run?** | Critical paths tested in CI? |
|
|
334
|
-
| ✅ **Paths filtered?** | Skipping runs for irrelevant changes? |
|
|
329
|
+
- ✅ **Actions pinned?**: Using `@v4` not `@latest`?
|
|
330
|
+
- ✅ **Caching enabled?**: Dependencies and builds cached?
|
|
331
|
+
- ✅ **Secrets secure?**: Using `secrets.X`, not hardcoded?
|
|
332
|
+
- ✅ **Permissions set?**: Explicit `permissions:` block?
|
|
333
|
+
- ✅ **Tests run?**: Critical paths tested in CI?
|
|
334
|
+
- ✅ **Paths filtered?**: Skipping runs for irrelevant changes?
|
|
335
335
|
|
|
336
336
|
---
|
|
337
337
|
|
|
338
338
|
## Related Skills
|
|
339
339
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
| Security scanning | `security-fundamentals` |
|
|
345
|
-
| Deployment workflows | `deployment-procedures` |
|
|
340
|
+
- Docker builds: `docker-patterns`
|
|
341
|
+
- Kubernetes deploy: `kubernetes-patterns`
|
|
342
|
+
- Security scanning: `security-fundamentals`
|
|
343
|
+
- Deployment workflows: `deployment-procedures`
|
|
346
344
|
|
|
347
345
|
---
|
|
348
346
|
|
|
@@ -8,19 +8,27 @@ priority: HIGH
|
|
|
8
8
|
|
|
9
9
|
# GitLab CI - CI/CD Automation
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## ⚡ Quick Reference
|
|
12
|
+
|
|
13
|
+
- **Stages**: `stages: [lint, test, build, security, deploy]` · Jobs run in stage order
|
|
14
|
+
- **Cache**: `key: $CI_COMMIT_REF_SLUG` · `pull-push` policy · Cache `node_modules/.cache`
|
|
15
|
+
- **Rules**: `rules: - if: $CI_COMMIT_BRANCH == "main"` · avoid deprecated `only/except`
|
|
16
|
+
- **Secrets**: GitLab CI/CD Variables (masked+protected) · Never in `.gitlab-ci.yml`
|
|
17
|
+
- **Docker**: `services: - docker:dind` · `DOCKER_TLS_CERTDIR: "/certs"` · Login before push
|
|
18
|
+
- **Artifacts**: `expire_in: 1 hour` for temp · `reports:` for test/coverage reports
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
12
22
|
|
|
13
23
|
---
|
|
14
24
|
|
|
15
25
|
## Core Principles
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| **Fail Fast** | Stop pipeline on first failure, save resources |
|
|
23
|
-
| **Cache Smart** | Cache dependencies, not build outputs |
|
|
27
|
+
- **DRY**: Use templates, includes, and extends to avoid repeat
|
|
28
|
+
- **Fast Feedback**: Tests should run in minutes, not hours
|
|
29
|
+
- **Stage Order**: Build → Test → Security → Deploy
|
|
30
|
+
- **Fail Fast**: Stop pipeline on first failure, save resources
|
|
31
|
+
- **Cache Smart**: Cache dependencies, not build outputs
|
|
24
32
|
|
|
25
33
|
---
|
|
26
34
|
|
|
@@ -398,16 +406,14 @@ Are jobs independent within a stage?
|
|
|
398
406
|
|
|
399
407
|
## Anti-Patterns (DON'T)
|
|
400
408
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
| Hardcoded URLs/versions | Use variables |
|
|
410
|
-
| `only` without `except` or `rules` | Prefer `rules:` for clarity |
|
|
409
|
+
- `image: node:latest`: Pin version: `node:20-alpine`
|
|
410
|
+
- No caching: Cache `node_modules`, `.cache` dirs
|
|
411
|
+
- Secrets in `.gitlab-ci.yml`: Use CI/CD variables (masked)
|
|
412
|
+
- Single job does everything: Split into stages
|
|
413
|
+
- No `expire_in` for artifacts: Set expiration to save storage
|
|
414
|
+
- `allow_failure: true` everywhere: Only for non-critical jobs
|
|
415
|
+
- Hardcoded URLs/versions: Use variables
|
|
416
|
+
- `only` without `except` or `rules`: Prefer `rules:` for clarity
|
|
411
417
|
|
|
412
418
|
---
|
|
413
419
|
|
|
@@ -425,26 +431,22 @@ Are jobs independent within a stage?
|
|
|
425
431
|
|
|
426
432
|
## 🔴 Self-Check Before Completing
|
|
427
433
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
| ✅ **Security scans?** | SAST/Dependency scanning enabled? |
|
|
435
|
-
| ✅ **Rules clear?** | Using `rules:` instead of `only/except`? |
|
|
434
|
+
- ✅ **Images pinned?**: Using specific versions, not `:latest`?
|
|
435
|
+
- ✅ **Cache configured?**: Dependencies cached with correct policy?
|
|
436
|
+
- ✅ **Secrets secure?**: Using CI/CD variables, not hardcoded?
|
|
437
|
+
- ✅ **Artifacts expire?**: `expire_in` set to reasonable duration?
|
|
438
|
+
- ✅ **Security scans?**: SAST/Dependency scanning enabled?
|
|
439
|
+
- ✅ **Rules clear?**: Using `rules:` instead of `only/except`?
|
|
436
440
|
|
|
437
441
|
---
|
|
438
442
|
|
|
439
443
|
## Related Skills
|
|
440
444
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
| Security scanning | `security-fundamentals` |
|
|
447
|
-
| Terraform in CI | `terraform-patterns` |
|
|
445
|
+
- GitHub Actions: `github-actions`
|
|
446
|
+
- Docker builds: `docker-patterns`
|
|
447
|
+
- Kubernetes deploy: `kubernetes-patterns`
|
|
448
|
+
- Security scanning: `security-fundamentals`
|
|
449
|
+
- Terraform in CI: `terraform-patterns`
|
|
448
450
|
|
|
449
451
|
---
|
|
450
452
|
|
|
@@ -7,20 +7,28 @@ version: 2.0
|
|
|
7
7
|
|
|
8
8
|
# GraphQL Patterns - API Design & Performance
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
## ⚡ Quick Reference
|
|
11
|
+
|
|
12
|
+
- **Schema first**: Define schema before implementation · Schema = contract for all clients
|
|
13
|
+
- **N+1 problem**: Always use DataLoader for nested resolvers · Batch + deduplicate DB calls
|
|
14
|
+
- **Pagination**: Cursor-based (edges/nodes) not offset · `first/after` convention
|
|
15
|
+
- **Mutations**: Return the modified type · Use input types · Clear error messages
|
|
16
|
+
- **Security**: Depth limiting · Complexity limits · Rate limit by complexity score · Disable introspection in prod
|
|
17
|
+
- **Performance**: Persisted queries · Apollo Client cache normalization · `@defer` for slow fields
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
11
21
|
|
|
12
22
|
---
|
|
13
23
|
|
|
14
24
|
## When to Use This Skill
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| Real-time subscriptions | File uploads as primary use |
|
|
23
|
-
| Query optimization | Rate limiting (use middleware) |
|
|
26
|
+
- Schema design: REST API design
|
|
27
|
+
- Resolver implementation: Database queries (use ORM)
|
|
28
|
+
- N+1 prevention (DataLoader): Client-side caching (use Apollo)
|
|
29
|
+
- Federation architecture: Simple CRUD APIs
|
|
30
|
+
- Real-time subscriptions: File uploads as primary use
|
|
31
|
+
- Query optimization: Rate limiting (use middleware)
|
|
24
32
|
|
|
25
33
|
➡️ For REST patterns, see `api-patterns` skill.
|
|
26
34
|
|
|
@@ -67,14 +75,12 @@ input UpdateUserInput {
|
|
|
67
75
|
|
|
68
76
|
### Nullability Strategy
|
|
69
77
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
| `[String!]` | List may be null, items never null |
|
|
77
|
-
| `[String!]!` | List never null, items never null |
|
|
78
|
+
- `String`: May be null (optional field)
|
|
79
|
+
- `String!`: Never null (required)
|
|
80
|
+
- `[String]`: List may be null, items may be null
|
|
81
|
+
- `[String]!`: List never null, items may be null
|
|
82
|
+
- `[String!]`: List may be null, items never null
|
|
83
|
+
- `[String!]!`: List never null, items never null
|
|
78
84
|
|
|
79
85
|
**Recommendation:** Use `[Type!]!` for lists (empty list over null).
|
|
80
86
|
|
|
@@ -516,16 +522,14 @@ const server = new ApolloServer({
|
|
|
516
522
|
|
|
517
523
|
## Anti-Patterns
|
|
518
524
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
| Create DataLoader once globally | Create per-request |
|
|
528
|
-
| Subscription without auth check | Check auth in subscribe function |
|
|
525
|
+
- Resolver makes DB call without loader: Use DataLoader for all DB access
|
|
526
|
+
- All fields nullable: Design nullability intentionally
|
|
527
|
+
- Auth only in directives: Auth in resolvers, directives as supplement
|
|
528
|
+
- Introspection in production: Disable introspection
|
|
529
|
+
- Deep unlimited queries: Depth limiting + complexity analysis
|
|
530
|
+
- Return all errors as same type: Use union types for error variants
|
|
531
|
+
- Create DataLoader once globally: Create per-request
|
|
532
|
+
- Subscription without auth check: Check auth in subscribe function
|
|
529
533
|
|
|
530
534
|
---
|
|
531
535
|
|
|
@@ -546,12 +550,10 @@ Before production:
|
|
|
546
550
|
|
|
547
551
|
## Related Skills
|
|
548
552
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
| Real-time patterns | `realtime-patterns` |
|
|
554
|
-
| TypeScript integration | `typescript-patterns` |
|
|
553
|
+
- REST API design: `api-patterns`
|
|
554
|
+
- Database queries: `database-design`
|
|
555
|
+
- Real-time patterns: `realtime-patterns`
|
|
556
|
+
- TypeScript integration: `typescript-patterns`
|
|
555
557
|
|
|
556
558
|
---
|
|
557
559
|
|
|
@@ -6,6 +6,18 @@ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
|
|
|
6
6
|
|
|
7
7
|
# i18n & Localization Patterns
|
|
8
8
|
|
|
9
|
+
## ⚡ Quick Reference
|
|
10
|
+
|
|
11
|
+
- **Keys**: `component.element.state` format · `user.profile.title` not `profileTitle` · never translate keys
|
|
12
|
+
- **Interpolation**: `t('greeting', { name })` not string concat · ICU format for plurals
|
|
13
|
+
- **RTL**: CSS logical properties (`margin-inline-start` not `margin-left`) · `dir="rtl"` on root
|
|
14
|
+
- **Dates/Numbers**: Always use `Intl.DateTimeFormat` and `Intl.NumberFormat` · Never hardcode locale
|
|
15
|
+
- **Currency**: Store in minor units (cents) · Format with `Intl.NumberFormat(locale, { style: 'currency' })`
|
|
16
|
+
- **Missing keys**: Fallback to default locale · Never show key ID to user · Log missing keys
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
|
|
9
21
|
> Make software work beautifully in every language and culture.
|
|
10
22
|
|
|
11
23
|
---
|
|
@@ -63,12 +75,10 @@ locales/
|
|
|
63
75
|
|
|
64
76
|
### Namespace Strategy
|
|
65
77
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
| `errors` | Error messages, validations |
|
|
71
|
-
| `[feature]` | Feature-specific strings |
|
|
78
|
+
- `common`: Shared: buttons, labels
|
|
79
|
+
- `auth`: Login, register, password
|
|
80
|
+
- `errors`: Error messages, validations
|
|
81
|
+
- `[feature]`: Feature-specific strings
|
|
72
82
|
|
|
73
83
|
---
|
|
74
84
|
|
|
@@ -95,12 +105,10 @@ locales/
|
|
|
95
105
|
|
|
96
106
|
### Naming Rules
|
|
97
107
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
| **Semantic naming** | `submitButton` not `button1` |
|
|
103
|
-
| **No hardcoded text** | Even for "OK" or "Cancel" |
|
|
108
|
+
- **camelCase keys**: `forgotPassword`
|
|
109
|
+
- **Nested by feature**: `auth.login.title`
|
|
110
|
+
- **Semantic naming**: `submitButton` not `button1`
|
|
111
|
+
- **No hardcoded text**: Even for "OK" or "Cancel"
|
|
104
112
|
|
|
105
113
|
---
|
|
106
114
|
|
|
@@ -217,15 +225,13 @@ const pseudoLocalize = (str: string) => {
|
|
|
217
225
|
|
|
218
226
|
### Logical Properties Mapping
|
|
219
227
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
| `padding-right` | `padding-inline-end` |
|
|
228
|
-
| `text-align: left` | `text-align: start` |
|
|
228
|
+
- `left`: `inline-start`
|
|
229
|
+
- `right`: `inline-end`
|
|
230
|
+
- `top`: `block-start`
|
|
231
|
+
- `bottom`: `block-end`
|
|
232
|
+
- `margin-left`: `margin-inline-start`
|
|
233
|
+
- `padding-right`: `padding-inline-end`
|
|
234
|
+
- `text-align: left`: `text-align: start`
|
|
229
235
|
|
|
230
236
|
### HTML Direction
|
|
231
237
|
|
|
@@ -320,25 +326,21 @@ const formatRelative = (date: Date, locale: string) => {
|
|
|
320
326
|
|
|
321
327
|
## ❌ Anti-Patterns
|
|
322
328
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
| Store locale in localStorage only | Support URL-based locale switching |
|
|
330
|
-
| Use images with embedded text | Separate text layer or generate per-locale |
|
|
329
|
+
- Concatenate strings for sentences: Use ICU message format
|
|
330
|
+
- Hardcode "OK", "Cancel", etc.: Externalize ALL strings
|
|
331
|
+
- Use physical CSS properties: Use logical properties for RTL
|
|
332
|
+
- Assume text length stays same: Design for 30-50% expansion
|
|
333
|
+
- Store locale in localStorage only: Support URL-based locale switching
|
|
334
|
+
- Use images with embedded text: Separate text layer or generate per-locale
|
|
331
335
|
|
|
332
336
|
---
|
|
333
337
|
|
|
334
338
|
## 🔗 Related Skills
|
|
335
339
|
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
| Accessibility | `accessibility-patterns` |
|
|
341
|
-
| Testing | `testing-patterns` |
|
|
340
|
+
- React patterns: `react-patterns`
|
|
341
|
+
- API design: `api-patterns`
|
|
342
|
+
- Accessibility: `accessibility-patterns`
|
|
343
|
+
- Testing: `testing-patterns`
|
|
342
344
|
|
|
343
345
|
---
|
|
344
346
|
|
|
@@ -8,19 +8,27 @@ priority: HIGH
|
|
|
8
8
|
|
|
9
9
|
# Kubernetes Patterns - Cloud-Native Orchestration
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## ⚡ Quick Reference
|
|
12
|
+
|
|
13
|
+
- **Core resources**: Deployment (stateless) · StatefulSet (stateful) · Service · ConfigMap · Secret · Ingress
|
|
14
|
+
- **Health**: Always `livenessProbe` + `readinessProbe` · `/health` and `/ready` endpoints required
|
|
15
|
+
- **Resources**: Always set `requests` (scheduling) and `limits` (capping) · No unbounded containers
|
|
16
|
+
- **Security**: Non-root user · `readOnlyRootFilesystem` · No `privileged: true` · NetworkPolicy
|
|
17
|
+
- **Config**: ConfigMap for non-sensitive config · Secret for credentials (base64 not encryption!) · Use external-secrets for prod
|
|
18
|
+
- **GitOps**: All manifests in git · ArgoCD/FluxCD for sync · Never `kubectl apply` manually in prod
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
12
22
|
|
|
13
23
|
---
|
|
14
24
|
|
|
15
25
|
## Core Principles
|
|
16
26
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| **Least Privilege** | RBAC with minimal permissions, pod security policies |
|
|
23
|
-
| **Observable** | Probes, metrics, logs for every workload |
|
|
27
|
+
- **Declarative**: Define desired state, not imperative steps
|
|
28
|
+
- **Immutable**: Never modify running resources - redeploy instead
|
|
29
|
+
- **GitOps**: Git is the source of truth for all manifests
|
|
30
|
+
- **Least Privilege**: RBAC with minimal permissions, pod security policies
|
|
31
|
+
- **Observable**: Probes, metrics, logs for every workload
|
|
24
32
|
|
|
25
33
|
---
|
|
26
34
|
|
|
@@ -316,41 +324,35 @@ spec:
|
|
|
316
324
|
|
|
317
325
|
## Anti-Patterns (DON'T)
|
|
318
326
|
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
| Single replica in prod | Minimum 2-3 replicas with PDB |
|
|
328
|
-
| `kubectl edit` in production | Edit in Git, apply via GitOps |
|
|
327
|
+
- `kubectl apply` from laptop: GitOps - apply from Git repo
|
|
328
|
+
- `latest` image tag: Specific versioned tags
|
|
329
|
+
- No resource requests/limits: Always set requests, usually set limits
|
|
330
|
+
- Running as root: `runAsNonRoot: true`
|
|
331
|
+
- Secrets in ConfigMap: Use Secrets or External Secrets
|
|
332
|
+
- No health probes: livenessProbe + readinessProbe
|
|
333
|
+
- Single replica in prod: Minimum 2-3 replicas with PDB
|
|
334
|
+
- `kubectl edit` in production: Edit in Git, apply via GitOps
|
|
329
335
|
|
|
330
336
|
---
|
|
331
337
|
|
|
332
338
|
## 🔴 Self-Check Before Deploying
|
|
333
339
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
| ✅ **Replicas > 1?** | At least 2 replicas for HA? |
|
|
342
|
-
| ✅ **PDB defined?** | PodDisruptionBudget for availability? |
|
|
340
|
+
- ✅ **Resources set?**: requests and limits configured?
|
|
341
|
+
- ✅ **Probes configured?**: liveness + readiness probes?
|
|
342
|
+
- ✅ **Non-root?**: Pod runs as non-root user?
|
|
343
|
+
- ✅ **Image pinned?**: Specific tag, not `latest`?
|
|
344
|
+
- ✅ **Secrets external?**: No hardcoded secrets in manifests?
|
|
345
|
+
- ✅ **Replicas > 1?**: At least 2 replicas for HA?
|
|
346
|
+
- ✅ **PDB defined?**: PodDisruptionBudget for availability?
|
|
343
347
|
|
|
344
348
|
---
|
|
345
349
|
|
|
346
350
|
## Related Skills
|
|
347
351
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
| Server management | `server-management` |
|
|
353
|
-
| Deployment workflows | `deployment-procedures` |
|
|
352
|
+
- Container images: `docker-patterns`
|
|
353
|
+
- CI/CD pipelines: `github-actions` (future)
|
|
354
|
+
- Server management: `server-management`
|
|
355
|
+
- Deployment workflows: `deployment-procedures`
|
|
354
356
|
|
|
355
357
|
---
|
|
356
358
|
|