compat-review
БесплатноБез исполняемых скриптовНе проверенVerify compat PR claims by running lodash vs es-toolkit/compat at runtime
от toss★ 11 407 звёзд на GitHubОб этом скилле
Compat Layer Review
Verify that a compat PR actually fixes a real lodash inconsistency.
Input
$ARGUMENTS — PR number (e.g. 1234) or function name (e.g. chunk)
Workflow
1. Identify target function and PR claims
PR number:
gh pr view {number} --repo toss/es-toolkit --json title,body,files
From the PR description and diff, extract:
- Which compat function is being fixed
- What inconsistency the contributor claims (expected vs actual behavior)
- Any test examples the contributor provides
Function name: Read the function source and its spec to understand current behavior.
2. Build comparison test
Create a temporary vitest spec at src/compat/{category}/_compat-review-{fn}.spec.ts.
import { describe, expect, it } from 'vitest';
import { fn as compatFn } from 'es-toolkit/compat';
import { fn as lodashFn } from 'lodash';
Include two groups of test cases:
A. Contributor's claimed examples — Extract directly from the PR description or test diff. These are the cases the PR claims to fix.
B. ~10 additional edge cases you generate — Based on the function's signature and lodash's known behavior patterns:
- Empty inputs:
[],{},'',0 - Nullish:
null,undefined - Negative/zero/float numbers:
-1,0,1.5,NaN,Infinity - Type coercion: string numbers (
'3'), boolean, mixed types - Boundary: single-element arrays, very long strings, deeply nested objects
- Pick cases that are relevant to the specific function
Each test:
it('description', () => {
let lodashResult, compatResult;
let lodashErr: any, compatErr: any;
try {
lodashResult = lodashFn(args);
} catch (e) {
lodashErr = e;
}
try {
compatResult = compatFn(args);
} catch (e) {
compatErr = e;
}
if (lodashErr && compatErr) return; // both throw = consistent
if (lodashErr || compatErr) {
throw new Error(`Behavior mismatch: ${lodashErr ? 'lodash throws' : 'compat throws'}`);
}
expect(compatResult).toEqual(lodashResult);
});
3. Run comparison BEFORE the PR change
yarn vitest run src/compat/{category}/_compat-review-{fn}.spec.ts
Record which tests fail — these are real inconsistencies that exist on main.
4. Apply PR changes and re-run
gh pr diff {number} --repo toss/es-toolkit | git apply
Run the same test again. Confirm that:
- The contributor's claimed examples now pass
- The additional edge cases still pass (no regressions)
Revert after testing:
git checkout -- .
5. Clean up
Delete _compat-review-*.spec.ts.
6. Report
## {fn} — Compat Review
### PR Claim
{What the contributor says they're fixing}
### Verification (BEFORE fix)
| # | Input | lodash | compat | Match? | Source |
|---|-------|--------|--------|--------|--------|
| 1 | ... | ... | ... | MISMATCH | PR example |
| 2 | ... | ... | ... | MATCH | Edge case |
### Verification (AFTER fix)
| # | Input | lodash | compat | Match? | Source |
|---|-------|--------|--------|--------|--------|
### Verdict
- [ ] PR claim is valid (inconsistency confirmed on main)
- [ ] Fix resolves the claimed inconsistency
- [ ] No regressions in edge cases
- [ ] Existing tests still pass
Установить compat-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
BashReadWriteGrepGlobFAQ
Что делает скилл compat-review?
Verify compat PR claims by running lodash vs es-toolkit/compat at runtime
Как установить скилл compat-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл compat-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic