Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsBlogPro
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges
  • Chrome Extension
  • Skill Manager

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Thalarch Refactor

ASecurity

Behavior-preserving refactoring protocol for simplifying, restructuring, modularizing, or modernizing existing code without silently changing externally observable behavior. Use for non-trivial cleanup, decomposition, abstraction changes, package/module moves, or legacy modernization where regression risk matters.

2 stars
0 votes
0 copies
1 views
Added 9/19/2026
ai-agentsexpresstestingrefactoringapi

Works with

cliapi

Security Analysis

A100/100

Scanned 9/19/2026

$npx -y skills add LUC4N3X/antigravity-thalarch --skill thalarch-refactor --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Thalarch Refactor?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Thalarch Refactor
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/luc4n3x-thalarch-refactor/badge)](https://www.skillsdirectory.com/skills/luc4n3x-thalarch-refactor)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
Files
SKILL.md
---
name: thalarch-refactor
description: >
  Behavior-preserving refactoring protocol for simplifying, restructuring, modularizing, or
  modernizing existing code without silently changing externally observable behavior. Use for
  non-trivial cleanup, decomposition, abstraction changes, package/module moves, or legacy
  modernization where regression risk matters.
---

# Thalarch Refactor

A refactor changes structure without intentionally changing observable behavior. Bug fixes,
feature changes, and refactors are separate operations unless the user explicitly combines them.

## 1. Freeze the behavior contract

Before editing, identify the behaviors that must remain stable:

- public inputs/outputs;
- exceptions/error semantics;
- side effects and ordering;
- persisted/wire formats;
- timing/concurrency guarantees that callers depend on;
- ABI/API/binary compatibility where relevant.

If tests are weak, create or locate characterization evidence before broad restructuring when
feasible.

## 2. Identify the actual pressure

Name the reason for the refactor: duplicated knowledge, ownership confusion, excessive coupling,
unsafe state, difficult testing, dependency direction, obsolete platform pattern, or another
specific maintenance cost.

Do not refactor merely because a different style is aesthetically preferred.

## 3. Small semantic steps

Prefer a sequence where each step is independently understandable and verifiable:

- rename;
- extract/move;
- replace data shape;
- invert dependency;
- remove duplication;
- delete old path.

Avoid simultaneous formatting, renaming, behavioral changes, and architecture movement in the
same diff unless unavoidable.

## 4. Abstraction test

Before creating an abstraction ask:

- what repeated knowledge or dependency boundary does it own?
- are there real consumers today?
- does it reduce coupling or merely relocate complexity?
- does the name express a stable domain concept?

If a shared abstraction has accumulated caller-specific flags/branches, consider re-inlining the
behavior, simplifying each caller, and re-abstracting only the truly shared rule.

## 5. Compatibility

For public or persisted contracts, explicitly review:

- source/binary compatibility;
- serialization/schema changes;
- migration order;
- config/environment compatibility;
- client/server rollout sequencing.

## 6. Verification

Use before/after proof:

1. establish baseline tests/behavior;
2. make one bounded structural change;
3. rerun the smallest invalidated checks;
4. inspect the semantic diff;
5. repeat;
6. run broader relevant verification at the end.

If a test must change because behavior changed, that part is not a pure refactor. Surface it.

## Completion

Report structural improvement separately from any intentionally changed behavior. Never hide a
bug fix inside a cleanup commit/diff.

Attribution

LUC4N3XLUC4N3X
View sourceSee grades on GitHubMore from LUC4N3X →
SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills Directory ProSkills Directory

Get any skill into Claude in one click.

Download any skill as a ZIP for Claude.ai, Claude Desktop, or .claude/skills. $9/mo.

See Pro

Related Skills

Caveman

Ultra-compressed communication mode that cuts output tokens while keeping technical accuracy. Levels: lite, full, ultra and the wenyan variants. Use for /caveman, "caveman mode", "talk like caveman", "be brief" or "less tokens".

1087401 votes

Hyperplan

Adversarial multi-agent planning skill. Self-orchestrates 5 hostile category members (unspecified-low, unspecified-high, deep, ultrabrain, artistry) via team-mode for ruthless cross-critique debate, distills only the defensible insights, then MANDATORILY hands the distilled insight bundle to the `plan` agent for executable plan formalization. Use when planning needs maximum rigor and surfacing of weak assumptions, blind spots, and over-engineering. Triggers: 'hyperplan', 'hpp', '/hyperplan', ...

697551 votes

Writing Skills

Create and manage Claude Code skills in HASH repository following Anthropic best practices. Use when creating new skills, modifying skill-rules.json, understanding trigger patterns, working with hooks, debugging skill activation, or implementing progressive disclosure. Covers skill structure, YAML frontmatter, trigger types (keywords, intent patterns), UserPromptSubmit hook, and the 500-line rule. Includes validation and debugging with SKILL_DEBUG. Examples include rust-error-stack, cargo-dep...

3931 votes

Mcp Code Execution

Routes multi-tool workflows through MCP servers for large datasets and pipelines. Use when Bash tool overhead is limiting throughput on data-heavy tasks.

3421 votes

catchup

Recovers the conversation and failed tool calls of a previous Codex, Amp, Claude Code, Antigravity, Cline, Copilot CLI, Cursor, DeepSeek Harness, Grok Build, Kimi, OpenCode, Pi Agent, or ZCode session. Use when the user says "catch up", "what did the last session do", "get me up to speed", "I switched agents", asks to recover/summarize a previous session before continuing, or asks to diagnose or report a catchup failure. Do NOT use for the current conversation, git history, or any non-agent log.

741 votes
View all in ai-agents →