refactor
Refactors existing code by identifying language and applying best practices. Use when the user asks to refactor, improve, optimize, or clean up code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Refactors existing code by identifying language and applying best practices. Use when the user asks to refactor, improve, optimize, or clean up code.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate conventional commit message from staged or unstaged changes
Checks projects and packages for CVEs using Socket.dev CLI and native audit commands. Use when installing or auditing dependencies for vulnerabilities, evaluating a package before install, or scanning a project's dependency tree.
Audit the current project's memory store (`~/.claude/projects/<encoded-cwd>/memory/`) and prune memories that no longer match the project state — dead file/function/flag references, past-dated project memories, orphaned index entries, and duplicates. Suggests candidates with rationale and requires per-item confirmation before deleting; does not edit memory bodies. Use when the user says "prune memory", "clean up memory", "audit memory", "memory is stale", "remove old memories", or invokes /prune-memory.
Symlink every skill in this repo into one or more agent skills directories (defaults to ~/.claude/skills/ and ~/.agents/skills/) so the skills become globally discoverable. Use when the user says "install these skills", "make these skills global", "symlink skills to ~/.claude", "symlink skills to ~/.agents", "register the skills", or wants to update the global skill set after editing skills here.
Build, validate, and exercise the agent-skills registry. Use when asked to run agent-skills, install its deps, lint or test it, run its bats suites, exercise a Claude Code hook, regenerate the index files, or symlink the skills out to ~/.claude / ~/.agents / ~/.cursor / ~/.opencode.
Concise, technically-precise response style with kawaii flourishes (emojis, emoticons, otaku suffixes). Use when the user wants playful agent output while keeping technical accuracy and brevity.
| name | refactor |
| description | Refactors existing code by identifying language and applying best practices. Use when the user asks to refactor, improve, optimize, or clean up code. |
// Before:
function sum(a, b) { return a+b }
// After:
/** Returns the sum of two numbers */
function sum(a, b) {
return a + b;
}
# Before:
def greet(name):return 'Hello, '+name
# After:
def greet(name: str) -> str:
"""Return a greeting for the given name."""
return f"Hello, {name}"