Skip to content

Commit ffdef52

Browse files
committed
fix: replace skill symlinks with real directories for marketplace compatibility
Symlinks to submodules/cockroachdb-skills break when the plugin is cloned without --recurse-submodules, which is how the Claude Code marketplace cache works. This replaces all 22 symlinks with real copied directories (29 skills total) and adds a weekly CI workflow to sync upstream changes via PR.
1 parent 966724e commit ffdef52

118 files changed

Lines changed: 27025 additions & 37 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude-plugin/marketplace.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
{
1313
"name": "cockroachdb",
1414
"description": "CockroachDB plugin — explore schemas, write optimized SQL, debug queries, and manage distributed database clusters directly from your AI coding agent.",
15-
"source": "./",
16-
"strict": false
15+
"source": "./"
1716
}
1817
]
1918
}

.claude-plugin/plugin.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cockroachdb",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "CockroachDB plugin for Claude Code — explore schemas, write optimized SQL, debug queries, and manage distributed database clusters directly from your AI coding agent.",
55
"author": {
66
"name": "Virag Tripathi",
@@ -20,5 +20,8 @@
2020
"schema",
2121
"migration",
2222
"multi-region"
23+
],
24+
"skills": [
25+
"./skills"
2326
]
2427
}

.github/workflows/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ jobs:
2626
run: |
2727
tar -czvf cockroachdb-claude-plugin.tar.gz \
2828
.claude-plugin/plugin.json \
29+
.claude-plugin/marketplace.json \
2930
.mcp.json \
3031
tools.yaml \
3132
skills/ \
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Update cockroachdb-skills submodule
2+
3+
on:
4+
schedule:
5+
- cron: '0 9 * * 1' # Weekly on Monday at 9am UTC
6+
workflow_dispatch: # Allow manual trigger
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
check-update:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
submodules: true
19+
fetch-depth: 0
20+
21+
- name: Check for upstream updates
22+
id: check
23+
run: |
24+
cd submodules/cockroachdb-skills
25+
CURRENT=$(git rev-parse HEAD)
26+
git fetch origin main
27+
LATEST=$(git rev-parse origin/main)
28+
echo "current=$CURRENT" >> "$GITHUB_OUTPUT"
29+
echo "latest=$LATEST" >> "$GITHUB_OUTPUT"
30+
if [ "$CURRENT" != "$LATEST" ]; then
31+
echo "behind=true" >> "$GITHUB_OUTPUT"
32+
COMMITS=$(git log --oneline "$CURRENT..$LATEST" | wc -l | tr -d ' ')
33+
echo "commits=$COMMITS" >> "$GITHUB_OUTPUT"
34+
git log --oneline "$CURRENT..$LATEST" > /tmp/changelog.txt
35+
echo "changelog<<EOF" >> "$GITHUB_OUTPUT"
36+
cat /tmp/changelog.txt >> "$GITHUB_OUTPUT"
37+
echo "EOF" >> "$GITHUB_OUTPUT"
38+
else
39+
echo "behind=false" >> "$GITHUB_OUTPUT"
40+
fi
41+
42+
- name: Update submodule
43+
if: steps.check.outputs.behind == 'true'
44+
run: |
45+
cd submodules/cockroachdb-skills
46+
git checkout origin/main
47+
48+
- name: Sync skills from submodule
49+
if: steps.check.outputs.behind == 'true'
50+
run: |
51+
# Build list of upstream skill names
52+
upstream_skills=""
53+
for skill_dir in submodules/cockroachdb-skills/skills/*/; do
54+
for skill in "$skill_dir"*/; do
55+
if [ -f "$skill/SKILL.md" ]; then
56+
skill_name=$(basename "$skill")
57+
upstream_skills="$upstream_skills $skill_name"
58+
59+
# Copy new or updated skills
60+
if [ -d "skills/$skill_name" ]; then
61+
rm -rf "skills/$skill_name"
62+
cp -r "$skill" "skills/$skill_name"
63+
echo "Updated: $skill_name"
64+
else
65+
cp -r "$skill" "skills/$skill_name"
66+
echo "Added: $skill_name"
67+
fi
68+
fi
69+
done
70+
done
71+
72+
# Remove skills that no longer exist upstream
73+
for existing in skills/*/; do
74+
existing_name=$(basename "$existing")
75+
if ! echo "$upstream_skills" | grep -qw "$existing_name"; then
76+
rm -rf "skills/$existing_name"
77+
echo "Removed (no longer upstream): $existing_name"
78+
fi
79+
done
80+
81+
echo "Total skills: $(ls -d skills/*/ 2>/dev/null | wc -l | tr -d ' ')"
82+
83+
- name: Create Pull Request
84+
if: steps.check.outputs.behind == 'true'
85+
uses: peter-evans/create-pull-request@v7
86+
with:
87+
commit-message: "chore: update cockroachdb-skills submodule"
88+
title: "chore: update cockroachdb-skills submodule (${{ steps.check.outputs.commits }} new commits)"
89+
body: |
90+
Updates `cockroachdb-skills` submodule from `${{ steps.check.outputs.current }}` to `${{ steps.check.outputs.latest }}`.
91+
92+
### Upstream changes
93+
```
94+
${{ steps.check.outputs.changelog }}
95+
```
96+
97+
This PR was auto-generated by the [update-skills](${{ github.server_url }}/${{ github.repository }}/actions/workflows/update-skills.yml) workflow.
98+
branch: chore/update-cockroachdb-skills
99+
delete-branch: true
100+
labels: dependencies,automated

