Skip to content

Accept a root SKILL.md repo and skip duplicate names under --all - #298

Merged
yourconscience merged 1 commit into
mainfrom
source-layouts
Nov 17, 2026
Merged

yourconscience merged 1 commit into
mainfrom
source-layouts

Conversation

@yourconscience

@yourconscience yourconscience commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

What and why

tackroom skill sources add refused two common repository layouts.

A repo that is itself one skill. With SKILL.md at the repository root, add failed with no skills (directories with SKILL.md) found. It is now added as one skill, recorded as skill_dirs: [.], which already meant "this directory is the skill" at sync time. The skill is named by name: in that file, else by the source name. The materialized copy leaves out the repository's .git.

A repo with one skill name in two folders. add --all failed with skill "review" exists in both a and b and added nothing, which made --all unusable on repos shaped like Anthropic's plugin marketplace. --all now adds every skill whose name is unique and prints one line per skipped name:

skipped skill "review": it is in a, b; --skills cannot choose between them, add the source by path to pick one

It exits 0 when at least one skill was added, and keeps the old error only when nothing can be. --skills review on a duplicated name still fails. Only the folders whose skills were all added are recorded, so a later skill update never meets the duplicate; a folder that holds a skipped skill beside others is recorded skill by skill.

Decisions worth a look:

  • A repo with both a root SKILL.md and skill folders is treated as one skill, the root. Before, it was refused entirely. Its folders stay reachable by path (add owner/repo/folder), which used to write skill_dirs: [.] and now records the folder.
  • An existing hand-written skill_dirs: [.] on a root SKILL.md changes its skill name if the frontmatter name: differs from the source name.

Not fixed, noticed in passing: add --all owner/repo/skills/review records the parent folder with no allowlist, so sync takes sibling skills too. Not reproduced.

The 3.0 release notes come with the PR that collects the notes for these fixes.

How I checked it

  • go build, go vet, go test ./... pass; lint reports 0 issues; the docs site builds with no warnings. No test was deleted.

  • With a binary from this branch in a throwaway home: the root-skill repo adds as 1 skill pinned, the duplicate repo adds one skill and prints the skipped line, tackroom.yaml records skill_dirs: [.] and skill_dirs: [c], and sync, doctor and status pass afterwards (2 canonical copies match lock).

  • Also run by the worker: skill update after a new upstream commit, removing the source, a root-skill repo with a risky script (still not pinned (blocked)), and a fresh root-skill repo from a loopback git server (still in cooldown).

  • Not run: the interactive picker, and add owner/repo/folder against GitHub.

  • go test ./... and go vet ./... pass

  • I can explain this change without an AI tool

Summary by Sourcery

Support root-level skills and make --all resilient to duplicate skill names across source folders.

New Features:

  • Support adding repositories whose root SKILL.md defines a single skill, including frontmatter-based naming and omission of repository metadata from the materialized copy.

Bug Fixes:

  • Allow --all to add uniquely named skills when duplicate names exist in other folders, while retaining errors when no unambiguous skill can be added.
  • Preserve precise skill directory selections so skipped duplicate skills are not picked up during later updates.

Enhancements:

  • Document root-repository skills and duplicate-name handling for skill sources.
  • Update auditing and drift checks to correctly compare root-level repository skills.

Documentation:

  • Document root SKILL.md repositories, duplicate-name behavior, selection rules, and resulting skill_dirs entries.

@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Sorry @yourconscience, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 day and 4 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cda0e36c-f5cd-47f6-af20-cfa0f6f35b52
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Reviewer's Guide

Data structures

Represent root-repository skills explicitly and derive their paths and names, while computing source directories so only fully selected folders are tracked wholesale.

  • internal/app/skill_sources.go L484-498, L904-907, L924-967 (+2 small edits)

Implementation

Discover root-level skills as the repository skill and omit a checkout’s top-level .git when copying its contents.

  • internal/app/external.go L563-566, L855-860 (+3 small edits)

Use root-aware discovery and tree comparison when auditing or checking materialized external skills.

  • internal/app/audit_cmd.go L196
  • internal/app/doctor.go L534

Select unique names for --all, report duplicate names while preserving the no-skills-left error, and compare canonical targets using each skill’s actual path.

  • internal/app/skill_sources.go L1030-1063 (+5 small edits)

Documentation

Document how --all handles duplicate skill names and how root-SKILL.md repositories are named, recorded, and materialized.

  • docs/skills.md L57-58

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@yourconscience yourconscience mentioned this pull request Nov 17, 2026
2 tasks done
@yourconscience
yourconscience merged commit a377e02 into main Nov 17, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant