.agents/skills/ssr-pipeline/SKILL.md
Trace or modify Madoc TS server-side rendering for site and admin. Use when changing SSR output, template injection, dev HMR SSR wiring, or debugging SSR redirects and template tokens in services/madoc-ts.
npx skillsauth add digirati-co-uk/madoc-platform ssr-pipelineInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Explain how server-side rendering is performed for site and admin, how SSR output is injected into HTML templates, and how dev-mode HMR SSR output is constructed.
services/madoc-ts/src/routes/frontend/site-frontend.tsservices/madoc-ts/src/routes/frontend/admin-frontend.tsservices/madoc-ts/src/site.htmlservices/madoc-ts/src/admin.htmlservices/madoc-ts/src/frontend/site/client.tsservices/madoc-ts/src/frontend/admin/client.tsxcontext.staticPage to an async renderer.render* function:
renderSite from src/frontend/site/serverrenderAdmin from src/frontend/admin/serverbody, head, htmlAttributes, and bodyAttributes.result.type === 'redirect', the handler returns a redirect (status result.status || 307) or a 404 if no to is provided.NODE_ENV === 'development', HTML is built inline with Vite HMR scripts and a dynamic host-based dev URL (port 3088).context.siteTemplate or context.adminTemplate is used, with token replacement:
<!--ssr-outlet--> replaced by result.body<!--ssr-head--> replaced by result.head<html> and <body> tags are replaced to include attributes from SSR output.site-frontend.ts and admin-frontend.ts to see how context.staticPage is set and how SSR results are injected.site.html and admin.html./src/frontend/site/client.ts/src/frontend/admin/client.tsxresult.type === 'redirect' and result.body/head expectations.@react-refresh and a viteProtocol derived from TLS certs at /home/node/app/openssl-certs.context.request.hostname.src/frontend/site/index.css in dev mode.<!--ssr-head-->, <!--ssr-outlet-->)result.head and result.body)result.head and result.body)tools
Work on Madoc TS shared utility helpers (JWT, metadata, errors, IIIF helpers, auth helpers). Use when changing core utility functions or shared helpers in services/madoc-ts.
development
Work on Madoc TS shared type definitions and schema contracts. Use when updating TypeScript types, JSON schema shapes, or cross-layer data contracts in services/madoc-ts.
tools
Understand and extend Madoc TS task automation, including bots and task-related extensions. Use when adding task automation, bot behavior, or task metadata resolution in services/madoc-ts.
development
Work on Madoc TS site SSR pipeline, HTML template injection, and site render data wiring. Use when changing site SSR behavior, template tokens, or site SSR data wiring in services/madoc-ts.