agentleFS
PaulRBergPaulRBerg/agent-skills/skills/repo-harmonization/SKILL.md

repo-harmonization

Skill96 starsChanged 2 months agoMITView on GitHub

If these instructions are already present in the conversation from a slash or dollar invocation, follow them directly; do not invoke this skill again through a skill tool. Turn a list of interdependent repositories into verified alignment findings, user-approved decisions, and surgically implemented fixes. $ARGUMENTS is a whitespace-separated list of repository paths. Tilde expansion is allowed. - Resolve every supplied path before investigating its contents. - Require at least two paths. - Require each resolved path to exist and be…

The file

Show its rules and text

We split this skill into the rules it gives an agent

33 rules. About 0 are common, 32 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈32

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  • could be automatic: a setting could enforce it
  1. Distinctive:

    If these instructions are already present in the conversation from a slash or dollar invocation, follow them directly.

    line 17
  2. Distinctive:

    Stop with a clear message identifying any missing, non-Git, or insufficient repository input.

    line 30
  3. Distinctive:

    Do not infer additional repositories from links, remotes, or installed copies.

    line 31
  4. Distinctive:

    Verify every alignment or duplication claim mechanically with a diff, content hash, regeneration round-trip, or symlink resolution.

    line 38
  5. Distinctive:

    Treat the approved alignment outcome and resolved judgment calls, not the initial file manifest, as the implementation authorization …

    line 44
  6. Distinctive:

    Prefer surgical fixes to restructuring.

    line 49
  7. Distinctive:

    Keep implementation agents from committing or pushing.

    line 53
  8. Distinctive:

    Treat pre-existing dirt as other agents' in-flight work: record it as a preservation boundary, never an audit target.

    line 63
  9. Distinctive:

    Treat the link map as an inventory, not proof that two files should share one source.

    line 68
  10. Distinctive:

    Search AI-context files for references to the other listed repositories, including AGENTS.md, CLAUDE.md, README guidance, skills, and local …

    line 75
  11. Distinctive:

    If the host cannot run investigators, perform the same partitions serially without relaxing the evidence standard.

    line 83
  12. Distinctive:

    Read build configuration and generator inputs before assigning canonical ownership to a file.

    line 87
  13. Distinctive:

    Test suspected duplication with normalized diffs or content hashes appropriate to the artifact format.

    line 89
  14. Distinctive:

    Use byte comparison for exact copies and show the normalization used for near-duplicate claims.

    line 90
  15. Distinctive:

    Check local references independently from remote or published references when both forms exist.

    line 97
  16. Distinctive:

    Keep generated artifacts distinct from their sources when grouping results.

    line 98
  17. Distinctive:

    Keep linked but non-identical observations separate when they require different fixes or decisions.

    line 105
  18. Distinctive:

    Do not classify an unverified suspicion.

    line 106
  19. Distinctive:

    Treat a self-contained installation requirement as a design constraint even when its copies are byte-identical.

    line 112
  20. Distinctive:

    Keep a deliberate-no-change list with the mechanical evidence and design reason for each entry.

    line 114
  21. Distinctive:

    Keep alternatives mutually exclusive where a choice determines the next plan.

    line 123
  22. Distinctive:

    Ask before choosing which single-source candidates to implement, which competing workflows to retire, how deeply to trim duplicated …

    line 124
  23. Distinctive:

    Avoid editing installed output by hand unless it is itself a canonical artifact under the repository's rules.

    line 138
  24. Distinctive:

    Use disjoint per-repository write scopes for delegated work in every implementation shape.

    line 146
  25. Distinctive:

    Keep the plan limited to user-approved decisions.

    line 148
  26. Distinctive:

    Run the narrowest per-repository checks that prove the intended edits.

    line 157
  27. Distinctive:

    Run those checks from the repository whose rules and dependencies they exercise.

    line 158
  28. Distinctive:

    Run cross-repository invariants once, including regeneration idempotence and source-versus-installed diffs where applicable.

    line 159
  29. Very specific:

    Use $commit when available after validation, passing only task files.

    line 164
  30. Distinctive:

    Keep commits per repository so their histories, hooks, and publication states remain independently auditable.

    line 167
  31. Distinctive:

    Do not publish an unvalidated source or an installed artifact that no longer matches its source.

    line 169
  32. Distinctive:

    If publication is held by user decision, leave the validated source commit ready and report the required release step.

    line 170
  33. Distinctive:

    Keep the report auditable: link every conclusion back to its recorded finding, decision, or command outcome.

    line 181

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Repo Harmonization

If these instructions are already present in the conversation from a slash or dollar invocation, follow them directly; do not invoke this skill again through a skill tool.

Turn a list of interdependent repositories into verified alignment findings, user-approved decisions, and surgically implemented fixes.

Arguments

