[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75RP8D5KMGF4F2F49DDJEND":3,"skill-same:01M75RP8D5KMGF4F2F49DDJEND":49},{"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":28,"commitSha":29,"skillDirectory":30,"forksCount":14,"repositoryHtmlUrl":31,"repositoryHomepageUrl":6,"ownerHtmlUrl":32,"ownerBlogUrl":33,"ownerDescription":6,"updatedAt":34,"install":35,"resources":48},"01M75RP8D5KMGF4F2F49DDJEND","error-mapper-scaffold",null,"Discovers ICT's existing error-mapping convention (handleErrorResponseUsingDefaultFlow + a per-feature *ErrorMapper) and, given a target ViewModel\u002FRepository, generates the mapper and wires the ViewModel to use it — or patches an existing mapper with only the missing mappings. Use when a new ViewModel needs error handling, or an existing one's error surface has grown.","ictech-projects\u002Fios-claude-skills","ictech-projects","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F197732316?v=4","01M75RMSRVS9SR1M94J9YTJ23Z","ICTechnology Projects","01M75RMSSD2EW7SM3WZBF4EFBE",0,"MIT","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Ferror-mapper-scaffold\u002Fskills\u002Ferror-mapper-scaffold\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: error-mapper-scaffold\ndescription: Discovers ICT's existing error-mapping convention (handleErrorResponseUsingDefaultFlow + a per-feature *ErrorMapper) and, given a target ViewModel\u002FRepository, generates the mapper and wires the ViewModel to use it — or patches an existing mapper with only the missing mappings. Use when a new ViewModel needs error handling, or an existing one's error surface has grown.\nlicense: MIT\nargument-hint: \"[ViewModel or Repository name]\"\nmetadata:\n  author: ICT\n  version: \"1.0\"\n---\n\n> **ICT iOS Team** — This skill generates error-mapping boilerplate following the pattern defined in `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md`. It never bypasses the shared 401→logout flow, and never invents error codes the target Repository doesn't actually produce.\n\n## ⚠️ [CLAUDE] Feature Workflow → Error Mapper Scaffold\n\nYou are a Senior iOS Engineer on the ICT team. Your job is to give a ViewModel consistent error handling without hand-copying it from whichever ViewModel the developer had open last.\n\nFollow this process, in order. Do not skip steps or reorder them.\n\n---\n\n### 1. Identify the target\n\nIf the developer named a ViewModel or Repository, use it. If neither is clear, ask.\n\n### 2. Discover the existing convention\n\nFollow `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md` to locate the `handleErrorResponseUsingDefaultFlow`-style method each ViewModel hand-rolls, and determine which of two shapes applies to the target:\n\n1. **Repository already isolates expiry** — its response type has a dedicated `.expired`-style case, handled by the ViewModel's state switch before the generic error handler ever runs. Here, `handleErrorResponseUsingDefaultFlow` only needs to set the plain error flag\u002Fmessage — no dedicated mapper needed.\n2. **Repository throws a raw `Error`** — the ViewModel needs a dedicated `\u003CFeature>ViewModelErrorMapper` (a `static func map(_ error: Error) -> ViewModelErrorResult`) that inspects the error's status code itself, including detecting 401 as expiry.\n\nCheck the target Repository's actual method signatures to tell which shape applies — don't assume; a Repository that already returns a state enum with `.expired` should not also get a redundant dedicated mapper.\n\nIf neither shape is recognizable at all, **stop** — this project may use a different error-handling convention entirely. Report what you found and ask, rather than inventing a new pattern.\n\n### 3. Check for an existing mapper\n\nSearch for a mapper already covering this ViewModel's Repository.\n\n- **None found** → go to step 4 (generate from scratch).\n- **Found** → compare it against the Repository\u002FTargetType's actual current error surface. If everything is already covered, tell the developer and stop. If new error cases exist that aren't mapped yet, go to step 5 (patch) instead of regenerating.\n\n### 4. Generate from scratch\n\nIf the target needs a dedicated mapper (shape 2 above), create `\u003CFeature>ViewModelErrorMapper.swift` following the discovered shape exactly — same `ViewModelErrorResult` return type, same status-code switch style, same flag\u002Fmessage naming as the worked examples in `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md`. If the target's Repository already isolates expiry via a state-enum case (shape 1), just generate the plain `handleErrorResponseUsingDefaultFlow` — no mapper file needed. Either way, 401\u002Fexpiry must always resolve to the same shared `isExpired` → `authenticationRepository.eraseToken(...)` → logout path every other ViewModel uses; never write a second, competing token-erase implementation.\n\n### 5. Patch an existing mapper\n\nAdd only the new error-code mappings the current error surface actually needs. Don't touch or restructure any mapping that's already there.\n\n### 6. Wire the ViewModel\n\nUpdate the ViewModel's failure-handling call site to use the mapper, matching how the worked examples call theirs.\n\n### 7. Report\n\nSummarize: file created or patched, which error codes are now mapped, and confirmation that 401 routes through the shared logout flow (not a new one-off implementation).\n\n---\n\n## Core Instructions\n\n- **Never invent an error code the Repository\u002FTargetType doesn't actually produce.** Base every mapping on the real error surface, not a guess.\n- **Never duplicate the 401 → `isExpired` → token-erase → logout flow.** Always route through the existing shared path; a second implementation of this is a security-relevant bug, not just duplication.\n- **Never rewrite an existing mapper's untouched mappings when patching.**\n- **Stop and ask if no existing convention is found** — don't retrofit this pattern onto a project that doesn't already use it.\n\n---\n\n## References\n\n- `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md` — the discovered convention shape (`handleErrorResponseUsingDefaultFlow` + `*ErrorMapper`), the shared 401→logout special case, and worked examples to extend for a new domain.\n","> **ICT iOS Team** — This skill generates error-mapping boilerplate following the pattern defined in `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md`. It never bypasses the shared 401→logout flow, and never invents error codes the target Repository doesn't actually produce.\n\n## ⚠️ [CLAUDE] Feature Workflow → Error Mapper Scaffold\n\nYou are a Senior iOS Engineer on the ICT team. Your job is to give a ViewModel consistent error handling without hand-copying it from whichever ViewModel the developer had open last.\n\nFollow this process, in order. Do not skip steps or reorder them.\n\n---\n\n### 1. Identify the target\n\nIf the developer named a ViewModel or Repository, use it. If neither is clear, ask.\n\n### 2. Discover the existing convention\n\nFollow `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md` to locate the `handleErrorResponseUsingDefaultFlow`-style method each ViewModel hand-rolls, and determine which of two shapes applies to the target:\n\n1. **Repository already isolates expiry** — its response type has a dedicated `.expired`-style case, handled by the ViewModel's state switch before the generic error handler ever runs. Here, `handleErrorResponseUsingDefaultFlow` only needs to set the plain error flag\u002Fmessage — no dedicated mapper needed.\n2. **Repository throws a raw `Error`** — the ViewModel needs a dedicated `\u003CFeature>ViewModelErrorMapper` (a `static func map(_ error: Error) -> ViewModelErrorResult`) that inspects the error's status code itself, including detecting 401 as expiry.\n\nCheck the target Repository's actual method signatures to tell which shape applies — don't assume; a Repository that already returns a state enum with `.expired` should not also get a redundant dedicated mapper.\n\nIf neither shape is recognizable at all, **stop** — this project may use a different error-handling convention entirely. Report what you found and ask, rather than inventing a new pattern.\n\n### 3. Check for an existing mapper\n\nSearch for a mapper already covering this ViewModel's Repository.\n\n- **None found** → go to step 4 (generate from scratch).\n- **Found** → compare it against the Repository\u002FTargetType's actual current error surface. If everything is already covered, tell the developer and stop. If new error cases exist that aren't mapped yet, go to step 5 (patch) instead of regenerating.\n\n### 4. Generate from scratch\n\nIf the target needs a dedicated mapper (shape 2 above), create `\u003CFeature>ViewModelErrorMapper.swift` following the discovered shape exactly — same `ViewModelErrorResult` return type, same status-code switch style, same flag\u002Fmessage naming as the worked examples in `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md`. If the target's Repository already isolates expiry via a state-enum case (shape 1), just generate the plain `handleErrorResponseUsingDefaultFlow` — no mapper file needed. Either way, 401\u002Fexpiry must always resolve to the same shared `isExpired` → `authenticationRepository.eraseToken(...)` → logout path every other ViewModel uses; never write a second, competing token-erase implementation.\n\n### 5. Patch an existing mapper\n\nAdd only the new error-code mappings the current error surface actually needs. Don't touch or restructure any mapping that's already there.\n\n### 6. Wire the ViewModel\n\nUpdate the ViewModel's failure-handling call site to use the mapper, matching how the worked examples call theirs.\n\n### 7. Report\n\nSummarize: file created or patched, which error codes are now mapped, and confirmation that 401 routes through the shared logout flow (not a new one-off implementation).\n\n---\n\n## Core Instructions\n\n- **Never invent an error code the Repository\u002FTargetType doesn't actually produce.** Base every mapping on the real error surface, not a guess.\n- **Never duplicate the 401 → `isExpired` → token-erase → logout flow.** Always route through the existing shared path; a second implementation of this is a security-relevant bug, not just duplication.\n- **Never rewrite an existing mapper's untouched mappings when patching.**\n- **Stop and ask if no existing convention is found** — don't retrofit this pattern onto a project that doesn't already use it.\n\n---\n\n## References\n\n- `${CLAUDE_SKILL_DIR}\u002Freferences\u002Ferror-mapping-pattern.md` — the discovered convention shape (`handleErrorResponseUsingDefaultFlow` + `*ErrorMapper`), the shared 401→logout special case, and worked examples to extend for a new domain.\n",{"name":5,"license":15,"metadata":24,"description":7,"argument-hint":27},{"author":25,"version":26},"ICT","1.0","[ViewModel or Repository name]","main","bb8e2f496754b4027a1573e1b1c03f132c14097b","error-mapper-scaffold\u002Fskills\u002Ferror-mapper-scaffold","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills","https:\u002F\u002Fgithub.com\u002Fictech-projects","https:\u002F\u002Fictechnology.com.au","2026-08-21 12:04:06",{"source":8,"skillName":5,"commands":36,"prompt":46,"zipAvailable":47},[37,40,43],{"tool":38,"command":39},"npx","npx skills add ictech-projects\u002Fios-claude-skills --skill error-mapper-scaffold",{"tool":41,"command":42},"bunx","bunx skills add ictech-projects\u002Fios-claude-skills --skill error-mapper-scaffold",{"tool":44,"command":45},"pnpm","pnpm dlx skills add ictech-projects\u002Fios-claude-skills --skill error-mapper-scaffold","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Ferror-mapper-scaffold\u002Fskills\u002Ferror-mapper-scaffold\u002FSKILL.md",true,[],[50,57,63,70,75,82],{"skillNo":51,"name":52,"nameZh":6,"description":53,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":54,"categories":55,"keywords":56,"publishedAt":19},"01M75RRCATDPVDZ46V6YQPV5NP","unit-testing","Writes or reviews iOS unit tests for data layer (Repository) and ViewModel code, following ICT's XCTest + Combine testing patterns.","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Funit-testing\u002Fskills\u002Funit-testing\u002FSKILL.md",[],[],{"skillNo":58,"name":52,"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},"01M75RR9CQVBVVACHW5V681GQB","Writes or reviews iOS unit tests for data layer (Repository) and ViewModel code, supporting both XCTest and Swift Testing frameworks. Use when adding new unit tests, reviewing existing tests for compliance, or expanding test coverage for a domain.","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Funit-testing\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":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M75RQWENXM6RK6C5TR2291RV","swiftui-reviewer","Comprehensively reviews SwiftUI code for best practices on modern APIs, maintainability, and performance. Use when reading, writing, or reviewing SwiftUI projects.","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Fswiftui-reviewer\u002Fskills\u002Fswiftui-reviewer\u002FSKILL.md",[],[],{"skillNo":71,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75RQSN17XH7MV6GMGBXQ3MW","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Fswiftui-reviewer\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75RQQ4FNK3FBHN8G29ZSWKA","security-review","Comprehensive iOS security assessment for the ICT iOS team. Reviews authentication, data storage, network security, secrets management, and more against OWASP MASVS and Apple security guidelines. Use when auditing or reviewing iOS app security.","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Fsecurity-review\u002Fskills\u002Fsecurity-review\u002FSKILL.md",[],[],{"skillNo":83,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M75RQMKS2Y8Z2MBB318EVXPG","https:\u002F\u002Fgithub.com\u002Fictech-projects\u002Fios-claude-skills\u002Fblob\u002Fmain\u002Fsecurity-review\u002FSKILL.md",[],[]]