code-refactor
Skill1 starsChanged 2 months agoMITView on GitHub
Analyze a repository, create an incremental refactor plan, modify code in small steps, and validate each step with tests. Use when the user asks for code refactor or an equivalent workflow.
16 other projects use a version of this.
Adopted by
Most recently taken up by
- u9401066/zotero-keepertheir own version, first seen Nov 8, 2026
- OpenxIntelligence/Coding-Agent-Skillstheir own version, first seen Nov 1, 2026
- hellyguo/self-ai-spectheir own version, first seen Oct 26, 2026
- I-Onlabs/claude-code-skillstheir own version, first seen Oct 25, 2026
- u9401066/pubmed-search-mcptheir own version, first seen Oct 20, 2026
- nek1987/auto-agent-harnesstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use git-doc-updater, git-precommit and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
u9401066Skillgit-doc-updater
Auto-check and update key documentation before Git commits to keep docs in sync with code. Triggers: docs, 文檔, 更新文檔, sync docs, release, 發布.
Also in 5 projects that use this
u9401066Skillgit-precommit
Orchestrate pre-commit workflow including Memory Bank sync, README/CHANGELOG/ROADMAP updates. Triggers: GIT, gc, push, commit, 提交, 準備 commit, 要提交了, git commit, pre-commit, 推送.
Also in 5 projects that use this
klauswgSkillreadme-i18n
Use when the user wants to translate a repository README, make a repo multilingual, localize docs, add a language switcher, internationalize the README, or update localized README variants in a GitHub-style repository.
Also in 5 projects that use this
GoogleSkillcode-reviewer
Also in 5 projects that use this
- +8 more from u9401066
Other versions16 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 16
- u9401066/pubmed-search-mcp★ 28same name
- nilecui/SkillsBase★ 27same name
- ZeroPointRepo/CRHQ-PRDs★ 22same name
- hellyguo/self-ai-spec★ 8same name
- u9401066/zotero-keeper★ 7same name
- arnabdeypolimi/claude_code_setup★ 4same name
- I-Onlabs/claude-code-skills★ 4same name
- nek1987/auto-agent-harness★ 4same name
- OpenxIntelligence/Coding-Agent-Skills★ 4same name
- rm2thaddeus/Aitor_Skills★ 4same name
6 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository99 other files it gives its agents.
- api-generatorSkill
- article-to-videoSkill
- auto-bgmSkill
- background-removerSkill
- backup-managerSkill
- book-knowledge-mapSkill
- brand-kit-generatorSkill
- budget-analyzerSkill
- calendar-coordinatorSkill
- chat-to-todoSkill
- cheatsheet-generatorSkill
- competitor-monitorSkill
- conditional-reminderSkill
- contract-signing-workflowSkill
- conversation-action-itemsSkill
- course-builderSkill
- cron-builderSkill
- data-anomaly-monitorSkill
- data-cleanerSkill
- debug-agentSkill
- decision-matrixSkill
- docker-generatorSkill
- document-diffSkill
- document-translatorSkill
- earnings-analyzerSkill
- employee-onboardingSkill
- expense-parserSkill
- figma-to-frontendSkill
- flashcard-generatorSkill
- font-pairingSkill
- framework-migrationSkill
- gift-recommenderSkill
- git-deploySkill
- habit-plannerSkill
- image-upscaleSkill
- image-watermarkSkill
- inbox-triageSkill
- invoice-data-extractorSkill
- invoice-generatorSkill
- knowledge-base-builderSkill
- landing-page-builderSkill
- lead-followupSkill
- live-teleprompterSkill
- log-analyzerSkill
- long-video-to-clipsSkill
- market-technical-analysisSkill
- meal-plannerSkill
- meeting-minutesSkill
- meme-gif-generatorSkill
- mind-map-generatorSkill
- multi-platform-resizeSkill
- palette-extractorSkill
- paper-summarizerSkill
- personalized-greetingsSkill
- personalized-mail-mergeSkill
- pitch-generatorSkill
- plain-language-explainerSkill
- podcast-digestSkill
- portfolio-analyzerSkill
- press-release-generatorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 12 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Use this skill when the user explicitly requests code refactor, or when the requested outcome clearly matches this workflow.
- Distinctive: line 47
Do not activate it merely because the topic is related.
- Distinctive: line 69
Treat permissions as capabilities to request or verify, not as permissions automatically granted by installing the skill.
- Distinctive: line 83
No universal runtime package is required by the skill format itself.
- Distinctive: line 123
Verify all expected outputs exist and are readable.
- Distinctive: line 124
Verify the source was not unintentionally overwritten.
- Distinctive: line 125
Verify structured outputs against their expected schema or invariants.
- Distinctive: line 127
Never mark the workflow successful solely because a model produced text.
- Distinctive: line 133
Do not invent source facts or claim an external action succeeded without verification.
- Distinctive: line 139
If a dependency, credential, connected service, browser session, file, or required permission is unavailable:
- Distinctive: line 141
Stop the affected step.
- Distinctive: line 144
Do not fabricate a successful result.
“Common” is measured: kept by at least 6 in 10 of the 9 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code Refactor / 代码重构
Purpose / 用途
中文
分析代码仓库,先制定增量重构计划,再小步修改并通过测试验证。
English
Analyze a repository, create an incremental refactor plan, modify code in small steps, and validate each step with tests.
Status / 状态
- Workflow status: 🟢 Verified Workflow / 已验证工作流
- Implementation: 📘 Definition only / 仅工作流定义
- Audit grade: A
- Quality score: 4.5/5
- Automation level: L2
- Category: Development & Engineering / 开发与工程
Workflow status describes how well the workflow itself is understood. Implementation status separately tells you whether this repository ships runnable code for it. Integration skills still require external services or authorization; experimental skills may need more human review.
Search aliases / 搜索关键词
code-refactor · Code Refactor · 代码重构 · AI refactoring · code cleanup · refactor agent · 代码优化
When to use / 何时使用
Use this skill when the user explicitly requests code refactor, or when the requested outcome clearly matches this workflow.
Do not activate it merely because the topic is related. Confirm the input, desired output, and any consequential external action.
Inputs / 输入
- Repository, diff, logs, or requirements
- Project-specific build/test commands
Outputs / 输出
- Source-code changes or review report
- Validation/test results
Core stack / 核心工具
Git / project test tools
Permissions / 权限
filesystem:readfilesystem:writeshell
Treat permissions as capabilities to request or verify, not as permissions automatically granted by installing the skill.
Workflow / 工作流
- Inspect / 检查输入 — Verify source files/data, format, scope, and user constraints.
- Plan / 制定计划 — Select the deterministic tools, model calls, and external integrations needed.
- Preflight / 运行前检查 — Check dependencies, credentials, permissions, destination paths, and destructive-action risk.
- Execute / 执行 — Run the smallest reliable sequence of steps. Prefer deterministic code for calculations, parsing, rendering, and file operations.
- Validate / 验证 — Verify output structure, counts, schemas, file readability, test results, or other task-specific invariants.
- Review / 审核 — For subjective or consequential outputs, present a reviewable result before external publication, sending, payment, deployment, signing, or irreversible action.
- Report / 汇报 — State what was produced, where it was saved, what was verified, and what still needs human review.
Dependency suggestions / 依赖建议
- No universal runtime package is required by the skill format itself. Install only the tools named in Core stack when your chosen implementation needs them.
The Agent Skill itself should remain installable even when optional runtimes are absent. Report missing runtime dependencies instead of silently installing privileged software.
Install / 安装
Inspect before installing
npx skills add BryceYuuu/open-workflow-skills --listInstall this skill into the current project
npx skills add BryceYuuu/open-workflow-skills --skill code-refactorInstall for a specific supported agent
npx skills add BryceYuuu/open-workflow-skills --skill code-refactor --agent codexnpx skills is a community ecosystem CLI, not an OpenAI-official installer. Review third-party skills and scripts before granting shell, filesystem, network, or credential access.
Example invocation / 调用示例
中文
使用
code-refactor工作流处理我提供的输入。先检查依赖和权限,不覆盖源文件;执行后给我输出路径、验证结果和需要人工审核的部分。
English
Use the
code-refactorworkflow for the provided input. Check dependencies and permissions first, preserve the source, validate the result, and report outputs plus any human-review items.
Validation / 验证
At minimum:
- Verify all expected outputs exist and are readable.
- Verify the source was not unintentionally overwritten.
- Verify structured outputs against their expected schema or invariants.
- Record warnings, skipped steps, external dependencies, and failed checks.
- Never mark the workflow successful solely because a model produced text.
See references/QUALITY.md for skill-specific quality expectations.
Safety / 安全
- Do not invent source facts or claim an external action succeeded without verification.
- Preserve source files unless the user explicitly requests in-place modification.
- Surface missing dependencies, permissions, credentials, and failed checks clearly.
Failure handling / 失败处理
If a dependency, credential, connected service, browser session, file, or required permission is unavailable:
- Stop the affected step.
- Preserve completed safe outputs.
- State exactly what is missing.
- Do not fabricate a successful result.
- Suggest the minimum next action needed to continue.
Files / 文件
SKILL.md— workflow instructionsreferences/QUALITY.md— quality/evaluation guidancetests/cases.yaml— example evaluation cases
Implementation scripts may be added under scripts/ when deterministic execution materially improves reliability.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

