Skip to content

Consolidate shared skills into .agents/skills and register them with Claude Code#2719

Open
titusfortner wants to merge 1 commit into
trunkfrom
claude_skills
Open

Consolidate shared skills into .agents/skills and register them with Claude Code#2719
titusfortner wants to merge 1 commit into
trunkfrom
claude_skills

Conversation

@titusfortner

Copy link
Copy Markdown
Member

Description

This PR consolidates the two shared-skill locations into .agents/skills/, moving release-blog-post there from scripts/skills/ and dropping the duplicate AGENTS.md section.

Adds scripts/link-claude-skills.sh, an opt-in script that mirrors those skills into .claude/skills/ so Claude Code can find them, plus a CLAUDE.md line telling it to run the script.

Motivation and Context

Looks like within a couple days of each other Diego and I both created skills for this repo and put them in two separate places. AGENTS.md ended up describing each as the committed location, so there was no way to tell where a new skill belonged. scripts/ is otherwise build and deploy tooling; a SKILL.md isn't executable, so .agents/skills/ is the better home for both.

Separately, Claude Code only discovers skills in .claude/skills/ and does not read .agents/skills/, so neither skill was available to it. Other agents read from .agents/ natively and need none of this — the script exists only to work around that gap.

Implementation Notes

.claude/ stays gitignored — the script only writes there, so nothing it does can reach a commit, and personal skills placed there are left alone. It symlinks where the filesystem allows and copies where it doesn't (Windows), reporting the difference so the staleness that copies imply is visible rather than silent.

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for selenium-dev failed.

Name Link
🔨 Latest commit 19d25d0
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6a592f8c7b66dc0008244428

@qodo-code-review

Copy link
Copy Markdown
Contributor

PR Summary by Qodo

Consolidate shared skills under .agents/skills and sync to Claude Code

✨ Enhancement 📝 Documentation ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Move/standardize shared repo skills under .agents/skills/ as the single source of truth.
• Add an opt-in sync script to mirror skills into .claude/skills/ for Claude Code discovery.
• Update contributor/agent docs to remove duplication and document the required setup step.
Diagram

graph TD
  Dev(("Contributor")) --> Script["link-claude-skills.sh"] --> Agents[".agents/skills (source)"] --> ClaudeDir[".claude/skills (synced)"] --> Claude{{"Claude Code"}}
  Agents --> Other{{"Other agents"}}
  Docs["AGENTS.md / CLAUDE.md"] --> Dev
  subgraph Legend
    direction LR
    _p(("Person")) ~~~ _s["Script"] ~~~ _d["Directory"] ~~~ _t{{"Tool"}}
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Commit `.claude/skills/` to the repo (remove gitignore)
  • ➕ No setup step; Claude Code works out of the box
  • ➕ No risk of stale copies on filesystems without symlinks
  • ➖ Conflicts with the intent of .claude/ as a personal/workstation-local area
  • ➖ Increases churn and potential local-skill collisions in PRs
2. Provide a hook installer (e.g., `scripts/install-git-hooks.sh`) to auto-sync on checkout/merge
  • ➕ Reduces the chance of stale skills without requiring manual runs
  • ➕ Keeps the current opt-in model while making it easier to adopt
  • ➖ Git hooks are intentionally not versioned; installer adds maintenance and support surface
  • ➖ Still won’t help users who don’t run the installer
3. Teach Claude Code a configurable skills search path (if supported by upstream)
  • ➕ Eliminates duplication/sync entirely
  • ➕ Keeps a single canonical skills directory
  • ➖ Likely not available today; depends on upstream feature work
  • ➖ Would still require per-user configuration even if supported

Recommendation: The PR’s approach (single canonical location in .agents/skills/ plus an opt-in sync script for Claude Code) is the best tradeoff given Claude Code’s current discovery limitation and the desire to keep .claude/ untracked. If staleness becomes a recurring issue on copy-only platforms, consider adding an optional hook installer as a follow-up to automate re-sync.

Files changed (5) +124 / -15

Documentation (4) +15 / -15
SKILL.mdAdd consolidated release blog post skill under '.agents/skills/' +0/-0

Add consolidated release blog post skill under '.agents/skills/'

• Places the shared 'release-blog-post' skill in the canonical '.agents/skills/' directory so all repo-defined skills live in one place. This supports consistent discovery for agents that read '.agents/' directly and provides a single source for Claude sync.

