Agent skill

Structure Refactor

by SurveyController in SurveyController/SurveyController

面向 SurveyController 仓库的目录结构重构与模块拆分技能。用于整理 software/、wjx/、tencent/、credamo/、CI/unittests/ 等真实目录,处理文件移动、命名调整、导入修复、测试路径更新、资源路径修复、CI 检查联动。适合在需要小步重构、保持行为不变、清理屎山边界时使用,不适合纯样式改名或无关大洗牌。

GPL-3.0Auto-check passedTesting & QA

Install Structure Refactor

skills CLI
$ npx skills add SurveyController/SurveyController --skill structure-refactor -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install SurveyController/SurveyController structure-refactor --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/SurveyController/SurveyController.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.codex/skills/structure-refactor .claude/skills/structure-refactor && rm -rf skills-src

Use ~/.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/

Facts

Skill name
structure-refactor
GitHub stars
142
Token cost
~645 tokens
SKILL.md length
121 words
Files
1
Skills in repo
9
Repo updated
First seen
Licence
GPL-3.0

At a glance

面向 SurveyController 仓库的目录结构重构与模块拆分技能。用于整理 software/、wjx/、tencent/、credamo/、CI/unittests/ 等真实目录,处理文件移动、命名调整、导入修复、测试路径更新、资源路径修复、CI 检查联动。适合在需要小步重构、保持行为不变、清理屎山边界时使用,不适合纯样式改名或无关大洗牌。

  • Works in 8 steps: 先读真实入口和边界。 → 先画出这次改动涉及的目录。 → 结构调整遵守“小步、可回滚、行为不变”。 → …
  • Tasks that involve Refactoring
  • SKILL.md covers name, description, when_to_use and instructions, plus 3 more sections
  • Calls uv and rg

What it does

Structure Refactor is an agent skill from SurveyController/SurveyController. 面向 SurveyController 仓库的目录结构重构与模块拆分技能。用于整理 software/、wjx/、tencent/、credamo/、CI/unittests/ 等真实目录,处理文件移动、命名调整、导入修复、测试路径更新、资源路径修复、CI 检查联动。适合在需要小步重构、保持行为不变、清理屎山边界时使用,不适合纯样式改名或无关大洗牌。

Its SKILL.md is about 650 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 Testing & QA, covering Refactoring and Unit testing. It works with Python. The repository describes itself as: 适用于问卷星、腾讯问卷、Credamo见数平台的纯HTTP高并发提交程序. The licence is GPL-3.0.

When your agent uses it

  • Tasks that involve Refactoring
  • Tasks that involve Unit testing

Example prompts

  • “/structure-refactor”

Requirements

  • Python 3

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. 先读真实入口和边界。
  2. 先画出这次改动涉及的目录。
  3. 结构调整遵守“小步、可回滚、行为不变”。
  4. 移动文件后立刻修这些东西
  5. 优先保留现有公开接口。
  6. 不要为了“统一风格”把平台目录和通用目录混起来。
  7. 涉及用户数据路径时,不准把可写数据挪到安装目录。
  8. 改完就跑最小相关测试。

What it can do on your machine

Read from SKILL.md and the folder at commit 1a22ba3. It shows what the files ask for, not the result of running them.

  • Tool permissions

    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.

  • Runs code

    Shell commands in SKILL.md call:

    • uv
    • rg

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Structure Refactor loads about 645 tokens when it runs. Until then it costs about 49 tokens; SKILL.md has 121 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~49
When it runs · the whole SKILL.md, loaded when a task matches
~645

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.

Safety

Auto-check passed

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.

SKILL.md

The full file from SurveyController/SurveyController at commit 1a22ba3, republished under its GPL-3.0 licence (© SurveyController). 121 words, ~645 tokens.

