-
Notifications
You must be signed in to change notification settings - Fork 1.2k
补充plugin的josn文件 #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
补充plugin的josn文件 #11
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,7 +22,7 @@ pids | |
| .env | ||
| .env.local | ||
| .env.*.local | ||
|
|
||
| settings.local.json | ||
| # IDE | ||
| .vscode/ | ||
| .idea/ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
|
|
||
| c0aca304189825d07d68f12a85ca4c4f5d53e58b {"key":"pacote:tarball:file:E:/ZNGZ/Code_copy/learning_proj/Open-ClaudeCode/package","integrity":"sha512-ukMtYZCi0I7cD3rt89rnXy20D/Zvk0Gj/SW60xYfz17zTslLz+VuhXw/KPb+2ndp3/ATadJdyNEqdKQlcNk7nQ==","time":1779353697479,"size":31196633} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,7 @@ | ||
| --- | ||
| name: conversation-analyzer | ||
| description: Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments\nuser: "/hookify"\nassistant: "I'll analyze the conversation to find behaviors you want to prevent"\n<commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations\nuser: "Can you look back at this conversation and help me create hooks for the mistakes you made?"\nassistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks."\n<commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example> | ||
| description: |- | ||
| Use this agent when analyzing conversation transcripts to find behaviors worth preventing with hooks. Examples: <example>Context: User is running /hookify command without arguments\nuser: "/hookify"\nassistant: "I'll analyze the conversation to find behaviors you want to prevent"\n<commentary>The /hookify command without arguments triggers conversation analysis to find unwanted behaviors.</commentary></example><example>Context: User wants to create hooks from recent frustrations\nuser: "Can you look back at this conversation and help me create hooks for the mistakes you made?"\nassistant: "I'll use the conversation-analyzer agent to identify the issues and suggest hooks."\n<commentary>User explicitly asks to analyze conversation for mistakes that should be prevented.</commentary></example> | ||
|
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 🏁 Script executed: #!/bin/bash
# Verify block-scalar descriptions that still contain literal "\n"
rg -n --type=md '^description:\s*\|-' plugins | cut -d: -f1 | sort -u | while read -r f; do
awk '
BEGIN {in_desc=0}
/^description:[[:space:]]*\|-/ {in_desc=1; next}
in_desc && /^[^[:space:]]/ {in_desc=0}
in_desc && /\\n/ {print FILENAME ":" NR ":" $0}
' "$f"
doneRepository: LING71671/Open-ClaudeCode Length of output: 10009 Fix YAML
🤖 Prompt for AI Agents |
||
| model: inherit | ||
| color: yellow | ||
| tools: ["Read", "Grep"] | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "name": "plugin-dev", | ||
| "description": "Comprehensive toolkit for developing Claude Code plugins. Includes expert skills covering hooks, MCP integration, commands, agents, and best practices.", | ||
| "version": "0.1.0", | ||
|
Comment on lines
+2
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Confirm whether other plugins in this repo also duplicate manifest fields in marketplace.json
fd -t f 'plugin.json' plugins -x sh -c 'echo "=== {} ==="; cat {}'Repository: LING71671/Open-ClaudeCode Length of output: 51 🏁 Script executed: #!/bin/bash
set -euo pipefail
# 1) Show the relevant manifest snippet
echo "---- plugin-dev/.claude-plugin/plugin.json (lines 1-40) ----"
nl -ba plugins/plugin-dev/.claude-plugin/plugin.json | sed -n '1,40p'
# 2) Show the relevant marketplace snippet around the plugin-dev entry
echo "---- plugins/.claude-plugin/marketplace.json (around plugin-dev) ----"
ls -la plugins/*/.claude-plugin/marketplace.json 2>/dev/null || true
# Try the path mentioned by the comment (from repo root)
if [ -f plugins/plugin-dev/.claude-plugin/marketplace.json ]; then
target="plugins/plugin-dev/.claude-plugin/marketplace.json"
else
# Fallback: search for marketplace.json in repo
target="$(fd -t f 'marketplace.json' . | head -n 1)"
fi
echo "Using marketplace.json: $target"
nl -ba "$target" | sed -n '90,140p' | cat
# 3) Identify how marketplace.json represents plugin entries (especially plugin-dev)
echo "---- plugin-dev entry block (best-effort) ----"
rg -n '"plugin-dev"' "$target" || true
rg -n '"name"[[:space:]]*:[[:space:]]*"plugin-dev"' "$target" || true
rg -n '"name"[[:space:]]*:[[:space:]]*"plugin-dev"' plugins/plugin-dev -S || true
# 4) Scan for drift: compare plugin.json description vs marketplace.json description where both exist
# We'll extract all plugin.json descriptions and then look for corresponding marketplace entries.
tmpdir="$(mktemp -d)"
echo "Using temp dir: $tmpdir"
# Extract plugin.json descriptions: <pluginPath>\t<description>
fd -t f 'plugin.json' plugins -x sh -c '
f="{}";
desc="$(jq -r ".description // empty" "$f" 2>/dev/null || true)";
if [ -n "$desc" ]; then
plugin="$(dirname "$f")";
printf "%s\t%s\n" "$plugin" "$desc";
fi
' > "$tmpdir/plugin_descriptions.tsv" || true
echo "---- Sample extracted plugin.json descriptions (first 20) ----"
head -n 20 "$tmpdir/plugin_descriptions.tsv" || true
# For marketplace.json files, look for description under entries containing plugin-dev and any other plugin names.
# We'll find all marketplace.json and check whether they include a "description" field that differs from manifest for the same plugin dir name.
fd -t f 'marketplace.json' plugins -x sh -c '
mf="{}";
echo "== Checking $mf ==";
# Extract candidate plugin name -> description from marketplace.json
# Assumes top-level array or object containing entries; handle common shapes.
jq -r '"'"'if (type=="array") then (.[].name // .[].name) else empty end'"'"'' "$mf" >/dev/null 2>&1 || true
jq -r '"'"'
def norm(x): (x|tostring);
if (type=="array") then
.[]
| .name as $n
| "\($n)\t"+( .description // "" )
else
to_entries[]
| .value
| .name as $n
| "\($n)\t"+( .description // "" )
end
'"'"'' "$mf" 2>/dev/null | head -n 3 || true
' || true
# 5) Specifically count occurrences where marketplace.json includes "description" with markdown emphasis (like **7**),
# as a proxy for manifest drift patterns.
fd -t f 'marketplace.json' plugins -x rg -n '"description"' || trueRepository: LING71671/Open-ClaudeCode Length of output: 191 🏁 Script executed: #!/bin/bash
set -euo pipefail
# Locate relevant files
echo "---- marketplace.json files under plugins/ ----"
fd -t f 'marketplace.json' plugins | sed -n '1,200p'
echo "---- plugin-dev manifest ----"
ls -la plugins/plugin-dev/.claude-plugin/plugin.json
echo "plugin.json (lines 1-20)"
cat -n plugins/plugin-dev/.claude-plugin/plugin.json | sed -n '1,25p'
# Find the marketplace.json that contains plugin-dev entry (best-effort)
echo "---- searching for plugin-dev in marketplace.json ----"
fd -t f 'marketplace.json' plugins -x sh -c 'echo "== $1 =="; rg -n "\"plugin-dev\"" "$1" || true' sh {}
echo "---- show nearby block for plugin-dev (best-effort) ----"
# Use rg to find the line number, then print a window around it.
target_mf="$(fd -t f 'marketplace.json' plugins | head -n 50 | xargs -I{} sh -c 'rg -q "\"plugin-dev\"" "{}" && echo "{}"' | head -n 1 || true)"
if [ -n "${target_mf}" ]; then
echo "Using marketplace.json: $target_mf"
# Find first match line number
line="$(rg -n "\"plugin-dev\"" "$target_mf" | head -n 1 | cut -d: -f1 || true)"
echo "Match line: ${line}"
start=$(( line>10 ? line-10 : 1 ))
end=$(( line+40 ))
echo "---- $target_mf (lines ${start}-${end}) ----"
sed -n "${start},${end}p" "$target_mf"
else
echo "No marketplace.json containing \"plugin-dev\" found under plugins/."
fi
echo "---- drift scan: compare plugin.json description vs marketplace.json description ----"
python3 - <<'PY'
import json, os, sys, glob
def find_files(root, name):
out=[]
for dirpath, dirnames, filenames in os.walk(root):
if name in filenames:
out.append(os.path.join(dirpath, name))
return out
plugin_jsons = []
for p in find_files("plugins", "plugin.json"):
if "/.claude-plugin/" in p.replace("\\","/"):
plugin_jsons.append(p)
marketplaces = find_files("plugins", "marketplace.json")
def collect_entries(obj, path=""):
# collect objects that look like {name:..., description:...}
res=[]
if isinstance(obj, dict):
if "name" in obj and "description" in obj:
res.append((obj.get("name"), obj.get("description"), path))
for k,v in obj.items():
res.extend(collect_entries(v, path + f"/{k}"))
elif isinstance(obj, list):
for i,v in enumerate(obj):
res.extend(collect_entries(v, path + f"[{i}]"))
return res
# Parse all plugin manifests
manifest_by_name = {}
for pj in plugin_jsons:
try:
with open(pj, "r", encoding="utf-8") as f:
data=json.load(f)
name=data.get("name")
desc=data.get("description")
if name:
manifest_by_name[name]=desc
except Exception as e:
print(f"Failed to parse {pj}: {e}", file=sys.stderr)
# Parse marketplace files and compare
mismatches=[]
found_entries=0
for mf in marketplaces:
try:
with open(mf, "r", encoding="utf-8") as f:
data=json.load(f)
except Exception as e:
print(f"Failed to parse {mf}: {e}", file=sys.stderr)
continue
entries=collect_entries(data)
# index marketplace descriptions by name (first occurrence)
desc_by_name={}
for nm, desc, path in entries:
if nm not in desc_by_name:
desc_by_name[nm]=desc
for nm, mdesc in manifest_by_name.items():
if nm in desc_by_name:
found_entries+=1
if (mdesc or "") != (desc_by_name[nm] or ""):
mismatches.append((nm, mdesc, desc_by_name[nm], mf))
# also count how many plugin names matched
# Output results
print(f"Manifest plugins found: {len(manifest_by_name)}")
print(f"Marketplace.json files found: {len(marketplaces)}")
print(f"Marketplace entries matched to manifests: {found_entries}")
print("---- mismatches (up to 50) ----")
for i,(nm, mdesc, pdesc, mf) in enumerate(mismatches[:50], 1):
print(f"{i}) {nm} @ {mf}")
print(" manifest description:", (mdesc or "")[:200].replace("\n","\\n"))
print(" marketplace description:", (pdesc or "")[:200].replace("\n","\\n"))
print(f"Total mismatches: {len(mismatches)}")
PYRepository: LING71671/Open-ClaudeCode Length of output: 1052 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- locate marketplace.json anywhere in repo ----"
fd -t f 'marketplace.json' .
echo "---- search for plugin-dev in any marketplace.json ----"
fd -t f 'marketplace.json' . | xargs -I{} sh -c 'echo "== {} =="; rg -n "\"plugin-dev\"" "{}" || true'
echo "---- search for marketplace.json under any .claude-plugin dirs ----"
fd -t f 'marketplace.json' . -g '*.json' -E node_modules . || true
echo "---- locate any .claude-plugin/marketplace.json specifically ----"
fd -t f 'marketplace.json' . -E node_modules | rg -n "\\.claude-plugin/marketplace\\.json$" || trueRepository: LING71671/Open-ClaudeCode Length of output: 381 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- fd for marketplace.json (include hidden) ----"
fd -t f --hidden 'marketplace.json' . || true
echo "---- rg for 'marketplace.json' references (include hidden) ----"
rg -n --hidden --no-ignore -S 'marketplace\.json' . || true
echo "---- find any .claude-plugin/marketplace.* (include hidden) ----"
fd -t f --hidden '.*/.claude-plugin/marketplace.*' . || true
echo "---- list all .claude-plugin directories (include hidden) ----"
fd -t d --hidden '.claude-plugin' . || trueRepository: LING71671/Open-ClaudeCode Length of output: 50383 🏁 Script executed: #!/bin/bash
set -euo pipefail
echo "---- marketplace.json files (all) ----"
fd -t f --hidden 'marketplace.json' .
echo "---- plugin-dev entry excerpt from .claude-plugin/marketplace.json (lines 95-135, best-effort) ----"
mf=".claude-plugin/marketplace.json"
if [ -f "$mf" ]; then
awk '{print NR "\t" $0}' "$mf" | sed -n '95,135p'
else
echo "Missing $mf"
fi
echo "---- drift scan: manifest vs marketplace description ----"
python3 - <<'PY'
import json, os, sys
from pathlib import Path
def load_json(p):
with open(p, "r", encoding="utf-8") as f:
return json.load(f)
def find_manifest_plugins(root="plugins"):
out = {}
for p in Path(root).glob("*/.claude-plugin/plugin.json"):
try:
d = load_json(p)
name = d.get("name")
if name:
out[name] = d.get("description","") or ""
except Exception as e:
print(f"Failed to parse manifest {p}: {e}", file=sys.stderr)
return out
def collect_objects_with_keys(obj):
# returns list of tuples (name, description)
res=[]
def walk(x):
if isinstance(x, dict):
if "name" in x and "description" in x:
res.append((x.get("name"), x.get("description","") or ""))
for v in x.values():
walk(v)
elif isinstance(x, list):
for it in x:
walk(it)
walk(obj)
return res
manifest = find_manifest_plugins("plugins")
marketplace_files = []
for p in Path(".").rglob("marketplace.json"):
if ".git" in p.parts:
continue
marketplace_files.append(p)
mismatches=[]
matched=0
for mf in marketplace_files:
try:
data = load_json(mf)
except Exception as e:
print(f"Failed to parse marketplace {mf}: {e}", file=sys.stderr)
continue
entries = collect_objects_with_keys(data)
desc_by_name = {}
for nm, desc in entries:
if nm is None:
continue
if nm not in desc_by_name:
desc_by_name[nm] = (desc or "")
for nm, mdesc in manifest.items():
if nm in desc_by_name:
matched += 1
if (mdesc or "") != (desc_by_name.get(nm) or ""):
mismatches.append((nm, str(mf), mdesc or "", desc_by_name[nm] or ""))
# done
print(f"Manifest plugins found: {len(manifest)}")
print(f"Marketplace.json files found: {len(marketplace_files)}")
print(f"Matched manifest->marketplace entries: {matched}")
print(f"Mismatches (manifest description != marketplace description): {len(mismatches)}")
# Show up to 20 mismatches
for i, (nm, mf, mdesc, pdesc) in enumerate(mismatches[:20], 1):
print(f"{i}) {nm} @ {mf}")
print(f" manifest description: {mdesc[:160].replace(chr(10),'\\n')}")
print(f" marketplace description: {pdesc[:160].replace(chr(10),'\\n')}")
PYRepository: LING71671/Open-ClaudeCode Length of output: 2336 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json
from pathlib import Path
def load_json(p):
with open(p, "r", encoding="utf-8") as f:
return json.load(f)
def manifest_descriptions():
out = {}
for p in Path("plugins").glob("*/.claude-plugin/plugin.json"):
try:
d = load_json(p)
name = d.get("name")
if name:
out[name] = d.get("description") or ""
except Exception as e:
print(f"Failed to parse manifest {p}: {e}")
return out
def collect_objects_with_keys(obj, acc=None):
if acc is None:
acc = []
if isinstance(obj, dict):
if "name" in obj and "description" in obj:
acc.append((obj.get("name"), obj.get("description") or ""))
for v in obj.values():
collect_objects_with_keys(v, acc)
elif isinstance(obj, list):
for it in obj:
collect_objects_with_keys(it, acc)
return acc
manifest = manifest_descriptions()
marketplace_files = [p for p in Path(".").rglob("marketplace.json") if ".git" not in p.parts]
mismatches = []
matched = 0
for mf in marketplace_files:
try:
data = load_json(mf)
except Exception as e:
print(f"Failed to parse marketplace {mf}: {e}")
continue
entries = collect_objects_with_keys(data)
desc_by_name = {}
for nm, desc in entries:
if nm is None:
continue
if nm not in desc_by_name:
desc_by_name[nm] = desc
for nm, mdesc in manifest.items():
if nm in desc_by_name:
matched += 1
pdesc = desc_by_name.get(nm) or ""
if (mdesc or "") != pdesc:
mismatches.append((nm, str(mf), mdesc, pdesc))
print(f"Manifest plugins found: {len(manifest)}")
print(f"Marketplace.json files found: {len(marketplace_files)}")
print(f"Matched manifest->marketplace entries: {matched}")
print(f"Mismatches: {len(mismatches)}")
# show the plugin-dev mismatch and then a few others
def show_one(i):
nm, mf, mdesc, pdesc = mismatches[i]
def esc(s): return s[:160].replace("\n","\\n")
print(f"\n{i+1}) {nm} @ {mf}")
print(f" manifest description: {esc(mdesc)}")
print(f" marketplace description: {esc(pdesc)}")
# prioritize plugin-dev
idxs = [i for i,(nm,_,_,_) in enumerate(mismatches) if nm=="plugin-dev"]
if idxs:
show_one(idxs[0])
for i in range(len(mismatches)):
nm, _, _, _ = mismatches[i]
if nm=="plugin-dev":
continue
if mismatches and len([x for x in mismatches if x[0]=="plugin-dev"])==0:
pass
# show up to 10 non-plugin-dev mismatches
if sum(1 for x in mismatches[:i] if x[0]!="plugin-dev") >= 10:
break
# just show next few
PYRepository: LING71671/Open-ClaudeCode Length of output: 599 🏁 Script executed: #!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json
from pathlib import Path
def load_json(p):
with open(p, "r", encoding="utf-8") as f:
return json.load(f)
def manifest_descriptions():
out = {}
for p in Path("plugins").glob("*/.claude-plugin/plugin.json"):
d = load_json(p)
name = d.get("name")
if name:
out[name] = d.get("description","") or ""
return out
def collect_objects_with_keys(obj, acc):
if isinstance(obj, dict):
if "name" in obj and "description" in obj:
acc.append((obj.get("name"), obj.get("description") or ""))
for v in obj.values():
collect_objects_with_keys(v, acc)
elif isinstance(obj, list):
for it in obj:
collect_objects_with_keys(it, acc)
manifest = manifest_descriptions()
marketplace_files = [p for p in Path(".").rglob("marketplace.json") if ".git" not in p.parts]
assert marketplace_files, "No marketplace.json found"
mismatches=[]
for mf in marketplace_files:
data = load_json(mf)
entries=[]
collect_objects_with_keys(data, entries)
desc_by_name={}
for nm, desc in entries:
if nm not in desc_by_name:
desc_by_name[nm]=desc
for nm, mdesc in manifest.items():
if nm in desc_by_name and (mdesc or "") != (desc_by_name[nm] or ""):
mismatches.append((nm, str(mf)))
print("MISMATCH count:", len(mismatches))
print("MISMATCH names:", ", ".join([nm for nm,_ in mismatches]))
print("Has plugin-dev mismatch:", any(nm=="plugin-dev" for nm,_ in mismatches))
PY
# Find repo docs/schema language about marketplace entries allowing manifest fields
echo "---- rg: marketplace entry schema/docs ----"
rg -n "PluginMarketplaceEntrySchema|marketplace entry|Prefer marketplace.json over plugin.json|description.*marketplace" src/utils/plugins/validatePlugin.ts src/utils/plugins/schemas.ts src/utils/plugins/pluginLoader.ts src/utils/plugins/marketplaceManager.ts || true
echo "---- show validatePlugin lines around 'Prefer marketplace.json over plugin.json' ----"
rg -n "Prefer marketplace\\.json over plugin\\.json" -n src/utils/plugins/validatePlugin.ts
python3 - <<'PY'
import subprocess, re, os, textwrap, sys
# Extract the block around the match line number from validatePlugin.ts
import pathlib
p=pathlib.Path("src/utils/plugins/validatePlugin.ts")
s=p.read_text(encoding="utf-8").splitlines()
# find match
for i,line in enumerate(s, start=1):
if "Prefer marketplace.json over plugin.json" in line:
start=max(1,i-20); end=min(len(s), i+20)
for j in range(start,end+1):
print(f"{j}\t{s[j-1]}")
break
PYRepository: LING71671/Open-ClaudeCode Length of output: 7245 Align plugin
"name": "plugin-dev",
"description": "Comprehensive toolkit for developing Claude Code plugins. Includes expert skills covering hooks, MCP integration, commands, agents, and best practices.",
"version": "0.1.0",…but Repo-wide drift exists: 7 of 13 plugins have mismatched 🤖 Prompt for AI Agents |
||
| "author": { | ||
| "name": "Daisy Hollman", | ||
| "email": "daisy@anthropic.com" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not commit npm cacache artifacts with machine-specific absolute paths.
This file is generated cache state and includes a local absolute path (
E:/...). It should be removed from version control and ignored to avoid noisy diffs and environment leakage.Suggested cleanup
📝 Committable suggestion
🤖 Prompt for AI Agents