Skip to content

Commit fc744e8

Browse files
feat: add /verify skill for lint, build, and test validation (#1222)
1 parent 765f3ba commit fc744e8

3 files changed

Lines changed: 41 additions & 1 deletion

File tree

.claude/skills/verify/skill.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: verify
3+
description: Run lint and tests to verify changes. Use when user says /verify, check my changes, validate changes, run checks, verify everything passes, pre-commit check, ready to commit, does it pass, CI check, sanity check
4+
---
5+
6+
# Verify Skill - mParticle Web SDK
7+
8+
Run the full lint and test battery to verify the current state of the codebase.
9+
10+
## Steps
11+
12+
1. Run lint first:
13+
14+
```bash
15+
npm run lint
16+
```
17+
18+
2. If lint passes, run both test suites in parallel. Each suite handles its own build internally.
19+
20+
```bash
21+
npm run test:jest
22+
```
23+
24+
```bash
25+
npm run test
26+
```
27+
28+
3. Report results in this format:
29+
30+
| Check | Status |
31+
|-------------|--------|
32+
| Lint | PASS / FAIL |
33+
| Jest Tests | PASS / FAIL |
34+
| Karma Tests | PASS / FAIL |
35+
36+
4. If any check fails, show the relevant error output so the user can diagnose and fix the issue.

AGENTS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,10 @@ Core modules receive `mpInstance` as a parameter, allowing them to access other
546546
4. **Inspect Storage**: Check Application tab for LocalStorage/Cookies
547547
5. **Use Source Maps**: Dev builds include source maps
548548
549+
### Available Skills
550+
551+
- **`/verify`**: Run lint, build, and Jest tests to validate your changes before committing. Use this after making code changes to ensure nothing is broken. See `.claude/skills/verify/skill.md`.
552+
549553
### Additional Resources
550554
551555
- **Documentation**: https://docs.mparticle.com/developers/sdk/web/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"test:karma:rollup:cjs": "cross-env BUNDLER=rollup karma start test/integrations/cjs/karma.rollup.config.js",
6666
"test:karma:webpack:module": "cross-env BUNDLER=webpack karma start test/integrations/module/karma.webpack.config.js",
6767
"test:karma:rollup:module": "cross-env BUNDLER=rollup karma start test/integrations/module/karma.rollup.config.js",
68-
"test:jest": "npm run build && jest --config jest.config.js",
68+
"test:jest": "jest --config jest.config.js",
6969
"test:jest:watch": "jest --config jest.config.js --watch",
7070
"watch": "cross-env ENVIRONMENT=dev BUILD=iife rollup --config rollup.config.js -w",
7171
"watch:all": "cross-env ENVIRONMENT=prod BUILDALL=true rollup --config rollup.config.js -w",

0 commit comments

Comments
 (0)