$ARGUMENTS is a whitespace-separated list of repository paths. Tilde expansion is allowed.

  • Resolve every supplied path before investigating its contents.
  • Require at least two paths.
  • Require each resolved path to exist and be a Git repository.
  • Stop with a clear message identifying any missing, non-Git, or insufficient repository input.
  • Do not infer additional repositories from links, remotes, or installed copies; the supplied list defines the audit boundary.

Contract

  • Research before any edit and keep research strictly read-only; parallelize across subagents when the host supports them, otherwise investigate serially.
  • Verify every alignment or duplication claim mechanically with a diff, content hash, regeneration round-trip, or symlink resolution; never rely on prose inspection alone, and attach file:line evidence to every finding.
  • Classify each finding exactly once as confirmed drift to fix, true duplication that is a single-source candidate, or deliberate or necessary duplication to document without changing.
  • Send judgment calls about deduplications to implement, competing workflows to retire, trim depth, and publish versus hold to the user before planning; never expand beyond the approved decisions.
  • Treat the approved alignment outcome and resolved judgment calls, not the initial file manifest, as the implementation authorization boundary. When implementation discovers a related in-repository prerequisite needed to carry out those decisions, the orchestrator may extend the manifest, acquire coordination for the new scope, and delegate the smallest sufficient follow-on fix without asking again. Workers still stop at their assigned write scopes and return the evidence to the orchestrator.
  • Prefer surgical fixes to restructuring; add no include pipeline, templating layer, shared reference, or other machinery unless it removes more complexity than it adds.
  • Respect every repository's generation pipelines and hooks; edit canonical sources only, regenerate artifacts through build-only non-committing paths, and let designed commit hooks run at commit time.
  • Keep implementation agents from committing or pushing; the orchestrator commits per repository, scopes commits to task files, and honors the host's coordination and shared-worktree rules.

Intake

  • Resolve the supplied repository paths to stable absolute paths and retain their original user-facing forms for the report.
  • Confirm the paths are distinct repositories rather than multiple spellings of the same resolved directory.
  • Record the checked repository root for each path so later evidence is unambiguous.
  • Snapshot git status --short in every repository before research.
  • Treat pre-existing dirt as other agents' in-flight work: record it as a preservation boundary, never an audit target.
  • Record the snapshot before running any command that might regenerate, install, or otherwise modify a worktree.
  • Record each repository's current branch and remote configuration only when those facts affect an install, publish, or cross-repository reference.
  • Build a first-pass link map before making conclusions.
  • Treat the link map as an inventory, not proof that two files should share one source.
  • Map symlinks that point between the listed repositories, including their resolved targets.
  • Distinguish an intentional external symlink from a broken one by resolving it from its containing repository.
  • Map files generated from another listed repository and identify the stated source when available.
  • Record the generator command or manifest entry that establishes each generated relationship.
  • Map install and publish flows that move artifacts, skills, packages, or configuration between the repositories.
  • Note whether each flow changes files, creates external state, or merely validates a source artifact.
  • Search AI-context files for references to the other listed repositories, including AGENTS.md, CLAUDE.md, README guidance, skills, and local instructions.
  • Capture the concrete referenced path, command, or repository identifier rather than only its surrounding prose.
  • Record unknown origins as unknown rather than assuming that path similarity establishes a relationship.

Research

  • Partition the repositories or their independent subsystems across no more than three read-only investigators.
  • If the host cannot run investigators, perform the same partitions serially without relaxing the evidence standard.
  • Give each investigator a bounded path scope and require evidence, not proposed edits.
  • Give every investigator the same repository boundary and pre-existing-dirt list.
  • Map canonical-versus-generated relationships and the exact build pipelines that produce generated artifacts.
  • Read build configuration and generator inputs before assigning canonical ownership to a file.
  • Identify duplicated and near-duplicated instruction, documentation, and script content; cite both sides precisely.
  • Test suspected duplication with normalized diffs or content hashes appropriate to the artifact format.
  • Use byte comparison for exact copies and show the normalization used for near-duplicate claims.
  • Identify drift, including stale paths, version mismatches, contradictory rules, and unpublished changes.
  • Prove suspected drift against the relevant canonical source, live path, version source, or reproducible command.
  • Attribute a stale reference to the referencing file and its target, not merely to a repository-wide search result.
  • Identify competing workflows that accomplish the same job and describe their inputs, outputs, and side effects.
  • Include the documented trigger and the actual canonical source each competing workflow consumes.
  • Locate references to every other listed repository and determine whether each reference remains valid.
  • Check local references independently from remote or published references when both forms exist.
  • Keep generated artifacts distinct from their sources when grouping results.
  • Fold all investigator results into one evidence-backed picture, preserving the provenance of every claim.
  • Resolve disagreements by rerunning the mechanical check, not by selecting the more persuasive prose description.

