Systematic Code Refactoring
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
Project code quality and architecture expectations for implementation, refactoring, planning, and code review.
$ npx skills add jmfederico/pi-web --skill code-quality-architecture -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install jmfederico/pi-web code-quality-architecture --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/code-quality-architecture .claude/skills/code-quality-architecture && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "code-quality-architecture" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architecture into .claude/skills/code-quality-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-architecture", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architectureType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add jmfederico/pi-web --skill code-quality-architecture -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install jmfederico/pi-web code-quality-architecture --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.agents/skills/code-quality-architecture .agents/skills/code-quality-architecture && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "code-quality-architecture" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architecture into .agents/skills/code-quality-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-architecture", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jmfederico/pi-web --skill code-quality-architecture -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install jmfederico/pi-web code-quality-architecture --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.agents/skills/code-quality-architecture .cursor/skills/code-quality-architecture && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "code-quality-architecture" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architecture into .cursor/skills/code-quality-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-architecture", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/jmfederico/pi-web.git --path .agents/skills/code-quality-architecture--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add jmfederico/pi-web --skill code-quality-architecture -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install jmfederico/pi-web code-quality-architecture --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.agents/skills/code-quality-architecture .gemini/skills/code-quality-architecture && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "code-quality-architecture" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architecture into .gemini/skills/code-quality-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-architecture", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install jmfederico/pi-web code-quality-architectureInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add jmfederico/pi-web --skill code-quality-architecture -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .github/skills && cp -r skills-src/.agents/skills/code-quality-architecture .github/skills/code-quality-architecture && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "code-quality-architecture" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architecture into .github/skills/code-quality-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-architecture", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add jmfederico/pi-web --skill code-quality-architecture -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install jmfederico/pi-web code-quality-architecture --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/jmfederico/pi-web.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.agents/skills/code-quality-architecture .opencode/skills/code-quality-architecture && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "code-quality-architecture" agent skill from https://github.com/jmfederico/pi-web/tree/main/.agents/skills/code-quality-architecture into .opencode/skills/code-quality-architecture/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "code-quality-architecture", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
code-quality-architectureProject code quality and architecture expectations for implementation, refactoring, planning, and code review.
Code Quality Architecture is an agent skill from jmfederico/pi-web. Project code quality and architecture expectations for implementation, refactoring, planning, and code review. Use this skill whenever writing, modifying, reviewing, or planning production code or architecture in this repository, especially when making architecture choices, introducing modules/services/components, managing side effects, dependencies, state, or boundaries. Favor composable, contained, intention-revealing, separated, dependency-injected, testable code while respecting the idioms of the framework or…
Its SKILL.md is about 2.1k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Development, covering Code quality and Refactoring. The repository describes itself as: Web UI for Pi Coding Agent that keeps sessions alive in real workspaces. The licence is MIT.
Read from SKILL.md and the folder at commit 15c13a4. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
No scripts in the folder and no shell commands in SKILL.md.
From the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Code Quality Architecture loads about 2.1k tokens when it runs. Until then it costs about 140 tokens; SKILL.md has 1,144 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from jmfederico/pi-web at commit 15c13a4, republished under its MIT licence (© jmfederico). 1,144 words, ~2,130 tokens.
.claude/skills/code-quality-architecture/SKILL.md (or your agent's skills folder).Use this skill as a design lens, not as a framework tutorial. The goal is to shape code so future agents and humans can understand it, change it safely, and test it without needing to reverse-engineer hidden coupling.
For test-specific strategy, test helper conventions, and UI test harness choices, use the testing-guide skill. This skill still treats testability as a production-code design concern.
Respect the project's existing conventions and the framework/library idioms already in use. If a dependency expects a particular pattern, such as inheritance, decorators, lifecycle hooks, or a registration API, use that pattern deliberately and keep the surrounding project code as simple and composable as possible.
Start with the simplest design that meets the behavioral contract and finish line. Prefer boring, local changes that solve the problem without surprising future maintainers.
When an edge case or race is identified, assess its plausible frequency and consequence before adding special handling. Address it now when the contract requires it, it is reasonably likely in normal use, or its impact justifies the added complexity. Otherwise defer special handling, rely on ordinary observable failure or recovery behavior, and revisit if real usage shows that the case matters. Do not defer cases with a credible risk of corrupting durable state, weakening a security or authorization boundary, or failing silently without a practical recovery path.
Avoid unrelated refactoring, opportunistic cleanup, and broad rewrites unless the task requires them. Avoid new abstractions that add ceremony without clarifying ownership, reducing duplication, isolating volatility, or improving testability.
Build behavior from small pieces with explicit contracts. Prefer functions, modules, factories, services, components, or adapters that can be combined without knowing each other's internals.
Prefer composition over inheritance. Reach for inheritance only when a framework/dependency requires it, when it clearly models a stable relationship, or when it is already the local convention. If you use inheritance, keep the hierarchy shallow and explain the reason in the design or final summary.
A unit of code should do its job without leaking state, assumptions, or side effects across the system. Keep effects at clear boundaries: network, filesystem, timers, process state, browser APIs, storage, logging, telemetry, and UI/event dispatch.
Make state ownership explicit: who owns it, who may mutate it, when it is created, and how it is cleaned up. Avoid hidden global coordination, surprise mutation, ad hoc event dispatch, and imports that perform work merely by being loaded. If code must produce side effects, make the trigger, scope, cleanup, and failure behavior visible.
Names, types, file boundaries, and function boundaries should reveal why the code exists. Prefer a small amount of clear structure over clever compactness.
Use types to express domain meaning, valid states, and boundaries between parts of the system. Do not duplicate lint/type rules here; the point is to make the design easier to understand, not merely to satisfy TypeScript.
Comments are most valuable when they explain why a decision exists, what invariant must be preserved, or why an apparent simpler approach would be unsafe. Avoid comments that merely restate the code.
Keep domain decisions, orchestration, framework glue, persistence, transport, rendering, and validation separate when that separation makes the code easier to reason about.
Framework-facing code should usually be thin: gather inputs, call the core logic, map results back to the framework. Core logic should usually be usable without starting the UI, server, session runtime, browser, filesystem, or network.
Failures must be observable and traceable to their cause. Handle them at meaningful boundaries through an explicit return or throw, contextual logging, a user-visible error, or another signal appropriate to that boundary. Do not silently rescue failures, swallow errors, or turn them into vague fallback or success behavior. Avoid scattering defensive try/catch blocks everywhere; let core logic communicate failures clearly, then translate them at the edge that has the right context.
When changing PI WEB-managed durable state, structure operations so failure does not silently leave partial writes, ambiguous overwrites, or broken invariants. Apply this where an actual persistence or lifecycle boundary warrants it; do not add transactional machinery to ephemeral or reconstructible state without a concrete need.
Security and authorization boundaries fail closed. Never convert a validation, authentication, authorization, or policy failure into permissive behavior merely to keep an operation running.
Pass collaborators, configuration, clocks, random sources, storage, network clients, and environment-specific services in through parameters, constructors, or small factories where practical. This makes dependencies visible and replaceable.
Do not introduce a heavy dependency-injection framework unless the project already uses one or there is a clear reason. Lightweight dependency injection is enough: explicit inputs beat hidden imports and singletons.
Testability should emerge from the previous values. Prefer pure or mostly pure core logic, small adapters around side effects, and explicit seams where tests can provide fakes or fixtures.
If a change is hard to test, treat that as design feedback. Look for hidden dependencies, mixed concerns, or side effects happening too deep in the call stack. Avoid designs that require excessive mocking just to reach the behavior under test.
Before implementing, briefly identify the boundary you are changing:
During implementation:
When reviewing or finishing code, check:
Do not over-engineer small fixes. The right amount of architecture is the minimum structure that makes the code clear, safe to change, and straightforward to test.
© jmfederico, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .agents/skills/code-quality-architecture of jmfederico/pi-web.
Open the folder on GitHubat commit 15c13a4
Code Quality Architecture next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Code Quality Architecture this skilljmfederico/pi-web | 866 | — | ~2.1k | Automated safety check: Pass | MIT | |
| Systematic Code Refactoringluongnv89/claude-howto | 42k | — | ~3k | Automated safety check: Pass | MIT | |
| Ponytail Lazy Developer ModeDietrichGebert/ponytail | 158k | — | ~871 | Automated safety check: Pass | MIT | |
| Dignified Python Standardsdocling-project/docling | 69k | — | ~1.5k | Automated safety check: Pass | Apache-2.0 | |
| Clean Code GuardamElnagdy/guard-skills | 1.3k | 2 repos | ~4.3k | Automated safety check: Pass | MIT | |
| Code Refactoring Workflowluongnv89/claude-howto | 42k | — | ~3.1k | Automated safety check: Pass | MIT |
luongnv89/claude-howto
Guides refactoring in phases based on Martin Fowler's method: research, test coverage check, planning and small tested steps, with your approval at each phase.
DietrichGebert/ponytail
Makes the agent pick the laziest solution that works: skip unneeded work, reuse what exists, prefer the standard library and platform features, and keep diffs small.
docling-project/docling
Applies opinionated production Python conventions chosen by the project's Python version: modern type syntax, pathlib, explicit checks and interface guidance.
amElnagdy/guard-skills
Reviews generated or changed production code against Clean Code, SOLID, DRY, KISS, YAGNI and LLM-specific failure modes before it ships, in any language.
luongnv89/claude-howto
Guides systematic, test-backed refactoring in the style of Martin Fowler, moving through research, planning and small incremental changes with your approval at each phase.
Devin-AXIS/iPolloWork
A code-change gate for the iPolloWork repository: search and reuse first, keep one source of truth, justify every new file or dependency, and audit the change.
jmfederico/pi-web
A skill your agent uses whenever the user asks about changelogs, Changesets, release notes, conventional commits, commit messages for release notes, or making user-visible project changes that…
jmfederico/pi-web
A skill your agent uses whenever the user asks for a new npm version, npm release, package release, new release, version bump, publishing to npm, cutting a GitHub release, tagging a release, or…
jmfederico/pi-web
Repository-specific testing guide. An agent skill from jmfederico/pi-web.
jmfederico/pi-web
Repository documentation placement and writing guidance. An agent skill from jmfederico/pi-web.
jmfederico/pi-web
Foundational, tool-agnostic Relay method for carrying long work across a chain of independent agent contexts, one bounded leg at a time.
jmfederico/pi-web
Opinionated full-lifecycle software-delivery profile for Relay chains in Git repositories.
Categories
Project code quality and architecture expectations for implementation, refactoring, planning, and code review. Code Quality Architecture is an agent skill from jmfederico/pi-web. Project code quality and architecture expectations for implementation, refactoring, planning, and code review.
Code Quality Architecture fits situations like: planning production code; architecture in this repository; especially when making architecture choices; introducing modules/services/components.
Run `npx skills add jmfederico/pi-web --skill code-quality-architecture -a claude-code`. Or copy the skill folder (.agents/skills/code-quality-architecture in jmfederico/pi-web) into .claude/skills/code-quality-architecture in your project. Claude Code loads it when a task matches its description.
Run `npx skills add jmfederico/pi-web --skill code-quality-architecture -a codex`. Or copy the skill folder (.agents/skills/code-quality-architecture in jmfederico/pi-web) into .agents/skills/code-quality-architecture in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jmfederico/pi-web --skill code-quality-architecture -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/code-quality-architecture, .gemini/skills/code-quality-architecture, .github/skills/code-quality-architecture and .opencode/skills/code-quality-architecture in your project.
SKILL.md names no scripts, command-line tools or credentials: Code Quality Architecture is instructions for the agent only.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Code Quality Architecture is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2.1k tokens (SKILL.md is roughly 8.5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Code Quality Architecture: Systematic Code Refactoring (luongnv89/claude-howto, 42k stars), Ponytail Lazy Developer Mode (DietrichGebert/ponytail, 158k stars), Dignified Python Standards (docling-project/docling, 69k stars) and Clean Code Guard (amElnagdy/guard-skills, 1.3k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
jmfederico (a GitHub user) maintains it in jmfederico/pi-web, which has 866 GitHub stars. The repository holds 7 skills in this directory. The repository was last updated on October 6, 2026.
Source: jmfederico/pi-web on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.