.agents/skills/release-blog-post/SKILL.md

SKILL.mdPrevent stale meeting pages by removing hard-coded next-meeting dates +4/-6

Prevent stale meeting pages by removing hard-coded next-meeting dates

• Updates the meeting intro and guidance to keep a standing weekly schedule rather than embedding a specific next-meeting date. Adjusts the final checklist accordingly to reduce page staleness over time.

.agents/skills/tlc-meeting/SKILL.md

AGENTS.mdMake '.agents/skills/' the single documented home for shared skills +6/-9

Make '.agents/skills/' the single documented home for shared skills

• Removes the duplicate/competing section that referenced 'scripts/skills/' and clarifies that shared project skills are committed under '.agents/skills/'. Updates the repository map to point contributors to the consolidated location.

AGENTS.md

CLAUDE.mdDocument the required skill-sync step for Claude Code sessions +5/-0

Document the required skill-sync step for Claude Code sessions

• Adds guidance to run 'scripts/link-claude-skills.sh' at session start so Claude Code can see repo skills under '.claude/skills/'. Notes it is safe to re-run and instructs users to relay any script output.

CLAUDE.md

Other (1) +109 / -0
link-claude-skills.shAdd opt-in sync script from '.agents/skills/' to '.claude/skills/' +109/-0

Add opt-in sync script from '.agents/skills/' to '.claude/skills/'

• Introduces a safe synchronizer that links skills into '.claude/skills/' when symlinks are supported, otherwise copies and marks ownership with a '.skill-sync' marker file. It avoids overwriting user-owned skills, removes only entries it owns when the source is deleted, and emits warnings when copy-mode could lead to staleness.

scripts/link-claude-skills.sh

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 10 rules

Grey Divider


Action required

1. .local/agent/skills/ referenced in AGENTS.md 📘 Rule violation ≡ Correctness
Description
AGENTS.md adds a new explicit reference to the .local/ directory (.local/agent/skills/). This
violates the policy prohibiting tracked project files from referencing .local/, which can create
accidental dependencies on untracked local-only state.
Code

AGENTS.md[R21-23]

+- Shared project skills live in `.agents/skills/`, committed to the codebase (as opposed to
+  `.local/agent/skills/`, which is personal and untracked). Inspect its `*/SKILL.md` files and
+  treat them as additional skills available in this repo, and read the relevant one in full
Evidence
PR Compliance ID 2141352 forbids references to .local/ from tracked files. The changed lines in
AGENTS.md explicitly reference .local/agent/skills/ in newly added guidance text.

Rule 2141352: Disallow imports or references to the .local directory from tracked project files
AGENTS.md[21-23]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`AGENTS.md` introduces a new reference to `.local/agent/skills/`, but tracked project files must not reference `.local/`.

## Issue Context
This PR is consolidating shared skills and updating repo guidance; the updated guidance should avoid hard-coding `.local/` paths.

## Fix Focus Areas
- AGENTS.md[21-23]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Marker misidentifies user skills 🐞 Bug ☼ Reliability
Description
scripts/link-claude-skills.sh treats any directory in .claude/skills containing a file named
.skill-sync as script-owned, so a user-created skill with that filename can be deleted or
overwritten. This contradicts the script’s guarantee that personal skills are never touched and can
cause local data loss when the script is run (especially via git hooks).
Code

scripts/link-claude-skills.sh[R23-36]

