Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Pull the codebase's empirical style norm from Memtrace and match it when writing or editing source code in an indexed repo. Use when choosing between competing idioms (ternary vs if-else, arrow vs function declaration, const vs let, await vs .then, early-return vs nested-return), matching naming case, or when the user asks what the convention here is. Do not re-derive style from training priors or maintain a markdown style guide for the project; the fingerprint is sampled live from the actual co
.claude/skills/syncable-dev-memtrace-style-fingerprint/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-06 | ✗→✓ | ▲ Improved | 129% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 134% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 111% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 81% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 64% | 0% |
Every indexed Memtrace repository carries an empirical style fingerprint — descriptive histograms of competing AST idioms (ternary vs if-else, arrow vs function declaration, const vs let, await vs .then, early-return vs nested-return depth) computed at parse time and rolled up to Repository + Community level. This workflow tells you when and how to consult it so your edits match the codebase's existing idioms instead of drifting on stylistic choices the linter doesn't catch.
The fingerprint is descriptive, not prescriptive. It reports what the codebase actually does, not what a style guide says it should do. If the codebase deviates from a popular convention for some reason, the fingerprint captures the deviation and you should match the deviation — that's the whole point. For prescriptive bug/security/perf rules, use find_code_review_issues instead.
| Situation | Action | |---|---| | About to write new code (function, component, module) in an indexed repo | Step 1 + Step 2 with file_path=<the file you'll create> | | About to edit an existing file | Step 1 + Step 2 with file_path=<that file> | | Asked "what's the convention here for X?" | Step 1 only — repo-mode fingerprint answers it | | Deciding between two equivalent idioms (ternary vs if, arrow vs fn-decl, await vs then) | Step 2 with file_path — delta_from_codebase_norm tells you which idiom matches the norm | | Reviewing a diff | Step 2 on each modified file — flag any new idioms that diverge from the file's language norm | | Session start in a multi-day project | Read the style: line in get_codebase_briefing (auto-included) |
If the repo is not indexed in Memtrace, this workflow does not apply — fall back to your default behavior.
Full parameter spec for every Memtrace tool: references/mcp-parameters.md (bundled at the memtrace-skills plugin root).
Call get_style_fingerprint(repo_id) with no file_path (repo_id comes from list_indexed_repositories if not already known). The response includes:
histogram — raw counts (e.g. ternary_count: 1005, if_stmt_count: 8087)ratios — computed shares for each competing pair (e.g. ternary_share: 0.11)dominant_idioms — top-3 dimensions sorted by |ratio - 0.5| (strongest preferences first), each with a dimension, ratio, and human-readable interpretationfunction_count — sample size at the repo levelsample_threshold — minimum observations before a ratio is committed (currently 20)A ratio of null means the codebase doesn't have enough observations for that dimension to commit a norm — treat it as "no signal", do not assume one.
Call get_style_fingerprint(repo_id, file_path=<file>). The response adds:
file_fingerprint — the same shape as histogram/ratios/function_count but computed over just the functions in that filecodebase_fingerprint — repo aggregate for comparisondelta_from_codebase_norm — array of dimensions where the file diverges ≥0.15 from the codebase, sorted by absolute delta, capped at top 5. Each entry has dimension, file_ratio, codebase_ratio, abs_delta, and a note describing the directionMatch the file's language_fingerprint, not the repo aggregate. In file mode the response carries language (the file's language), language_fingerprint (that language's slice — the primary comparator), and delta_from_language_norm (divergence vs the language, not the repo). Per-language slicing prevents cross-applying Python norms to JS code or vice versa — read the language_fingerprint. (delta_from_codebase_norm is retained as a deprecated alias and is removed in 0.5.14.)
If delta_from_language_norm is empty, the file is already aligned — proceed without style adjustments. If it has entries, your edits should not amplify the divergence (e.g. don't add more ternaries to a file that's already above the language's ternary norm).
get_codebase_briefing(repo_id) auto-includes a style: line in its summary when the sample threshold is met and at least one ratio is outside the 0.4..0.6 no-preference band. Format:
style: <interpretation 1> (<%>); <interpretation 2> (<%>); <interpretation 3> (<%>)Example on a TS/JS-heavy codebase:
style: strongly prefers arrow functions (98%); strongly prefers async/await over .then chains (88%); strongly prefers const over let (94%)You should already be reading the briefing at session start (per memtrace-codebase-exploration). The style: line lands in your context for free — no extra call needed.
| Condition | Action | |---|---| | dominant_idioms[0].ratio >= 0.85 or <= 0.15 | Treat as a hard preference — match it unless there's a specific structural reason not to | | dominant_idioms[0].ratio in 0.65..0.85 or 0.15..0.35 | Treat as a soft preference — match it for new code, leave existing patterns alone | | ratio in 0.4..0.6 | No clear preference — use your own judgment, match local file context | | ratio is null (below sample threshold) | No signal — don't assume a norm; pick the idiom that fits the immediate context | | delta_from_codebase_norm shows your target file already diverges from the norm | Don't amplify the divergence with your edits — match the codebase, not the outlier file | | file_fingerprint is empty (file has no functions yet, or is a config file) | Use the language slice or repo aggregate; this is creation territory |
Repo-mode get_style_fingerprint (field meanings in Steps 1–2):
json{ "histogram": { "ternary_count": 1005, "if_stmt_count": 8087 }, "ratios": { "ternary_share": 0.11, "naming_variables_snake_share": 0.89 }, "dominant_idioms": [ { "dimension": "ternary_share", "ratio": 0.11, "interpretation": "strongly prefers if-else over ternaries" } ], "function_count": 4211, "sample_threshold": 20 }
File mode adds file_fingerprint, codebase_fingerprint, language, language_fingerprint, and delta_from_language_norm (entries: dimension, file_ratio, codebase_ratio, abs_delta, note).
language_fingerprint (when available) or codebase_fingerprint.ratios filtered by the file's language is what you should match. Cross-applying TS norms to a Python file is the failure mode this whole tool exists to prevent.get_style_fingerprint for every line of code. Once per file at the start of an edit session is enough. The norm doesn't change between your edits within the same session.Beyond the AST idioms, the fingerprint also reports identifier naming-case per scope, across all 13 source languages:
ratios.naming_variables_snake_share or the dominant_idioms entry that names the scope's winning case ("vars are snake_case (89%)").ratios.config_keys_*_share.null for it (Rust vars/fns/types/consts, Ruby constants). A null there means "the compiler decides, not the codebase" — don't try to match a non-signal.go_exported_share (PascalCase = exported) instead of per-case naming, because case encodes visibility in Go.When editing, match the naming case the file's language_fingerprint reports for the scope you're touching — same per-language rule as the idiom dimensions.
find_code_review_issues (prescriptive deterministic review).memtrace-codebase-exploration and memtrace-refactoring-guide.Without this workflow, LLM editors drift session-to-session on style choices that aren't enforced by linters — one session uses ternaries, the next doesn't; one uses arrow functions, the next uses function. The fix isn't a manually-maintained style guide (stale by week 2). The fix is sampling the codebase's actual idioms at parse time and reading them before each edit. The fingerprint is computed in the same parse pass as cyclomatic + cognitive complexity at sub-1% overhead, so the cost of providing the answer is near zero.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 4,947 | 3,284 | -34% | 1 | 1 | 0% | 726 | 2,715 | +274% | 0 | 0 | — |
case-02 | fail→fail | 9,737 | 2,633 | -73% | 1 | 1 | 0% | 1,416 | 2,717 | +92% | 0 | 0 | — |
case-03 | fail→fail | 12,396 | 3,025 | -76% | 1 | 1 | 0% | 1,421 | 2,751 | +94% | 0 | 0 | — |
case-04 | fail→fail | 11,627 | 4,625 | -60% | 1 | 1 | 0% | 1,836 | 3,223 | +76% | 0 | 0 | — |
case-05 | pass→pass | 8,808 | 5,478 | -38% | 1 | 1 | 0% | 1,432 | 3,440 | +140% | 0 | 0 | — |
case-06 | fail→pass | 9,176 | 5,130 | -44% | 1 | 1 | 0% | 1,471 | 3,371 | +129% | 0 | 0 | — |
case-07 | fail→pass | 9,401 | 6,052 | -36% | 1 | 1 | 0% | 1,520 | 3,555 | +134% | 0 | 0 | — |
case-08 | fail→pass | 10,116 | 4,417 | -56% | 1 | 1 | 0% | 1,572 | 3,312 | +111% | 0 | 0 | — |
case-09 | pass→pass | 9,355 | 3,805 | -59% | 1 | 1 | 0% | 1,586 | 3,205 | +102% | 0 | 0 | — |
case-10 | pass→pass | 3,416 | 3,293 | -4% | 1 | 1 | 0% | 557 | 3,103 | +457% | 0 | 0 | — |
case-11 | fail→pass | 12,589 | 6,019 | -52% | 1 | 1 | 0% | 1,920 | 3,467 | +81% | 0 | 0 | — |
case-12 | fail→pass | 12,674 | 4,228 | -67% | 1 | 1 | 0% | 1,903 | 3,123 | +64% | 0 | 0 | — |
case-13 | fail→pass | 8,615 | 1,969 | -77% | 1 | 1 | 0% | 1,372 | 2,775 | +102% | 0 | 0 | — |
case-14 | fail→pass | 9,729 | 6,982 | -28% | 1 | 1 | 0% | 1,581 | 3,672 | +132% | 0 | 0 | — |
case-15 | fail→pass | 11,045 | 4,711 | -57% | 1 | 1 | 0% | 1,641 | 3,219 | +96% | 0 | 0 | — |
case-16 | pass→pass | 8,670 | 3,348 | -61% | 1 | 1 | 0% | 1,299 | 2,971 | +129% | 0 | 0 | — |
case-17 | fail→pass | 10,440 | 3,332 | -68% | 1 | 1 | 0% | 1,521 | 3,003 | +97% | 0 | 0 | — |
case-18 | fail→pass | 10,052 | 3,249 | -68% | 1 | 1 | 0% | 1,608 | 2,983 | +86% | 0 | 0 | — |
case-19 | fail→pass | 18,429 | 1,442 | -92% | 1 | 1 | 0% | 1,176 | 2,705 | +130% | 0 | 0 | — |
case-20 | fail→pass | 12,516 | 5,971 | -52% | 1 | 1 | 0% | 2,103 | 2,938 | +40% | 0 | 0 | — |
case-21 | fail→pass | 11,871 | 4,494 | -62% | 1 | 1 | 0% | 1,928 | 3,156 | +64% | 0 | 0 | — |
case-22 | fail→pass | 13,316 | 4,469 | -66% | 1 | 1 | 0% | 2,036 | 3,168 | +56% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +64 percentage points is the difference between those two pass rates over the 18 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.