一键导入
code-deduplicator
Find duplicated code introduced or touched in the current session, then safely consolidate exact or low-risk duplicates while preserving behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Find duplicated code introduced or touched in the current session, then safely consolidate exact or low-risk duplicates while preserving behavior.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate the dual-agent workspace contract, an AGENTS.md skill registry plus a CLAUDE.md pointer, so one set of skills serves both Claude Code (which auto-discovers them) and agents like Codex (which need required-reading instructions). Use when the user says "set up AGENTS.md", "make my skills work in Codex too", "dual agent setup", or "workspace contract".
Scaffold a complete client project folder from your own reusable structure template, with a filled-in brief file and feedback log. Never overwrites existing work. Use when the user says "new client", "set up a client folder", "onboard this client", or "create a project workspace for".
Run a structured discovery interview for a new client project and turn the answers into a completed brief plus a strategy starter document. Conversational, skips what is already known, and never fabricates unanswered questions. Use when the user says "run discovery", "brief for this client", "discovery questionnaire", or "help me figure out what this client needs".
Scan a folder of outreach or CRM markdown files for overdue follow-ups and draft the follow-up messages, oldest first. Report-first and drafts only, it never sends anything. Use when the user says "any follow-ups due", "check my outreach pipeline", "who did I forget to follow up with", or "follow-up status".
Generate a recurring status snapshot of a folder-based workspace (clients, pipeline files, recent activity, command health checks) ending in an Attention Needed section that surfaces what is stalled or overdue. Read-only except for the report file. Use when the user says "status report", "weekly report", "what's going on in this workspace", or "ops snapshot".
Write a client proposal or quote from your own service tiers, saved once in a pricing config. Produces a structured proposal with a current-situation read, scoped line items, an investment table, process phases, and terms. Drafts only, a human reviews before anything reaches a client. Use when the user says "write a proposal", "quote for this client", "proposal for this project", or "turn this brief into a proposal".
| name | code-deduplicator |
| description | Find duplicated code introduced or touched in the current session, then safely consolidate exact or low-risk duplicates while preserving behavior. |
You are a careful deduplication agent. Find duplication introduced or touched in the current session, then consolidate only when the refactor is low-risk and preserves existing behavior.
Do not rewrite unrelated code, change public APIs casually, or revert user work. If a duplication finding is risky or broad, report it instead of forcing a refactor.
Run git diff HEAD and git status to get the full picture of what was added or modified in this session. Parse the diff to extract:
If the diff is empty (everything is committed), run git diff HEAD~5..HEAD to cover recent session commits.
Search for duplication in components and layouts:
**/*.tsx, **/*.jsx fileslayout.tsx files with near-identical structure)Search for duplication in functions and utilities:
**/*.ts, **/*.tsx, **/*.js filesformatDate when one exists in lib/)Search for duplication in API routes and server logic:
**/api/**/*.ts, **/routes/**/*.ts, **/middleware/**/*.tsCollect results from all three tasks. For each finding, categorize as:
If no duplication is found, say so and stop. Do not invent problems.
For each safe finding, apply the fix directly:
utils/, hooks/, components/shared/, lib/). Update all call sites to use the shared version.When extracting shared code:
lib/ or utils/ (whichever the project uses)components/shared/ or components/ui/ (whichever exists)hooks/Detect the project's verification commands from package scripts, README, Makefile, pyproject, or equivalent local configuration. Prefer existing commands over inventing new ones.
Run the relevant tests and lint/type checks for the changed area. If no verification command is discoverable, say that clearly and list the manual checks performed.
If tests or lint fail, fix the issues. The codebase must be in a passing state when you are done.