Populate up to 3 queries and run multi-search aggregation: From the repomix tech-stack, craft at most 3 queries — they should target domain-relevant skills (e.g., skill systems, extension patterns, package management, skill authoring, configuration management). Avoid queries about tooling, CI, testing, or generic AI/LLM topics unless they match a unique project need. Execute the script below.
QUERIES=(
"skill system"
"extension pattern"
"configuration management"
)
RESULTS_DIR=$(mktemp -d)
ALL="$RESULTS_DIR/_all.json"
echo '[]' > "$ALL"
echo "=== Running ${#QUERIES[@]} targeted searches ==="
for q in "${QUERIES[@]}"; do
safe=$(echo "$q" | tr -s ' /' '_')
out="$RESULTS_DIR/$safe.json"
echo " Searching: $q"
skillshare search "$q" --json --limit 10 > "$out" 2>/dev/null
if [[ $? -ne 0 || ! -s "$out" ]]; then
echo " ⚠ Empty"
continue
fi
is_valid=$(jq 'if type == "array" and length > 0 then true else false end' "$out" 2>/dev/null)
if [[ "$is_valid" != "true" ]]; then
echo " ⚠ No results"
continue
fi
jq --arg q "$q" '[.[] | . + {_source: $q}]' "$out" > "${out}.tagged" 2>/dev/null
jq -s 'add' "$ALL" "${out}.tagged" > "${ALL}.tmp" 2>/dev/null && mv "${ALL}.tmp" "$ALL"
done
echo ""
echo "=== Aggregating and deduplicating ==="
AGGREGATED="$RESULTS_DIR/aggregated.json"
jq '
group_by(.Name)
| map(
first as $orig
| {
name: $orig.Name,
description: $orig.Description,
stars: ($orig.Stars // 0),
owner: $orig.Owner,
source: $orig.Source,
repo: $orig.Repo,
tags: $orig.Tags // [],
matched_by: [.[] | ._source] | unique
}
)
| sort_by(-.stars)
| to_entries
| map(.key += 1 | { rank: .key, name: .value.name, description: .value.description, stars: .value.stars, owner: .value.owner, source: .value.source, repo: .value.repo, tags: .value.tags, matched_by: .value.matched_by })
' "$ALL" > "$AGGREGATED" 2>/dev/null
if [[ ! -s "$AGGREGATED" ]]; then
echo "No valid results could be aggregated."
cat "$ALL" 2>/dev/null | head -c 2000 || true
rm -rf "$RESULTS_DIR"
exit 1
fi
echo ""
echo "╔══════════════════════════════════════════════════════════╗"
echo "║ SKILLSHARE RECOMMENDATIONS ║"
echo "╚══════════════════════════════════════════════════════════╝"
jq -r '
.[] |
"\(.rank). \(.name)
⭐ \(.stars) stars | Owner: \(.owner // "?")
\(.description // "(no description)")
Matched by: \(if (.matched_by | length) > 0 then (.matched_by | join(", ")) else "direct search" end)
"' "$AGGREGATED" 2>&1 | head -120
cp "$AGGREGATED" ".skillshare/skills/<repo name>/aggregated-results.json"
echo ""
echo "Full results saved to: .skillshare/skills/<repo name>/aggregated-results.json"
rm -rf "$RESULTS_DIR"