Download SKILL.mdSave it as .claude/skills/structure-refactor/SKILL.md (or your agent's skills folder).
name
structure-refactor
description
面向 SurveyController 仓库的目录结构重构与模块拆分技能。用于整理 software/、wjx/、tencent/、credamo/、CI/unit_tests/ 等真实目录,处理文件移动、命名调整、导入修复、测试路径更新、资源路径修复、CI 检查联动。适合在需要小步重构、保持行为不变、清理屎山边界时使用,不适合纯样式改名或无关大洗牌。

structure-refactor

name

structure-refactor

description

这个 skill 处理项目级结构重构。 重点是模块拆分、文件移动、命名整理、导入修复、测试同步。 目标是让 software/、平台适配目录、测试目录和资源目录的职责更清楚。

when_to_use

出现这些情况时用:

  • 某个文件职责失控,已经把 UI、网络、解析、状态逻辑搅成一锅粥。
  • 需要把代码从 software/ui/、software/core/、software/network/、software/providers/、wjx/provider/ 之类目录重新归位。
  • 需要移动或拆分文件,同时修复 import、测试引用、资源路径、CI 检查路径。
  • 新增或删除顶层目录,必须同步检查 AGENTS.md 和 CONTRIBUTING.md。

这些情况别乱用:

  • 只是顺手把文件名改得更“好看”。
  • 没有行为问题,却想大面积重排目录。
  • 想把平台特定逻辑塞回通用层。

instructions

  1. 先读真实入口和边界。 必读:SurveyController.py、software/app/main.py、software/providers/registry.py、相关模块和对应测试。
  2. 先画出这次改动涉及的目录。 常见边界:
    • software/ui/ 放界面和控制器。
    • software/core/ 放执行引擎、任务、题目模型。
    • software/network/ 放 HTTP、代理、会话。
    • software/providers/ 放平台公共层和适配注册。
    • wjx/provider/、tencent/provider/、credamo/provider/ 放平台专属解析和提交链路。
    • CI/unit_tests/、CI/live_tests/ 放测试。
  3. 结构调整遵守“小步、可回滚、行为不变”。 一次只解决一个边界问题。先移动,再修导入,再补测试。
  4. 移动文件后立刻修这些东西:
    • Python import 路径
    • __init__.py 暴露
    • Qt 懒加载导入路径
    • 资源文件路径
    • CI/python_ci.py、CI/python_checks/、测试文件中的路径引用
  5. 优先保留现有公开接口。 如果必须改接口,先找调用方和测试,不准只改一头。
  6. 不要为了“统一风格”把平台目录和通用目录混起来。 wjx/、tencent/、credamo/ 的逻辑必须继续隔离。
  7. 涉及用户数据路径时,不准把可写数据挪到安装目录。 路径规则看 software/app/runtime_paths.py 和 software/app/user_paths.py。
  8. 改完就跑最小相关测试。 如果改动碰到入口、路径、UI、执行链路,再补更大范围检查。

project_conventions

  • 仓库没有 src/,主体代码在 software/、wjx/、tencent/、credamo/。
  • 仓库没有顶层 tests/,测试在 CI/unit_tests/ 和 CI/live_tests/。
  • requirements.txt 当前不存在,依赖以 pyproject.toml 和 uv.lock 为准。
  • GUI 代码优先留在 software/ui/,不要把业务实现塞进页面文件。
  • 平台解析和 HTTP 提交逻辑优先留在各自 */provider/。
  • 纯 HTTP 链路已经固化,software/providers/registry.py 明确禁用浏览器填答兜底。别把这坨屎又搬回来。
  • 改顶层目录时,同步更新 AGENTS.md 和 CONTRIBUTING.md。

common_commands

bash
uv run python CI/python_ci.py
uv run pytest CI/unit_tests
uv run pytest CI/unit_tests/engine
uv run pytest CI/unit_tests/app
uv run pytest CI/unit_tests/questions
uv run python CI/python_ci.py --full
rg "from software|import software|from wjx|from tencent|from credamo"
rg --files software CI wjx tencent credamo

validation_checklist

  • 是否先读了入口、被移动模块、调用方、相关测试。
  • 是否只做本次问题需要的结构调整,没有无关大重排。
  • 文件移动后 import、测试路径、资源路径、CI 路径是否已修完。
  • software/、平台目录、测试目录的职责边界是否更清楚。
  • 相关测试和检查是否已运行;没跑要说明原因。
  • 如果改了顶层目录,AGENTS.md 和 CONTRIBUTING.md 是否同步更新。

© SurveyController, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .codex/skills/structure-refactor of SurveyController/SurveyController.

Open the folder on GitHubat commit 1a22ba3

Compare with similar skills

Structure Refactor 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.

Structure Refactor compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Structure Refactor this skillSurveyController/SurveyController142—~645Automated safety check: PassGPL-3.0
Python Regression Test GeneratorArabelaTso/Skills-4-SE253—~4.1kAutomated safety check: PassApache-2.0
Adk Verify Snippetsgoogle/adk-python22k—~1.4kAutomated safety check: PassApache-2.0
TDD WorkflowhellangleZ/burn-in-cceverywhere-ralph11211 repos~2.4kAutomated safety check: PassNone
Hermetic Python Unit TestsdimensionalOS/dimos4.6k—~1.4kAutomated safety check: PassCustom licence
Rocketmq Rust Issue Generatormxsm/rocketmq-rust1.5k—~1.6kAutomated safety check: PassApache-2.0

Similar skills

  • Python Regression Test Generator

    ArabelaTso/Skills-4-SE

    Automatically generates regression tests for Python codebases by analyzing changes between old and new code versions and their existing tests.

    253 GitHub stars~4.1k tokensUpdated 1 mo ago
    Testing & QAAuto-check passed
  • Adk Verify Snippets

    google/adk-python

    Official

    Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…

    22k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • TDD Workflow

    hellangleZ/burn-in-cceverywhere-ralph

    A skill your agent uses when writing new features, fixing bugs, or refactoring code.

    112 GitHub starsUsed in 11 repos~2.4k tokens
    Testing & QAAuto-check passed
  • Hermetic Python Unit Tests

    dimensionalOS/dimos

    Rules for writing, fixing and reviewing pytest unit tests that are hermetic: behavior-focused, deterministic, isolated and cheap to run.

    4.6k GitHub stars~1.4k tokensUpdated today
    Testing & QAAuto-check passed
  • A skill your agent uses when the user asks to create, draft, prepare, or publish a GitHub issue for the rocketmq-rust project — bugs, features, enhancements, refactors, docs, unit tests, CI…

    1.5k GitHub stars~1.6k tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Test Guidelines

    getsentry/sentry-react-native

    Official

    Enforce Sentry React Native SDK test conventions for naming, structure, mocking, and fixtures with Jest.

    1.8k GitHub stars~1.3k tokensUpdated today
    Testing & QAAuto-check passed

More from SurveyController/SurveyController

All 9 skills in this repo
  • App Settings Migration

    SurveyController/SurveyController

    面向 SurveyController 仓库的设置、路径与配置迁移技能。用于修改 software/app/、software/io/config/、software/core/config/ 里的 QSettings 键、用户目录、配置文件路径、schema 版本、序列化字段、默认值和兼容策略,避免升级后读错配置、写错目录或把旧配置直接干爆。适合做预防性演进,不适合只修表面报错。

    142 GitHub stars~732 tokensUpdated 19 days ago
    Auto-check passed
  • Async HTTP Pipeline

    SurveyController/SurveyController

    面向 SurveyController 仓库的全异步 HTTP 解析与执行链路技能。用于修改或排查 software/network/http/、software/core/engine/、software/providers/、software/network/proxy/ 以及各平台 provider 的异步请求、响应解析、任务调度、并发控制、超时、重试、取消和资源释放问题。适合处理纯…

    142 GitHub stars~648 tokensUpdated 19 days ago
    Auto-check passed
  • Gui Development

    SurveyController/SurveyController

    面向 SurveyController 桌面端的 GUI 开发与界面修复技能。用于修改 software/ui/ 下的 PySide6 + QFluentWidgets 页面、弹窗、导航、配置编辑、运行状态展示和日志界面,处理信号槽、线程协作、对象生命周期、布局、主题和窗口缩放问题。适合做桌面界面开发、交互修复和配置同步,不适合把耗时逻辑直接塞进主线程。

    142 GitHub stars~580 tokensUpdated 19 days ago
    Auto-check passed
  • Log Config Debugging

    SurveyController/SurveyController

    面向 SurveyController 的日志、配置与报错排查技能。用于根据用户提供的日志、截图、配置文件、调用栈、运行环境和最近改动定位根因,修复 software/app/、software/io/、software/logging/、software/network/、software/ui/…

    142 GitHub stars~481 tokensUpdated 19 days ago
    Auto-check passed
  • Playwright Pipeline

    SurveyController/SurveyController

    面向 SurveyController 仓库 v3 分支的 Playwright 作答执行层技能。仅在修改或排查 Playwright 作答链路、异步浏览器 owner/context 池、BrowserDriver 封装、页面加载、运行时答题、翻页、提交、取消、超时、资源释放和并发调度时使用。只能用于 v3 分支;只允许系统自带 Microsoft Edge,不允许安装或引入…

    142 GitHub stars~945 tokensUpdated 19 days ago
    Auto-check passed
  • Question Parser Rules

    SurveyController/SurveyController

    面向 SurveyController 仓库的题型解析、字段映射与 parser 规则技能。用于修改 wjx/provider/、tencent/provider/、credamo/provider/、software/core/questions/、software/providers/ 中的题目结构解析、元数据字段、题型识别、逻辑规则标记、答案模型映射和最小兼容适配。适合处理 parser…

    142 GitHub stars~653 tokensUpdated 19 days ago
    Auto-check passed

Works with

Categories

Questions about Structure Refactor

What does Structure Refactor do?

面向 SurveyController 仓库的目录结构重构与模块拆分技能。用于整理 software/、wjx/、tencent/、credamo/、CI/unittests/ 等真实目录,处理文件移动、命名调整、导入修复、测试路径更新、资源路径修复、CI 检查联动。适合在需要小步重构、保持行为不变、清理屎山边界时使用,不适合纯样式改名或无关大洗牌。. Structure Refactor is an agent skill from SurveyController/SurveyController.

When should I use Structure Refactor?

Structure Refactor fits situations like: tasks that involve Refactoring; tasks that involve Unit testing.

How do I install Structure Refactor in Claude Code?

Run `npx skills add SurveyController/SurveyController --skill structure-refactor -a claude-code`. Or copy the skill folder (.codex/skills/structure-refactor in SurveyController/SurveyController) into .claude/skills/structure-refactor in your project. Claude Code loads it when a task matches its description.

How do I install Structure Refactor in Codex?

Run `npx skills add SurveyController/SurveyController --skill structure-refactor -a codex`. Or copy the skill folder (.codex/skills/structure-refactor in SurveyController/SurveyController) into .agents/skills/structure-refactor in your project. Codex loads it when a task matches its description.

Can I use Structure Refactor in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add SurveyController/SurveyController --skill structure-refactor -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/structure-refactor, .gemini/skills/structure-refactor, .github/skills/structure-refactor and .opencode/skills/structure-refactor in your project.

What does Structure Refactor need to run?

Going by SKILL.md and its folder, Structure Refactor needs the command-line tools its instructions call (uv and rg). Our summary lists: Python 3.

Does Structure Refactor access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Structure Refactor safe to install?

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.

What licence does Structure Refactor use?

Structure Refactor is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Structure Refactor use?

About 645 tokens (SKILL.md is roughly 2.6k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Structure Refactor?

Skills that share tags, products or a category with Structure Refactor: Python Regression Test Generator (ArabelaTso/Skills-4-SE, 253 stars), Adk Verify Snippets (google/adk-python, 22k stars), TDD Workflow (hellangleZ/burn-in-cceverywhere-ralph, 112 stars) and Hermetic Python Unit Tests (dimensionalOS/dimos, 4.6k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Structure Refactor?

SurveyController (a GitHub organization) maintains it in SurveyController/SurveyController, which has 142 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on September 18, 2026.

Source: SurveyController/SurveyController on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.