refactor-safely SKILL.md skillA
refactor-safely from techygarg/lattice is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.
mdr add techygarg/lattice/refactor-safely@git:20261009.a96f344Pins git:20261009.a96f344 in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 17 of 17 checks passed
- Kind
- SKILL.md skill
- Repository
- techygarg/lattice
- Path
skills/refactor-safely/SKILL.md- Versions recorded
- 2
- Latest version
- git:20261009.a96f344, committed Oct 9, 2026
- First version recorded
- Sep 3, 2026
- Size
- 13,622 bytes
- Repository stars
- 206
- License
- MIT
Restructure existing code safely without changing externally observable behavior. Composes context, design, architecture, code quality, and testing guardrails into a characterization-first refactoring workflow. Use when the user says 'refactor this', 'clean this up', 'untangle this module', 'move this to the right layer', 'simplify this code', or 'improve this structure'.
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# Refactor Safely ## Required Skills Load these skills based on refactor scope (see Steps 3, 5, 6 for conditional use): 1. `framework:knowledge-priming` -- Load project context so the refactor grounds in the real codebase. (always) 2. `framework:context-anchoring` -- Find and load the feature's context doc; capture approved plans and decisions in it. (always) 3. `framework:learning-harvest` -- Load prior operational learnings at session start; harvest new ones at session end. (always) 4. `framework:collaborative-judgment` -- Surface trade-offs in structure, seams, and migration sequence instead of silently assuming. (always) 5. `framework:clean-code` -- Readability, responsibility boundaries, local craft. (always) 6. `framework:test-quality` -- Characterization tests and the safety net. (always) 7. `framework:design-first` -- Target-structure planning for significant structural changes. (conditional: Step 3) 8. `framework:architecture` -- Layer placement and dependency direction. (conditional: responsibilities move across layers in Steps 5/6) 9. `framework:domain-driven-design` -- Aggregate boundaries and domain behavior. (conditional: domain rules move or sharpen in Step 6) …
Read the whole file at its exact version.
How to install
mdr add techygarg/lattice/refactor-safely@sha256:2c15e97df45b1374The line at the top of this page pins the label git:20261009.a96f344, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_a7wc7lsdpmbphqil)
2 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 2 versions of this file, between Sep 3, 2026 and Oct 9, 2026, about one every 36 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20261009.a96f344 latest | 2026-10-09 | a96f344 | 13,622 B | A | view · diff |
| git:20260903.6d09876 | 2026-09-03 | 6d09876 | 13,077 B | A | view |
Audit of the latest version
- pass: Frontmatter block present
- pass: Frontmatter declares a name
- pass: Frontmatter declares a description
- pass: Size between 200 bytes and 200 KB (13622 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
techygarg/lattice · 206 stars · license MIT · pushed 2026-10-10 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_a7wc7lsdpmbphqil GET https://markdownregistry.com/api/v1/resolve?ref=techygarg/lattice/refactor-safely GET https://markdownregistry.com/api/v1/blob/2c15e97df45b1374cfc34c3d7d70aa24bb0faad1b10ca7ad94835ed134871d94
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.
More from techygarg/lattice
Every file in techygarg/lattice