reverse-skills-max: initial public release (restored, redacted, hardened)

This commit is contained in:
baradok609hecl1pq6qi
2026-10-20 02:17:15 +03:00
commit da24c2bd20
2227 changed files with 443931 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
name: Sync Marketplace Version on Release
on:
release:
types: [published]
jobs:
sync-version:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: main
fetch-depth: 0
- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF_NAME#v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "tag=$GITHUB_REF_NAME" >> $GITHUB_OUTPUT
- name: Update marketplace.json and plugin.json version
env:
VERSION: ${{ steps.version.outputs.version }}
run: |
jq --arg v "$VERSION" '.metadata.version = $v | .plugins[].version = $v' .claude-plugin/marketplace.json > tmp.json
mv tmp.json .claude-plugin/marketplace.json
jq --arg v "$VERSION" '.version = $v' .claude-plugin/plugin.json > tmp.json
mv tmp.json .claude-plugin/plugin.json
echo "Updated marketplace.json and plugin.json to version $VERSION"
- name: Commit and push
run: |
git config user.name "mukul975"
git config user.email "mukuljangra5@gmail.com"
git add .claude-plugin/marketplace.json .claude-plugin/plugin.json
git diff --staged --quiet || git commit -m "chore: bump plugin version to ${{ steps.version.outputs.tag }}"
git push origin HEAD:main

View File

@@ -0,0 +1,44 @@
name: Update contributors
on:
push:
branches: [main]
schedule:
# GitHub's contributors API is cached and lags a merge by up to ~24h, so a
# weekly pass catches anyone the push-triggered run was too early to see.
- cron: '17 4 * * 1'
workflow_dispatch:
# Only one run at a time; a burst of merges must not race on README.md.
concurrency:
group: update-contributors
cancel-in-progress: false
jobs:
update:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Regenerate the contributor wall
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python3 tools/update-contributors.py
- name: Commit if it changed
run: |
git config user.name "mukul975"
git config user.email "mukuljangra5@gmail.com"
git add README.md
if git diff --staged --quiet; then
echo "No new contributors."
exit 0
fi
git commit -m "chore: update contributor wall"
# Another workflow (update-index) may have pushed while this ran.
git pull --rebase --autostash origin main
git push

View File

@@ -0,0 +1,79 @@
name: Update marketplace index
on:
push:
branches: [main]
paths:
- 'skills/**'
- '.github/workflows/update-index.yml'
workflow_dispatch:
jobs:
update-index:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: pip install pyyaml
# Generation lives in tools/generate-index.py so it is testable outside CI
# and shares one PyYAML-backed frontmatter parser with the validators.
# The previous inline regex parser silently truncated 604/817 descriptions
# to their first line for every YAML scalar style except '>'/'|'.
- name: Regenerate index.json
run: python3 tools/generate-index.py
- name: Sync skill count into README and marketplace
run: |
python3 << 'EOF'
import os, re, json
# Authoritative count: directories under skills/ that contain a SKILL.md
# and are not .bak backups (matches index.json generation above).
count = 0
for name in os.listdir("skills"):
if name.endswith(".bak"):
continue
if os.path.isfile(os.path.join("skills", name, "SKILL.md")):
count += 1
print(f"Authoritative skill count: {count}")
# README.md — replace the skills badge and every "<NNN> ... skills" phrase.
with open("README.md", encoding="utf-8") as f:
readme = f.read()
readme = re.sub(r"(badge/skills-)\d+", rf"\g<1>{count}", readme)
# "817 production-grade", "817 structured", "817 skills", "all 817 skills",
# "Scans 817 skill", "contains **817 skills**", BibTeX "{817 structured"
readme = re.sub(r"\b\d+(?=\s+production-grade cybersecurity skills)", str(count), readme)
readme = re.sub(r"\b\d+(?=\s+structured cybersecurity skills)", str(count), readme)
readme = re.sub(r"(all\s+)\d+(?=\s+skills)", rf"\g<1>{count}", readme)
readme = re.sub(r"(Scans\s+)\d+(?=\s+skill\b)", rf"\g<1>{count}", readme)
readme = re.sub(r"(contains\s+\*\*)\d+(?=\s+skills\*\*)", rf"\g<1>{count}", readme)
readme = re.sub(r"(\{)\d+(?=\s+structured cybersecurity skills)", rf"\g<1>{count}", readme)
with open("README.md", "w", encoding="utf-8") as f:
f.write(readme)
# marketplace.json + plugin.json — patch "<NNN> cybersecurity skills" in descriptions.
for path in (".claude-plugin/marketplace.json", ".claude-plugin/plugin.json"):
with open(path, encoding="utf-8") as f:
data = f.read()
data = re.sub(r"\b\d+(?=\s+cybersecurity skills)", str(count), data)
json.loads(data) # fail loudly if the regex broke JSON
with open(path, "w", encoding="utf-8") as f:
f.write(data)
print("Synced skill count into README.md, marketplace.json, plugin.json")
EOF
- name: Commit updated index and skill count
run: |
git config user.name "mukul975"
git config user.email "mukuljangra5@gmail.com"
git add index.json README.md .claude-plugin/marketplace.json .claude-plugin/plugin.json
git diff --staged --quiet || git commit -m "chore: auto-update index.json and skill count"
git push

