memory-journal-mcp 7.1.0 → 7.3.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.
Files changed (124) hide show
  1. package/README.md +59 -51
  2. package/dist/{chunk-GW5DYUQJ.js → chunk-CHWIPVQN.js} +174 -74
  3. package/dist/{chunk-37BQOJDZ.js → chunk-WXDEVIFL.js} +87 -8
  4. package/dist/{chunk-JEGRDY6W.js → chunk-ZJJD2F5T.js} +487 -89
  5. package/dist/cli.js +30 -4
  6. package/dist/github-integration-YODGZH3K.js +1 -0
  7. package/dist/index.d.ts +5 -1
  8. package/dist/index.js +3 -3
  9. package/dist/{tools-O44Q52RD.js → tools-MNMGDTQI.js} +2 -2
  10. package/package.json +4 -4
  11. package/skills/README.md +77 -0
  12. package/skills/autonomous-dev/SKILL.md +56 -0
  13. package/skills/bin/sync.js +50 -0
  14. package/skills/bun/SKILL.md +156 -0
  15. package/skills/github-commander/SKILL.md +1 -1
  16. package/skills/github-commander/workflows/code-quality-audit.md +7 -5
  17. package/skills/github-commander/workflows/issue-triage.md +13 -4
  18. package/skills/github-commander/workflows/milestone-sprint.md +9 -1
  19. package/skills/github-commander/workflows/perf-audit.md +2 -0
  20. package/skills/github-commander/workflows/pr-review.md +9 -3
  21. package/skills/github-commander/workflows/roadmap-kickoff.md +79 -0
  22. package/skills/github-commander/workflows/security-audit.md +3 -3
  23. package/skills/github-commander/workflows/update-deps.md +2 -2
  24. package/skills/gitlab/SKILL.md +115 -0
  25. package/skills/gitlab/package-lock.json +392 -0
  26. package/skills/gitlab/package.json +14 -0
  27. package/skills/gitlab/scripts/gitlab-client.ts +125 -0
  28. package/skills/gitlab/scripts/gitlab-helper.ts +80 -0
  29. package/skills/golang/SKILL.md +54 -0
  30. package/skills/mysql/SKILL.md +30 -0
  31. package/skills/package.json +48 -0
  32. package/skills/playwright-standard/SKILL.md +58 -0
  33. package/skills/playwright-standard/examples/fixtures.ts +66 -0
  34. package/skills/playwright-standard/examples/type-stubs.d.ts +10 -0
  35. package/skills/playwright-standard/references/advanced-scenarios.md +59 -0
  36. package/skills/playwright-standard/references/infrastructure.md +43 -0
  37. package/skills/postgres/SKILL.md +33 -0
  38. package/skills/react-best-practices/AGENTS.md +2883 -0
  39. package/skills/react-best-practices/README.md +127 -0
  40. package/skills/react-best-practices/SKILL.md +138 -0
  41. package/skills/react-best-practices/metadata.json +17 -0
  42. package/skills/react-best-practices/rules/_sections.md +46 -0
  43. package/skills/react-best-practices/rules/_template.md +28 -0
  44. package/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
  45. package/skills/react-best-practices/rules/advanced-init-once.md +42 -0
  46. package/skills/react-best-practices/rules/advanced-use-latest.md +39 -0
  47. package/skills/react-best-practices/rules/async-api-routes.md +35 -0
  48. package/skills/react-best-practices/rules/async-defer-await.md +80 -0
  49. package/skills/react-best-practices/rules/async-dependencies.md +48 -0
  50. package/skills/react-best-practices/rules/async-parallel.md +24 -0
  51. package/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
  52. package/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
  53. package/skills/react-best-practices/rules/bundle-conditional.md +37 -0
  54. package/skills/react-best-practices/rules/bundle-defer-third-party.md +48 -0
  55. package/skills/react-best-practices/rules/bundle-dynamic-imports.md +34 -0
  56. package/skills/react-best-practices/rules/bundle-preload.md +44 -0
  57. package/skills/react-best-practices/rules/client-event-listeners.md +78 -0
  58. package/skills/react-best-practices/rules/client-localstorage-schema.md +74 -0
  59. package/skills/react-best-practices/rules/client-passive-event-listeners.md +48 -0
  60. package/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
  61. package/skills/react-best-practices/rules/js-batch-dom-css.md +110 -0
  62. package/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
  63. package/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
  64. package/skills/react-best-practices/rules/js-cache-storage.md +68 -0
  65. package/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
  66. package/skills/react-best-practices/rules/js-early-exit.md +50 -0
  67. package/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
  68. package/skills/react-best-practices/rules/js-index-maps.md +37 -0
  69. package/skills/react-best-practices/rules/js-length-check-first.md +50 -0
  70. package/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
  71. package/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
  72. package/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
  73. package/skills/react-best-practices/rules/rendering-activity.md +24 -0
  74. package/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +38 -0
  75. package/skills/react-best-practices/rules/rendering-conditional-render.md +32 -0
  76. package/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
  77. package/skills/react-best-practices/rules/rendering-hoist-jsx.md +36 -0
  78. package/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +72 -0
  79. package/skills/react-best-practices/rules/rendering-hydration-suppress-warning.md +26 -0
  80. package/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
  81. package/skills/react-best-practices/rules/rendering-usetransition-loading.md +75 -0
  82. package/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
  83. package/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
  84. package/skills/react-best-practices/rules/rerender-derived-state-no-effect.md +40 -0
  85. package/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
  86. package/skills/react-best-practices/rules/rerender-functional-setstate.md +77 -0
  87. package/skills/react-best-practices/rules/rerender-lazy-state-init.md +56 -0
  88. package/skills/react-best-practices/rules/rerender-memo-with-default-value.md +36 -0
  89. package/skills/react-best-practices/rules/rerender-memo.md +44 -0
  90. package/skills/react-best-practices/rules/rerender-move-effect-to-event.md +45 -0
  91. package/skills/react-best-practices/rules/rerender-simple-expression-in-memo.md +35 -0
  92. package/skills/react-best-practices/rules/rerender-transitions.md +40 -0
  93. package/skills/react-best-practices/rules/rerender-use-ref-transient-values.md +73 -0
  94. package/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
  95. package/skills/react-best-practices/rules/server-auth-actions.md +96 -0
  96. package/skills/react-best-practices/rules/server-cache-lru.md +41 -0
  97. package/skills/react-best-practices/rules/server-cache-react.md +76 -0
  98. package/skills/react-best-practices/rules/server-dedup-props.md +65 -0
  99. package/skills/react-best-practices/rules/server-parallel-fetching.md +83 -0
  100. package/skills/react-best-practices/rules/server-serialization.md +38 -0
  101. package/skills/rust/SKILL.md +86 -0
  102. package/skills/shadcn-ui/SKILL.md +72 -0
  103. package/skills/skill-builder/SKILL.md +457 -0
  104. package/skills/skill-builder/checklist.md +65 -0
  105. package/skills/sqlite/SKILL.md +38 -0
  106. package/skills/typescript/SKILL.md +453 -0
  107. package/skills/typescript/assets/eslint-template.js +102 -0
  108. package/skills/typescript/assets/tsconfig-template.json +45 -0
  109. package/skills/typescript/references/enterprise-patterns.md +531 -0
  110. package/skills/typescript/references/generics.md +493 -0
  111. package/skills/typescript/references/nestjs-integration.md +579 -0
  112. package/skills/typescript/references/react-integration.md +616 -0
  113. package/skills/typescript/references/toolchain.md +547 -0
  114. package/skills/typescript/references/type-system.md +481 -0
  115. package/skills/vitest-standard/SKILL.md +82 -0
  116. package/skills/vitest-standard/examples/service-mock.ts +60 -0
  117. package/skills/vitest-standard/examples/tdd-calculator.ts +41 -0
  118. package/skills/vitest-standard/examples/type-stubs.d.ts +18 -0
  119. package/skills/vitest-standard/references/async-and-errors.md +58 -0
  120. package/skills/vitest-standard/references/coverage-and-config.md +53 -0
  121. package/skills/vitest-standard/references/mocking.md +61 -0
  122. package/skills/vitest-standard/references/tdd-patterns.md +60 -0
  123. package/dist/github-integration-FOJ4U6I5.js +0 -1
  124. package/skills/github-commander/workflows/full-audit.md +0 -134
