@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.
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +5 -1
- package/plugins/lisa/.codex-plugin/hooks.json +4 -0
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/commands/parity-code-review.md +6 -0
- package/plugins/lisa/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa/hooks/parity-safety-net.sh +102 -0
- package/plugins/lisa/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa/skills/parity-code-review/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa/skills/parity-code-simplifier/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa/skills/parity-coderabbit/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa/skills/parity-safety-net-rules/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa/skills/parity-sentry-sdk-setup/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa/skills/parity-sentry-seer/agents/openai.yaml +4 -0
- package/plugins/lisa/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa/skills/parity-skill-creator/agents/openai.yaml +4 -0
- package/plugins/lisa-agy/commands/parity-code-review.md +6 -0
- package/plugins/lisa-agy/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa-agy/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa-agy/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa-agy/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa-agy/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa-agy/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa-agy/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa-agy/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa-agy/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa-agy/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa-agy/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa-agy/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +5 -1
- package/plugins/lisa-copilot/commands/parity-code-review.md +6 -0
- package/plugins/lisa-copilot/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa-copilot/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa-copilot/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa-copilot/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa-copilot/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa-copilot/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa-copilot/hooks/parity-safety-net.sh +102 -0
- package/plugins/lisa-copilot/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa-copilot/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa-copilot/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa-copilot/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa-copilot/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa-copilot/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa-copilot/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/commands/parity-code-review.md +6 -0
- package/plugins/lisa-cursor/commands/parity-code-simplifier.md +6 -0
- package/plugins/lisa-cursor/commands/parity-coderabbit.md +6 -0
- package/plugins/lisa-cursor/commands/parity-safety-net-rules.md +6 -0
- package/plugins/lisa-cursor/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/lisa-cursor/commands/parity-sentry-seer.md +6 -0
- package/plugins/lisa-cursor/commands/parity-skill-creator.md +6 -0
- package/plugins/lisa-cursor/hooks/hooks.json +4 -0
- package/plugins/lisa-cursor/hooks/parity-safety-net.sh +102 -0
- package/plugins/lisa-cursor/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/lisa-cursor/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/lisa-cursor/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/lisa-cursor/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/lisa-cursor/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/lisa-cursor/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/lisa-cursor/skills/parity-skill-creator/SKILL.md +149 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/.claude-plugin/plugin.json +2 -1
- package/plugins/src/base/commands/parity-code-review.md +6 -0
- package/plugins/src/base/commands/parity-code-simplifier.md +6 -0
- package/plugins/src/base/commands/parity-coderabbit.md +6 -0
- package/plugins/src/base/commands/parity-safety-net-rules.md +6 -0
- package/plugins/src/base/commands/parity-sentry-sdk-setup.md +6 -0
- package/plugins/src/base/commands/parity-sentry-seer.md +6 -0
- package/plugins/src/base/commands/parity-skill-creator.md +6 -0
- package/plugins/src/base/hooks/parity-safety-net.sh +102 -0
- package/plugins/src/base/skills/parity-code-review/SKILL.md +83 -0
- package/plugins/src/base/skills/parity-code-simplifier/SKILL.md +76 -0
- package/plugins/src/base/skills/parity-coderabbit/SKILL.md +77 -0
- package/plugins/src/base/skills/parity-safety-net-rules/SKILL.md +144 -0
- package/plugins/src/base/skills/parity-sentry-sdk-setup/SKILL.md +211 -0
- package/plugins/src/base/skills/parity-sentry-seer/SKILL.md +135 -0
- package/plugins/src/base/skills/parity-skill-creator/SKILL.md +149 -0
- package/scripts/plugin-parity-drift.mjs +9 -1
|
@@ -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,4 @@
|
|
|
1
|
+
display_name: "Parity Sentry SDK Setup"
|
|
2
|
+
short_description: "Install and configure the Sentry SDK for a project — detect the framework/runtime, add the correct @sentry/<framework> package, initialize…"
|
|
3
|
+
default_prompt:
|
|
4
|
+
- "Use $parity-sentry-sdk-setup: Install and configure the Sentry SDK for a project — detect the framework/runtime, add the correct @sentry/<framework> package, initialize…."
|
|
@@ -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,4 @@
|
|
|
1
|
+
display_name: "Parity Sentry Seer"
|
|
2
|
+
short_description: "AI debugging — given an error message, stack trace, or failing test, analyze the signal, form ranked hypotheses, locate the root cause in…"
|
|
3
|
+
default_prompt:
|
|
4
|
+
- "Use $parity-sentry-seer: AI debugging — given an error message, stack trace, or failing test, analyze the signal, form ranked hypotheses, locate the root cause in…."
|
|
@@ -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.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
display_name: "Parity Skill Creator"
|
|
2
|
+
short_description: "Author a new Lisa skill end-to-end — scaffold the SKILL.md frontmatter (name/description/allowed-tools), write the pass-through command…"
|
|
3
|
+
default_prompt:
|
|
4
|
+
- "Use $parity-skill-creator: Author a new Lisa skill end-to-end — scaffold the SKILL.md frontmatter (name/description/allowed-tools), write the pass-through command…."
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Lisa-native code review of the current git diff — correctness bugs, security issues, and obvious defects, reported as severity-ranked findings with file:line references. Vendor-neutral cross-agent equivalent of the upstream code-review command."
|
|
3
|
+
argument-hint: "[optional: path or scope hint]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-code-review skill to review the current branch and working-tree diff for correctness bugs, security issues, and obvious defects, and report findings ranked by severity with file:line references. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Behavior-preserving simplification of recently-changed code — dedup, reuse, readability, and dead-code removal, quality only (never a bug hunt). Vendor-neutral cross-agent equivalent of the upstream code-simplifier agent."
|
|
3
|
+
argument-hint: "[optional: path or scope hint]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-code-simplifier skill to simplify the recently-changed code — removing duplication and dead code, reusing existing utilities, and improving readability — without altering behavior, then verify tests still pass. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Thorough PR-style review of the full diff — bugs, security, performance, and maintainability — with concrete fixes and a structured summary. An independent Lisa-native review (does NOT call CodeRabbit's service); vendor-neutral cross-agent equivalent of the upstream coderabbit plugin."
|
|
3
|
+
argument-hint: "[optional: PR number, path, or scope hint]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-coderabbit skill to run a thorough PR-style review of the full diff — flagging bugs, security, performance, and maintainability issues with concrete suggested fixes — and produce a structured summary with a verdict. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "View, set, and verify the custom guard rules enforced by Lisa's safety-net PreToolUse Bash hook — the cross-agent equivalent of the upstream safety-net plugin's set/verify-custom-rules skills."
|
|
3
|
+
argument-hint: "[view | set <regex> | verify]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-safety-net-rules skill to view, set, or verify the project-local custom guard rules enforced by Lisa's safety-net Bash hook (`parity-safety-net.sh`). $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Install and configure the Sentry SDK for a project — detect the framework, add the right @sentry/<framework> package, init the client, wire the DSN via env, enable error + performance monitoring, and set up source maps. One consolidated skill covering react, nextjs, node, nestjs, python, react-native, and more."
|
|
3
|
+
argument-hint: "[framework override, e.g. nextjs | node | python] (auto-detected if omitted)"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-sentry-sdk-setup skill to detect the framework and install + configure the correct Sentry SDK with error and performance monitoring and source maps. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "AI debugging — given an error, stack trace, or failing test, analyze it, 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."
|
|
3
|
+
argument-hint: "<error message | stack trace | failing test | Sentry issue URL>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-sentry-seer skill to root-cause the failure and propose an evidence-backed fix. $ARGUMENTS
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Author a new Lisa skill end-to-end — scaffold the SKILL.md frontmatter, write the pass-through command, follow hyphen naming and placement under plugins/src, and rebuild plugins. Lisa-native equivalent of the upstream skill-creator plugin."
|
|
3
|
+
argument-hint: "<skill-name and a one-line description of what it should do>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Use the /lisa:parity-skill-creator skill to scaffold a new Lisa skill and its pass-through command, following frontmatter, naming, placement, and build conventions. $ARGUMENTS
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: parity-code-review
|
|
3
|
+
description: "Lisa-native code review of the current git diff. Walks every changed hunk and reports correctness bugs, security issues, and obvious defects as severity-ranked findings with file:line references. Vendor-neutral — the cross-agent equivalent of the upstream code-review command, runnable on Codex, agy, Copilot, Cursor, and Claude."
|
|
4
|
+
allowed-tools: ["Read", "Bash", "Grep", "Glob"]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Parity Code Review
|
|
8
|
+
|
|
9
|
+
Review the code that is *about to ship* — the current uncommitted/branch diff — for defects a reviewer would block on. This is a focused **defect hunt**: correctness, security, and obvious mistakes. It is not a style audit and not a refactor pass (use `parity-code-simplifier` for quality-only cleanup).
|
|
10
|
+
|
|
11
|
+
> **Not drift-trackable.** This skill intentionally carries **no `synced-from` pin**. The upstream `code-review@claude-plugins-official` plugin publishes **no semver** (its cache version resolves to `unknown`), so a pin would be unparseable and meaningless to `scripts/plugin-parity-drift.mjs`. Drift is tracked **manually** — re-review the upstream command by hand when the curated plugin set is refreshed. This is a Lisa-native reimplementation, **not** a port of upstream code.
|
|
12
|
+
|
|
13
|
+
## Step 1: Establish the diff
|
|
14
|
+
|
|
15
|
+
Determine exactly what changed. Prefer the broadest accurate view of the work-in-progress:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Branch changes vs the merge base (preferred for a PR-style review)
|
|
19
|
+
git merge-base HEAD origin/main 2>/dev/null && \
|
|
20
|
+
git diff "$(git merge-base HEAD origin/main)"...HEAD
|
|
21
|
+
|
|
22
|
+
# Plus anything still uncommitted in the working tree
|
|
23
|
+
git diff HEAD
|
|
24
|
+
git status --short
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
If there is no diff at all, say so plainly and stop — do not invent findings. If the diff is enormous, review in full but prioritize the files with the most logic changes; never silently skip files (note any you deprioritized).
|
|
28
|
+
|
|
29
|
+
## Step 2: Read for real context
|
|
30
|
+
|
|
31
|
+
Do **not** review hunks in isolation. For each changed file, open enough surrounding code to understand:
|
|
32
|
+
|
|
33
|
+
- What the function/module is supposed to do and who calls it.
|
|
34
|
+
- Invariants and preconditions the change might violate.
|
|
35
|
+
- Error/edge paths touched by the change.
|
|
36
|
+
|
|
37
|
+
Use `Read`, `Grep`, and `Glob` to follow call sites and trace data flow. A finding you can't ground in the actual code is a guess — drop it.
|
|
38
|
+
|
|
39
|
+
## Step 3: Hunt for defects
|
|
40
|
+
|
|
41
|
+
For every changed hunk, evaluate against these lenses:
|
|
42
|
+
|
|
43
|
+
1. **Correctness** — Off-by-one errors, inverted conditions, wrong operator, missing `await`, unhandled `null`/`undefined`, incorrect default, broken control flow, type coercion bugs, mutation of shared state, race conditions.
|
|
44
|
+
2. **Security** — Unsanitized input at trust boundaries; injection (SQL/shell/template); secrets, tokens, or keys committed or logged; missing authn/authz on new endpoints; unsafe deserialization; path traversal; overly broad permissions; SSRF.
|
|
45
|
+
3. **Edge cases & failure modes** — Empty collections, zero, negative numbers, very large input, concurrent calls, partial failures, timeouts, retries that aren't idempotent.
|
|
46
|
+
4. **Obvious defects** — Dead code paths, unreachable branches, swallowed errors, resource leaks (unclosed handles/connections), `TODO`/`FIXME` left in shipping code, debug logging left on, broken or missing tests for the new behavior.
|
|
47
|
+
5. **Contract & API** — Breaking changes to public signatures, changed return shapes, altered error semantics callers depend on.
|
|
48
|
+
|
|
49
|
+
## Step 4: Output — severity-ranked findings
|
|
50
|
+
|
|
51
|
+
Group findings by severity. Within each group, list the most impactful first. Every finding **must** carry a `file:line` reference.
|
|
52
|
+
|
|
53
|
+
### Critical (must fix before merge)
|
|
54
|
+
Bugs that break correctness, leak/expose data, or introduce a security hole.
|
|
55
|
+
|
|
56
|
+
### Warning (should fix)
|
|
57
|
+
Likely to cause problems later, or a real defect with limited blast radius.
|
|
58
|
+
|
|
59
|
+
### Suggestion (nice to have)
|
|
60
|
+
Minor correctness nits or defensive improvements.
|
|
61
|
+
|
|
62
|
+
### Finding format
|
|
63
|
+
|
|
64
|
+
For each finding:
|
|
65
|
+
|
|
66
|
+
- **What** — precise description of the defect.
|
|
67
|
+
- **Where** — `path/to/file.ts:42` (and a span if it covers multiple lines).
|
|
68
|
+
- **Why** — the concrete failure it causes, with an example input or sequence that triggers it.
|
|
69
|
+
- **Fix** — a specific, actionable suggestion (or a short code sketch).
|
|
70
|
+
|
|
71
|
+
Example:
|
|
72
|
+
|
|
73
|
+
> **Critical — Unhandled null dereference**
|
|
74
|
+
> **Where:** `src/auth/session.ts:88`
|
|
75
|
+
> **Why:** `findUser()` returns `null` when the id is unknown, but line 88 reads `user.roles` directly. An unknown session id (expired token replay) throws and 500s instead of returning 401.
|
|
76
|
+
> **Fix:** Guard `if (!user) return unauthorized()` before reading `user.roles`.
|
|
77
|
+
|
|
78
|
+
## Rules
|
|
79
|
+
|
|
80
|
+
- **Ground every finding in the diff.** No speculative findings, no generic best-practice lectures unrelated to the change.
|
|
81
|
+
- **Be honest about coverage.** If you deprioritized files or couldn't fully trace a path, say so.
|
|
82
|
+
- **If the diff is clean, say so clearly** — "No blocking issues found across N changed files" — do not manufacture problems.
|
|
83
|
+
- This is review-only: report findings, do **not** edit files. Apply fixes via the normal implementation flow or `parity-code-simplifier` (quality) after triage.
|