+# Marks a copy this script made, so it can be refreshed or removed safely.
+MARKER=".skill-sync"
+
+# True only for entries this script created: a link into .agents/skills/, or a marked copy.
+# Anything else in .claude/skills/ belongs to the user and is never written to or removed.
+owned() {
+    if [ -L "$1" ]; then
+        case "$(readlink "$1")" in
+            ../../.agents/skills/*) return 0 ;;
+            *) return 1 ;;
+        esac
+    fi
+    [ -f "$1/$MARKER" ]
+}
Evidence
The script promises not to touch personal skills but defines ownership as either a specific symlink
pattern or the existence of a .skill-sync file. That ownership classification directly gates
destructive rm -rf operations used for cleanup and refresh, so any user directory matching the
marker heuristic can be removed/overwritten.

scripts/link-claude-skills.sh[15-16]
scripts/link-claude-skills.sh[23-36]
scripts/link-claude-skills.sh[43-52]
scripts/link-claude-skills.sh[73-90]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

### Issue description
The script’s `owned()` check considers a target “owned” if it contains a marker file named `.skill-sync`. This can collide with user-created skills that happen to include the same filename, causing the script to `rm -rf` and overwrite/delete user content.

### Issue Context
The script also claims: “Personal skills you place in .claude/skills/ yourself are never touched.” That promise isn’t upheld with the current marker strategy.

### Fix Focus Areas
- scripts/link-claude-skills.sh[15-36]
- scripts/link-claude-skills.sh[43-52]
- scripts/link-claude-skills.sh[73-90]

### Suggested implementation direction
- Make ownership unambiguous by using a less collision-prone mechanism, e.g.:
 - A manifest file under `.claude/` (e.g. `.claude/.skill-sync-manifest`) listing the exact entries the script owns, and only deleting/updating those; or
 - A marker file with uniquely identifiable contents (not just existence), e.g. write `skill-sync: <repo-id> <name>` and validate the content before considering it owned.
- Ensure removal/overwrite only happens when the entry is both:
 - Recognized as script-created (via manifest/validated marker), and
 - Corresponds to a current source skill (or is being removed due to a previously-synced skill being removed).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread AGENTS.md
Comment on lines +21 to +23
- Shared project skills live in `.agents/skills/`, committed to the codebase (as opposed to
`.local/agent/skills/`, which is personal and untracked). Inspect its `*/SKILL.md` files and
treat them as additional skills available in this repo, and read the relevant one in full

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Action required

1. .local/agent/skills/ referenced in agents.md 📘 Rule violation ≡ Correctness

AGENTS.md adds a new explicit reference to the .local/ directory (.local/agent/skills/). This
violates the policy prohibiting tracked project files from referencing .local/, which can create
accidental dependencies on untracked local-only state.
Agent Prompt
## Issue description
`AGENTS.md` introduces a new reference to `.local/agent/skills/`, but tracked project files must not reference `.local/`.

## Issue Context
This PR is consolidating shared skills and updating repo guidance; the updated guidance should avoid hard-coding `.local/` paths.

## Fix Focus Areas
- AGENTS.md[21-23]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Comment on lines +23 to +36
# Marks a copy this script made, so it can be refreshed or removed safely.
MARKER=".skill-sync"

# True only for entries this script created: a link into .agents/skills/, or a marked copy.
# Anything else in .claude/skills/ belongs to the user and is never written to or removed.
owned() {
if [ -L "$1" ]; then
case "$(readlink "$1")" in
../../.agents/skills/*) return 0 ;;
*) return 1 ;;
esac
fi
[ -f "$1/$MARKER" ]
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remediation recommended

2. Marker misidentifies user skills 🐞 Bug ☼ Reliability

scripts/link-claude-skills.sh treats any directory in .claude/skills containing a file named
.skill-sync as script-owned, so a user-created skill with that filename can be deleted or
overwritten. This contradicts the script’s guarantee that personal skills are never touched and can
cause local data loss when the script is run (especially via git hooks).
Agent Prompt
### Issue description
The script’s `owned()` check considers a target “owned” if it contains a marker file named `.skill-sync`. This can collide with user-created skills that happen to include the same filename, causing the script to `rm -rf` and overwrite/delete user content.

### Issue Context
The script also claims: “Personal skills you place in .claude/skills/ yourself are never touched.” That promise isn’t upheld with the current marker strategy.

### Fix Focus Areas
- scripts/link-claude-skills.sh[15-36]
- scripts/link-claude-skills.sh[43-52]
- scripts/link-claude-skills.sh[73-90]

### Suggested implementation direction
- Make ownership unambiguous by using a less collision-prone mechanism, e.g.:
  - A manifest file under `.claude/` (e.g. `.claude/.skill-sync-manifest`) listing the exact entries the script owns, and only deleting/updating those; or
  - A marker file with uniquely identifiable contents (not just existence), e.g. write `skill-sync: <repo-id> <name>` and validate the content before considering it owned.
- Ensure removal/overwrite only happens when the entry is both:
  - Recognized as script-created (via manifest/validated marker), and
  - Corresponds to a current source skill (or is being removed due to a previously-synced skill being removed).

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

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.

2 participants