@codyswann/lisa 2.127.1 → 2.128.1

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 (131) hide show
  1. package/package.json +1 -1
  2. package/plugins/lisa/.claude-plugin/plugin.json +5 -1
  3. package/plugins/lisa/.codex-plugin/hooks.json +4 -0
  4. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  5. package/plugins/lisa/commands/parity-code-review.md +6 -0
  6. package/plugins/lisa/commands/parity-code-simplifier.md +6 -0
  7. package/plugins/lisa/commands/parity-coderabbit.md +6 -0
  8. package/plugins/lisa/commands/parity-safety-net-rules.md +6 -0
  9. package/plugins/lisa/commands/parity-sentry-sdk-setup.md +6 -0
  10. package/plugins/lisa/commands/parity-sentry-seer.md +6 -0
  11. package/plugins/lisa/commands/parity-skill-creator.md +6 -0
  12. package/plugins/lisa/hooks/parity-safety-net.sh +102 -0
  13. package/plugins/lisa/skills/parity-code-review/SKILL.md +83 -0
  14. package/plugins/lisa/skills/parity-code-review/agents/openai.yaml +4 -0
  15. package/plugins/lisa/skills/parity-code-simplifier/SKILL.md +76 -0
  16. package/plugins/lisa/skills/parity-code-simplifier/agents/openai.yaml +4 -0
  17. package/plugins/lisa/skills/parity-coderabbit/SKILL.md +77 -0
  18. package/plugins/lisa/skills/parity-coderabbit/agents/openai.yaml +4 -0
  19. package/plugins/lisa/skills/parity-safety-net-rules/SKILL.md +144 -0
  20. package/plugins/lisa/skills/parity-safety-net-rules/agents/openai.yaml +4 -0
  21. package/plugins/lisa/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
  22. package/plugins/lisa/skills/parity-sentry-sdk-setup/agents/openai.yaml +4 -0
  23. package/plugins/lisa/skills/parity-sentry-seer/SKILL.md +135 -0
  24. package/plugins/lisa/skills/parity-sentry-seer/agents/openai.yaml +4 -0
  25. package/plugins/lisa/skills/parity-skill-creator/SKILL.md +149 -0
  26. package/plugins/lisa/skills/parity-skill-creator/agents/openai.yaml +4 -0
  27. package/plugins/lisa-agy/commands/parity-code-review.md +6 -0
  28. package/plugins/lisa-agy/commands/parity-code-simplifier.md +6 -0
  29. package/plugins/lisa-agy/commands/parity-coderabbit.md +6 -0
  30. package/plugins/lisa-agy/commands/parity-safety-net-rules.md +6 -0
  31. package/plugins/lisa-agy/commands/parity-sentry-sdk-setup.md +6 -0
  32. package/plugins/lisa-agy/commands/parity-sentry-seer.md +6 -0
  33. package/plugins/lisa-agy/commands/parity-skill-creator.md +6 -0
  34. package/plugins/lisa-agy/plugin.json +1 -1
  35. package/plugins/lisa-agy/skills/parity-code-review/SKILL.md +83 -0
  36. package/plugins/lisa-agy/skills/parity-code-simplifier/SKILL.md +76 -0
  37. package/plugins/lisa-agy/skills/parity-coderabbit/SKILL.md +77 -0
  38. package/plugins/lisa-agy/skills/parity-safety-net-rules/SKILL.md +144 -0
  39. package/plugins/lisa-agy/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
  40. package/plugins/lisa-agy/skills/parity-sentry-seer/SKILL.md +135 -0
  41. package/plugins/lisa-agy/skills/parity-skill-creator/SKILL.md +149 -0
  42. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  43. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  44. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  45. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  47. package/plugins/lisa-copilot/.claude-plugin/plugin.json +5 -1
  48. package/plugins/lisa-copilot/commands/parity-code-review.md +6 -0
  49. package/plugins/lisa-copilot/commands/parity-code-simplifier.md +6 -0
  50. package/plugins/lisa-copilot/commands/parity-coderabbit.md +6 -0
  51. package/plugins/lisa-copilot/commands/parity-safety-net-rules.md +6 -0
  52. package/plugins/lisa-copilot/commands/parity-sentry-sdk-setup.md +6 -0
  53. package/plugins/lisa-copilot/commands/parity-sentry-seer.md +6 -0
  54. package/plugins/lisa-copilot/commands/parity-skill-creator.md +6 -0
  55. package/plugins/lisa-copilot/hooks/parity-safety-net.sh +102 -0
  56. package/plugins/lisa-copilot/skills/parity-code-review/SKILL.md +83 -0
  57. package/plugins/lisa-copilot/skills/parity-code-simplifier/SKILL.md +76 -0
  58. package/plugins/lisa-copilot/skills/parity-coderabbit/SKILL.md +77 -0
  59. package/plugins/lisa-copilot/skills/parity-safety-net-rules/SKILL.md +144 -0
  60. package/plugins/lisa-copilot/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
  61. package/plugins/lisa-copilot/skills/parity-sentry-seer/SKILL.md +135 -0
  62. package/plugins/lisa-copilot/skills/parity-skill-creator/SKILL.md +149 -0
  63. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-cursor/commands/parity-code-review.md +6 -0
  65. package/plugins/lisa-cursor/commands/parity-code-simplifier.md +6 -0
  66. package/plugins/lisa-cursor/commands/parity-coderabbit.md +6 -0
  67. package/plugins/lisa-cursor/commands/parity-safety-net-rules.md +6 -0
  68. package/plugins/lisa-cursor/commands/parity-sentry-sdk-setup.md +6 -0
  69. package/plugins/lisa-cursor/commands/parity-sentry-seer.md +6 -0
  70. package/plugins/lisa-cursor/commands/parity-skill-creator.md +6 -0
  71. package/plugins/lisa-cursor/hooks/hooks.json +4 -0
  72. package/plugins/lisa-cursor/hooks/parity-safety-net.sh +102 -0
  73. package/plugins/lisa-cursor/skills/parity-code-review/SKILL.md +83 -0
  74. package/plugins/lisa-cursor/skills/parity-code-simplifier/SKILL.md +76 -0
  75. package/plugins/lisa-cursor/skills/parity-coderabbit/SKILL.md +77 -0
  76. package/plugins/lisa-cursor/skills/parity-safety-net-rules/SKILL.md +144 -0
  77. package/plugins/lisa-cursor/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
  78. package/plugins/lisa-cursor/skills/parity-sentry-seer/SKILL.md +135 -0
  79. package/plugins/lisa-cursor/skills/parity-skill-creator/SKILL.md +149 -0
  80. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  81. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  82. package/plugins/lisa-expo-agy/plugin.json +1 -1
  83. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  84. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  85. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  86. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  87. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  88. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  89. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  90. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  91. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  92. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  93. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  94. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  95. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  96. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  97. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  98. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  99. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  100. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  101. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  102. package/plugins/lisa-rails-agy/plugin.json +1 -1
  103. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  104. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  105. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  106. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  107. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  108. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  109. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  110. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  111. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  112. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  113. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  114. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  115. package/plugins/src/base/.claude-plugin/plugin.json +2 -1
  116. package/plugins/src/base/commands/parity-code-review.md +6 -0
  117. package/plugins/src/base/commands/parity-code-simplifier.md +6 -0
  118. package/plugins/src/base/commands/parity-coderabbit.md +6 -0
  119. package/plugins/src/base/commands/parity-safety-net-rules.md +6 -0
  120. package/plugins/src/base/commands/parity-sentry-sdk-setup.md +6 -0
  121. package/plugins/src/base/commands/parity-sentry-seer.md +6 -0
  122. package/plugins/src/base/commands/parity-skill-creator.md +6 -0
  123. package/plugins/src/base/hooks/parity-safety-net.sh +102 -0
  124. package/plugins/src/base/skills/parity-code-review/SKILL.md +83 -0
  125. package/plugins/src/base/skills/parity-code-simplifier/SKILL.md +76 -0
  126. package/plugins/src/base/skills/parity-coderabbit/SKILL.md +77 -0
  127. package/plugins/src/base/skills/parity-safety-net-rules/SKILL.md +144 -0
  128. package/plugins/src/base/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
  129. package/plugins/src/base/skills/parity-sentry-seer/SKILL.md +135 -0
  130. package/plugins/src/base/skills/parity-skill-creator/SKILL.md +149 -0
  131. package/scripts/plugin-parity-drift.mjs +9 -1
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: parity-safety-net-rules
3
+ description: "View, set, and verify the custom guard rules enforced by Lisa's safety-net PreToolUse Bash hook (parity-safety-net.sh). The consolidated cross-agent equivalent of the upstream safety-net plugin's set-custom-rules + verify-custom-rules skills — manages a project-local list of extended-regex patterns that block destructive shell commands, on Codex, agy, Copilot, Cursor, and Claude."
4
+ allowed-tools: ["Read", "Edit", "Write", "Bash"]
5
+ synced-from: safety-net@cc-marketplace@0.9.0
6
+ ---
7
+
8
+ # Parity Safety-Net Rules
9
+
10
+ Manage the **custom guard rules** that Lisa's safety-net hook enforces on every
11
+ Bash command. The hook (`hooks/parity-safety-net.sh`, registered as a
12
+ `PreToolUse` matcher on `Bash`) ships with built-in guards against catastrophic
13
+ commands; this skill lets a project **view**, **set**, and **verify** *additional*
14
+ project-specific rules on top of those built-ins.
15
+
16
+ > **Lisa-native reimplementation.** This consolidates the upstream
17
+ > `safety-net@cc-marketplace` plugin's two rule-management skills
18
+ > (`set-custom-rules` + `verify-custom-rules`) into one. It is reimplemented from
19
+ > scratch against Lisa conventions — it does **not** port or invoke upstream
20
+ > plugin code.
21
+ >
22
+ > **Drift tracking.** Pinned to `safety-net@cc-marketplace@0.9.0`.
23
+ > `scripts/plugin-parity-drift.mjs` compares this pin against the upstream
24
+ > version in the plugin cache and flags staleness. **Do not port or copy upstream
25
+ > plugin code.**
26
+
27
+ ## How the rules work
28
+
29
+ - The hook always enforces its **built-in guards** (see below). These cannot be
30
+ disabled from the rules file — they are the floor.
31
+ - **Custom rules** live in a project-local file, one **POSIX extended regular
32
+ expression (ERE)** per line. Blank lines and lines beginning with `#` are
33
+ ignored. Matching is case-insensitive (`grep -Ei`).
34
+ - If *any* built-in guard or custom rule matches the proposed command, the hook
35
+ exits non-zero and the Bash call is **blocked**, with the reason shown to the
36
+ agent.
37
+
38
+ ### Rules file location
39
+
40
+ Resolved in this order:
41
+
42
+ 1. `$SAFETY_NET_RULES_FILE` (explicit override), else
43
+ 2. `${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt`
44
+
45
+ ```bash
46
+ RULES_FILE="${SAFETY_NET_RULES_FILE:-${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt}"
47
+ ```
48
+
49
+ ### Built-in guards (always on)
50
+
51
+ 1. `rm -rf` of a filesystem root, `$HOME`/`~`, or a top-level wildcard.
52
+ 2. Force-pushing a protected branch (`main`/`master`/`production`/`release`).
53
+ `--force-with-lease` is intentionally allowed.
54
+ 3. `git reset --hard` while the working tree is **dirty** (would discard work).
55
+ 4. Destructive SQL — `DROP DATABASE/SCHEMA/TABLE`, `TRUNCATE TABLE`.
56
+
57
+ ## View the current rules
58
+
59
+ ```bash
60
+ RULES_FILE="${SAFETY_NET_RULES_FILE:-${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt}"
61
+ if [ -f "$RULES_FILE" ]; then
62
+ echo "Custom safety-net rules ($RULES_FILE):"
63
+ grep -vE '^[[:space:]]*(#|$)' "$RULES_FILE" || echo "(no active rules)"
64
+ else
65
+ echo "No custom rules file yet ($RULES_FILE). Only built-in guards are active."
66
+ fi
67
+ ```
68
+
69
+ `Read` the file to show comments and structure as well.
70
+
71
+ ## Set (add or edit) a rule
72
+
73
+ A rule is an ERE matched against the full command string. Keep rules **specific**
74
+ to avoid blocking legitimate work — anchor on the dangerous verb and its target.
75
+
76
+ 1. Ensure the file exists, then **append** a commented rule (use `Edit`/`Write`,
77
+ or append from the shell):
78
+
79
+ ```bash
80
+ RULES_FILE="${SAFETY_NET_RULES_FILE:-${CLAUDE_PROJECT_DIR:-$PWD}/.claude/safety-net-rules.txt}"
81
+ mkdir -p "$(dirname "$RULES_FILE")"
82
+ {
83
+ echo "# Block deleting a Kubernetes namespace"
84
+ echo 'kubectl[[:space:]]+delete[[:space:]]+namespace'
85
+ } >> "$RULES_FILE"
86
+ ```
87
+
88
+ 2. **Always verify** the new rule (next section) before considering it set —
89
+ confirm it blocks what it should and allows what it shouldn't.
90
+
91
+ Editing/removing: open the file with `Edit` and change or delete the line.
92
+ Removing a rule never affects the built-in guards.
93
+
94
+ ## Verify the rules
95
+
96
+ Two checks — both should pass before you trust a rule.
97
+
98
+ ### 1. The ERE is valid
99
+
100
+ An invalid regex would make the hook error on every command. Validate it:
101
+
102
+ ```bash
103
+ printf '%s' "$RULE" | grep -Eq -- "$RULE" 2>/dev/null && echo "valid ERE" \
104
+ || echo "INVALID ERE — fix before saving"
105
+ ```
106
+
107
+ ### 2. The rule behaves as intended
108
+
109
+ Drive the **actual hook** with a fake `PreToolUse` payload and assert the exit
110
+ code (non-zero = blocked, 0 = allowed). Build the JSON with `jq` so the test
111
+ command line itself never contains the dangerous literal:
112
+
113
+ ```bash
114
+ HOOK="${CLAUDE_PLUGIN_ROOT}/hooks/parity-safety-net.sh"
115
+
116
+ check() { # check <expect: block|allow> <command>
117
+ jq -nc --arg c "$2" '{tool_name:"Bash",tool_input:{command:$c}}' \
118
+ | bash "$HOOK" >/dev/null 2>&1
119
+ local code=$?
120
+ local got=allow; [ "$code" -ne 0 ] && got=block
121
+ printf '%-5s want=%-5s got=%-5s %s\n' \
122
+ "$([ "$got" = "$1" ] && echo OK || echo FAIL)" "$1" "$got" "$2"
123
+ }
124
+
125
+ # Should block (matches the new rule):
126
+ check block "kubectl delete namespace prod"
127
+ # Should allow (must not over-match):
128
+ check allow "kubectl get pods"
129
+ ```
130
+
131
+ Report a table of cases with want/got/verdict. If any case disagrees, tighten the
132
+ ERE and re-verify.
133
+
134
+ ## Rules
135
+
136
+ - **Built-in guards are the floor** — custom rules only *add* blocks; they cannot
137
+ weaken the built-ins.
138
+ - **Prefer specific over broad** — a rule that blocks too much trains users to
139
+ bypass the safety net. Anchor on verb + target.
140
+ - **Verify every rule against the real hook** before saving — never ship an
141
+ unverified or syntactically invalid ERE.
142
+ - **Never weaken the net to unblock yourself.** If a built-in guard fires on a
143
+ command that is genuinely safe, run it manually outside the agent after the
144
+ user confirms — do not edit the hook to remove the guard.
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: parity-sentry-sdk-setup
3
+ description: "Install and configure the Sentry SDK for a project — detect the framework/runtime, add the correct @sentry/<framework> package, initialize the client, wire the DSN through env, enable error + performance monitoring, and set up source map upload for readable stack traces. One consolidated skill covering react, nextjs, node, nestjs, express, python, django, react-native, and more. Lisa-native reimplementation of Sentry's SDK-setup suite. Use when adding Sentry to a project or fixing an existing Sentry install."
4
+ allowed-tools: ["Read", "Edit", "Write", "Bash"]
5
+ synced-from: sentry@claude-plugins-official@1.0.0
6
+ ---
7
+
8
+ # Sentry SDK Setup
9
+
10
+ Detect a project's framework and runtime, then install and configure the correct
11
+ Sentry SDK with sensible, production-ready defaults: client initialization, DSN
12
+ via environment variable, error capture, performance/tracing, and source map
13
+ upload so stack traces are readable.
14
+
15
+ ## Consolidation note
16
+
17
+ The upstream `sentry@claude-plugins-official` plugin ships **~30 separate
18
+ per-SDK setup skills** (one per framework/runtime). This **single** Lisa-native
19
+ skill consolidates all of them: instead of one thin skill per SDK, it detects the
20
+ framework and applies the matching case below. The behavior is reimplemented from
21
+ scratch against Lisa conventions — it is **not** a translation of the upstream
22
+ skills. Pinned to `sentry@claude-plugins-official@1.0.0` via `synced-from` so the
23
+ parity drift detector tracks it as one unit.
24
+
25
+ ## Step 1 — Detect framework & runtime
26
+
27
+ Inspect the project before choosing an SDK. Read `package.json`
28
+ (dependencies/scripts), config files, and lockfiles:
29
+
30
+ - `next` dependency or `next.config.*` → **Next.js**
31
+ - `@nestjs/core` → **NestJS**
32
+ - `react-native` / `expo` → **React Native / Expo**
33
+ - `react` + a bundler (vite/webpack) without Next → **React (browser)**
34
+ - `express` / `fastify` / `koa` and a Node entrypoint → **Node server**
35
+ - `vue` / `@angular/core` / `svelte` → that browser framework
36
+ - `pyproject.toml` / `requirements.txt`; `django`/`flask`/`fastapi` →
37
+ **Python** (and which web framework)
38
+ - A plain Node library/CLI → **Node**
39
+
40
+ If the runtime is genuinely ambiguous, ask which app to instrument rather than
41
+ guessing. Respect the project's package manager (bun/npm/pnpm/yarn — match the
42
+ lockfile) and module system (ESM vs CJS).
43
+
44
+ ## Step 2 — Install the package
45
+
46
+ Use the project's package manager. Examples (swap `bun add` for your manager):
47
+
48
+ | Framework | Package |
49
+ | --- | --- |
50
+ | React (browser) | `@sentry/react` |
51
+ | Next.js | `@sentry/nextjs` |
52
+ | Node / Express / Fastify | `@sentry/node` (+ `@sentry/profiling-node` for profiling) |
53
+ | NestJS | `@sentry/nestjs` (+ `@sentry/node`) |
54
+ | React Native / Expo | `@sentry/react-native` |
55
+ | Vue | `@sentry/vue` |
56
+ | Angular | `@sentry/angular` |
57
+ | Svelte / SvelteKit | `@sentry/svelte` / `@sentry/sveltekit` |
58
+ | Python (generic) | `sentry-sdk` |
59
+ | Django | `sentry-sdk[django]` |
60
+ | Flask | `sentry-sdk[flask]` |
61
+ | FastAPI | `sentry-sdk[fastapi]` |
62
+
63
+ For Next.js, prefer the official wizard when available — it scaffolds the config
64
+ files and source-map upload for you:
65
+
66
+ ```bash
67
+ npx @sentry/wizard@latest -i nextjs
68
+ ```
69
+
70
+ ## Step 3 — Initialize the client
71
+
72
+ Initialize **as early as possible** in the app's lifecycle, before other code
73
+ runs. Always read the DSN from the environment (see Step 4) — never hard-code it.
74
+
75
+ **React (browser)** — `src/instrument.ts`, imported first in the entrypoint:
76
+
77
+ ```ts
78
+ import * as Sentry from "@sentry/react";
79
+
80
+ Sentry.init({
81
+ dsn: import.meta.env.VITE_SENTRY_DSN,
82
+ environment: import.meta.env.MODE,
83
+ integrations: [Sentry.browserTracingIntegration()],
84
+ tracesSampleRate: 0.1, // tune per traffic; 1.0 in dev
85
+ });
86
+ ```
87
+
88
+ **Node / Express** — `instrument.ts`, required at the very top of the entrypoint
89
+ (`import "./instrument";` must be the first import):
90
+
91
+ ```ts
92
+ import * as Sentry from "@sentry/node";
93
+
94
+ Sentry.init({
95
+ dsn: process.env.SENTRY_DSN,
96
+ environment: process.env.NODE_ENV,
97
+ tracesSampleRate: 0.1,
98
+ });
99
+ ```
100
+
101
+ Then, after routes are defined: `Sentry.setupExpressErrorHandler(app);`
102
+
103
+ **NestJS** — import `./instrument` first in `main.ts`, then add Sentry's module:
104
+
105
+ ```ts
106
+ // main.ts — FIRST line
107
+ import "./instrument";
108
+ // ...
109
+ // app.module.ts
110
+ import { SentryModule } from "@sentry/nestjs/setup";
111
+ @Module({ imports: [SentryModule.forRoot()] })
112
+ export class AppModule {}
113
+ ```
114
+
115
+ **Next.js** — config lives in `sentry.client.config.ts`,
116
+ `sentry.server.config.ts`, `sentry.edge.config.ts`, and `next.config.js` is
117
+ wrapped with `withSentryConfig`. The wizard (Step 2) writes these; verify the DSN
118
+ is read from `process.env.NEXT_PUBLIC_SENTRY_DSN` / `process.env.SENTRY_DSN`.
119
+
120
+ **React Native / Expo** — wrap the root component:
121
+
122
+ ```ts
123
+ import * as Sentry from "@sentry/react-native";
124
+ Sentry.init({
125
+ dsn: process.env.EXPO_PUBLIC_SENTRY_DSN,
126
+ tracesSampleRate: 0.2,
127
+ });
128
+ export default Sentry.wrap(App);
129
+ ```
130
+
131
+ **Python (Django/Flask/FastAPI/generic)** — initialize at startup
132
+ (`settings.py`, app factory, or main module):
133
+
134
+ ```python
135
+ import os
136
+ import sentry_sdk
137
+
138
+ sentry_sdk.init(
139
+ dsn=os.environ["SENTRY_DSN"],
140
+ environment=os.environ.get("ENVIRONMENT", "production"),
141
+ traces_sample_rate=0.1,
142
+ send_default_pii=False,
143
+ )
144
+ ```
145
+
146
+ Framework-specific integrations (e.g. `DjangoIntegration`, `FastApiIntegration`)
147
+ are auto-enabled by the matching extra installed in Step 2.
148
+
149
+ ## Step 4 — DSN via environment
150
+
151
+ - Store the DSN in an environment variable, never in committed source.
152
+ - Add it to `.env.example` (with a placeholder) so the requirement is documented,
153
+ but keep the real value in `.env`/secrets and confirm `.env` is gitignored.
154
+ - Use the framework's public-env convention for client-side code:
155
+ `NEXT_PUBLIC_SENTRY_DSN` (Next.js), `VITE_SENTRY_DSN` (Vite),
156
+ `EXPO_PUBLIC_SENTRY_DSN` (Expo). Server-only code uses `SENTRY_DSN`.
157
+ - For source-map upload (Step 6) the build also needs `SENTRY_AUTH_TOKEN`,
158
+ `SENTRY_ORG`, and `SENTRY_PROJECT` — these are **build/CI** secrets, not
159
+ shipped to the client.
160
+
161
+ ## Step 5 — Error + performance monitoring
162
+
163
+ - **Errors**: unhandled exceptions/rejections are captured automatically once
164
+ `init` runs; add the framework error handler where required (Express:
165
+ `setupExpressErrorHandler`; React: an error boundary via
166
+ `Sentry.ErrorBoundary`; NestJS: `SentryModule`). Use
167
+ `Sentry.captureException(err)` for caught-but-notable errors.
168
+ - **Performance/tracing**: set a `tracesSampleRate` (start ~0.1 in production,
169
+ `1.0` in dev) and enable the framework tracing integration (browser tracing,
170
+ HTTP/DB auto-instrumentation on the server). Optionally add profiling on Node
171
+ via `@sentry/profiling-node` and `profilesSampleRate`.
172
+ - Set `environment` and (ideally) `release` so issues are grouped per deploy.
173
+
174
+ ## Step 6 — Source maps (readable stack traces)
175
+
176
+ Minified/transpiled traces are useless without source maps. Configure upload at
177
+ build time:
178
+
179
+ - **Next.js**: handled by `withSentryConfig` in `next.config.js` (the wizard sets
180
+ it up); ensure `SENTRY_AUTH_TOKEN`/`SENTRY_ORG`/`SENTRY_PROJECT` exist in CI.
181
+ - **Vite/Webpack/Rollup/esbuild**: add the Sentry bundler plugin
182
+ (`@sentry/vite-plugin`, `@sentry/webpack-plugin`, etc.) with `sourcemaps`
183
+ upload enabled and the same auth env vars.
184
+ - **Node**: build with source maps emitted and upload via
185
+ `sentry-cli sourcemaps upload` (or the bundler plugin) in the release step.
186
+ - **React Native**: source maps upload through the Sentry Metro/Gradle/Xcode
187
+ integration added by the SDK's setup.
188
+ - Tie uploads to a **release** identifier (commit SHA or version) and inject the
189
+ same release into `Sentry.init({ release })` so traces map to the right build.
190
+
191
+ ## Step 7 — Verify
192
+
193
+ - Build/typecheck to confirm the SDK wiring compiles:
194
+ `bun run build` / `bun run typecheck` (or the project's equivalents).
195
+ - Trigger a deliberate test error in a non-production environment and confirm it
196
+ appears in Sentry with a **readable** (source-mapped) stack trace.
197
+ - Confirm a transaction/trace shows up to validate performance monitoring.
198
+ - Remove the test error afterward.
199
+
200
+ ## Rules
201
+
202
+ - **Do not port or copy upstream plugin code** — reimplement from scratch.
203
+ - Never hard-code or commit a DSN or `SENTRY_AUTH_TOKEN`; route everything
204
+ through env/secrets and update `.env.example`.
205
+ - Match the project's package manager and module system; do not introduce a new
206
+ one to install Sentry.
207
+ - Initialize Sentry before any other application code runs.
208
+ - Tune sample rates for the environment — do not ship `tracesSampleRate: 1.0` to
209
+ high-traffic production by default.
210
+ - Verify with a real captured event and a source-mapped trace before declaring
211
+ setup complete.
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: parity-sentry-seer
3
+ description: "AI debugging — given an error message, stack trace, or failing test, analyze the signal, form ranked hypotheses, locate the root cause in the codebase with file:line evidence, and propose a minimal fix. Lisa-native reimplementation of Sentry's seer workflow, available across all agent runtimes. Use when handed an exception, crash, regression, or red test and asked to find and fix the cause."
4
+ allowed-tools: ["Read", "Grep", "Glob", "Bash", "Edit"]
5
+ synced-from: sentry@claude-plugins-official@1.0.0
6
+ ---
7
+
8
+ # Seer — AI Root-Cause Debugging
9
+
10
+ Take a failure signal (exception, stack trace, failing test, log excerpt, or a
11
+ Sentry issue) and drive it to a proven root cause and a proposed fix. This is the
12
+ Lisa-native reimplementation of the upstream `sentry@claude-plugins-official`
13
+ plugin's `seer` command, rebuilt from scratch so the AI-debugging workflow is
14
+ available to the Codex, agy, and Copilot runtimes (Cursor loads upstream
15
+ natively).
16
+
17
+ > The Sentry MCP itself (for pulling live issue data) is re-pointed per agent
18
+ > separately by the parity subsystem — this skill works **with or without** it.
19
+ > When the MCP is connected, use it to fetch issue details, breadcrumbs, and
20
+ > event context; when it is not, work from the error text the user pastes in.
21
+
22
+ ## Drift tracking
23
+
24
+ Pinned to `sentry@claude-plugins-official@1.0.0` via `synced-from`. SDK install
25
+ & configuration is a separate concern owned by `parity-sentry-sdk-setup`.
26
+
27
+ ## Inputs this handles
28
+
29
+ - A raw stack trace or exception message.
30
+ - A failing test (name + assertion output, or the command to reproduce it).
31
+ - A log excerpt or error ID from CloudWatch / project logging.
32
+ - A Sentry issue URL or ID (resolve via the Sentry MCP when available).
33
+
34
+ If the signal is too thin to act on (no message, no location, not reproducible),
35
+ ask for the one missing thing — the exact error text, the failing command, or a
36
+ repro step — before guessing.
37
+
38
+ ## Workflow
39
+
40
+ ### 1. Capture & normalize the signal
41
+
42
+ - Read the full error: type, message, and the **complete** stack trace.
43
+ - Identify the **deepest frame that belongs to this codebase** (ignore
44
+ node_modules / stdlib frames) — that file:line is your primary anchor.
45
+ - Note the runtime, environment, and any IDs (request id, user id, release).
46
+ - If a Sentry issue is referenced and the MCP is connected, fetch the event,
47
+ breadcrumbs, tags, and first/last-seen + frequency.
48
+
49
+ ### 2. Reproduce (or pin down why you cannot)
50
+
51
+ - For a failing test, run it in isolation and read the actual vs. expected:
52
+ ```bash
53
+ bun run test -- <test-file-or-pattern>
54
+ ```
55
+ - For a runtime error, find the smallest command/route/input that triggers it.
56
+ - A reliably reproduced failure is the strongest evidence; if it is flaky or
57
+ environment-only, say so explicitly and treat hypotheses as provisional.
58
+
59
+ ### 3. Form ranked hypotheses
60
+
61
+ List 2–4 candidate causes, **most likely first**, each with the reasoning that
62
+ makes it plausible and a concrete way to confirm or refute it. Common classes:
63
+
64
+ - Null/undefined or unexpected shape reaching the failing frame.
65
+ - Off-by-one / boundary / empty-collection edge case.
66
+ - Async race, unawaited promise, or ordering assumption.
67
+ - Contract drift — a caller and callee disagree after a recent change.
68
+ - Bad input validation / unhandled external response.
69
+ - Config/env divergence (works locally, fails in the target environment).
70
+
71
+ ### 4. Locate the root cause with evidence
72
+
73
+ Walk the code to confirm or kill each hypothesis, highest-ranked first:
74
+
75
+ - `Grep`/`Glob` for the failing symbol, message string, and the function in the
76
+ anchor frame; read the surrounding code, not just the one line.
77
+ - Trace the data **backward** from the failure point to where the bad value
78
+ originates — the crash site is usually a symptom, not the cause.
79
+ - Use `git log`/`git blame` on the anchor file to find a correlated recent change:
80
+ ```bash
81
+ git log -n 5 --oneline -- <path/to/anchor/file>
82
+ git blame -L <line>,<line> -- <path/to/anchor/file>
83
+ ```
84
+ - When a value is uncertain, add a **temporary** strategic log/assert to confirm
85
+ the actual value, run, observe, then remove it. State the observed value as
86
+ evidence. (For deeper investigations, the `debug-specialist` agent owns
87
+ log-placement and CloudWatch tracing.)
88
+
89
+ Stop when one hypothesis is **proven** — you can point to the exact line where
90
+ the wrong value/behavior originates and explain the mechanism.
91
+
92
+ ### 5. Propose the fix
93
+
94
+ - Describe the **minimal** change that addresses the root cause, not the symptom.
95
+ - Prefer fixing where the bad value originates over masking it at the crash site.
96
+ - Note any other call sites affected by the same root cause.
97
+ - Recommend a regression test that would have caught it (a failing test that the
98
+ fix turns green) — pair with `reproduce-bug` / `tdd-implementation` to land it
99
+ TDD-style, and `codify-verification` to lock it in.
100
+ - Do not silently broaden scope; if you spot adjacent issues, list them
101
+ separately as follow-ups.
102
+
103
+ ## Output
104
+
105
+ Report in this shape:
106
+
107
+ ```
108
+ ## Signal
109
+ <error type/message + anchor frame file:line + repro status>
110
+
111
+ ## Root cause
112
+ <the proven cause, in plain English, with the mechanism>
113
+
114
+ ## Evidence
115
+ - <file:line> — <what it shows>
116
+ - <observed value / test output / blame commit> — <why it confirms the cause>
117
+
118
+ ## Proposed fix
119
+ <minimal change, where, and why it addresses the cause not the symptom>
120
+
121
+ ## Regression test
122
+ <the test that should be added to prevent recurrence>
123
+
124
+ ## Follow-ups (if any)
125
+ <adjacent issues found but out of scope>
126
+ ```
127
+
128
+ ## Rules
129
+
130
+ - **Do not port or copy upstream plugin code.** This is a native reimplementation.
131
+ - Prove the cause before proposing a fix — no speculative "try changing this".
132
+ - Cite concrete `file:line` evidence for every claim.
133
+ - Remove any temporary debug logging you add before finishing.
134
+ - Fix the root cause, not the symptom; flag, don't smuggle in, scope creep.
135
+ - Never weaken a test to make it pass, and never use `--no-verify`.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: parity-skill-creator
3
+ description: "Author a new Lisa skill end-to-end — scaffold the SKILL.md frontmatter (name/description/allowed-tools), write the pass-through command, follow hyphen naming, place files under plugins/src/base, and rebuild plugins. Lisa-native reimplementation of the upstream skill-creator plugin. NO drift pin: upstream publishes no semver, so it is not drift-trackable."
4
+ allowed-tools: ["Read", "Edit", "Write", "Bash"]
5
+ ---
6
+
7
+ # Skill Creator
8
+
9
+ Author a new, working Lisa skill (and its pass-through command) from a one-line
10
+ description. This is the Lisa-native equivalent of the upstream
11
+ `skill-creator@claude-plugins-official` plugin, reimplemented from scratch
12
+ against Lisa's conventions so the same capability is available to the Codex,
13
+ agy, and Copilot runtimes (Cursor reads `.claude-plugin/` natively).
14
+
15
+ ## Not drift-trackable
16
+
17
+ This skill intentionally carries **no `synced-from` pin**. The upstream
18
+ `skill-creator` plugin publishes **no semver** (its cache version resolves to
19
+ `unknown`), so a `@unknown` pin would be unparseable and meaningless to
20
+ `scripts/plugin-parity-drift.mjs`. **Drift is tracked manually** — re-review the
21
+ upstream plugin by hand whenever the curated plugin set is refreshed. Do **not**
22
+ add a `synced-from` line to skills generated by this skill unless they
23
+ reimplement a semver-versioned upstream plugin.
24
+
25
+ ## When to use
26
+
27
+ - A reusable workflow, checklist, or piece of domain knowledge keeps recurring
28
+ and deserves a named, invokable skill.
29
+ - You are reimplementing an upstream third-party plugin command/skill for
30
+ cross-agent parity (see `analyze-plugin` / `implement-plugin-parity`).
31
+ - The user asks to "create a skill", "add a command", or "scaffold a skill".
32
+
33
+ If the knowledge is narrow or one-off, prefer a rule in `.claude/rules/` instead
34
+ — skills are for broad, repeatable capabilities. When unsure whether content
35
+ warrants a skill, run it past the `skill-evaluator` agent first.
36
+
37
+ ## Where skills live
38
+
39
+ Lisa skills are **build output** for downstream projects. The source of truth is
40
+ `plugins/src/`, never the generated `plugins/lisa*` artifacts:
41
+
42
+ | Source directory | Builds artifact | Use for |
43
+ | --- | --- | --- |
44
+ | `plugins/src/base/` | `plugins/lisa` | Skills that ship to **every** stack |
45
+ | `plugins/src/<stack>/` | `plugins/lisa-<stack>` | Stack-specific (typescript, expo, nestjs, cdk, harper-fabric, rails) |
46
+
47
+ Lisa-repo-only skills (parity tooling, wiki ingestion, `lisa-*` meta-skills) live
48
+ at the **root** `.claude/skills/` and `.claude/commands/`, NOT under
49
+ `plugins/src` — they are not relevant to downstream projects. Decide placement
50
+ first:
51
+
52
+ - Ships to downstream projects → `plugins/src/base/skills/<name>/SKILL.md`
53
+ - Only meaningful inside the Lisa monorepo → `.claude/skills/<name>/SKILL.md`
54
+
55
+ ## Naming
56
+
57
+ - Use **hyphen-separated** names: `git-commit`, `tracker-write`,
58
+ `parity-sentry-seer`. No spaces, no camelCase, no underscores.
59
+ - The directory name, the frontmatter `name`, and the command filename must all
60
+ match exactly.
61
+ - Commands map to colon-separated UI names via directory nesting:
62
+ `commands/git/commit.md` → `/lisa:git:commit`; a flat
63
+ `commands/plan.md` → `/lisa:plan`.
64
+
65
+ ## SKILL.md frontmatter
66
+
67
+ Skills support **only** these frontmatter keys (they do **not** support
68
+ `argument-hint` or `$ARGUMENTS` substitution — those belong on the command):
69
+
70
+ ```yaml
71
+ ---
72
+ name: my-skill # required — matches the directory name
73
+ description: "One or two sentences." # required — when to use + what it does
74
+ allowed-tools: ["Read", "Edit", "Write", "Bash"] # optional — least privilege
75
+ synced-from: <plugin>@<marketplace>@<version> # ONLY for semver upstream reimplementations
76
+ ---
77
+ ```
78
+
79
+ - **`name`** — the hyphen identifier, byte-identical to the directory.
80
+ - **`description`** — write it so the model knows *when* to reach for the skill,
81
+ not just what it does. Lead with the trigger. This is the single most
82
+ important field for discoverability.
83
+ - **`allowed-tools`** — grant the minimum set. A read-only review skill needs no
84
+ `Write`/`Edit`. Omit the key entirely to inherit the caller's tools.
85
+ - **`synced-from`** — add **only** when the skill reimplements an upstream plugin
86
+ that publishes a real semver. Grammar: `name@marketplace@version`
87
+ (e.g. `sentry@claude-plugins-official@1.0.0`). Omit for upstreams with no
88
+ semver (note that in the body instead, as this skill does).
89
+
90
+ ## The command pass-through pattern
91
+
92
+ Every skill should have a thin command that is the user-facing entry point.
93
+ Commands support `description`, `argument-hint`, and `$ARGUMENTS`; they delegate
94
+ straight to the skill:
95
+
96
+ ```markdown
97
+ ---
98
+ description: "Same human-facing summary as the skill, phrased for the picker."
99
+ argument-hint: "<what the user should type after the command>"
100
+ ---
101
+
102
+ Use the /lisa:my-skill skill to <do the thing>. $ARGUMENTS
103
+ ```
104
+
105
+ The command carries the `argument-hint` and forwards `$ARGUMENTS`; the SKILL.md
106
+ carries the actual logic. Keep the two descriptions consistent.
107
+
108
+ ## Scaffolding walkthrough
109
+
110
+ 1. **Decide placement** — downstream (`plugins/src/base`) vs. Lisa-only
111
+ (`.claude`). For base, both a skill and a command directory entry are needed.
112
+ 2. **Pick the name** — hyphenated, unique. Check it does not collide:
113
+ `ls plugins/src/base/skills/` and `ls plugins/src/base/commands/`.
114
+ 3. **Create the skill** at
115
+ `plugins/src/base/skills/<name>/SKILL.md` with the frontmatter above and a
116
+ body that follows house style — see `plugins/src/base/skills/quality-review/SKILL.md`
117
+ for the canonical shape (title, "When to use", numbered checklist/steps,
118
+ explicit "Rules"/"Output" sections). Write real, actionable guidance, not
119
+ TODOs.
120
+ 4. **Create the command** at `plugins/src/base/commands/<name>.md` (or a nested
121
+ `commands/<namespace>/<name>.md` for a colon-namespaced command) using the
122
+ pass-through template.
123
+ 5. **Rebuild the artifacts** so the generated plugins match source:
124
+ ```bash
125
+ bun run build:plugins
126
+ ```
127
+ Then commit **both** `plugins/src/...` and the regenerated `plugins/lisa*`.
128
+ The `🧩 Plugins Sync` CI check (and `bun run check:plugins` locally) fails if
129
+ artifacts drift from source — never hand-edit `plugins/lisa*`.
130
+ 6. **Verify discoverability** — confirm the skill appears in the skill list and
131
+ the command resolves to `/lisa:<name>`.
132
+
133
+ ## Body house style
134
+
135
+ - Open with an `#` H1 title in Title Case.
136
+ - Add a `## When to use` section that names the triggers.
137
+ - Use numbered steps for procedures, checklists for review-style skills.
138
+ - End with an explicit `## Rules` (hard constraints) and/or `## Output` section.
139
+ - Write in plain, imperative English. Prefer concrete examples over abstraction.
140
+ - Reference sibling skills by their hyphen name (e.g. "delegate to `git-commit`").
141
+
142
+ ## Rules
143
+
144
+ - Never edit `plugins/lisa*` directly — edit `plugins/src/` and rebuild.
145
+ - Skill frontmatter must not contain `argument-hint` or `$ARGUMENTS`.
146
+ - The directory name, `name` field, and command filename must match exactly.
147
+ - Add `synced-from` **only** for semver-versioned upstream reimplementations.
148
+ - Do not include `/coding-philosophy` in task `skills` metadata — it auto-loads.
149
+ - One skill, one responsibility. If a skill grows two jobs, split it.
@@ -496,10 +496,18 @@ export function parseArgs(argv) {
496
496
  cacheRoot ??
497
497
  process.env.CLAUDE_PLUGIN_CACHE ??
498
498
  path.join(os.homedir(), ".claude", "plugins", "cache");
499
+ // Default roots: both the root-level Lisa skills AND the distributed base
500
+ // plugin skills (plugins/src/base/skills), where the real cross-agent parity
501
+ // reimplementations carrying `synced-from` pins now live. The generated
502
+ // plugins/lisa*/skills artifacts are deliberately NOT included — they are
503
+ // copies of plugins/src/base and would double-count every pin.
499
504
  const resolvedSkills =
500
505
  skillsRoots.length > 0
501
506
  ? skillsRoots
502
- : [path.join(REPO_ROOT, ".claude", "skills")];
507
+ : [
508
+ path.join(REPO_ROOT, ".claude", "skills"),
509
+ path.join(REPO_ROOT, "plugins", "src", "base", "skills"),
510
+ ];
503
511
  return {
504
512
  cacheRoot: path.resolve(resolvedCache),
505
513
  json,