Consolidate

  • Deduplicate overlapping observations without discarding the strongest file:line and mechanical evidence.
  • Keep linked but non-identical observations separate when they require different fixes or decisions.
  • Do not classify an unverified suspicion; return it to research or record it as an open question.
  • Regenerate suspected generated-copy drift through its build-only path and byte-verify the result with a diff.
  • Preserve the generator's inputs and command output needed to reproduce the verification.
  • Resolve symlinks and compare their targets before calling linked content duplicated or divergent.
  • Mark duplication protected by design rules, such as self-contained artifacts or independently installed skills, as deliberate when the evidence supports that constraint.
  • Treat a self-contained installation requirement as a design constraint even when its copies are byte-identical.
  • Separate an objectively broken reference from a preference about how much duplicated context to retain.
  • Keep a deliberate-no-change list with the mechanical evidence and design reason for each entry.

Decide

  • Apply decisions and delegated judgment already established by the user. Ask only for unresolved choices that materially change the alignment outcome; prepare the evidence and concrete proposal before requesting approval.
  • Present confirmed drift separately from judgment calls; normally offer confirmed drift as an uncontroversial fix.
  • Include the affected repositories and the exact mechanical evidence with each proposed fix.
  • Present every judgment call as an explicit user question with a recommended option and its tradeoff.
  • Keep alternatives mutually exclusive where a choice determines the next plan.
  • Ask before choosing which single-source candidates to implement, which competing workflows to retire, how deeply to trim duplicated material, or whether to publish now or hold changes.
  • State the default preservation option when no simplification is clearly justified.
  • Resolve decisions affecting each fix before planning it. Continue independent research and already authorized fixes while another choice is pending; do not treat a progress report as completion of the requested work.
  • Record each user decision verbatim beside the finding it resolves.
  • Preserve a decision's condition or exception when it limits an otherwise approved change.
  • Carry declined changes into the deliberate-no-change list rather than silently omitting them.

Plan

  • Produce a decision-complete plan that names exact files, canonical sources, and affected generated artifacts.
  • Associate each edit with its finding and the user decision that authorized it.
  • Order edits so canonical sources change before their generated or installed counterparts.
  • Avoid editing installed output by hand unless it is itself a canonical artifact under the repository's rules.
  • Name every regeneration command and whether it is build-only, non-committing, or expected to alter files.
  • Identify commit-hook side effects and keep them distinct from build and regeneration steps.
  • Specify per-repository verification, commit sequencing, publish sequencing, and any dependency between repositories.
  • Identify the point at which a downstream repository can safely consume an upstream generated or installed artifact.
  • In Claude Code, prefer plan mode.
  • Delegate implementation through $codex-handoff when available; otherwise use host subagents, otherwise implement directly.
  • Use disjoint per-repository write scopes for delegated work in every implementation shape.
  • Reserve aggregate cross-repository validation for one owner so it runs once after dependent edits settle.
  • Keep the plan limited to user-approved decisions. Extend it autonomously for technical prerequisites covered by those decisions; report and ask only when a new finding introduces a subjective consolidation choice, changes the repository set or intended outcome, or crosses an unapproved destructive, publish, or other external-write boundary.

Implement and finalize

  • Reconcile each implementation-agent result against the visible working tree and its assigned write scope.
  • Confirm every reported changed path belongs to the approved scope before treating an agent result as complete.
  • Preserve pre-existing dirt and unrelated concurrent changes byte-for-byte.
  • Run the narrowest per-repository checks that prove the intended edits.
  • Run those checks from the repository whose rules and dependencies they exercise.
  • Run cross-repository invariants once, including regeneration idempotence and source-versus-installed diffs where applicable.
  • Attribute an aggregate failure before acting: first rule out effects of this task's changes, formatters, hooks, and generators, including downstream failures outside the approved files. Continue past a failure only when evidence establishes that it is unrelated and the task's own checks still pass.
  • Use $commit when available after validation, passing only task files; never bypass it with git add -A, git commit -a, stash, or reset.
  • Inspect each scoped commit before creating the next so an upstream commit remains independently reversible.
  • Keep commits per repository so their histories, hooks, and publication states remain independently auditable.
  • Rerun every required publish or install flow after its source changes.
  • Do not publish an unvalidated source or an installed artifact that no longer matches its source.
  • If publication is held by user decision, leave the validated source commit ready and report the required release step.

Report

  • Report per-repository commit identifiers and the files each commit contains.
  • Report every verification command and its outcome.
  • Distinguish passed checks from checks that were intentionally not run and explain the latter.
  • List deliberate no-change findings with the reasons they remain duplicated or unchanged.
  • State residual risks, including unrun publish flows, unavailable regeneration tooling, and unresolved cross-repository references.
  • State open questions that were deferred or discovered after the approved decision boundary.
  • Keep the report auditable: link every conclusion back to its recorded finding, decision, or command outcome.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.