skills/find-duplicate-ownership/SKILL.md
Find duplicate ownership, hidden second sources of truth, and contract drift in layered codebases. Use when reviewing normalization, validation, defaulting, canonicalization, persistence mapping, runtime-vs-durable state, duplicated helpers, query or cache ownership, or any "who owns this rule?" architecture question. Especially useful for SSOT audits across frontend, backend, shared core, and adapter layers, and when the user explicitly asks for duplicate-ownership exploration with subagents.
npx skillsauth add regenrek/agent-skills find-duplicate-ownershipInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Audit the codebase for multiply-owned rules instead of blindly grepping normalize.
Classify each case as real SSOT drift, local dedupe cleanup, legitimate boundary work, or legitimate domain constraint.
Define the audit target before searching. Narrow by feature, contract, package, service, or file slice when possible. Good targets: session state, persistence contracts, runtime geometry, provider options, path helpers, JSON canonicalization.
Build a taxonomy first. Use these buckets:
architecture / SSOT bug: same business rule owned in more than one layerlocal dedupe cleanup: same helper semantics copied nearbylegitimate boundary adapter: wire, vendor, or untrusted input transformation with one clear ownerlegitimate domain constraint: runtime clamp, math, security, or path logic that cannot be removed architecturallySearch for ownership smells, not words. Look for:
Separate true duplicates from valid boundaries. Do not flag these by default:
For each finding, name the winning owner. Always answer:
Only use subagents when the user explicitly asks for them or asks for parallel exploration.
Reusable read-only agent definitions live in this skill's agents/ directory:
ownership-taxonomy-mapper.toml
Use first for broad slice mapping and taxonomy.duplicate-ownership-explorer.toml
Use one per independent slice: persistence, runtime state, contracts, helpers, adapters.ssot-judge.toml
Use after explorers when you need one strict verdict on winning owner and hard-cut cleanup.Recommended fan-out:
Tell subagents:
For each finding, return:
Order findings by severity, then finish with a prioritized backlog by impact versus effort.
Use prompt patterns from references/audit-prompts.md.
rg normalize.tools
Live-test any Electron desktop app with native-devtools-mcp, Chrome DevTools Protocol, screenshots, OCR, and accessibility tools. Use when the user asks for Electron UI verification, MCP-driven app control, renderer CDP interaction, native desktop automation, screenshots, or OCR-driven checks.
testing
Find, clone, inspect, and summarize high-quality GitHub reference repositories for coding agents. Use when a user asks for GitHub reference projects, examples, prior art, inspiration, implementation patterns, or includes "$search-context" in a coding prompt.
testing
Run or install repo security leak checks with BetterLeaks and Trivy. Use when asked to scan for leaked secrets, vulnerable dependencies, misconfigurations, add secret-leak guardrails, add BetterLeaks, add forbidden-path hooks, or run secleak-check before release.
development
Run a reusable JavaScript supply-chain security baseline with pnpm-first hardening, release-age gating, lifecycle-script controls, exotic dependency checks, CI install checks, and optional incident IOC profiles.