Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .claude/skills/quick-check/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
name: quick-check
description: "Run the smallest useful format, lint, type-check, or test command for the affected Insomnia workspace, and only escalate to broader validation when the change scope justifies it."
argument-hint: "Provide changed file paths and the desired check type (format, lint, type-check, test), or name the target workspace and what you want validated"
Comment on lines +2 to +4
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth adding allowed tools to the metadata for the commands it'll use. We can scope to specific commands not purely *. So, npx prettier * instead of npx * - docs

---

## Workspace Mapping
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, workspace seems not to be that useful since most changes also affect other workspaces. A full repo npm run lint && npm run type-check && npm test may be more accurate.


| Changed paths | Workspace | Commands |
| -------------------------------------------- | -------------------------------- | -------------------------------------------------------------------------------------------------------- |
| `packages/insomnia/**` | `insomnia` | `npm run lint -w insomnia`, `npm run type-check -w insomnia`, `npm test -w insomnia` |
| `packages/insomnia-api/**` | `insomnia-api` | `npm run lint -w insomnia-api`, `npm run type-check -w insomnia-api` |
| `packages/insomnia-inso/**` | `insomnia-inso` | `npm run lint -w insomnia-inso`, `npm run type-check -w insomnia-inso`, `npm run test:unit -w insomnia-inso` |
| `packages/insomnia-testing/**` | `insomnia-testing` | `npm run lint -w insomnia-testing`, `npm run type-check -w insomnia-testing`, `npm test -w insomnia-testing` |
| `packages/insomnia-scripting-environment/**` | `insomnia-scripting-environment` | `npm run lint -w insomnia-scripting-environment`, `npm run type-check -w insomnia-scripting-environment`, `npm test -w insomnia-scripting-environment` |
| `packages/insomnia-smoke-test/**` | `insomnia-smoke-test` | `npm run lint -w insomnia-smoke-test`, `npm run test:dev -w insomnia-smoke-test -- --project=Smoke <file>` |

`insomnia-smoke-test` has no `type-check` script. `insomnia-inso` has no generic `test` script.

## Lint

Format then fix then verify:

```bash
npx prettier --write <changed files>
npx eslint --fix <changed files>
npm run lint -w <workspace>
```

## Targeted Tests
Copy link
Copy Markdown

@arora-r arora-r May 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could also tell it explicitly to either auto-fix or not fix the issues found in tests to be clear on its goals.


Narrow to a single file using `--run`:

```bash
npm test -w <workspace> -- --run src/<path>/<file>.test.ts
```

For smoke tests:

```bash
npm run test:dev -w insomnia-smoke-test -- --project=Smoke tests/smoke/<file>.test.ts
```

To run smoke tests against the dev server, start `npm run dev` in a separate terminal first. Use `npm run app-build` + `npm run test:build` only when the failure requires a production build.

## Escalate When

- Change spans more than one workspace
- Root config changed (`package.json`, `package-lock.json`, `eslint.config.mjs`)
- Renderer/main boundary touched — also run `npm run check:renderer-node-imports -w insomnia`

```bash
npm run lint && npm run type-check && npm test
```
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can give it an early exit condition section to prevent any spikes.

We could also have it not write everything to the terminal

  - eslint --quiet
  - npm test --silent
  - pipe commands with `| head -50 or 2>&1 | tail -25`

so only errors are shown to lower token usage even more.

2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ npm run type-check # TypeScript check all workspaces
npm test # Tests all workspaces (or: npm test -w packages/insomnia)
```

Before pushing, run `/quick-check` (`.claude/skills/quick-check/SKILL.md`) to validate your changes. It selects the narrowest lint/type-check/test command for the affected workspace, so it's fast enough to run every time — only escalating to repo-wide checks when the change crosses workspace boundaries.

## Repository Structure
`packages/`
`insomnia/` ← Main Electron app
Expand Down
Loading