@jesdi/skills 0.0.15 → 0.0.16

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/README.md CHANGED
@@ -58,7 +58,7 @@ which ones are part of the standard setup, where they come from, and (under
58
58
  upstream with the [skills.sh](https://skills.sh/) CLI:
59
59
 
60
60
  ```bash
61
- npx skills add mattpocock/skills # grill-me, grill-with-docs, grilling, improve-codebase-architecture, to-questionnaire, tdd, code-review, codebase-design, diagnosing-bugs, resolving-merge-conflicts
61
+ npx skills add mattpocock/skills # grill-me, grill-with-docs, grilling, improve-codebase-architecture, to-questionnaire, tdd, code-review, codebase-design, diagnosing-bugs, resolving-merge-conflicts, handoff, teach, wait-what
62
62
  npx skills add JuliusBrussee/caveman # caveman suite
63
63
  npx skills add vercel-labs/skills # find-skills
64
64
  npx skills add vercel-labs/agent-skills # vercel-react-best-practices
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jesdi/skills",
3
- "version": "0.0.15",
3
+ "version": "0.0.16",
4
4
  "description": "jesdi's agent skills (content package consumed by @jesdi/skills-cli)",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -34,23 +34,33 @@ size, orchestration.
34
34
  causes it (an invariant enforced by an optional parameter is a structure
35
35
  finding). Everything else belongs in a different review.
36
36
 
37
+ **Repo conventions come first.** Read the repo's AGENTS.md (and CLAUDE.md,
38
+ CONTRIBUTING.md, or coding-standards file) before the diff. A breach of a
39
+ documented rule is a finding; cite the file and the rule. A documented rule
40
+ overrides a smell: when the repo endorses a pattern the table would flag,
41
+ don't flag it.
42
+
37
43
  ## The smells
38
44
 
39
45
  Run every meaningful change through this table, top to bottom. Each row is one
40
46
  concept; the *Ask* is the question that exposes it, the *Remedy* is what to
41
- push for.
47
+ push for. Names in parentheses are the matching Fowler smells (*Refactoring*,
48
+ ch. 3), folded into the row that already covers them.
42
49
 
43
50
  | # | Smell | Ask | Remedy |
44
51
  |---|-------|-----|--------|
45
- | 1 | **Duplicated concept** — one idea expressed twice: near-duplicate helper, parallel model, copy-pasted branch, a flag *and* an optional both meaning "off", the same predicate reimplemented instead of reused | What single concept are these copies of? Where is its canonical home? | Name the concept once; make the variants its data or parameters; delete the copies. Never accept a second copy because the first one exists. |
52
+ | 1 | **Duplicated concept** — one idea expressed twice: near-duplicate helper, parallel model, copy-pasted branch (Duplicated Code), a flag *and* an optional both meaning "off", the same predicate reimplemented instead of reused, the same `switch`/`if`-cascade on the same type in two places (Repeated Switches) | What single concept are these copies of? Where is its canonical home? | Name the concept once; make the variants its data or parameters (one map or one polymorphic dispatch both sites share); delete the copies. Never accept a second copy because the first one exists. |
46
53
  | 2 | **Complexity rearranged, not deleted** — the diff moves code around but the reader still holds the same number of branches, modes, and helpers | Which reframing of the model or ownership makes these branches disappear? | Change the model so the special case becomes the default flow. Prefer the version that feels inevitable in hindsight. |
47
54
  | 3 | **Special case in a shared flow** — new `if`, one-off boolean, nullable mode, or feature check bolted into an unrelated path | Whose decision is this, and why is it made here? | Move it behind its own abstraction (policy, resolver, dispatcher, module); keep the shared path linear. |
48
- | 4 | **Wrong layer / boundary leak** — feature logic in a shared module, implementation details through an API, callers re-deriving what the owner already knows | Which module owns this concept? | Move the logic to the owner; callers receive results, not raw inputs to recompute. |
49
- | 5 | **Indirection without clarity** — thin wrapper, pass-through helper, "generic" mechanism hiding a simple data shape | What does the reader learn from this layer? | Delete it and keep the direct call. Boring and direct beats clever. |
50
- | 6 | **Weak contract** — `any`, `unknown`, casts, optional params, silent fallbacks that paper over an unclear invariant | What invariant is this hiding? | Make the boundary explicit in the type so the control flow simplifies. |
51
- | 7 | **File sprawl** — the diff pushes a file past a healthy size boundary (~1k lines) | Should this be decomposed *before* adding to it? | Split by concept first; waive only with a compelling structural reason. |
52
- | 8 | **Needless sequencing / non-atomic update** — independent work serialized, related updates that can leave state half-applied | Is this actually dependent? Can it be observed half-done? | Parallelize independent work; group related updates. Not micro-optimization — brittleness. |
53
- | 9 | **Short-horizon change** — "temporary", TODO-later, quick patch, deferred cleanup, a shape chosen because it is the smallest diff | What does this look like when its reason is gone? What does removing it cost? | Do the durable fix now, or structure the stopgap so removal is a pure deletion (one branch, one file), never a refactor of live callers. |
55
+ | 4 | **Wrong layer / boundary leak** — feature logic in a shared module, implementation details through an API, callers re-deriving what the owner already knows, a function that works on another module's data more than its own (Feature Envy), callers walking `a.b().c().d()` to reach what they need (Message Chains) | Which module owns this concept? | Move the logic to the owner; callers receive results, not raw inputs to recompute. Hide a navigation walk behind one method on the first object. |
56
+ | 5 | **Change doesn't follow module lines** — one logical change forces small edits scattered across many files (Shotgun Surgery), or one module is edited for several unrelated reasons (Divergent Change) | If this rule changes again, how many files move? Does this module have one reason to change? | Gather what changes together into one module; split a module that changes for unrelated reasons. |
57
+ | 6 | **Indirection without clarity** — thin wrapper, pass-through helper or class that only delegates (Middle Man), "generic" mechanism hiding a simple data shape, parameters, hooks or abstractions for needs nobody has yet (Speculative Generality) | What does the reader learn from this layer? Who needs this flexibility today? | Delete it and keep the direct call. Boring and direct beats clever. |
58
+ | 7 | **Refused inheritance** — a subclass or implementer that ignores, stubs out, or overrides most of what it inherits (Refused Bequest) | Is this really a kind of its parent? | Drop the inheritance; compose, or implement a narrower interface. |
59
+ | 8 | **Weak contract** — `any`, `unknown`, casts, optional params, silent fallbacks that paper over an unclear invariant; a string or number standing in for a domain concept (Primitive Obsession); the same few fields or params always travelling together (Data Clumps) | What invariant is this hiding? Which type wants to be born? | Make the boundary explicit in the type, a small domain type or one bundled type, so the control flow simplifies. |
60
+ | 9 | **Mysterious name** — a function, variable, or type whose name hides what it does or holds, or says something it no longer does | Could a reader predict the body from the name? | Rename it. If no honest name comes, the concept is murky: fix the design, not the name. |
61
+ | 10 | **File sprawl** — the diff pushes a file past a healthy size boundary (~1k lines) | Should this be decomposed *before* adding to it? | Split by concept first; waive only with a compelling structural reason. |
62
+ | 11 | **Needless sequencing / non-atomic update** — independent work serialized, related updates that can leave state half-applied | Is this actually dependent? Can it be observed half-done? | Parallelize independent work; group related updates. Not micro-optimization — brittleness. |
63
+ | 12 | **Short-horizon change** — "temporary", TODO-later, quick patch, deferred cleanup, a shape chosen because it is the smallest diff | What does this look like when its reason is gone? What does removing it cost? | Do the durable fix now, or structure the stopgap so removal is a pure deletion (one branch, one file), never a refactor of live callers. |
54
64
 
55
65
  Short-horizon change is the long-term rule and it applies to every other smell: prefer
56
66
  consolidating now over a third copy later; prefer the simplification that
@@ -88,9 +98,11 @@ Write the review in this shape:
88
98
 
89
99
  Working code is not the bar. `REQUEST CHANGES` when any of Duplicated
90
100
  concept, Complexity rearranged, Special case in a shared flow, Wrong layer,
91
- Indirection without clarity, Weak contract, or Short-horizon change is present
92
- and unjustified, or when a visible code-judo move was skipped. File sprawl and
93
- Needless sequencing block when the cleaner structure is obvious.
101
+ Change doesn't follow module lines, Indirection without clarity, Refused
102
+ inheritance, Weak contract, or Short-horizon change is present and
103
+ unjustified, when a documented repo rule is broken, or when a visible
104
+ code-judo move was skipped. Mysterious name, File sprawl and Needless
105
+ sequencing block when the cleaner structure is obvious.
94
106
 
95
107
  ## Author pushback
96
108
 
@@ -102,6 +114,9 @@ Needless sequencing block when the cleaner structure is obvious.
102
114
  | "The existing code already does it this way" | Existing mess licenses fixing the concept, not adding a copy of it. |
103
115
  | "A restructure is out of scope" | If the restructure deletes the complexity this change adds, it is the scope. |
104
116
 
117
+ The Fowler smell list is an idea from mattpocock/skills `code-review`; the
118
+ wording here is ours.
119
+
105
120
  ## Review Tone
106
121
 
107
122
  Be direct, serious, and demanding about quality.
@@ -0,0 +1,122 @@
1
+ ---
2
+ name: review-diff
3
+ description: >-
4
+ Review a branch before merge: first a gate (the repo's check command plus
5
+ crap-gate), then three independent reviewers in parallel — spec (did we build
6
+ what was asked, no more, no less), correctness via Codex (races, idempotency,
7
+ money, time, authz, indexes, N+1, migrations, error paths, test quality) and
8
+ structure (deep-quality-review). `--quick` runs only spec and correctness,
9
+ shortened, for a live interview. Use when the user says "/review-diff",
10
+ "review this branch", "review this slice", "review before merge", or before
11
+ closing out a spec task.
12
+ ---
13
+
14
+ # /review-diff
15
+
16
+ One gate, then three reviewers that never see each other's output. Each
17
+ answers one question; their reports stay separate, because a strong answer
18
+ on one axis must not hide a failure on another.
19
+
20
+ | Reviewer | Question | Runs as |
21
+ |---|---|---|
22
+ | Spec | Did we build what the spec asked, no more, no less? | subagent, `spec.md` |
23
+ | Correctness | Can this lose money or corrupt data? | `codex exec`, `correctness.md` |
24
+ | Structure | Is the code getting messier? | subagent, `deep-quality-review` |
25
+
26
+ `spec.md` and `correctness.md` sit next to this file (`<skill-dir>`).
27
+
28
+ ## Arguments
29
+
30
+ - A range (`A..B`) or a base ref. Default: the merge-base with the repo's
31
+ default branch (`origin/main`, else `main`). Review `git diff <base>...HEAD`.
32
+ - A spec path, optional.
33
+ - `--quick`: interview mode. Gate, then spec + correctness only; each report
34
+ keeps its top 3 findings in under 150 words. Default: all three, full
35
+ reports.
36
+
37
+ Before anything else, confirm the range resolves and the diff is non-empty. A
38
+ bad ref fails here, not inside three reviewers.
39
+
40
+ ## Step 0 — gate (sequential, a precondition, not a reviewer)
41
+
42
+ 1. Run the repo's check command: `make check` if the Makefile has it,
43
+ otherwise the one AGENTS.md / CONTRIBUTING.md / package.json documents. None
44
+ documented → say so and continue.
45
+ 2. Run crap-gate if the repo has `.crap-gate.json`: prefer its wrapper
46
+ (`make crap-gate` / `make crap`), else `sh <crap-gate-dir>/run.sh`, where
47
+ the dir is the first of `.my-skills/crap-gate`, `.agents/skills/crap-gate`,
48
+ `.claude/skills/crap-gate`, `~/.my-skills/crap-gate` that exists. No
49
+ config → "crap-gate: not configured, skipped". Config but skill missing →
50
+ "crap-gate: skill not installed, skipped".
51
+
52
+ Either red → **stop**. Report the failing command and the first failures, and
53
+ no review: reviewing red code wastes the reviewers, and "is there a test for
54
+ this scenario" means nothing while tests fail.
55
+
56
+ ## Steps 1–3 — reviewers, in parallel
57
+
58
+ Launch all of them in one go; don't let one wait for another. Give each only
59
+ the range, the commit list (`git log --oneline <range>`) and its brief. Never
60
+ paste one reviewer's output into another's prompt.
61
+
62
+ - **Spec.** Find the spec: the path argument, then a spec under `specs/`
63
+ matching the branch or feature (skip templates), then issue refs in the
64
+ commits (`#123`, fetched with `gh issue view`). None → skip: "Spec: no spec
65
+ found, skipped". Otherwise spawn a subagent: "Read and follow
66
+ `<skill-dir>/spec.md`. Range: <range>. Commits: <list>. Spec: <path or fetched text>."
67
+ - **Correctness.** If `codex` is on PATH, run it (in the background while
68
+ the others run):
69
+
70
+ ```bash
71
+ out=$(mktemp) && codex exec -s read-only --ephemeral -o "$out" \
72
+ "Read and follow <skill-dir>/correctness.md. Range: <range>. Commits: <list>.<quick>" \
73
+ >/dev/null 2>&1; cat "$out"
74
+ ```
75
+
76
+ No Codex → spawn a subagent with the same instruction and note "Correctness:
77
+ Codex unavailable, ran on <current model>". The second model is the point;
78
+ never drop the note.
79
+ - **Structure** (skipped in `--quick`). Spawn a subagent: "Use the
80
+ `deep-quality-review` skill on range <range>." Skill not installed → skip:
81
+ "Structure: deep-quality-review not installed, skipped".
82
+
83
+ In `--quick`, append to each brief: "Quick mode: top 3 findings, under 150
84
+ words." No subagents in this harness → run them one after another, each in a
85
+ fresh context if you can, and say so.
86
+
87
+ ## Output
88
+
89
+ ```
90
+ Gate: `make check` green · crap-gate green
91
+
92
+ ## Spec
93
+ <report, verbatim or lightly cleaned>
94
+
95
+ ## Correctness (Codex)
96
+ <report>
97
+
98
+ ## Structure
99
+ <report>
100
+
101
+ Spec: 3 findings — worst: <one line>
102
+ Correctness: 1 finding — worst: <one line>
103
+ Structure: REQUEST CHANGES, 2 findings — worst: <one line>
104
+ ```
105
+
106
+ A skipped step keeps its place with its one-line note (in the gate line, or
107
+ as the section body and summary line). `--quick` has no Structure section and
108
+ no Structure summary line. A clean reviewer's summary line is `0 findings`.
109
+
110
+ Do not merge, dedupe or re-rank findings across reviewers, and do not pick an
111
+ overall winner. A finding two reviewers both raise stays in both reports; that
112
+ is signal.
113
+
114
+ ## Dependencies
115
+
116
+ Needs the `deep-quality-review` and `crap-gate` skills (install them with the
117
+ skills CLI next to this one) and, for the second model, the `codex` CLI. Any
118
+ of them missing skips that step with a one-line note; it never fails the
119
+ review.
120
+
121
+ The spec axis is an idea from mattpocock/skills `code-review`; the wording
122
+ here is ours.
@@ -0,0 +1,29 @@
1
+ # Correctness reviewer
2
+
3
+ You check one thing: **can this diff lose money, corrupt data, or let the
4
+ wrong person act?** Not style, not structure, not spec coverage. Assume lint,
5
+ types and tests already pass.
6
+
7
+ Read `git diff <range>` in full, then only the surrounding code a check needs
8
+ (the model behind a query, the existing indexes, the caller of a handler).
9
+
10
+ | Check | Flag |
11
+ |---|---|
12
+ | Concurrency | Read-then-write without a lock, conditional `UPDATE … WHERE`, or DB constraint: overselling, double-spend, lost updates. Transactions that commit half the work. |
13
+ | Idempotency | Webhooks, payment callbacks, retries and queue consumers that do the work twice when the same message arrives twice. |
14
+ | Money | Floats for amounts (use integer cents or decimal), rounding in more than one place, currency dropped. |
15
+ | Time | Naive datetimes, local time stored, "today" computed without the business timezone. Store UTC. |
16
+ | Authorization | A check done only in the client, or missing on the server: can user A read or change user B's rows by changing an id? |
17
+ | Foreign keys | A new FK column that is filtered or joined on without an index. |
18
+ | N+1 | One query per loop iteration where a join or `IN (…)` would do. |
19
+ | Migrations | Not reversible, or unsafe on a live table (a NOT NULL column without a default, a rewrite under lock). |
20
+ | Failure paths | A payment-provider, checkout or stock-decrement call whose failure (timeout, decline, provider error) is unhandled or silently swallowed. |
21
+ | Test quality | Tautological tests (asserting a mock's return value, or a value the test just set with no code in between) and tests on internals instead of the public seam. Say what they should assert. |
22
+
23
+ Every finding: `file:line`, the concrete failure scenario (inputs or
24
+ interleaving → wrong result), and the fix. "Consider reviewing" is not a
25
+ finding. Report only what you can point at; mark anything unconfirmed
26
+ "(unverified)".
27
+
28
+ Output: findings, worst first, then one line naming the checks with nothing
29
+ to report ("Clean: money, time, …"). Under 400 words.
@@ -0,0 +1,24 @@
1
+ # Spec reviewer
2
+
3
+ You check one thing: **did this diff build what the spec asked, no more, no
4
+ less?** Not style, not structure, not bugs outside the spec.
5
+
6
+ 1. Read the spec in full, then `git diff <range>` in full (not a summary),
7
+ then the tests the diff adds or touches.
8
+ 2. Walk the spec requirement by requirement and report:
9
+ - **Missing / partial**: asked for, not built or only half built.
10
+ - **Scope creep**: built, not asked for (endpoints, flags, fields, UI,
11
+ options). Say what to delete.
12
+ - **Built wrong**: looks implemented, but behaves differently from the
13
+ spec line.
14
+ - **Untested scenario**: each Given/When/Then scenario with no test that
15
+ exercises it through the public seam (the API, the UI, the use case), not
16
+ through an internal helper. A test that only passes because a layer
17
+ above the one the scenario names stops the input (e.g. API validation
18
+ hiding an untested DB constraint) does not count.
19
+ 3. Every finding quotes the spec line it rests on, then `file:line` and the
20
+ concrete fix. No spec line → not a finding.
21
+
22
+ Output: findings grouped under those four headings. Leave out empty groups
23
+ and end with one line naming them ("Clean: scope creep, built wrong"). Don't
24
+ list what was fine. Under 400 words.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-09-13T13:58:48.949Z",
3
+ "generatedAt": "2026-09-23T16:36:43.907Z",
4
4
  "skills": [
5
5
  {
6
6
  "name": "backlog",
@@ -28,8 +28,8 @@
28
28
  },
29
29
  {
30
30
  "name": "deep-quality-review",
31
- "version": "0.1.1",
32
- "hash": "sha256-da5ce29dc5349bcbed74589f3475fa12907ae7eed385e4ecc680bf67edae7e43",
31
+ "version": "0.1.2",
32
+ "hash": "sha256-134c1a194e9ec53f244e6500e68cf963b384759d8b5f5c934784665b6ef4b8f6",
33
33
  "description": "Extremely strict maintainability review of a branch's changes: duplicated concepts, complexity that got rearranged instead of deleted, spaghetti branching, boundary leaks, weak type contracts, file sprawl, and \"temporary\" fixes that will outlive their reason. Use when the user asks for a \"deep code quality review\", \"thermonuclear review\", \"harsh maintainability review\", \"code judo\", \"is this making the codebase messier\", or before merging a change that touches shared code. Not a correctness, security, or test-coverage review."
34
34
  },
35
35
  {
@@ -56,6 +56,12 @@
56
56
  "hash": "sha256-211e0e116ff6efbc4589ea7264835855b9495ba535f242733af913903fe7707d",
57
57
  "description": "Build a throwaway prototype to answer a design question, delivered as one self-contained HTML file. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like."
58
58
  },
59
+ {
60
+ "name": "review-diff",
61
+ "version": "0.1.0",
62
+ "hash": "sha256-f1efdffdad0abf536777a3afcc733b2612ed51abad0b1a04d24f280bf2f223d3",
63
+ "description": "Review a branch before merge: first a gate (the repo's check command plus crap-gate), then three independent reviewers in parallel — spec (did we build what was asked, no more, no less), correctness via Codex (races, idempotency, money, time, authz, indexes, N+1, migrations, error paths, test quality) and structure (deep-quality-review). `--quick` runs only spec and correctness, shortened, for a live interview. Use when the user says \"/review-diff\", \"review this branch\", \"review this slice\", \"review before merge\", or before closing out a spec task."
64
+ },
59
65
  {
60
66
  "name": "to-spec",
61
67
  "version": "0.1.0",