Skip to content

Add static skill browser UI at /docs - #67

Open
yalbantov85 wants to merge 2 commits into
mukul975:mainfrom
yalbantov85:feat/skill-browser
Open

Add static skill browser UI at /docs#67
yalbantov85 wants to merge 2 commits into
mukul975:mainfrom
yalbantov85:feat/skill-browser

Conversation

@yalbantov85

Copy link
Copy Markdown

Summary

  • Adds a single-page, dependency-free browser for the 754-skill catalogue, deployable via GitHub Pages from /docs with no build step
  • New tools/build-browser-data.py aggregates SKILL.md frontmatter + the MITRE ATT&CK Navigator layer into docs/data.json
  • .github/workflows/update-index.yml extended to keep docs/data.json in sync alongside index.json on every push that touches skills/**
  • UX features: filter by subdomain / tag / framework, full-text search across name/description/tags/technique IDs, URL hash state for shareable filtered views, keyboard navigation, active-filter chips, search-within-filter, pretty-formatted skill names with security acronym preservation (JWT, SOC, SIEM, ATT&CK, …), match highlighting

How to preview

python3 tools/build-browser-data.py
python3 -m http.server --directory docs 8000
# open http://localhost:8000

To deploy after merge: Settings → Pages → Source: Deploy from a branch → main / /docs. Pages auto-serves the static site at https://mukul975.github.io/Anthropic-Cybersecurity-Skills/.

Test plan

  • python3 tools/build-browser-data.py runs from repo root and emits docs/data.json with 754 skills
  • Open docs/index.html via a local HTTP server — search, subdomain, tag, and framework filters all narrow results
  • URL hash updates on filter change; reloading the page restores the filtered view (#sub=cloud-security&q=lateral)
  • / walks the result list; Enter opens the first result when nothing is active
  • Active-filter chips appear above the results; clicking the × on a chip removes only that filter
  • Existing validate-skills.yml workflow still passes on this branch
  • update-index.yml workflow commits both index.json and docs/data.json on the next skills/** change

Notes for review

  • All HTML insertion uses document.createElement + .textContent (no innerHTML). XSS-safe by construction even if a future PR adds adversarial frontmatter content.
  • No new runtime dependencies; the data builder uses only the Python stdlib.
  • docs/data.json is treated like index.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

yalbantov85 and others added 2 commits May 28, 2026 10:11
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 mukul975 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, zero innerHTML — and the comment in highlightInto() 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.json on 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.

@mukul975

Copy link
Copy Markdown
Owner

One thing before merge: both commits include Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>. Please squash to a single commit and remove that line — attribution should be yours only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants