mongo-migration Skill Evaluation Report¶
Method: skill-creator A/B testing Date: 2026-04-18 Subject:
skills/mongo-migration/— MongoDB schema migration safety reviewer (MongoDB 4.4–7.0+)
MongoDB migration safety is a specialized domain, and the base model handles the core defects well. The measurable gaps are in output structure consistency and token efficiency. The evaluation used three A/B test scenarios with 24 scored assertions covering the skill's three primary working modes.
1. Skill Overview¶
Core files:
| File | Lines | Purpose |
|---|---|---|
SKILL.md | 321 | Main framework: 4 Gates, 3 depth levels, 12-item scorecard, 9-section output contract |
references/mongo-ddl-lock-matrix.md | ~150 | Standard/Deep: MongoDB version × lock behavior matrix |
references/large-collection-migration.md | ~180 | Deep: _id-range batching, 6-step field type migration, rolling index builds |
references/migration-anti-examples.md | ~100 | Extended anti-examples AE-7 through AE-13 |
Key MongoDB safety rules the skill enforces: - _id-range batched updates (never unbounded updateMany) - Explicit write concern (w: "majority") - Validator progression (moderate → strict, never jump straight to strict) - New-field pattern for type migrations (amount_v2 + dual-read + backfill + cleanup) - Rolling index builds for collections >50M documents
2. Test Design¶
2.1 Scenarios¶
| # | Name | Collection size | Core challenge | Expected outcome |
|---|---|---|---|---|
| 1 | Index safety + validator progression | 15M docs, 18 GB | Unbounded updateMany, no duplicate check before unique index, strict validator before backfill | Identifies 3 Critical defects, provides _id-range batching solution |
| 2 | Large-collection field type migration | 8M docs, 12 GB | In-place type overwrite (irreversible), no write concern, no _id batching | Recommends amount_v2 new-field pattern, original scores 0/12 |
| 3 | Degraded mode (no context) | Unknown | MongoDB version, collection size, and deployment type all unknown | Enters Minimal mode, conservative assumptions listed, Data basis labeled |
2.2 Assertion Matrix (24 total)¶
Scenario 1 — Index safety + write concern (9 assertions)
| ID | Assertion | With Skill | Without Skill |
|---|---|---|---|
| A1 | Flags unbounded updateMany({}, ...) as a WiredTiger write ticket exhaustion risk | PASS | PASS |
| A2 | Flags missing duplicate pre-check before createIndex({unique: true}) | PASS | PASS |
| A3 | Flags validationLevel: "strict" applied before backfill as UNSAFE | PASS | PASS |
| A4 | Recommends "moderate" → "strict" validator progression | PASS | PASS |
| A5 | Requires explicit w: "majority" write concern on all operations, flagged as Critical absence | PASS | PASS |
| A6 | Provides an _id-range batched backfill script (with sleep throttling) | PASS | PASS |
| A7 | Original script scorecard: Critical 0/3 (write concern, batching, rollback all missing) | PASS | PASS |
| A8 | §9.9 includes ≥5 risks covering email field existence, null handling, oplog window | PASS | PASS |
| A9 | §9.9 Uncovered Risks uses the required 4-column table (Area | Reason | Impact | Follow-up) | PASS | FAIL |
Scenario 1 result: With Skill 9/9, Without Skill 8/9 — the only gap is the §9.9 table format.
Scenario 2 — Large-collection field type migration (9 assertions)
| ID | Assertion | With Skill | Without Skill |
|---|---|---|---|
| B1 | Flags unbounded updateMany as Critical (WiredTiger write ticket exhaustion) | PASS | PASS |
| B2 | Flags in-place type overwrite as UNSAFE (irreversible + old code breaks immediately) | PASS | PASS |
| B3 | Recommends amount_v2 new-field + dual-read + backfill + validator + cleanup (6-step pattern) | PASS | PASS |
| B4 | Explicitly labels Phase 5 ($unset old field) as irreversible in the rollback plan — backup required | PASS | PASS |
| B5 | Requires upgrading write concern from w: 1 to w: "majority" | PASS | PASS |
| B6 | Provides an _id-range migration script (with idempotent filter and sleep throttling) | PASS | PASS |
| B7 | Original script scorecard: 0/12 (every Critical/Standard/Hygiene item fails) | PASS | PASS |
| B8 | Flags validationLevel: "strict" before backfill as UNSAFE (AE-3) | PASS | PASS |
| B9 | §9.9 uses the required 4-column table (Area | Reason | Impact | Follow-up) | PASS | FAIL |
Scenario 2 result: With Skill 9/9, Without Skill 8/9 — again, the only gap is the §9.9 table format.
Scenario 3 — Degraded mode, no context (6 assertions)
| ID | Assertion | With Skill | Without Skill |
|---|---|---|---|
| C1 | Minimal/Degraded mode declared with Data basis: minimal label | PASS | PASS |
| C2 | All risk assessments are conditional — no unconditional "safe" claims | PASS | PASS |
| C3 | §9.9 uses the required 4-column table and covers ≥8 known unknowns | PASS | FAIL |
| C4 | Identifies MongoDB version impact on index build behavior (<4.2 vs 4.2+) | PASS | PASS |
| C5 | Recommends running estimatedDocumentCount() first to determine collection size | PASS | PASS |
| C6 | Recommends {device_type: {$exists: false}} as an idempotent filter condition | PASS | PASS |
Scenario 3 result: With Skill 6/6, Without Skill 5/6 — the §9.9 table format fails again.
3. Pass Rate Summary¶
3.1 Overall¶
| Configuration | PASS | FAIL | Pass rate |
|---|---|---|---|
| With Skill | 24/24 | 0 | 100% |
| Without Skill | 21/24 | 3 | 87.5% |
Delta: +12.5 percentage points
3.2 By scenario¶
| Scenario | With Skill | Without Skill | Where points were lost |
|---|---|---|---|
| S1 Index safety | 9/9 (100%) | 8/9 (88.9%) | A9: §9.9 table format |
| S2 Type migration | 9/9 (100%) | 8/9 (88.9%) | B9: §9.9 table format |
| S3 Degraded mode | 6/6 (100%) | 5/6 (83.3%) | C3: §9.9 table format |
The pattern is consistent: all three lost points come from the same root cause — the §9.9 Uncovered Risks output format. Without the skill, the baseline uses numbered lists or prose paragraphs. With the skill, §9.9 is always a 4-column table (Area | Reason | Impact | Follow-up). This is a structural output contract requirement, not a knowledge gap.
4. Key Differences¶
4.1 Behaviors unique to the With-Skill group¶
| Behavior | Source |
|---|---|
| §9.9 Uncovered Risks as a 4-column table (Area | Reason | Impact | Follow-up) | §9 Output Contract |
| Anti-example number cross-references (AE-2, AE-3, AE-4) | §7 Anti-Examples |
| Explicit Gate-by-Gate analysis (Gate 1–4 each noted) | §2 Mandatory Gates |
Data basis: label (full / degraded / minimal / planning) | §8 Scorecard requirement |
Scorecard in the format X/12 — Critical Y/3, Standard Z/5, Hygiene W/4 | §8 exact format |
4.2 Technical knowledge comparison¶
| Check | With Skill | Without Skill |
|---|---|---|
| WiredTiger ticket exhaustion detection | PASS | PASS |
_id-range batching solution | PASS | PASS |
amount_v2 new-field migration pattern | PASS | PASS |
moderate → strict validator progression | PASS | PASS |
irreversible classification on $unset phase | PASS | PASS |
Conclusion: MongoDB migration safety knowledge — WiredTiger, _id-range batching, validator progression — is well-trained in the base model. The skill's value is about enforcing structure, not transferring knowledge.
4.3 Scenario 3 anomaly: With Skill costs more tokens¶
Scenario 3 (degraded mode) produced a reversal: With Skill (36,706 tokens, 3 tool calls) was more expensive than Without Skill (31,986 tokens, 2 tool calls).
Why: SKILL.md §3 specifies "unknown collection size → assume Large → Deep depth → load both reference files." The skill followed this rule and loaded large-collection-migration.md and mongo-ddl-lock-matrix.md, generating extra input tokens and tool calls. The baseline stayed at Standard depth with a leaner output.
Implication: this reflects the skill's conservative design philosophy — loading more context rather than risk missing something. But in a fully context-free scenario, it increases cost unnecessarily.
5. Token Cost Analysis¶
5.1 Skill context overhead¶
| Component | Lines | Estimated tokens | Loaded when |
|---|---|---|---|
SKILL.md | 321 | ~4,200 | Every request |
mongo-ddl-lock-matrix.md | ~150 | ~2,000 | Standard/Deep |
large-collection-migration.md | ~180 | ~2,400 | Deep / large collections |
5.2 Actual token consumption¶
| Agent | Scenario | Total tokens | Tool calls | Mode |
|---|---|---|---|---|
| Without Skill | S1 | 36,844 | 3 | No skill |
| With Skill | S1 | 19,574 | 0 | With skill |
| Without Skill | S2 | 37,583 | 3 | No skill |
| With Skill | S2 | 19,374 | 0 | With skill |
| Without Skill | S3 | 31,986 | 2 | No skill |
| With Skill | S3 | 36,706 | 3 | With skill (anomaly: reference files loaded) |
5.3 Efficiency¶
| Metric | S1 | S2 | S3 (anomaly) | Average |
|---|---|---|---|---|
| Without Skill tokens | 36,844 | 37,583 | 31,986 | 35,471 |
| With Skill tokens | 19,574 | 19,374 | 36,706 | 25,218 |
| Token change | −46.9% | −48.5% | +14.8% | −28.9% |
| Quality gain | +11.1 pp | +11.1 pp | +16.7 pp | +12.5 pp |
S1 and S2 are highly efficient: when context is available (version and collection size known), the skill saves nearly 50% of tokens while maintaining higher quality. The savings come from structured output replacing exploratory reasoning, plus zero extra tool calls.
S3 is in the negative range: when context is completely absent, the skill's conservative depth trigger (Deep + all reference files) increases cost by ~15%. Compare with pg-migration, which handles the same situation at Standard depth without this anomaly. This is a known design issue — see §7.
6. Weighted Scores¶
6.1 Dimension scores (out of 5)¶
| Dimension | With Skill | Without Skill | Gap |
|---|---|---|---|
| Critical defect detection completeness | 5.0 | 4.8 | +0.2 |
| Write safety enforcement | 5.0 | 4.5 | +0.5 |
| Rollback classification accuracy | 5.0 | 4.5 | +0.5 |
| Output structure compliance (§9 format) | 5.0 | 3.5 | +1.5 |
Migration script quality (_id-range, idempotency) | 5.0 | 4.5 | +0.5 |
| Degraded mode handling | 5.0 | 4.0 | +1.0 |
6.2 Weighted total (out of 10)¶
| Dimension | Weight | With Skill | Without Skill | Notes |
|---|---|---|---|---|
| Critical defect detection | 25% | 10.0 | 9.5 | Both correctly identify all 3 Critical defects; baseline slightly weaker on AE cross-references |
| Write safety enforcement | 20% | 10.0 | 9.0 | Both require w: majority; skill formally marks it as a Critical-tier requirement |
| Rollback classification | 15% | 10.0 | 9.0 | Both identify irreversible phases; skill uses the three-category framework more systematically |
| Output structure compliance | 20% | 10.0 | 7.0 | §9.9 table: 100% compliant with skill, 100% non-compliant without |
| Migration script quality | 10% | 10.0 | 9.0 | Both provide _id-range scripts; skill adds idempotent filter and checkpointing |
| Degraded mode handling | 10% | 10.0 | 8.0 | Skill explicitly declares Data basis and Gate framework; baseline uses conservative mode but less formally |
| Weighted total | 100% | 10.00/10 | 8.77/10 | — |
7. Findings and Recommendations¶
Finding 1: mongo-migration baseline is strong, similar to pg-migration¶
| Skill | Baseline pass rate | With Skill pass rate | Delta |
|---|---|---|---|
| mysql-migration | 52% | 100% | +48 pp |
| pg-migration | 87% | 100% | +13 pp |
| mongo-migration | 87.5% | 100% | +12.5 pp |
MongoDB migration safety — WiredTiger exhaustion, _id-range batching, validator progression — is thoroughly trained into the base model. The skill's value is concentrated in format enforcement, not knowledge injection.
Finding 2: The §9.9 table format is the single most consistent differentiator¶
Across all three scenarios, the baseline's content was nearly identical to the skill's. The only consistent failure was the §9.9 output format. The baseline's numbered lists and prose paragraphs: - Cannot be machine-parsed in a CI/CD pipeline - Lack the Impact and Follow-up columns needed for team-level action tracking
The skill's 4-column table can be copied directly into a JIRA or Linear ticket description.
Finding 3: Scenario 3 triggers Deep depth too aggressively¶
SKILL.md specifies "unknown collection size → assume Large → Deep depth → load all reference files," which produces ~14.8% extra token cost in a Minimal context. Suggested fix: add a rule to §3 Depth Selection:
If context is Minimal (script only, no size or version information), confirm collection size with the user before triggering Deep depth, or default to Standard depth in Degraded mode to avoid over-consuming when information is absent.
Finding 4: Token efficiency depends heavily on available context¶
| Scenario type | Token savings |
|---|---|
| With sufficient context (S1, S2) | −46% to −49% |
| No context at all (S3) | +15% (negative) |
Collect MongoDB version and collection size before invoking the skill — this is the single best way to maximize token efficiency.
8. Conclusion¶
Rating: production-ready. Strongly recommended for all MongoDB migration reviews.
Three things the skill does well:
-
Structural enforcement: the §9.9 Uncovered Risks 4-column table makes risk items trackable and machine-parseable. Without the skill, 100% of baseline outputs used freeform formats that can't be parsed or directly actioned.
-
Evaluation framework consistency: Gate analysis, AE cross-references, and
Data basis:labels ensure that every review is reproducible and comparable across engineers and over time. -
Token efficiency when context is available: S1 and S2 save 47% of tokens by replacing exploratory web searches and tool calls with structured framework output.
Three improvement suggestions:
-
Add a rule in §3 Depth Selection to avoid triggering Deep depth in Minimal context — stay at Standard depth with degraded mode instead.
-
Add notes in §9 Output Contract about transaction wrapping behavior in common MongoDB migration tools (golang-migrate, mongomigrate) — analogous to the golang-migrate notes already in the pg-migration skill.
-
Consider adding a fourth test scenario covering
reshardCollection(shard key migration), which is the most operationally complex MongoDB 5.0+ feature and currently has no dedicated golden fixture.