[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B00H4V0RR2QQ3KBKWH64D2":3,"skill-same:01M7B00H4V0RR2QQ3KBKWH64D2":48},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":27,"commitSha":28,"skillDirectory":29,"forksCount":14,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7B00H4V0RR2QQ3KBKWH64D2","angular-mock-to-real-api",null,"Rewrite an Angular app's mocked\u002Fin-memory services to call a real backend API (HttpClient). Covers the predictable breakage chain — DTO\u002Fproperty renames that ripple into templates, duplicate interceptor\u002Fservice files that shadow the real implementation, and phantom TS errors from stale incremental build caches. Use when the user says \"connect the frontend to the real API\", \"kill the mocks\", or \"wire services to the backend\".","dbillion\u002Fhermes-skills-public","dbillion","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F49393855?v=4","01M7AVH8QPGCM8WKWS22TRT0T6","Oludayo Adeoye","01M7AVH8RD1JJWA0YS9CFEWAV9",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ffrontend\u002Fangular-mock-to-real-api\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: angular-mock-to-real-api\ndescription: Rewrite an Angular app's mocked\u002Fin-memory services to call a real backend API (HttpClient). Covers the predictable breakage chain — DTO\u002Fproperty renames that ripple into templates, duplicate interceptor\u002Fservice files that shadow the real implementation, and phantom TS errors from stale incremental build caches. Use when the user says \"connect the frontend to the real API\", \"kill the mocks\", or \"wire services to the backend\".\nlicense: MIT\nmetadata:\n  author: ks-knowledge-sharing project learnings\n  version: '1.0'\n---\n\n# Angular: Mock -> Real API\n\nRecurring task for this user (Angular 20 frontend over a NestJS API). The refactor is mechanical but the build breakage is a fixed set of traps — fix them all in one pass.\n\n## Sequence\n1. **Add an API config constant** (e.g. `src\u002Fapp\u002Fcore\u002Fconfig\u002Fapi.config.ts` exporting `API_CONFIG.baseUrl = 'http:\u002F\u002Flocalhost:3000\u002Fapi'`). Keep it out of components so you can swap to a deployed URL in one place.\n2. **Inject `HttpClient`** into each service and replace mock `of([...])` \u002F hardcoded arrays with real `http.get\u002Fpost\u002Fpatch`. Confirm `provideHttpClient()` is in `app.config.ts` (it usually is).\n3. **Align DTOs to the real response shape.** Inspect the live endpoint first:\n   `curl -s 'http:\u002F\u002Flocalhost:3000\u002Fapi\u002Farticles?limit=1'` — note exact field names and types. The backend field names are authoritative; change the Angular interface to match, not the other way around.\n4. **Map response -> component model** in the service (so components don't change), OR update components. Prefer mapping in the service to limit blast radius.\n\n## Trap 1 — property rename ripples into templates\nIf the backend renames a field (e.g. `categoryId` -> `category`, or changes type from number to UUID string), every `.categoryId` property access breaks — including in `.html` templates and `formValue.categoryId` passed to create calls.\n- Grep the whole `src` for the old name: `grep -rn \"categoryId\" src --include=*.ts --include=*.html`.\n- Fix property *reads* (`article.categoryId` -> `article.category`). Leave reactive-form `formControlName=\"categoryId\"` and `form.get('categoryId')` alone — those are control keys, not the article property.\n- Templates: `\u003Cimg [src]=\"getPlaceholderImage(article()!.categoryId)\">` -> `article()!.category`.\n\n## Trap 2 — duplicate interceptor\u002Fservice shadows the real one\nA project can have BOTH `auth.interceptor.ts` (Angular default, 444B, references a `refreshToken()` that no longer exists) AND `auth-interceptor.ts` (hyphen, the one `app.config.ts` actually imports). The unused one still gets compiled by `tsc` (`src\u002F**\u002F*.ts`) and throws a phantom error.\n- Find duplicates: `find src -name \"auth*.ts\"`.\n- Delete the dead duplicate (`rm` the hyphen file + its `.spec.ts`) if `app.config.ts` imports the other. The live error \"Property 'refreshToken' does not exist\" on a line number beyond the real file's length is the tell.\n\n## Trap 3 — phantom TS errors from stale incremental cache\nAfter fixing everything, `tsc --noEmit` \u002F `ng build` may STILL report errors that reference lines you already edited (e.g. \"categoryId does not exist\" on a line now reading `category`). This is stale `.tsbuildinfo` \u002F `.angular` cache.\n- Nuclear clear: `find . -name \"*.tsbuildinfo\" -not -path \"*\u002Fnode_modules\u002F*\" -delete; rm -rf .angular node_modules\u002F.cache; rm -rf dist`.\n- Then rebuild. If `ng build --no-aot` still fails, run `npx tsc --noEmit -p tsconfig.app.json` to get the true error list (bypasses the bundler).\n- A real syntax error (e.g. a dangling `)` left by a half-applied patch) will show as `TS1128`\u002F`TS1005` at a specific line — read that file region, don't trust the earlier phantom lines.\n\n## Verification\n- `npx tsc --noEmit -p tsconfig.app.json` must be clean (empty output).\n- `npx ng build --configuration development` must exit 0. Template *warnings* (e.g. `controlFlowPreventingContentProjection`) are non-blocking; only `error` lines block.\n- Optional runtime check: serve the app (`ng serve`) and confirm a component fetches from the live API (Network tab \u002F curl the served index). At minimum, confirm the service code references the real `API_CONFIG.baseUrl` + correct paths and the backend returns the expected shape.\n\n## Commit each slice\nPer the maker\u002Fchecker loop: after a verified build, commit the frontend wiring as its own commit before moving to the next screen\u002Ffeature. Don't batch unrelated slices.\n","# Angular: Mock -> Real API\n\nRecurring task for this user (Angular 20 frontend over a NestJS API). The refactor is mechanical but the build breakage is a fixed set of traps — fix them all in one pass.\n\n## Sequence\n1. **Add an API config constant** (e.g. `src\u002Fapp\u002Fcore\u002Fconfig\u002Fapi.config.ts` exporting `API_CONFIG.baseUrl = 'http:\u002F\u002Flocalhost:3000\u002Fapi'`). Keep it out of components so you can swap to a deployed URL in one place.\n2. **Inject `HttpClient`** into each service and replace mock `of([...])` \u002F hardcoded arrays with real `http.get\u002Fpost\u002Fpatch`. Confirm `provideHttpClient()` is in `app.config.ts` (it usually is).\n3. **Align DTOs to the real response shape.** Inspect the live endpoint first:\n   `curl -s 'http:\u002F\u002Flocalhost:3000\u002Fapi\u002Farticles?limit=1'` — note exact field names and types. The backend field names are authoritative; change the Angular interface to match, not the other way around.\n4. **Map response -> component model** in the service (so components don't change), OR update components. Prefer mapping in the service to limit blast radius.\n\n## Trap 1 — property rename ripples into templates\nIf the backend renames a field (e.g. `categoryId` -> `category`, or changes type from number to UUID string), every `.categoryId` property access breaks — including in `.html` templates and `formValue.categoryId` passed to create calls.\n- Grep the whole `src` for the old name: `grep -rn \"categoryId\" src --include=*.ts --include=*.html`.\n- Fix property *reads* (`article.categoryId` -> `article.category`). Leave reactive-form `formControlName=\"categoryId\"` and `form.get('categoryId')` alone — those are control keys, not the article property.\n- Templates: `\u003Cimg [src]=\"getPlaceholderImage(article()!.categoryId)\">` -> `article()!.category`.\n\n## Trap 2 — duplicate interceptor\u002Fservice shadows the real one\nA project can have BOTH `auth.interceptor.ts` (Angular default, 444B, references a `refreshToken()` that no longer exists) AND `auth-interceptor.ts` (hyphen, the one `app.config.ts` actually imports). The unused one still gets compiled by `tsc` (`src\u002F**\u002F*.ts`) and throws a phantom error.\n- Find duplicates: `find src -name \"auth*.ts\"`.\n- Delete the dead duplicate (`rm` the hyphen file + its `.spec.ts`) if `app.config.ts` imports the other. The live error \"Property 'refreshToken' does not exist\" on a line number beyond the real file's length is the tell.\n\n## Trap 3 — phantom TS errors from stale incremental cache\nAfter fixing everything, `tsc --noEmit` \u002F `ng build` may STILL report errors that reference lines you already edited (e.g. \"categoryId does not exist\" on a line now reading `category`). This is stale `.tsbuildinfo` \u002F `.angular` cache.\n- Nuclear clear: `find . -name \"*.tsbuildinfo\" -not -path \"*\u002Fnode_modules\u002F*\" -delete; rm -rf .angular node_modules\u002F.cache; rm -rf dist`.\n- Then rebuild. If `ng build --no-aot` still fails, run `npx tsc --noEmit -p tsconfig.app.json` to get the true error list (bypasses the bundler).\n- A real syntax error (e.g. a dangling `)` left by a half-applied patch) will show as `TS1128`\u002F`TS1005` at a specific line — read that file region, don't trust the earlier phantom lines.\n\n## Verification\n- `npx tsc --noEmit -p tsconfig.app.json` must be clean (empty output).\n- `npx ng build --configuration development` must exit 0. Template *warnings* (e.g. `controlFlowPreventingContentProjection`) are non-blocking; only `error` lines block.\n- Optional runtime check: serve the app (`ng serve`) and confirm a component fetches from the live API (Network tab \u002F curl the served index). At minimum, confirm the service code references the real `API_CONFIG.baseUrl` + correct paths and the backend returns the expected shape.\n\n## Commit each slice\nPer the maker\u002Fchecker loop: after a verified build, commit the frontend wiring as its own commit before moving to the next screen\u002Ffeature. Don't batch unrelated slices.\n",{"name":5,"license":15,"metadata":24,"description":7},{"author":25,"version":26},"ks-knowledge-sharing project learnings","1.0","master","f341c46fed021656175d5c9ccc67a72126e50bfb","skills\u002Ffrontend\u002Fangular-mock-to-real-api","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public","https:\u002F\u002Fgithub.com\u002Fdbillion","I enjoy writing codes,teaching programming, solving problems, tasted automation in Python and never looked back😋😋😋💞","2026-10-14 03:31:55",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add dbillion\u002Fhermes-skills-public --skill angular-mock-to-real-api",{"tool":40,"command":41},"bunx","bunx skills add dbillion\u002Fhermes-skills-public --skill angular-mock-to-real-api",{"tool":43,"command":44},"pnpm","pnpm dlx skills add dbillion\u002Fhermes-skills-public --skill angular-mock-to-real-api","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ffrontend\u002Fangular-mock-to-real-api\u002FSKILL.md",true,[],[49,56,63,72,79,86],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7B25T0V7RBKES86Y3RTXQRN","blocked-page-recovery","Use when a fetch fails: 403\u002F429, paywall, WAF, bot wall.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fweb\u002Fblocked-page-recovery\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7B25DSBBMZRHVD28MAX7N5X","gemini-vision-fallback","Vision fallback: Gemini REST API if vision_analyze blocked.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fvision\u002Fgemini-vision-fallback\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":67,"licenseFileUrl":68,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":19},"01M7B22XW9QXT2ZWWXVZDFWYZP","twitter-cli","Use twitter-cli for ALL Twitter\u002FX operations — reading tweets, posting, replying, quoting, liking, retweeting, following, searching, user lookups. Invoke whenever user requests any Twitter interaction.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ftwitter-cli\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Ftwitter-cli\u002FSKILL.md",[],[],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":19},"01M7B22QMWY1B4F7BC114RG4S6","prism-scan","Structural analysis through dynamically generated cognitive lenses. Generates the optimal analytical lens for the specific code\u002Fartifact, then executes it. Finds conservation laws, structural invariants, and concrete bugs that vanilla analysis misses. Use on any code file, system design, or text artifact.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-scan\u002FSKILL.md",[],[],{"skillNo":80,"name":81,"nameZh":6,"description":82,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":83,"categories":84,"keywords":85,"publishedAt":19},"01M7B22JA5XCAP1ACT6V50WYR1","prism-reflect","Constraint transparency: analyzes an artifact structurally, then analyzes what its own analysis concealed. Produces a conservation law AND a constraint report showing what was maximized, what was sacrificed, and what to investigate next. The only AI skill that knows what it can't see.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-reflect\u002FSKILL.md",[],[],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":19},"01M7B22EB15M75M4X3C52YGDCC","prism-full","Full Prism: multi-pass structural analysis with mandatory adversarial self-correction. Designs custom analytical passes, executes them with chaining, then attacks its own findings before synthesizing. Use for maximum depth on important code or artifacts.","https:\u002F\u002Fgithub.com\u002Fdbillion\u002Fhermes-skills-public\u002Fblob\u002Fmaster\u002Fskills\u002Fts-superhermes-prism-full\u002FSKILL.md",[],[]]