View File

@@ -0,0 +1,126 @@
name: Validate SKILL.md files
on:
push:
paths:
- 'skills/**'
- 'tools/**'
- '.github/workflows/validate-skills.yml'
pull_request:
paths:
- 'skills/**'
- 'tools/**'
- '.github/workflows/validate-skills.yml'
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-latest
name: Validate SKILL.md frontmatter
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: pip install pyyaml
# All frontmatter is parsed by tools/skill_frontmatter.py (PyYAML). Any
# reintroduced regex parser silently truncates multi-line descriptions --
# that bug shipped 604/817 broken descriptions before it was caught.
- name: Guard against hand-rolled YAML parsers
run: |
if grep -rnE '(re\.(search|match|compile)\([^)]*description|^\s*description:.*\(\.\*\))' \
tools/ --include='*.py' ; then
echo "::error::Regex-based frontmatter parsing detected. Use tools/skill_frontmatter.py."
exit 1
fi
echo "OK: no regex frontmatter parsers"
# Single source of truth: tools/validate-skill.py validates required
# frontmatter fields, kebab-case name, description length, subdomain, and
# tag count. (Previously this step duplicated a weaker inline parser.)
- name: Validate SKILL.md frontmatter
run: python3 tools/validate-skill.py --all
# agentskills.io conformance: name==directory, 1..1024 description,
# reserved-word ban, angle-bracket injection check.
- name: Validate agentskills.io conformance
run: python3 tools/validate-agentskills.py --strict
# index.json is generated; a PR that changes a description must regenerate it.
# Pull requests only: on a push to main, update-index.yml regenerates
# index.json in parallel with this job, so checking here would race and go
# red on every merge that adds a skill before self-healing seconds later.
- name: Check index.json is current
if: github.event_name == 'pull_request'
run: python3 tools/generate-index.py --check
# Description quality gate. Pre-existing failures are grandfathered in
# tools/lint-baseline.json so this blocks NEW debt only; the baseline is
# allowed to shrink and never to grow.
- name: Lint descriptions
run: python3 tools/lint-descriptions.py --all --stats
# Ratchet: the number of unreviewed near-duplicate description pairs may
# never increase. Lower this cap as disambiguation lands.
- name: Detect skill collisions
run: python3 tools/detect-collisions.py --max-unreviewed 55
- name: Check for duplicate skill names
run: |
python3 << 'EOF'
import os
import re
from collections import Counter
names = []
for root, dirs, files in os.walk('skills'):
for file in files:
if file == 'SKILL.md':
path = os.path.join(root, file)
with open(path, 'r', encoding='utf-8') as f:
content = f.read()
fm_match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if fm_match:
name_match = re.search(r'^name:\s*(.+)$', fm_match.group(1), re.MULTILINE)
if name_match:
names.append(name_match.group(1).strip().strip('"'))
duplicates = [name for name, count in Counter(names).items() if count > 1]
if duplicates:
print(f"❌ Duplicate skill names found: {duplicates}")
exit(1)
print(f"✅ No duplicate names in {len(names)} skills")
EOF
- name: Report skill counts
if: always()
run: |
echo "## Skill Database Stats" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
python3 << 'EOF'
import os
import re
from collections import Counter
subdomain_counts = Counter()
total = 0
for root, dirs, files in os.walk('skills'):
for file in files:
if file == 'SKILL.md':
total += 1
path = os.path.join(root, file)
with open(path, 'r', encoding='utf-8') as f:
content = f.read()
fm_match = re.match(r'^---\n(.*?)\n---', content, re.DOTALL)
if fm_match:
sd_match = re.search(r'^subdomain:\s*(.+)$', fm_match.group(1), re.MULTILINE)
if sd_match:
subdomain_counts[sd_match.group(1).strip()] += 1
print(f"**Total Skills: {total}**")
print("")
print("| Subdomain | Count |")
print("|-----------|-------|")
for sd, count in sorted(subdomain_counts.items(), key=lambda x: -x[1]):
print(f"| {sd} | {count} |")
EOF