refactor

AI Community

Skill notes

Step 0: Detect Language

Before applying any technique, detect the project's stack: Project File · Language · Idiom Style pom.xml / build.gradle · Java · OOP, Stream API pyproject.toml / requirements.txt / setup.py · Python · Duck typing, comprehensions package.json + tsconfig.json · TypeScript · Functional-OOP hybrid

Language Support Matrix

Concept · Python · TypeScript · Go · Rust Class / struct · class · class · struct + methods · struct + impl Inheritance · class Child(Parent) · extends · Embedding (no inheritance) · Traits (no inheritance) Interface / contract · Protocol / ABC · interface · interface (implicit) · trait Encapsulation · _private convention · private keyword · Unexported (lowercase) · Private by default, pub

Core Philosophy

Refactoring is the process of changing the internal structure of code without altering its observable behavior. It is a disciplined technique, not a random cleanup. The golden rule is: Cover → Modify → Refactor (always have tests before you start).

How to Use This Skill

Detect the language (Step 0 above) Diagnose first: Identify the code smell (see techniques/00-code-smells-diagnostic.md) Check applicability: See references/language-applicability.md for technique availability per language Select technique: Each smell maps to one or more refactoring techniques Read the technique file: Each technique has multi-language examples (Python, TypeScript, Go, Rust)

Technique Categories

The techniques are organized in 7 groups. Each technique has its own file in the techniques/ directory.

Fluxly profile Runtime and permissions are inferred by Fluxly static checks, not author declarations or runtime test results.
Domain
AI
Author-declared agents
No explicit declaration found; this is not inferred or tested compatibility
Static check
88 / 100 · heuristic scan, not runtime safety proof
Runtime evidence
Not run; no isolated runtime test evidence is currently recorded
Author / version / license
@tomevault-io · no license declared
Token usage
Moderate
Setup complexity
Guided setup
External API key
Not required
Operating systems
Unspecified (assume cross-platform)
Runtime requirements
Python
Detected file/system behavior
  • Read-only
  • Write / modify
  • Shell exec
Network behavior
Local-only
Install commands
None (reference only)

Heads up: Tool permissions are not declared; actual access depends on the runtime.

01
Step 0: Detect Language

Before applying any technique, detect the project's stack: Project File · Language · Idiom Style `pom.xml` / `build.gradle` · Java · OOP, Stream API `pyproject.toml` / `requirements.txt` / `setup.py` · Python · Duck typing, comprehensions `package.json` + `tsconfig.json` · TypeScript · Functional-OOP hybrid

Discussion

Powered by GitHub Discussions. Sign in with GitHub to comment, react, or subscribe.