README.md

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,15 @@ Requires [ccloud CLI](https://www.cockroachlabs.com/docs/cockroachcloud/ccloud-g
122122

123123
### Skills
124124

125-
22 skills from [cockroachdb-skills](https://github.com/cockroachlabs/cockroachdb-skills) across multiple operational domains:
125+
Skills are sourced from the [`cockroachdb-skills`](https://github.com/cockroachlabs/cockroachdb-skills) submodule via symlinks — a single source of truth shared across CockroachDB agent integrations. A [weekly CI workflow](.github/workflows/update-skills.yml) auto-detects upstream changes and opens a PR to update.
126126

127-
| Domain | Skills | Examples |
128-
|------------------------------------|--------|--------------------------------------------------------------|
129-
| **Query & Schema Design** | 1 | cockroachdb-sql |
130-
| **Observability & Diagnostics** | 7 | profiling-statement-fingerprints, triaging-live-sql-activity |
131-
| **Security & Governance** | 11 | auditing-cloud-cluster-security, hardening-user-privileges |
132-
| **Onboarding & Migrations** | 3 | molt-fetch, molt-verify, molt-replicator |
133-
134-
Skills are sourced from the [`cockroachdb-skills`](https://github.com/cockroachlabs/cockroachdb-skills) submodule via symlinks — a single source of truth shared across CockroachDB agent integrations.
127+
| Domain | Examples |
128+
|------------------------------------|--------------------------------------------------------------|
129+
| **Query & Schema Design** | cockroachdb-sql |
130+
| **Observability & Diagnostics** | profiling-statement-fingerprints, triaging-live-sql-activity |
131+
| **Security & Governance** | auditing-cloud-cluster-security, hardening-user-privileges |
132+
| **Onboarding & Migrations** | molt-fetch, molt-verify, molt-replicator |
133+
| **Operations & Lifecycle** | managing-cluster-capacity, upgrading-cluster-version |
135134

136135
### Agents
137136

@@ -177,7 +176,7 @@ claude plugin validate .
177176

178177
```
179178
.claude-plugin/
180-
plugin.json # Plugin manifest (metadata only)
179+
plugin.json # Plugin manifest with component declarations
181180
marketplace.json # Marketplace catalog for distribution
182181
.mcp.json # MCP server configuration
183182
tools.yaml # Toolbox source & tool definitions
@@ -190,7 +189,7 @@ hooks/
190189
scripts/
191190
validate-sql.py # SQL validation hook
192191
check-sql-files.py # Anti-pattern linter hook
193-
skills/ # 22 symlinks to cockroachdb-skills submodule
192+
skills/ # Skills copied from cockroachdb-skills submodule
194193
submodules/
195194
cockroachdb-skills/ # Shared skills submodule
196195
assets/

skills/analyzing-range-distribution

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)