bedkillerspacex-boop/codex-skill-library/angular-ssr-hydration
Claude Code and agent skill by bedkillerspacex-boop/codex-skill-library
Trust tier 3
- community
Source check pending
Checking that the SKILL.md file is still in the repository.
Angular SSR and client hydration for owned apps: server rendering setup, hydration mismatches, TransferState, non-DOM browser APIs, and auth/cookie considerations on server. Use when enabling Universal/SSR, fixing flicker/mismatch errors, or securing SSR data paths — not for generic SPA-only security (see angular-security-basics).
Install
npx vskill@latest install bedkillerspacex-boop/codex-skill-library/angular-ssr-hydrationSKILL.md
The same SKILL.md was published earlier as bedkillerspacex-boop/codex-skill-library/angular-ssr-hydration.
Angular SSR & Hydration
Scope And Authorization
- In scope: Angular apps you operate where SSR/hydration is used or planned.
- Out of scope: Scraping third-party SSR pages; leaking server-only secrets to the client bundle.
- SSR runs code on the server — treat it as backend surface for secrets and SSRF.
- Pair with
angular-security-basicsandcode-quality-standards.
When To Use
- Enabling Angular Universal / SSR builders.
- Fixing hydration mismatch warnings/errors.
- Using
TransferStateto avoid double-fetch. - Debugging
window/documentaccess breaking SSR.
Do Not Use As Primary
| Need | Skill instead | |
|---|---|---|
| Client XSS/CSRF/auth interceptors | angular-security-basics | |
| Signals state | angular-signals-basics | |
| Node SSR host hardening broadly | server/security skills | |
| Implementation quality baseline | code-quality-standards |
Domain Focus
| Concept | Detail | |
|---|---|---|
| SSR | Render HTML on server for first paint/SEO | |
| Hydration | Client attaches to existing DOM | |
| Mismatch | Server HTML ≠ client first render → bugs/re-render | |
| TransferState | Serialize server-fetched data for client reuse | |
| Platform checks | isPlatformBrowser / isPlatformServer | |
| Auth | Cookies available on server carefully; no secret keys in client |
Workflow
1. Confirm goals and success criteria
- Record Angular version, hosting (Node, Firebase, custom), SEO needs.
- Success: SSR HTML correct; hydration without mismatch; TTFB acceptable; no secrets in payload.
- Identify pages needing SSR vs client-only.
2. Enable SSR toolchain
- Pin versions; follow official migration for hydration APIs.
- Configure production reverse proxy to Node server if used.
3. Eliminate non-portable DOM use
| Problem | Fix | |
|---|---|---|
window at construct | Guard or afterNextRender | |
| Random IDs differ | Stable IDs from data | |
| Time-dependent text | Same clock source / skip in SSR | |
| Locale differ | Align server/client locale |
4. Data fetching and TransferState
- Do not put secrets or PII-heavy blobs into TransferState unnecessarily.
- Ensure API base URL works on server (absolute URL / internal network carefully — SSRF risk).
5. Auth and cookies on SSR
- Forward cookies only to trusted own APIs.
- Never embed refresh tokens in HTML.
- Personalized pages: consider
Cache-Control: privateto avoid CDN leaking user HTML.
6. Hydration debugging
| Symptom | Checks | |
|---|---|---|
| Content jump | Mismatch text/structure | |
| Double HTTP | TransferState missing | |
| Flash unstyled | CSS order / critical CSS | |
| Auth wrong user | Cache personalization bug |
7. Verify and hand off
- Document which routes are SSR.
- Monitor server error rates and memory (SSR leaks).
- Security review of server-side HTTP client.
Good / Bad
| Topic | Good | Bad | |
|---|---|---|---|
| DOM APIs | Platform guards | Assume browser globals on server | |
| Cache | Private for personalized SSR | CDN cache user dashboards publicly | |
| State transfer | Public data only | API keys in TransferState | |
| Hydration | Stable render | Random UIDs each side |
Output Checklist
- [ ] SSR enabled with pinned versions
- [ ] Browser-only APIs guarded
- [ ] TransferState used where beneficial
- [ ] Auth/cookie/caching model safe
- [ ] Hydration mismatches resolved on critical routes
- [ ] Server API calls SSRF-safe
- [ ] Build/test green
- [ ]
code-quality-standards+ security skill applied
Rules
- Owned apps only.
- SSR is a server: protect secrets and outbound requests.
- Prefer stable, deterministic renders for hydration.
- Do not cache personalized HTML on shared CDNs.
- Keep client security practices from
angular-security-basics.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingangular-ssr-hydration/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/bedkillerspacex-boop/codex-skill-library/angular-ssr-hydration)