Add static skill browser UI at /docs - #67
Conversation
Adds a single-page browser UI for the 754-skill catalogue, deployable via GitHub Pages from /docs with no build step or external dependencies. - tools/build-browser-data.py: aggregates SKILL.md frontmatter and the ATT&CK Navigator layer into docs/data.json - docs/: vanilla HTML/CSS/JS browser with filtering by subdomain, tag, and framework; full-text search across name/description/tags/ technique IDs; URL hash state for shareable views; keyboard navigation through results - .github/workflows/update-index.yml: regenerates docs/data.json alongside index.json on every push that touches skills/**, the Navigator layer, or the build script Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ighlighting User-facing polish pass on the static browser: - Display skill names in Title Case with security acronyms preserved (JWT, ATT&CK, SOC, SIEM, …); kebab-case slug shown under the detail title for copy-paste discoverability - Active filter chips bar above the results, with per-chip × to remove individual filters without scrolling back to the sidebar - "Filter within" inputs above the subdomain and tag checkbox lists to narrow the 45+50 options by substring - Search-match highlighting in result names via <mark>, built with DOM nodes (no innerHTML) so it stays XSS-safe - × button inside the search input for one-click reset - "No matches" empty state now offers an inline "Clear all filters" button instead of being a dead end Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
mukul975
left a comment
There was a problem hiding this comment.
Tested locally — build runs clean, all 754 skills indexed, filters and search work correctly.
Wrote docs/data.json: 754 skills, 45 subdomains, 723.7 KB
Verified:
- XSS-safe throughout: all skill content rendered via
textContent/createTextNode, zeroinnerHTML— and the comment inhighlightInto()explicitly documents this - Build script handles missing/malformed frontmatter gracefully (bad file skipped, not a crash)
- All files opened
encoding="utf-8"explicitly - CI regenerates
docs/data.jsonon every skill push and commits it — no manual drift path - No external CDN dependencies, no SKILL.md content touched
One known limitation worth a follow-up issue: the frontmatter parser doesn't handle multi-line folded scalars (description: >- spanning multiple lines). Currently skills/performing-nist-csf-maturity-assessment/SKILL.md renders with a blank description in the browser because of this. The skill still appears in search results — it's cosmetic only — but worth fixing the parser to handle >/>- blocks so it stays consistent with validate-skill.py.
Approving. Great addition to the repo.
|
One thing before merge: both commits include |
Summary
/docswith no build steptools/build-browser-data.pyaggregatesSKILL.mdfrontmatter + the MITRE ATT&CK Navigator layer intodocs/data.json.github/workflows/update-index.ymlextended to keepdocs/data.jsonin sync alongsideindex.jsonon every push that touchesskills/**How to preview
python3 tools/build-browser-data.py python3 -m http.server --directory docs 8000 # open http://localhost:8000To deploy after merge: Settings → Pages → Source: Deploy from a branch →
main//docs. Pages auto-serves the static site athttps://mukul975.github.io/Anthropic-Cybersecurity-Skills/.Test plan
python3 tools/build-browser-data.pyruns from repo root and emitsdocs/data.jsonwith 754 skillsdocs/index.htmlvia a local HTTP server — search, subdomain, tag, and framework filters all narrow results#sub=cloud-security&q=lateral)↑/↓walks the result list;Enteropens the first result when nothing is activevalidate-skills.ymlworkflow still passes on this branchupdate-index.ymlworkflow commits bothindex.jsonanddocs/data.jsonon the nextskills/**changeNotes for review
document.createElement+.textContent(noinnerHTML). XSS-safe by construction even if a future PR adds adversarial frontmatter content.docs/data.jsonis treated likeindex.json— CI-managed, do not hand-edit. The PR includes a generated copy so reviewers can preview without running the script.🤖 Generated with Claude Code