How cosmicstack-labs/mercury-agent-skills works
1. What this repo is
Mercury Skills is a content registry, not an application with business logic. The primary artifacts are hundreds of standalone SKILL.md playbooks organized by category. These are meant to be consumed directly by AI agent runtimes, including Mercury, Claude Code, Codex CLI, OpenClaw, Hermes, Cursor, and Gemini CLI.
2. Source-of-truth content layer
The core repository structure is categories/<category>/<skill>/SKILL.md. Each skill is a single Markdown document with YAML frontmatter plus the instructional body. This makes the repository a mostly static, file-based knowledge library where each skill is independently installable and versionable.
3. Taxonomy and navigation boundaries
Categories are the main organizational boundary: AI/ML, backend, frontend, DevOps, automation, media download, PDF generation, etc. The category folders provide the human and machine-readable grouping used by the catalog, browse UI, and CLI search/install flows. CATALOG.md acts as the full index over this taxonomy.
4. Generated registry data
docs/data/skills.json is the compiled registry dataset used by the website. The presence of scripts/build_data.py strongly suggests a build step that scans the category tree and extracts frontmatter/content metadata into a single machine-readable index. This is the main transformation boundary between authored markdown and consumable site data.
5. Static browse-and-install web surface
The docs/ directory is a client-side web app / static site: index.html, app.js, style.css, and bundled data under docs/data/. It powers browsing, search, per-skill detail pages, install instructions, leaderboard-like views, and shareable metadata. Architecturally, it is a read-only presentation layer over generated JSON.
6. Distribution and consumption flows
There are two primary downstream consumption paths:
- Direct file consumption: users or agents clone the repo or install individual skill files into agent-specific skills directories.
- Registry/web consumption: the website and its JSON API surface provide searchable discovery and copy-paste install commands.
The repo is therefore both a source library and an install distribution format.
7. CLI and automation tooling
scripts/package.json, scripts/package-lock.json, and scripts/zomato-order.js indicate a small Node-based tooling surface for repository-related automation or demos. scripts/export-data.sh suggests shell-driven export/build orchestration, while scripts/build_data.py is the main data compilation utility. The tooling boundary is lightweight and exists to support publishing and data generation, not runtime serving.
8. Publishing/update pipeline
The README says new contributions land on skills.mercuryagent.sh “within the hour” via automated sync. That implies an external deployment pipeline that consumes this repo, rebuilds the registry data, and republishes the static site and JSON endpoints. The repo itself is the authoritative content source; the website is a derived deployment.
9. External services and runtime boundaries
The canonical web experience lives at skills.mercuryagent.sh, while mercuryagent.sh is the agent runtime ecosystem that consumes these skills. The repo does not appear to depend on a backend database or application server; its architecture is centered on static files plus generated data, with external services handling hosting and agent execution.
10. How to diagram it
A good architecture diagram should show:
- Authors/contributors editing SKILL.md files in category folders
- A build/export step that compiles repo contents into skills.json and related catalog artifacts
- A static docs site that reads the generated JSON and serves browsing/install UX
- Agent runtimes / CLI tools consuming individual SKILL.md files directly
- An automation/deployment pipeline syncing the repo to the public registry site
Overall, this repo is best modeled as a content registry with generated catalog data and a static discovery layer, rather than as an application with stateful services.
Main entry points: SKILL.md SKILL.md files · docs Docs Site · skills.json skills.json · build_data.py Build Data
Components 16
Skill Library
Authoritative SKILL.md playbooks organized by category.
- Categories · Top-level organization for skills across domains like backend, frontend, DevOps, and more.
categories - SKILL.md files · Standalone Markdown skill files with frontmatter and instructional content.
categories/ai-ml/agent-audit-logging/SKILL.md - Catalog · Human-readable global index over the skill taxonomy.
CATALOG.md - README · Repository overview, contribution guidance, and publishing context.
README.md
Catalog Pipeline
Indexing and compilation from authored markdown into machine-readable registry data.
- Build Data · Scans categories and extracts metadata into registry JSON.
scripts/build_data.py - skills.json · Compiled machine-readable skill registry used by the website.
docs/data/skills.json - Export Script · Shell-driven build/export entrypoint for repository data.
scripts/export-data.sh
Docs Site
Static browse-and-install experience backed by generated data.
- Docs Site · Client-side browsing and install UX for the registry.
docs - Index Page · Main HTML shell for the static registry UI.
docs/index.html - App Logic · Browser-side navigation, search, detail views, and install flows.
docs/app.js - Styles · Visual styling for the static docs experience.
docs/style.css
Automation Tools
Lightweight scripts and Node utilities supporting exports and demos.
- Package Config · Node-based tooling manifest for repository automation.
scripts/package.json - Lockfile · Pinned dependency state for the scripts tooling.
scripts/package-lock.json - Zomato Tool · Repository-specific Node automation/demo script.
scripts/zomato-order.js
Downstream Consumers
Agent runtimes and external deployment targets that use the registry.
- Agent Runtimes · External runtimes and CLIs that consume individual skill files directly.
- Public Site · External hosted registry experience that receives automated syncs.
Connections 17
- Categories → SKILL.md files: contains · Category folders organize the authored skill playbooks.
- SKILL.md files → Catalog: indexed by · The global catalog provides a navigable index over the skill set.
- SKILL.md files → Build Data: compiled by · Skill frontmatter and content are extracted into registry data.
- Categories → Build Data: scanned by · The compiler walks the category tree to build the dataset.
- Build Data → skills.json: produces · Compilation yields the machine-readable skills registry.
- Export Script → Build Data: orchestrates · Shell export wraps the Python compilation step.
- Export Script → skills.json: writes · Export flow generates or refreshes the registry artifact.
- skills.json → Docs Site: feeds · The static site reads generated registry data for browse and search.
- Docs Site → Index Page: starts with · The site is mounted from the main HTML entry point.
- Docs Site → App Logic: runs · Browser logic powers the interactive registry UI.
- Docs Site → Styles: styled by · Presentation layer is controlled by site styles.
- Package Config → Zomato Tool: defines · Node tooling manifest includes repository automation scripts.
- Package Config → Lockfile: locks · Dependency versions are pinned by the lockfile.
- Zomato Tool → Agent Runtimes: supports · Utility scripts complement downstream skill consumption flows.
- SKILL.md files → Agent Runtimes: consumed by · Agent runtimes install or read skills directly from markdown files.
- skills.json → Public Site: deployed to · Generated registry data is synced into the public hosted experience.
- README → Public Site: describes · Repository docs explain the external registry and sync behavior.