Agent skill · Audited from source
Memtrace Refactoring Guide
skill · syncable-dev/memtrace-publicNOASSERTION licenceAudited 31 Oct 2026 · source 3e7894d935d8
Is it safe? Yes — SAFE, grade B (89/100). We read this skill's source at commit 3e7894d935d8 and found no filesystem, network or shell access and no hard-coded secrets. What it does: Build a phased, risk-scored refactoring plan from Memtrace complexity, dead-code, bridge, impact analysis, and Cortex decision-memory constraints. Use when the user wants to refactor source code, reduce complexity,…
Cite
Cite this page
ModelsAtlas. “Memtrace Refactoring Guide (syncable-dev/memtrace-public)”. Retrieved 31 Oct 2026. https://modelsatlas.com/skills/syncable-dev/memtrace-refactoring-guide
Trust audit
Audit 0.4.1 · source read 31 Oct 2026
SAFE means nothing in the source contradicts what the skill says it does. Grade B is shared by 17,406 of 18,389 audited skills.
What the source does
- FilesystemNone observedNo reads or writes in the source
- NetworkNone observedNo outbound calls in the source
- ShellNone observedNo commands run in the source
- DependenciesPinnedNothing floats
- SecretsNone foundNo keys in source
Five audit layers
| Layer | What we check | Result | Findings |
|---|---|---|---|
L0 Provenance | Repo owner, licence, archive status, activity | PASS | 0 |
L1 Static source | Secrets, path traversal, supply chain, hidden code | NA | 0 |
L2 Instructions | Prompt injection, authority framing, hidden directives | PASS | 0 |
L3 Inventory | The files and declarations match the source | PASS | 0 |
L4 Sandbox | Run in isolation and watch behaviour | SKIPPED why | 0 |
Gates applied: no behavioural pass.
Findings (0)
No findings at any severity. We re-audit when the source changes.
Audit 0.4.1 · source sha 3e7894d935d8 · 31 Oct 2026Report an issue or request a re-scan
Provenance
Who published it, and what the verdict is pinned to
- Publishersyncable-dev GitHub organizationOwner of the repository this skill is read from
- Source foldersyncable-dev/memtrace-public/plugins/memtrace-skills/skills/memtrace-refactoring-guideThe exact folder we audited
- LicenceNOASSERTIONAs the repository states it
- Commit pinned for this verdict3e7894d935d8A new audit runs when the source changes
- Repository statusNot archivedPushed today
- Sandboxed runNot runSkills are read, not executed; layer L4 is skipped
What it tells the agent
Full source on GitHub ↗Its description: Build a phased, risk-scored refactoring plan from Memtrace complexity, dead-code, bridge, impact analysis, and Cortex decision-memory constraints. Use when the user wants to refactor source code, reduce complexity,…
---
name: memtrace-refactoring-guide
description: "Build a phased, risk-scored refactoring plan from Memtrace complexity, dead-code, bridge, impact analysis, and Cortex decision-memory constraints. Use when the user wants to refactor source code, reduce complexity, clean technical debt, delete dead code, split large functions, extract modules, reorganize code, or choose refactoring priorities. Do not plan refactors from grep/manual reference search alone; check graph impact and decision rationale/bans/contracts before changing existing code."
---
## Overview
Guided refactoring workflow — identifies refactoring candidates using structural analysis, scores them by risk and priority, checks Cortex decision memory for rationale/bans/contracts, and produces a phased refactoring plan. Combines complexity metrics, dead code detection, bridge analysis, temporal evolution, and decision memory to prioritize what to refactor first and how to do it safely.
## Steps
### 1. Identify refactoring candidates
Run these three tools in parallel to build a candidate list:
**a) Complexity hotspots:**
Call `find_most_complex_functions` with `top_n: 20`
**b) Dead code:**
Call `find_dead_code` to find unused symbols
**c) Architectural bottlenecks:**
Call `find_bridge_symbols` to find chokepoints with too much responsibility
### 2. Score candidates by volatility
Call `get_evolution` with `from: "90d ago"` and `mode: "compound"`.
Review `top_touched_symbols` and `top_changed_files`:
- Symbols that are BOTH complex AND frequently changing are the highest priority
- Complex but stable code can wait — it's not causing active pain
- Volatile but simple code may be fine — frequent changes to simple code is normal
**Priority matrix:**
| | Low Complexity | High Complexity |
|---|---|---|
| **Stable (low change freq)** | Leave alone | Monitor; refactor if touched |
| **Volatile (high change freq)** | Normal; leave alone | **TOP PRIORITY** — refactor first |
### 3. Assess risk for top candidates
For each top-priority candidate, call `get_impact` with `direction: both`:
- **Low risk** → refactor directly
- **Medium risk** → refactor with comprehensive tests
- **High/Critical risk** → plan incremental migration with backward compatibility
Also call `get_symbol_context` to check:
- How many processes does this symbol participate in? (More = more testing needed)
- Is it part of a cross-repo API? (If yes, coordinate with consumers)
### 4. Check decision memory before refactoring/removing
For each top candidate, call `recall_decision("<symbol/subsystem/refactor intent>")`.
If you have a numeric `symbol_id`, call `why_is_this_here(symbol_id)` and
`governing_contracts(symbol_id)`.
- A matching held decision/ban can veto or reshape the refactor.
- Contracts become acceptance criteria for the new design.
- CannotProve is unknown, not permission to delete.
### 5. Understand the neighbourhood
For each refactoring target, call `analyze_relationships`:
- `find_callees` — what does it depend on? These become candidates for extraction
- `find_callers` — what depends on it? These need updating after refactoring
- `class_hierarchy` — is it part of an inheritance chain? Liskov concerns
Full parameter spec for every Memtrace tool: `references/mcp-parameters.md` (bundled at the memtrace-skills plugin root).
### 6. Check community boundaries
Call `list_communities` and check: does the refactoring target sit at a community boundary?
- If yes, the refactoring may involve splitting responsibilities across modules
- If it belongs clearly to one community, the refactoring is more contained
### 7. Produce the refactoring plan
Synthesize into a phased plan:
**Phase 1 — Quick Wins:**
- Dead code removal (zero-risk deletions)
- Simple functions with high churn (reduce volatility)
**Phase 2 — High-Impact Refactors:**
- Complex + volatile functions (highest priority by the matrix)
- Bridge symbols with too many responsibilities (extract interfaces)
**Phase 3 — Structural Improvements:**
- Splitting oversized communities into smaller, focused modules
- Extracting shared logic from bridge symbols into dedicated services
For each item, include:
1. **Target** — function/class name, file, current complexity score
2. **Why** — complexity + volatility + blast radius rationale
3. **How** — specific refactoring approach (extract method, split class, introduce interface)
4. **Decision Memory** — relevant Cortex decisions/bans/contracts, or CannotProve as unknown
5. **Risk** — impact analysis rating + affected processes
6. **Test Plan** — which callers/processes to verify
## Decision Points
| Condition | Action |
|-----------|--------|
| Complex + volatile + high blast radius | Highest priority — but plan carefully; incremental approach |
| Complex + stable + low blast radius | Can wait; refactor when you're already touching nearby code |
| Dead code with zero callers | Run Cortex provenance/recall first; zero callers is not proof that no decision/contract keeps it |
| Bridge symbol with many dependents | Extract interface first, then refactor implementation behind it |
| Symbol in cross-repo API | Coordinate with consumers; backward-compatible changes only |
| Cortex returns a held ban/contract | Preserve it or ask before overriding it |
## Output
A phased plan (Phases 1–3). One worked entry:
| Field | Example |
|---|---|
| Target | `process_payment` — `src/billing/processor.py`, complexity 38 |
| Why | Complex + volatile (14 changes/90d in `top_touched_symbols`) + 23-symbol blast radius |
| First move | Extract validation branch to `validate_payment_request`; keep callers untouched |
| Risk | High — upstream spans 3 processes incl. `checkout_flow`; incremental migration |
Acceptance criteria:
- Every plan item cites complexity, volatility, blast radius, and decision-memory status — no gut-feel picks.
- High/Critical-risk items include a test plan naming affected callers/processes.
## Common Mistakes
| Mistake | Reality |
|----Excerpt, first 6,000 characters of SKILL.md, verbatim from the audited commit. It is text from someone else’s repository, quoted so you can judge it before your agent reads it.
Install
Pinned to the audited commit 3e7894d
git clone https://github.com/syncable-dev/memtrace-public git -C memtrace-public checkout 3e7894d935d8
The author documents no install command, so this uses the repository directly. Our verdict covers commit 3e7894d935d8 only.
Works in
The author has not said which agents this skill supports, and we have not tested it in any.
Audit history
Every audit, every source change
- ✓SAFE B 89 / 100
first audit · source
3e7894d935d8
Similar skills
All coding & review skills →syncable-dev/memtrace-public
Map source-code relationships between symbols. Use when the user asks about callers, callees, references, imports, exports, type usages, class hierarchy, inheritance, implementations, overrides, or dependencies between…
syncable-dev/memtrace-public
Find source code with Memtrace hybrid BM25+semantic search: symbols, functions, classes, types, constants, definitions, implementations, logic, or error strings inside code. Use when the user wants to find, search,…
syncable-dev/memtrace-public
Catch up on everything that changed in an indexed source-code repo since the last session, using stored session anchors and Memtrace change memory. Use when the user asks to continue, catch up, resume, see what changed…
syncable-dev/memtrace-public
Index a source-code repo into the Memtrace knowledge graph and poll the job to completion. Use when the user asks to index, parse, ingest, reindex, watch, or prepare a source-code repo for Memtrace analysis, when code…
syncable-dev/memtrace-public
Find dead code, complexity hotspots, and refactoring candidates in indexed source code. Use when the user asks about source-code quality, dead code, unused functions, zero callers, complexity, cyclomatic complexity,…
syncable-dev/memtrace-public
Review GitHub pull requests with Memtrace's local graph-backed review engine. Use when the user asks to review a GitHub pull request, run Memtrace code review, post Memtrace review comments, create a PR with a review…
Questions about Memtrace Refactoring Guide
What does the Memtrace Refactoring Guide skill do?
Is Memtrace Refactoring Guide safe to install?
What can Memtrace Refactoring Guide access on my machine?
How current is this page?
Sources
- github.com/syncable-dev/memtrace-public/tree/main/plugins/memtra — the audited source at commit 3e7894d935d8 and every finding aboveObserved · 31 Oct 2026
Spotted something wrong? Report a correction · Methodology
Keep going in your AI
Opens with this page as the source. We add nothing else to the prompt.
- What does the Memtrace Refactoring Guide skill do?
- Is Memtrace Refactoring Guide safe to install?
- What can Memtrace Refactoring Guide access on my machine?