@@ -0,0 +1,125 @@
1
+ import { Gitlab } from '@gitbeaker/rest'
2
+ import * as dotenv from 'dotenv'
3
+ import { join } from 'path'
4
+ import * as fs from 'fs'
5
+
6
+ // Try loading from .claude/.env as per specific requirements, fallback to regular .env
7
+ const homeDir = process.env.USERPROFILE || process.env.HOME || ''
8
+ const claudeEnvPath = join(homeDir, '.claude', '.env')
9
+
10
+ if (fs.existsSync(claudeEnvPath)) {
11
+ dotenv.config({ path: claudeEnvPath })
12
+ } else {
13
+ dotenv.config()
14
+ }
15
+
16
+ /**
17
+ * Core GitLab Client wrapping the @gitbeaker/rest API.
18
+ */
19
+ export class GitLabClient {
20
+ public api: InstanceType<typeof Gitlab>
21
+
22
+ constructor() {
23
+ const token = process.env.GITLAB_API_TOKEN
24
+ if (!token) {
25
+ throw new Error('GITLAB_API_TOKEN is missing in environment or ~/.claude/.env')
26
+ }
27
+
28
+ const host = process.env.GITLAB_URL || 'https://gitlab.com'
29
+
30
+ this.api = new Gitlab({
31
+ host,
32
+ token,
33
+ // Default to rejectUnauthorized = false equivalent via custom fetch if required,
34
+ // but gitbeaker handles standard HTTPS well.
35
+ })
36
+ }
37
+
38
+ async getCurrentUser() {
39
+ return await this.api.Users.current()
40
+ }
41
+
42
+ async getProjects(
43
+ options: {
44
+ search?: string
45
+ owned?: boolean
46
+ membership?: boolean
47
+ starred?: boolean
48
+ perPage?: number
49
+ } = {}
50
+ ) {
51
+ return await this.api.Projects.all(options)
52
+ }
53
+
54
+ async getProject(projectId: string | number) {
55
+ return await this.api.Projects.show(projectId)
56
+ }
57
+
58
+ async getBranches(projectId: string | number, search?: string) {
59
+ return await this.api.Branches.all(projectId, { search })
60
+ }
61
+
62
+ async getTags(projectId: string | number, search?: string) {
63
+ return await this.api.Tags.all(projectId, { search })
64
+ }
65
+
66
+ async getCommits(
67
+ projectId: string | number,
68
+ refName?: string,
69
+ options: { since?: string; until?: string } = {}
70
+ ) {
71
+ return await this.api.Commits.all(projectId, { refName, ...options })
72
+ }
73
+
74
+ async getFile(projectId: string | number, filePath: string, ref: string) {
75
+ return await this.api.RepositoryFiles.show(projectId, filePath, ref)
76
+ }
77
+
78
+ async getTree(
79
+ projectId: string | number,
80
+ options: { path?: string; ref?: string; recursive?: boolean } = {}
81
+ ) {
82
+ return await this.api.Repositories.tree(projectId, options)
83
+ }
84
+
85
+ async getMergeRequests(
86
+ projectId: string | number,
87
+ options: { state?: string; scope?: string } = {}
88
+ ) {
89
+ return await this.api.MergeRequests.all({ projectId, ...options })
90
+ }
91
+
92
+ async getMergeRequest(projectId: string | number, mrIid: number) {
93
+ return await this.api.MergeRequests.show(projectId, mrIid)
94
+ }
95
+
96
+ async getMergeRequestChanges(projectId: string | number, mrIid: number) {
97
+ return await this.api.MergeRequests.changes(projectId, mrIid)
98
+ }
99
+
100
+ async getIssues(projectId: string | number, options: { state?: string; labels?: string } = {}) {
101
+ return await this.api.Issues.all({ projectId, ...options })
102
+ }
103
+
104
+ async getPipelines(
105
+ projectId: string | number,
106
+ options: { status?: string; ref?: string } = {}
107
+ ) {
108
+ return await this.api.Pipelines.all(projectId, options)
109
+ }
110
+
111
+ async getPipelineJobs(projectId: string | number, pipelineId: number) {
112
+ return await this.api.Jobs.all(projectId, { pipelineId })
113
+ }
114
+
115
+ async getJobLog(projectId: string | number, jobId: number) {
116
+ return await this.api.Jobs.showLog(projectId, jobId)
117
+ }
118
+
119
+ async search(query: string, scope: string, projectId?: string | number) {
120
+ if (projectId) {
121
+ return await this.api.Search.all(scope, query, { projectId })
122
+ }
123
+ return await this.api.Search.all(scope, query)
124
+ }
125
+ }
@@ -0,0 +1,80 @@
1
+ import { GitLabClient } from './gitlab-client.js'
2
+
3
+ /**
4
+ * High-level repository operations utilizing GitLabClient.
5
+ */
6
+ export class GitLabHelper {
7
+ private client: GitLabClient
8
+
9
+ constructor() {
10
+ this.client = new GitLabClient()
11
+ }
12
+
13
+ async connect() {
14
+ // Current user request will throw if authentication fails
15
+ return await this.client.getCurrentUser()
16
+ }
17
+
18
+ async listProjects(
19
+ options: { search?: string; owned?: boolean; membership?: boolean; starred?: boolean } = {}
20
+ ) {
21
+ return await this.client.getProjects(options)
22
+ }
23
+
24
+ async getProject(projectPath: string) {
25
+ return await this.client.getProject(projectPath)
26
+ }
27
+
28
+ async getFileContent(project: string, path: string, ref: string = 'main') {
29
+ const file = await this.client.getFile(project, path, ref)
30
+ if (!file || !file.content) return null
31
+ return Buffer.from(file.content, 'base64').toString('utf-8')
32
+ }
33
+
34
+ async listFiles(project: string, path?: string, ref?: string, recursive: boolean = false) {
35
+ return await this.client.getTree(project, { path, ref, recursive })
36
+ }
37
+
38
+ async getCommits(project: string, branch: string = 'main', limit: number = 10) {
39
+ const commits = await this.client.getCommits(project, branch)
40
+ return Array.isArray(commits) ? commits.slice(0, limit) : []
41
+ }
42
+
43
+ async listMergeRequests(projectPath: string, state: string = 'opened') {
44
+ return await this.client.getMergeRequests(projectPath, { state })
45
+ }
46
+
47
+ async getMyMergeRequests() {
48
+ const user = await this.client.getCurrentUser()
49
+ // Scope 'created_by_me' requires different endpoint parameters, but using standard API
50
+ return await this.client.api.MergeRequests.all({ authorId: user.id, state: 'opened' })
51
+ }
52
+
53
+ async getAssignedMergeRequests() {
54
+ const user = await this.client.getCurrentUser()
55
+ return await this.client.api.MergeRequests.all({ assigneeId: user.id, state: 'opened' })
56
+ }
57
+
58
+ async listPipelines(project: string, status?: string, ref?: string) {
59
+ return await this.client.getPipelines(project, { status, ref })
60
+ }
61
+
62
+ async getPipelineJobs(project: string, pipelineId: number) {
63
+ return await this.client.getPipelineJobs(project, pipelineId)
64
+ }
65
+
66
+ async getJobLog(project: string, jobId: number) {
67
+ return await this.client.getJobLog(project, jobId)
68
+ }
69
+
70
+ async getLatestPipeline(project: string, ref: string = 'main') {
71
+ const pipelines = await this.client.getPipelines(project, { ref })
72
+ if (!pipelines || pipelines.length === 0) return null
73
+ // Pipelines are generally sorted by id desc
74
+ return pipelines[0]
75
+ }
76
+
77
+ async searchCode(query: string, project?: string) {
78
+ return await this.client.search(query, 'blobs', project)
79
+ }
80
+ }
@@ -0,0 +1,54 @@
1
+ ---
2
+ name: golang
3
+ description: |
4
+ Master Go development using production-grade best practices merged from the Google and Uber style guides. Use whenever writing Go code, designing APIs, handling errors, managing goroutines, or configuring linters.
5
+ ---
6
+
7
+ # Golang Engineering Standards
8
+
9
+ This skill synthesizes the absolute best practices from the ecosystem (Uber Guide, Google Guide, and community consensus) to ensure written Go code is idiomatic, performant, and safe.
10
+
11
+ ## 1. Interface & API Design
12
+
13
+ - **Accept Interfaces, Return Structs**: Define interfaces where they are consumed (by the caller), not where they are implemented. Return concrete structs from constructors so callers can use all methods or mock as needed.
14
+ - **Context is King**: `context.Context` must **always** be the first parameter of any function doing I/O or asynchronous work.
15
+ - **Never Store Context**: Do not store `context.Context` inside structs. It is meant to flow entirely through the function stack.
16
+ - **No Dependency Injection via Context**: Only use `context.WithValue` for request-scoped data (like trace IDs, user claims). Never use it to pass databases, loggers, or configuration.
17
+
18
+ ## 2. Error Handling
19
+
20
+ - **Wrapping Options**: Use `fmt.Errorf("doing operation: %w", err)` to preserve the underlying error for `errors.Is` or `errors.As`. Use `%v` only if you explicitly want to hide the underlying error's identity.
21
+ - **Never Log AND Return**: Pick one. If you log an error, handle it there. If you return it, let the caller log it. Doing both creates duplicate noise in APM systems.
22
+ - **Sentinel Errors**: Define top-level exported errors for standard package failure modes (`var ErrNotFound = errors.New(...)`). Use `errors.Is(err, ErrNotFound)` rather than string comparisons.
23
+
24
+ ## 3. Concurrency & Goroutines
25
+
26
+ - **Know When To Stop**: Never start a goroutine without knowing exactly how and when it will terminate. Unbounded or untracked goroutines cause devastating memory leaks.
27
+ - **Coordination**: Use `sync.WaitGroup` to wait for a pool of workers.
28
+ - **Channels vs Mutexes**:
29
+ - Use `chan` to pass ownership of data between concurrent routines.
30
+ - Use `sync.Mutex` to protect shared state accessed from multiple routines.
31
+ - **Lock Discipline**: Keep the critical section of a lock as short as physically possible. **Never** perform I/O while holding a mutex.
32
+
33
+ ## 4. Naming Conventions (No Stuttering)
34
+
35
+ - **Getters**: Go does not use `Get` prefixes for getters. If a struct has an `Owner` field, the getter is `Owner()`, not `GetOwner()`. The setter would be `SetOwner()`.
36
+ - **Stuttering**: Avoid package/type name redundancy.
37
+ - _Bad_: `user.UserConfig`, `log.Logger`.
38
+ - _Good_: `user.Config`, `log.Entry`.
39
+ - **Interfaces**: Single-method interfaces should end in `-er` (`Reader`, `Writer`, `Formatter`).
40
+ - **Short Variable Names**: Idiomatic Go uses very short variables for scope-limited entities (`idx` instead of `index`, `b` instead of `buffer`, `r` instead of `reader`).
41
+
42
+ ## 5. Performance & Data Structures
43
+
44
+ - **Capacity Pre-allocation**: Always use `make([]T, 0, capacity)` or `make(map[K]V, capacity)` when the target size is known. This dramatically reduces heap allocations during append loops.
45
+ - **Nil vs Empty**: A `nil` slice (`var names []string`) is idiomatically correct, functionally identical to a zero-length slice, and requires zero allocations. Use it over `names := []string{}` unless JSON formatting explicitly demands an empty array `[]` instead of `null`.
46
+
47
+ ## 6. Testing
48
+
49
+ - **Table-Driven Tests**: Always utilize `[]struct{ name string ... }` iterated via `t.Run()` for clear, modular test cases.
50
+ - **t.Helper()**: Ensure any custom assertion or setup function immediately calls `t.Helper()` so test runner output points to the actual failure site, not the inside of the utility function.
51
+
52
+ ## 7. Tooling & Enforcement
53
+
54
+ - The agent should prioritize running `go fmt ./...` and `golangci-lint run` (if available) before confirming code completion.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: mysql
3
+ description: Enterprise MySQL & MariaDB production rules — query safety, connection pooling, and strict schema configurations.
4
+ ---
5
+
6
+ # MySQL / MariaDB Production Standards
7
+
8
+ MySQL and MariaDB are powerful relationship-driven databases, but AI agents MUST adhere to these strict behavioral boundaries when executing queries, utilizing the `mysql-mcp` server, or generating application code.
9
+
10
+ ## 1. Query Safety & Execution Rules
11
+
12
+ - **Absolute Parameterization**: You MUST ALWAYS use parameterized queries (`?`). Under zero circumstances are you permitted to string-interpolate or concatenate variables into a raw SQL string. This is to enforce strict SQL-injection prevention.
13
+ - **Guarded Reads**: Every top-level `SELECT` statement MUST contain a `LIMIT` clause unless explicitly overridden by the user. Do not execute unbounded `SELECT * FROM table;` queries.
14
+ - **Safe Destructive Ops**: `DELETE` and `UPDATE` queries MUST include a `WHERE` clause. Never execute these operations without a targeted identifier.
15
+ - **Action Scoping**: Limit operations to single-statements. Do not stack multiple statements (`query1; query2;`) in a single payload unless executing a batch migration.
16
+
17
+ ## 2. Connections & Transactions
18
+
19
+ - **Connection Pooling**: Always assume and design for connection pooling. Code evaluating database connections should handle acquiring from and releasing to a pool, avoiding connection leaks.
20
+ - **Data Mutability Scopes**: Whenever executing writes spanning across multiple tables (e.g., inserts requiring foreign key links), they MUST be wrapped in a transaction block: `START TRANSACTION; ... COMMIT;` with robust `ROLLBACK` logic in the `catch` block.
21
+
22
+ ## 3. Strict Schema Configurations
23
+
24
+ - **Mode Enforcement**: Ensure `sql_mode` includes `STRICT_TRANS_TABLES` and `ONLY_FULL_GROUP_BY`. AI agents must not disable these modes to bypass errors; you must rewrite your `GROUP BY` logic to be strictly compliant.
25
+ - **Foreign Keys**: Explicitly define `FOREIGN KEY` constraints during `CREATE TABLE` unless specifically orchestrating a Vitess/PlanetScale sharded environment where declarative FKs are explicitly forbidden by the user context.
26
+
27
+ ## 4. Ecosystem & Diagnostics
28
+
29
+ - **Error Handling**: When intercepting connection drops or authentication failures (e.g., ER_ACCESS_DENIED_ERROR), instruct the user to verify their `.env` configurations (`MYSQL_URL`, `MYSQL_HOST`, etc.). Do not hallucinate database names.
30
+ - **Using MCP**: If the `mysql-mcp` server is attached, prefer utilizing its formal 227+ structured tools over executing raw Bash CLI scripts (`mysql -h ...`) to guarantee payload optimizations and schema intelligence.
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "neverinfamous-agent-skills",
3
+ "version": "1.0.8",
4
+ "description": "Foundational AI agent metacognitive skills and workflows for the Adamic ecosystem.",
5
+ "type": "module",
6
+ "main": "README.md",
7
+ "bin": {
8
+ "agent-skills": "bin/sync.js"
9
+ },
10
+ "files": [
11
+ "bin/",
12
+ "README.md",
13
+ "autonomous-dev/",
14
+ "bun/",
15
+ "github-commander/",
16
+ "gitlab/",
17
+ "golang/",
18
+ "mysql/",
19
+ "playwright-standard/",
20
+ "postgres/",
21
+ "react-best-practices/",
22
+ "rust/",
23
+ "shadcn-ui/",
24
+ "skill-builder/",
25
+ "sqlite/",
26
+ "typescript/",
27
+ "vitest-standard/"
28
+ ],
29
+ "scripts": {
30
+ "sync": "node bin/sync.js"
31
+ },
32
+ "keywords": [
33
+ "agent",
34
+ "skills",
35
+ "mcp",
36
+ "llm",
37
+ "github-commander"
38
+ ],
39
+ "author": "Adamic.tech",
40
+ "license": "MIT",
41
+ "repository": {
42
+ "type": "git",
43
+ "url": "git+https://github.com/neverinfamous/memory-journal-mcp.git"
44
+ },
45
+ "publishConfig": {
46
+ "access": "public"
47
+ }
48
+ }
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: playwright-standard
3
+ description: |
4
+ Comprehensive, opinionated guidance for Playwright test development. Use when
5
+ writing E2E, API, component, or visual tests, debugging failures, implementing
6
+ Page Object Model, or configuring CI/CD. Includes "Golden Rules" for resilient
7
+ tests and provides on-demand reference for specialized scenarios (Electron,
8
+ WebSockets, mobile, security audits).
9
+ ---
10
+
11
+ # Playwright Standard
12
+
13
+ This skill combines battle-tested coding standards with industrial-scale infrastructure guidance. It is designed to keep agents on the "Golden Path" of modern Playwright development while providing deep reference for niche environments.
14
+
15
+ ## Golden Rules (Mandatory)
16
+
17
+ 1. **`getByRole()` over CSS/XPath** — Resilient to markup changes, mirrors how users see the page.
18
+ 2. **Never `page.waitForTimeout()`** — Use `expect(locator).toBeVisible()` or `page.waitForURL()`.
19
+ 3. **Web-first assertions** — `expect(locator)` auto-retries; `expect(await locator.textContent())` does not.
20
+ 4. **Isolate every test** — Every test must run independently in any order (no shared state).
21
+ 5. **Fixtures over globals** — Share state via `test.extend()`, not module-level variables.
22
+ 6. **`baseURL` in config** — ZERO hardcoded URLs in test files.
23
+ 7. **Auth: Reuse storage state** — Use `browserContext.storageState` to avoid UI login in every test.
24
+ 8. **Network: Mock third-party only** — Never mock your own app; mock external APIs, gateways, and emails.
25
+ 9. **Traces: `'on-first-retry'`** — High-fidelity debugging without CI performance penalties.
26
+ 10. **One behavior per test** — Avoid "mega-tests": keep focus narrow and assertions meaningful.
27
+
28
+ ## Quality Standards
29
+
30
+ ### Locators Priority
31
+
32
+ 1. **Role**: `page.getByRole('button', { name: 'Submit' })`
33
+ 2. **Label**: `page.getByLabel('User Name')`
34
+ 3. **Placeholder**: `page.getByPlaceholder('Search...')`
35
+ 4. **Text**: `page.getByText('Success')`
36
+ 5. **TestID**: `page.getByTestId('submit-btn')` (Last resort)
37
+
38
+ ### Synchronization
39
+
40
+ - **Do**: `await expect(locator).toBeVisible()`
41
+ - **Avoid**: `await page.waitForSelector('.btn')`
42
+ - **Avoid**: `await page.waitForLoadState('networkidle')` (Flaky on high-latency networks)
43
+
44
+ ---
45
+
46
+ ## Specialized References (Load On-Demand)
47
+
48
+ For infrastructure, scale, or niche environments, read the relevant reference file:
49
+
50
+ | Scenario | Reference File |
51
+ | :------------------------------- | :-------------------------------------------------------- |
52
+ | **CI/CD, Sharding, Docker** | [infrastructure.md](references/infrastructure.md) |
53
+ | **Electron, WebSockets, Canvas** | [advanced-scenarios.md](references/advanced-scenarios.md) |
54
+ | **Visual, Accessibility, API** | [advanced-scenarios.md](references/advanced-scenarios.md) |
55
+
56
+ ## Example: Fixture-based Isolation
57
+
58
+ See [fixtures.ts](examples/fixtures.ts) for the recommended pattern for sharing state without global variables.
@@ -0,0 +1,66 @@
1
+ import { test as base, Page, Browser, BrowserContext } from '@playwright/test'
2
+
3
+ // 1. Define the fixture type
4
+ type MyFixtures = {
5
+ todoPage: TodoPage
6
+ authenticatedUser: User
7
+ }
8
+
9
+ // 2. Extend the base test with your fixture
10
+ export const test = base.extend<MyFixtures>({
11
+ todoPage: async ({ page }: { page: Page }, use: (r: TodoPage) => Promise<void>) => {
12
+ // Setup (Isolation over globals)
13
+ const todoPage = new TodoPage(page)
14
+ await todoPage.goto()
15
+
16
+ // Pass the fixture to the test
17
+ await use(todoPage)
18
+
19
+ // Teardown (optional)
20
+ await todoPage.removeAll()
21
+ },
22
+
23
+ authenticatedUser: async (
24
+ { browser }: { browser: Browser },
25
+ use: (r: User) => Promise<void>
26
+ ) => {
27
+ // Shared state (StorageState over login-in-each-test)
28
+ const context = await browser.newContext({ storageState: 'auth.json' })
29
+ const user = new User(context)
30
+ await use(user)
31
+ await context.close()
32
+ },
33
+ })
34
+
35
+ export { expect } from '@playwright/test'
36
+
37
+ // 3. Usage inside a test file
38
+ /*
39
+ import { test, expect } from './fixtures';
40
+
41
+ test('create a todo', async ({ todoPage }) => {
42
+ await todoPage.addTodo('buy milk');
43
+ await expect(todoPage.todoList.locator('li')).toHaveText(['buy milk']);
44
+ });
45
+ */
46
+
47
+ class TodoPage {
48
+ public todoList: any // Using any for example simplicity, but it's initialized in constructor
49
+ constructor(private page: Page) {
50
+ this.todoList = this.page.locator('ul')
51
+ }
52
+ async goto() {
53
+ await this.page.goto('/todo')
54
+ }
55
+ async removeAll() {
56
+ /* ... */
57
+ }
58
+ async addTodo(text: string) {
59
+ await this.page.fill('input', text)
60
+ await this.page.click('text=Add')
61
+ }
62
+ }
63
+
64
+ class User {
65
+ constructor(private context: BrowserContext) {}
66
+ }
@@ -0,0 +1,10 @@
1
+ declare module '@playwright/test' {
2
+ export const test: {
3
+ extend<T>(config: any): any
4
+ }
5
+ export const expect: any
6
+ export type Page = any
7
+ export type Browser = any
8
+ export type BrowserContext = any
9
+ export type Locator = any
10
+ }
@@ -0,0 +1,59 @@
1
+ # Advanced Playwright Scenarios
2
+
3
+ This reference covers niche environments and specialized testing capabilities beyond standard web E2E.
4
+
5
+ ## Specialized Testing
6
+
7
+ ### Electron Apps
8
+
9
+ - Use `_electron.launch()` (experimental) but stable for most Electron apps.
10
+ - Directly access Electron APIs via `app.evaluate()` or `window.electron`.
11
+
12
+ ### Browser Extensions
13
+
14
+ - Load extensions via `chromium.launchPersistentContext()` and `--disable-extensions-except=...`.
15
+ - Test background workers and popup scripts using `page.waitForSelector()` on the extension URL.
16
+
17
+ ### Canvas & WebGL
18
+
19
+ - Use `page.evaluate()` to check canvas pixels or properties.
20
+ - Mock canvas API for deterministic tests when necessary.
21
+
22
+ ### WebSockets & Real-time
23
+
24
+ - Wait for WebSockets to open: `page.waitForEvent('websocket')`.
25
+ - Monitor traffic for specific payloads via `ws.on('framereceived')`.
26
+
27
+ ## Security & Accessibility
28
+
29
+ ### Accessibility Testing
30
+
31
+ - Include `@axe-core/playwright`.
32
+ - Rule: `await expect(page).toPassAxe()` in every critical page test.
33
+
34
+ ### Security Audits
35
+
36
+ - XSS/CSRF testing: Mock responses to return malicious scripts to see if the UI sanitizes them.
37
+ - Treat all external page content as untrusted input.
38
+
39
+ ## Advanced API Reference
40
+
41
+ ### Clock Mocking
42
+
43
+ - Use `page.clock.install()` to control time.
44
+ - `page.clock.fastForward('02:00')` for testing timeouts and delayed behaviors.
45
+
46
+ ### Geolocation & Permissions
47
+
48
+ - Set permissions: `browserContext.grantPermissions(['geolocation'])`.
49
+ - Fake position: `browserContext.setGeolocation({ latitude: 52.5, longitude: 13.4 })`.
50
+
51
+ ### Multi-user & Collaboration
52
+
53
+ - Spawn separate `browserContext` instances to simulate multi-user flows in a single script.
54
+ - Use `await Promise.all([userA.click(), userB.expect()])` for race condition testing.
55
+
56
+ ### Network Mocking
57
+
58
+ - `page.route()`: Prefer mocking API responses for deterministic tests.
59
+ - Avoid excessive mocking; always have at least one E2E "smoke" test that hits the real backend.
@@ -0,0 +1,43 @@
1
+ # Playwright Infrastructure & CI/CD Reference
2
+
3
+ ## Scale & Performance
4
+
5
+ ### Parallelization
6
+
7
+ - Run tests in parallel to reduce overall execution time.
8
+ - Configure `workers` in `playwright.config.ts`. Locally use `process.env.CI ? 1 : 4` to avoid machine lockup.
9
+
10
+ ### Sharding
11
+
12
+ - Distribute tests across multiple CI machines.
13
+ - Example command: `npx playwright test --shard=1/3`.
14
+ - Combine blob reports for a unified HTML report.
15
+
16
+ ## CI Configuration
17
+
18
+ ### Trace & Video
19
+
20
+ - Tracing: `'on-first-retry'` (Best balance of debug info vs storage).
21
+ - Video: `'on-first-retry'` (High fidelity failure evidence).
22
+
23
+ ### Secret Management
24
+
25
+ - Use environment variables for secrets: `process.env.PASSWORD`.
26
+ - Never commit `.env` or hardcoded keys.
27
+
28
+ ## Docker & Containerization
29
+
30
+ ### SLSA Compliance
31
+
32
+ - Pin images using SHA-256 digests: `mcr.microsoft.com/playwright:v1.59.1-focal@sha256:xxxx`.
33
+ - Avoid floating tags like `:latest` or `:v1` to ensure reproducible builds.
34
+
35
+ ### Execution Policy
36
+
37
+ - Run as a non-root user when possible.
38
+ - Mount the host machine's UI/X11 socket if running headed mode inside Docker.
39
+
40
+ ## Reporting & Analytics
41
+
42
+ - Use **Currents.dev** for enterprise-grade reporting, flakiness detection, and parallelization analytics.
43
+ - Integrate via the `@currents/playwright` reporter plugin.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: postgres
3
+ description: Enterprise PostgreSQL production rules — advanced querying, indexing, JSONB data, and strict optimization patterns.
4
+ ---
5
+
6
+ # PostgreSQL Production Standards
7
+
8
+ PostgreSQL is a deeply capable object-relational database. Because of its advanced feature set, AI agents and orchestrated deployment workflows MUST adhere to strict operational boundaries to avoid common pitfalls like index bloating, inefficient JSONB parsing, and locking regressions.
9
+
10
+ ## 1. Advanced Querying & Safety
11
+
12
+ - **Strict Parameterization**: Just like MySQL, executing parameterized queries (`$1, $2, ...`) is a non-negotiable hard mandate. String interpolation is globally prohibited.
13
+ - **Explicit Columns**: NEVER use `SELECT *` in production code. You must specifically query required columns. This minimizes data transfer latency and prevents application crashes if schema columns mutate.
14
+ - **N+1 Avoidance**: Agents scaffolding code must implement batch loading architectures (e.g., `DataLoader`) or advanced `JOIN` logic when building APIs. Do not execute identical iterative queries inside loops.
15
+ - **Guarded Modifications**: Any `UPDATE` or `DELETE` MUST contain a deterministic `WHERE` block.
16
+
17
+ ## 2. Advanced Indexing Patterns
18
+
19
+ - **Targeted Strategies**: Do not blindly index every column. Optimize based on frequency.
20
+ - **Partial Indexes**: If you routinely query states like `WHERE active = true`, you must use a Partial Index (`CREATE INDEX idx_active_users ON users(email) WHERE active = true;`) instead of indexing the entire column.
21
+ - **Composite Layout**: For standard queries targeting multiple identifiers, employ Composite Indexes with the most selective columns first.
22
+
23
+ ## 3. Operations & Migrations
24
+
25
+ - **Transaction Safety**: Wrap multi-step mutations in `BEGIN; ... COMMIT;`. Standardize transactions to stay small and fast to prevent lock contentions.
26
+ - **Analytical Overviews**: Use `EXPLAIN ANALYZE` locally when debugging slow queries to analyze sequential sweeps relative to index scans.
27
+ - **Schema Extensibility**: Add constraints and columns dynamically (e.g., `ALTER TABLE users ADD CONSTRAINT unique_email UNIQUE (email);`). Always apply sane `DEFAULT` properties to avoid backfilling issues on massive tables.
28
+
29
+ ## 4. Modern PostGres Functionality
30
+
31
+ - **JSONB Arrays/Objects**: Use `JSONB`, never `JSON`. JSONB is stored in a decomposed binary format, allowing fast, native index checking (via `@>` or `?` operators) instead of full parsing upon retrieval.
32
+ - **Row-Level Security (RLS)**: Emphasize defining default-deny security protocols using `ENABLE ROW LEVEL SECURITY`.
33
+ - **Ecosystem Integration**: Whenever available, prefer using structured `postgres-mcp` tools for safe schema interpretation over native Bash `psql` piping.