Project Hub scaffold
Reuse an existing Project Hub engine: a local filesystem scanner and vanilla-JS
explorer. Find the checkout containing Hub/hub.mjs and Hub/index.html from the
user's context; ask for its location only if it cannot be found. Do not reconstruct
the engine from screenshots. Read its README and config reference.
The engine is the source of truth if this reference has drifted.
Choose the mode
- A — add a workspace (default). Add
Projects/<Name>/hub.config.json to the
existing installation. One server scans all projects and shared roots. No new
port, launcher, engine copy, or hub-switcher entry is needed.
- B — portable installation. Use when the project must carry its own engine.
Copy the complete runtime and tests into
Hub/, the launcher and example into
Project-Hub/, and create Projects/<Name>/. Each machine supplies its own
ignored configs. Independent copies need their own future engine updates.
- C — visual match. For an explicitly static page, read the
design system and reuse the actual theme and
layout from
Hub/index.html. Explain that scanning, native launch actions,
previews, and server-backed search require A or B.
Workflow
- Inspect the existing server config, project configs, and target folder. Preserve
existing work. Project display names and folders must be unique;
dir must
exist. Choose either repo groups or a path prefix ending in /, or omit scope.
- Run scripts/scaffold-hub.ps1 for A or B. It refuses
existing destinations. A writes only a project config. B copies an allowlist of
engine files, license, launchers and examples; it never copies scan output,
credentials, personal configs, screenshots, or design archives.
- In B, select an available port and
base; shared roots default to empty. Verify
the configured port is free before starting. Roots come from configuration and
user runtimes use the current home directory: do not edit source constants for
machine paths. The runtime scans supported user-scope agent folders as well as
configured roots; disclose that scope to the user.
- Run
npm test from Hub/. Fresh clones validate example shapes without needing
personal configs; installed configs are checked when present. Separately check
all configured directories exist. Tests do not prove a port is free or a page works.
- New project configs are discovered at startup. Restart the existing server
through
Project-Hub/Start-Hub.ps1 -Restart -NoBrowser when authorized by the
setup task, then check /api/health and /api/scan. Use the configured port.
Never terminate a foreign process to claim a port.
- Verify the Projects landing page, target workspace, sidebar, search, a rendered
document, and Back/Forward in a browser. Use a temporary fixture installation
for script validation; do not start a second scanner over real private roots.
- Link the skill and setup instructions from the project's README. Keep personal
roots, ports in instance inventories, and editor wiring in ignored local files.
Scheduled tasks and workspace auto-start are optional integrations, not actions
every scaffold should install. Public source publication is separate from
exposing the local server over a network.
Helper usage
PowerShell 7; use paths appropriate to the user's machine:
# A: mount another workspace in the shared process
./scripts/scaffold-hub.ps1 -HubDesignRoot C:/Tools/ProjectHub `
-Name Demo -Dir C:/Work/Projects/Demo -RepoScopePathPrefix Repos/
# B: new standalone installation (destination must not exist)
./scripts/scaffold-hub.ps1 -HubDesignRoot C:/Tools/ProjectHub `
-Name Demo -Dir C:/Work/Projects/Demo -Standalone `
-TargetDir C:/Tools/DemoHub -Base C:/Work -Port 4400
Current behavior to preserve
Read current features when extending or checking
an installation. It covers the shared Projects landing page, lazy Pictures,
sandboxed HTML/PDF report reading, search and heading routes, bookmarks and Recent,
folder sorting, Markdown reader tools, help panels, and watchdog behavior.
Read the design reference only for UI work; adding a workspace needs no UI edit.
Avoid
- Creating
Project-Hub-<Name> and a separate server per workspace: that is the retired layout.
- Copying only
hub.mjs and index.html: the runtime imports other modules.
- Hardcoding an owner's drive, user profile, scheduled-task name, or project list.
- Committing
hub.config.json, scan.json, logs, or private design exports.
- Claiming current-file sanitization also removes Git history or hosted attachments.
- Claiming browser checks, native launches, or scheduled tasks passed without executing them.
1---2title: "💻 project-hub-scaffold"3name: project-hub-scaffold4description: >-5 Stand up a browsable HTML console over a folder of project documents — Project Hub6 is a zero-dependency Node server plus a static explorer that turns any workspace7 into a clickable document tree in the browser, with no build step and no install.8 Use when asked to add a workspace to an existing Project Hub, scaffold a fresh9 portable installation of the server and explorer, build a document browser or docs10 console for a project, or match an existing Hub page's theme, sidebar tree and11 navigation. Source: github.com/ai-automation-tools/project-hub (MIT).12tags: ["skill","development","web-development","agent-skills"]13upstream:14 match: exact15 repo: ai-automation-tools/agent-skills16 path: skills/core/web/project-hub-scaffold/SKILL.md17 ref: 6f36b558eb82b55e9a68814da0941dd968dfe5f718 checked: 2026-10-2119metadata:20 source: https://skillmd.com/skills/michaelschecht/project-hub-scaffold21---2223# Project Hub scaffold2425Reuse an existing Project Hub engine: a local filesystem scanner and vanilla-JS26explorer. Find the checkout containing `Hub/hub.mjs` and `Hub/index.html` from the27user's context; ask for its location only if it cannot be found. Do not reconstruct28the engine from screenshots. Read its README and [config reference](references/config-schema.md).29The engine is the source of truth if this reference has drifted.3031## Choose the mode3233- **A — add a workspace (default).** Add `Projects/<Name>/hub.config.json` to the34 existing installation. One server scans all projects and shared roots. No new35 port, launcher, engine copy, or hub-switcher entry is needed.36- **B — portable installation.** Use when the project must carry its own engine.37 Copy the complete runtime and tests into `Hub/`, the launcher and example into38 `Project-Hub/`, and create `Projects/<Name>/`. Each machine supplies its own39 ignored configs. Independent copies need their own future engine updates.40- **C — visual match.** For an explicitly static page, read the41 [design system](references/design-system.md) and reuse the actual theme and42 layout from `Hub/index.html`. Explain that scanning, native launch actions,43 previews, and server-backed search require A or B.4445## Workflow46471. Inspect the existing server config, project configs, and target folder. Preserve48 existing work. Project display names and folders must be unique; `dir` must49 exist. Choose either repo groups or a path prefix ending in `/`, or omit scope.502. Run [scripts/scaffold-hub.ps1](scripts/scaffold-hub.ps1) for A or B. It refuses51 existing destinations. A writes only a project config. B copies an allowlist of52 engine files, license, launchers and examples; it never copies scan output,53 credentials, personal configs, screenshots, or design archives.543. In B, select an available port and `base`; shared roots default to empty. Verify55 the configured port is free before starting. Roots come from configuration and56 user runtimes use the current home directory: do not edit source constants for57 machine paths. The runtime scans supported user-scope agent folders as well as58 configured roots; disclose that scope to the user.594. Run `npm test` from `Hub/`. Fresh clones validate example shapes without needing60 personal configs; installed configs are checked when present. Separately check61 all configured directories exist. Tests do not prove a port is free or a page works.625. New project configs are discovered at **startup**. Restart the existing server63 through `Project-Hub/Start-Hub.ps1 -Restart -NoBrowser` when authorized by the64 setup task, then check `/api/health` and `/api/scan`. Use the configured port.65 Never terminate a foreign process to claim a port.666. Verify the Projects landing page, target workspace, sidebar, search, a rendered67 document, and Back/Forward in a browser. Use a temporary fixture installation68 for script validation; do not start a second scanner over real private roots.697. Link the skill and setup instructions from the project's README. Keep personal70 roots, ports in instance inventories, and editor wiring in ignored local files.71 Scheduled tasks and workspace auto-start are optional integrations, not actions72 every scaffold should install. Public source publication is separate from73 exposing the local server over a network.7475## Helper usage7677PowerShell 7; use paths appropriate to the user's machine:7879```powershell80# A: mount another workspace in the shared process81./scripts/scaffold-hub.ps1 -HubDesignRoot C:/Tools/ProjectHub `82 -Name Demo -Dir C:/Work/Projects/Demo -RepoScopePathPrefix Repos/8384# B: new standalone installation (destination must not exist)85./scripts/scaffold-hub.ps1 -HubDesignRoot C:/Tools/ProjectHub `86 -Name Demo -Dir C:/Work/Projects/Demo -Standalone `87 -TargetDir C:/Tools/DemoHub -Base C:/Work -Port 440088```8990## Current behavior to preserve9192Read [current features](references/current-features.md) when extending or checking93an installation. It covers the shared Projects landing page, lazy Pictures,94sandboxed HTML/PDF report reading, search and heading routes, bookmarks and Recent,95folder sorting, Markdown reader tools, help panels, and watchdog behavior.96Read the design reference only for UI work; adding a workspace needs no UI edit.9798## Avoid99100- Creating `Project-Hub-<Name>` and a separate server per workspace: that is the retired layout.101- Copying only `hub.mjs` and `index.html`: the runtime imports other modules.102- Hardcoding an owner's drive, user profile, scheduled-task name, or project list.103- Committing `hub.config.json`, `scan.json`, logs, or private design exports.104- Claiming current-file sanitization also removes Git history or hosted attachments.105- Claiming browser checks, native launches, or scheduled tasks passed without executing them.