# Refactoring

> Plan refactors with Ontoly impact and dependency evidence. Use when asked to move, rename, split, extract, or remove code while preserving behavior.

- Skill: `0xsarwagya/refactoring` (Agent Skill, multi-file: 10 files)
- Install (CLI): `npx skillmds@latest add 0xsarwagya/refactoring`
- Raw SKILL.md: https://api.skillmd.com/api/skills/0xsarwagya/refactoring/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- License: AGPL-3.0-only
- Author: 0xsarwagya (https://skillmd.com/u/0xsarwagya)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/0xsarwagya/refactoring

---


# Refactoring

Use this skill when the user asks for refactoring using Ontoly evidence.

## Required Workflow

Follow [the shared Ontoly workflow](reference/workflow.md). Also read [graph evidence rules](reference/graph.md), [MCP usage](reference/mcp.md), [best practices](reference/best-practices.md), and [fallback rules](reference/fallbacks.md) when the task requires detail.

## Ontoly Capabilities

Use these capabilities first: `ImpactAnalysis`, `FindDependencies`, `FindDependents`, `FindCycles`, `EvidencePack`.

## Output Contract

Return:

- answer or plan
- capabilities invoked
- graph evidence with node ids, edge types, source spans, and graph hash when available
- confidence: high, medium, or low
- fallback reason if repository files were inspected

## Boundaries

Do not implement compiler, query, MCP, SDK, or business logic in the skill. Do not search repository files until Ontoly cannot answer or evidence must be confirmed.

## Resources

- [Examples](examples.md)
- [Prompt template](templates/refactoring-plan.md)
- [Capability notes](reference/capabilities.md)

## Learn more

- Documentation: https://ontoly.xyz/docs
- This skill on the web: https://ontoly.xyz/skills#refactoring
- All Ontoly Agent Skills: https://ontoly.xyz/skills
- Install via skills.sh: https://www.skills.sh/?q=0xsarwagya/ontoly

