find-duplicate-ownership

在分层代码库中查找重复的所有权、隐藏的第二真相源以及契约漂移。用于审查规范化、验证、默认值设置、规范化处理、持久化映射、运行时与持久化状态、重复的工具函数、查询或缓存所有权,或任何“谁拥有此规则?”的架构问题。特别适合审计前端、后端、共享核心与适配器层之间的单一真相源(SSOT),以及在用户明确要求使用子代理时进行的重复所有权探索。

仓库最近推送
GitHub Stars
141
Forks
17
Issues / PRs
0

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "find-duplicate-ownership":https://skillpi.com/zh/skills/deepskill-6e945a6d30434c3f251ed5b3633e45edb9c6d466108314e6965c890dbb64ba72。安装前核对上游来源和版本:https://github.com/instructa/agent-skills。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

在分层代码库中查找重复的所有权、隐藏的第二真相源以及契约漂移。用于审查规范化、验证、默认值设置、规范化处理、持久化映射、运行时与持久化状态、重复的工具函数、查询或缓存所有权,或任何“谁拥有此规则?”的架构问题。特别适合审计前端、后端、共享核心与适配器层之间的单一真相源(SSOT),以及在用户明确要求使用子代理时进行的重复所有权探索。

0 下载

介绍来源: third_party · instructa · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
输入和输出
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: find-duplicate-ownership
description: 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.

Find Duplicate Ownership

Overview

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.

Workflow

  1. 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.

  2. Build a taxonomy first. Use these buckets:

    • architecture / SSOT bug: same business rule owned in more than one layer
    • local dedupe cleanup: same helper semantics copied nearby
    • legitimate boundary adapter: wire, vendor, or untrusted input transformation with one clear owner
    • legitimate domain constraint: runtime clamp, math, security, or path logic that cannot be removed architecturally
  3. Search for ownership smells, not words. Look for:

    • validation, defaults, or clamps duplicated across frontend and backend
    • generated bindings or shared type aliases hiding the real contract owner
    • runtime mutators calling boundary repair or coercion
    • persisted shape differing from runtime shape and requiring glue
    • query, store, or cache logic re-owning domain policy
    • two helpers with the same semantics but different names
    • thin wrapper functions that hide a second path
    • copied deterministic serializers or hash inputs
    • local component, hook, or service helper clones instead of one domain owner
  4. Separate true duplicates from valid boundaries. Do not flag these by default:

    • pure UI formatting or presentation transforms
    • provider or protocol adapters with one clear boundary owner
    • security or path canonicalization with one clear security owner
    • runtime-only clamp or math logic with one clear runtime owner
  5. For each finding, name the winning owner. Always answer:

    • what exact rule is multiply owned
    • who owns it today
    • who should own it
    • what gets deleted in a hard cut
    • whether anything remains as real boundary adapter code

Heuristics

  • Be suspicious when frontend and backend both shape or repair the same contract.
  • Be suspicious when trusted runtime state is "normalized" after every mutation.
  • Be suspicious when query glue, cache glue, or store glue maps between two supposedly canonical state shapes.
  • Be suspicious when multiple languages or services define the same min, max, enum, or default constants independently.
  • Be suspicious when a helper exists in a domain library and again in a hook, component, controller, or service.

Subagent Use

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:

  • 1 taxonomy mapper
  • 2 to 5 explorers for disjoint slices
  • 1 SSOT judge to merge and challenge findings

Tell subagents:

  • stay read-only
  • cite files and symbols
  • do not propose compatibility shims
  • distinguish duplicate ownership from legitimate boundary work
  • return winner owner plus delete or keep plan

Output Contract

For each finding, return:

  1. severity
  2. rule or contract being multiply owned
  3. competing owners
  4. why it is a duplicate-owner bug or why it is legitimate boundary work
  5. exact files or symbols
  6. recommended single owner
  7. hard-cut cleanup:
    • delete
    • keep
    • rename
  8. classification:
    • architecture / SSOT bug
    • local dedupe cleanup
    • legitimate boundary adapter
    • legitimate domain constraint

Order findings by severity, then finish with a prioritized backlog by impact versus effort.

Prompting

Use prompt patterns from references/audit-prompts.md.

Guardrails

  • Do not reduce the audit to rg normalize.
  • Do not flag every adapter or clamp as bad architecture.
  • Do not recommend wrappers, fallbacks, shims, or dual paths.
  • Prefer deleting the losing owner, not introducing a mediator.
  • If ownership is ambiguous because the diff is mixed or the contract is unclear, say so explicitly.

版本历史

  1. v1.0.0 GitHub ↗
    原版更新说明

    First Agent Plugins v1 release of `regenrek.agentic-engineer-core`. - portable root `plugin.json` - six fully validated Agent Skills - provider compilation verified for Codex, Claude Code, and Cursor - no legacy `.plugin/plugin.json` or `x-agentrig` metadata Bundle SHA-256: `eae83ad0d813ec89bf4e2bb0128c8e7cb09c888e54d1ef661bd184147b884664`

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值85/100

亮点

  • 解决分层代码库中重复所有权和契约漂移的实际工程痛点
  • 适用于前后端、共享核心、适配器层的SSOT审计,受众明确且广泛
触发精准90/100

亮点

  • 触发描述清晰,覆盖多种架构审查场景,边界定义明确
结构规范80/100

待提升项

  • 文档长度略长 原报告严重程度:轻微

    SKILL.md 文件约600行,超出理想单文件长度(≤500行)

    改进建议:建议将部分内容(如 Heuristics 或 Subagent Use)拆分为独立文档或附录

亮点

  • Workflow 步骤清晰,Output Contract 定义完整,结构逻辑性强
执行可靠75/100

待提升项

  • 子代理文件引用未验证 原报告严重程度:轻微

    引用 agents/ 目录下多个 .toml 文件,但未确认其是否存在

    改进建议:请确保 agents/ownership-taxonomy-mapper.toml 等文件随 Skill 包提供,或明确说明其为可选模板

  • 子代理调用机制不明确 原报告严重程度:轻微

    未说明如何实际调用 subagents,用户可能无法直接执行流程

    改进建议:补充子代理集成说明或提供调用示例

亮点

  • 强调 read-only 操作和硬切清理策略,降低执行风险
证据可验 (前四项均值)83/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。