跳到正文
cccskills
免费在 GitHub 公开

refactor

Scan the project for refactoring opportunities, then fix them. No behavior/visual changes.

中文简介正在准备中。当前显示原文说明。

查看安装方法

包含的文件(1)

  • SKILL.md1.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Refactor

Identify and fix code quality issues across the project without changing behavior, visuals, or public API.

Constraints

  • NEVER change behavior, visuals, or public API
  • NEVER add new dependencies
  • NEVER add features or functionality
  • Run pnpm check after all changes to verify no type errors were introduced

Phase 1: Scan (read-only, use Agents for token efficiency)

Launch an Explore agent to scan src/ for issues in these categories:

  1. Dead code: unused imports, unreachable branches, commented-out code, unused exports
  2. Oversized components: .svelte files > 300 lines that mix unrelated concerns and could be split (skip files with a // NOTE: Large file by design comment — these have been reviewed and deemed unsplittable)
  3. Redundant state: $state that duplicates or could be $derived from other state
  4. Copy-paste: near-duplicate code blocks across files that should share a helper
  5. Bug risks: unguarded async, missing cleanup, event listener leaks, race conditions
  6. Inefficiency: unnecessary re-computation, work in hot paths, unbounded allocations

Skip lines marked with // REFACTOR-OK: <reason> — these have been reviewed and intentionally kept as-is.

Output a numbered list of findings with file paths and line numbers, sorted by severity (high → low). Do NOT fix anything yet.

Phase 2: User approval

Present the findings list to the user. Ask which items to fix (e.g. "all", specific numbers, or "skip"). Wait for the user to respond before proceeding.

Phase 3: Fix approved items

Fix only approved items, one at a time. After all fixes, run pnpm check to verify.

Briefly summarize what was changed.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

adr

免费

Create a new Architecture Decision Record (ADR) for a proposed feature or design change.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

adr-done

免费

Mark an ADR as Implemented (or Superseded) and archive it, following INDEX.md conventions.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

Scan the codebase for security vulnerabilities. Check OWASP top 10, input validation, auth, crypto, and known BACKLOG security items.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

Check docs/ai/ spec files and ADRs for inconsistencies with the actual codebase. Report only, no modifications.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

sync-docs

免费

Check docs/ai/ spec files and ADRs for inconsistencies with the codebase, then fix all discrepancies.

中文简介正在准备中。当前显示原文说明。

im9/inboil22026年10月17日 更新

查看 im9 的全部技能

报告此技能的问题