[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XCBJPXNCC5017RD53N84P0":3,"skill-same:01M6XCBJPXNCC5017RD53N84P0":69},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6XCBJPXNCC5017RD53N84P0","typescript-import-audit",null,"Systematic workflow for auditing TypeScript codebases for import hygiene issues (value vs. type imports, duplicates), missing base class extensions, and incomplete barrel file re-exports, with actionable fix patterns.","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Ftypescript-import-audit\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"typescript import audit","audit","typescript","import","missing","value","imports","for","extensions","re","with","actionable","hygiene","type","systematic","duplicates","fix","file","issues","workflow","2026-11-10 10:12:30",false,"---\nname: typescript-import-audit\ndescription: Systematic workflow for auditing TypeScript codebases for import hygiene issues (value vs. type imports, duplicates), missing base class extensions, and incomplete barrel file re-exports, with actionable fix patterns.\n---\n\n# TypeScript Import & Structure Audit\n\nA step-by-step workflow for auditing TypeScript projects for common structural and import hygiene problems, then applying targeted fixes.\n\n---\n\n## Overview\n\nThis skill covers four audit checks and their corresponding fixes:\n\n| # | Issue | Fix |\n|---|-------|-----|\n| 1 | Value imports used only as type annotations | Split with `import type` |\n| 2 | Duplicate imports from the same module | Consolidate into one import statement |\n| 3 | Classes missing expected base class extension | Add `extends BaseClass` |\n| 4 | Missing re-exports in barrel (`index.ts`) files | Add the missing `export` lines |\n\n---\n\n## Step 1 — Read All Relevant Files in Parallel\n\nBefore making any changes, read all files that need to be audited in a single parallel batch. This avoids slow sequential reads.\n\n```\nRead in parallel:\n  - src\u002Findex.ts           (barrel file)\n  - src\u002F**\u002F*.ts            (all source files)\n  - Any explicitly named files from the task spec\n```\n\nLook for:\n- All `import` statements at the top of each file\n- Class declarations (`class Foo`)\n- Export lists in barrel files\n\n---\n\n## Step 2 — Audit Check 1: Value Imports Used Only as Types\n\n### Detection\n\nFor every `import { A, B } from 'module'` statement, check whether each\nimported name is used **only** in type positions (`: TypeName`, `as TypeName`,\n`\u003CTypeName>` generics, `implements TypeName`). If a name never appears in a\nvalue position (instantiation, function call, assignment), it should be a\ntype-only import.\n\n```typescript\n\u002F\u002F ❌ Bad — Foo is only used as a type annotation\nimport { Foo, bar } from '.\u002Fmodule';\nconst x: Foo = bar();\n\n\u002F\u002F ✅ Good — split into value import + type import\nimport { bar } from '.\u002Fmodule';\nimport type { Foo } from '.\u002Fmodule';\n```\n\n### Fix Pattern\n\n1. Identify all names in the import that are type-only.\n2. Remove them from the value import (delete the value import entirely if all names are type-only).\n3. Add (or merge into an existing) `import type { ... } from 'module'` statement.\n\n---\n\n## Step 3 — Audit Check 2: Duplicate Imports from the Same Module\n\n### Detection\n\nScan for two or more `import` statements that reference the **same module path**:\n\n```typescript\n\u002F\u002F ❌ Bad — two imports from the same source\nimport { ComponentA } from '.\u002Fcomponents';\nimport { ComponentB } from '.\u002Fcomponents';\n```\n\n### Fix Pattern\n\nMerge all named imports from the same module into a single statement:\n\n```typescript\n\u002F\u002F ✅ Good\nimport { ComponentA, ComponentB } from '.\u002Fcomponents';\n```\n\nIf there is a mix of value and type imports from the same module, keep them as two separate lines (`import { ... }` and `import type { ... }`), but ensure there is at most one of each kind per module path.\n\n---\n\n## Step 4 — Audit Check 3: Classes That Should Extend a Base Class\n\n### Detection\n\nLook for class declarations that:\n- Implement an interface that implies a base class, OR\n- Are described in comments \u002F documentation as extending something, OR\n- Contain methods\u002Fproperties that are defined on a known base class\n\n```typescript\n\u002F\u002F ❌ Missing base class\nclass MyPanel implements PanelInterface {\n  render() { ... }\n}\n\n\u002F\u002F ✅ Correct\nclass MyPanel extends BasePanel implements PanelInterface {\n  render() { ... }\n}\n```\n\n### Fix Pattern\n\nAdd `extends BaseClass` between the class name and any `implements` clause:\n\n```typescript\nclass ClassName extends BaseClass implements InterfaceName { ... }\n```\n\nEnsure the base class is imported if it is not already.\n\n---\n\n## Step 5 — Audit Check 4: Missing Re-exports in Barrel Files\n\n### Detection\n\nA barrel file (`index.ts`) should re-export everything that is part of the\npublic API. Common gaps:\n\n- A new file was added but never added to `index.ts`\n- A named export inside a file is not forwarded by the barrel\n\n```typescript\n\u002F\u002F src\u002Fcomponents\u002FMyWidget.ts\nexport class MyWidget { ... }\nexport type MyWidgetProps = { ... }\n\n\u002F\u002F src\u002Fcomponents\u002Findex.ts — ❌ missing MyWidget\nexport { SomeOtherThing } from '.\u002FSomeOtherThing';\n```\n\n### Fix Pattern\n\nAdd the missing re-export line:\n\n```typescript\n\u002F\u002F src\u002Fcomponents\u002Findex.ts — ✅ fixed\nexport { SomeOtherThing } from '.\u002FSomeOtherThing';\nexport { MyWidget } from '.\u002FMyWidget';\nexport type { MyWidgetProps } from '.\u002FMyWidget';\n```\n\nUse `export type { ... }` for type-only exports to maintain strict type\u002Fvalue separation.\n\n---\n\n## Step 6 — Apply Fixes and Verify\n\n### Order of operations\n\n1. Fix **duplicate imports** first (consolidation may surface type-only candidates).\n2. Fix **value vs. type imports** (split imports).\n3. Fix **missing base class** extensions.\n4. Fix **barrel re-exports** last (they depend on the other files being correct).\n\n### Verification checklist\n\nAfter edits, confirm:\n\n- [ ] No two `import` statements reference the same module path (same kind).\n- [ ] All names used only as types are in `import type { ... }` statements.\n- [ ] Every class that should extend a base class does so.\n- [ ] Every public export in every source file appears in the barrel `index.ts`.\n- [ ] The project compiles without errors (`tsc --noEmit`).\n\n---\n\n## Quick Reference: Import Patterns\n\n```typescript\n\u002F\u002F Value import\nimport { foo, bar } from '.\u002Fmodule';\n\n\u002F\u002F Type-only import\nimport type { Foo, Bar } from '.\u002Fmodule';\n\n\u002F\u002F Mixed (value + type from same module — two lines)\nimport { foo } from '.\u002Fmodule';\nimport type { Foo } from '.\u002Fmodule';\n\n\u002F\u002F Re-export value\nexport { foo } from '.\u002Fmodule';\n\n\u002F\u002F Re-export type\nexport type { Foo } from '.\u002Fmodule';\n\n\u002F\u002F Re-export everything\nexport * from '.\u002Fmodule';\nexport type * from '.\u002Fmodule';  \u002F\u002F TypeScript 5.0+\n```\n\n---\n\n## Notes\n\n- Always prefer **explicit named exports** over `export *` in barrel files for better tree-shaking and discoverability.\n- If the project uses `verbatimModuleSyntax` or `isolatedModules` in `tsconfig.json`, `import type` is **required** for type-only imports — the compiler will error otherwise.\n- Run `tsc --noEmit` after each fix category to catch regressions early.","# TypeScript Import & Structure Audit\n\nA step-by-step workflow for auditing TypeScript projects for common structural and import hygiene problems, then applying targeted fixes.\n\n---\n\n## Overview\n\nThis skill covers four audit checks and their corresponding fixes:\n\n| # | Issue | Fix |\n|---|-------|-----|\n| 1 | Value imports used only as type annotations | Split with `import type` |\n| 2 | Duplicate imports from the same module | Consolidate into one import statement |\n| 3 | Classes missing expected base class extension | Add `extends BaseClass` |\n| 4 | Missing re-exports in barrel (`index.ts`) files | Add the missing `export` lines |\n\n---\n\n## Step 1 — Read All Relevant Files in Parallel\n\nBefore making any changes, read all files that need to be audited in a single parallel batch. This avoids slow sequential reads.\n\n```\nRead in parallel:\n  - src\u002Findex.ts           (barrel file)\n  - src\u002F**\u002F*.ts            (all source files)\n  - Any explicitly named files from the task spec\n```\n\nLook for:\n- All `import` statements at the top of each file\n- Class declarations (`class Foo`)\n- Export lists in barrel files\n\n---\n\n## Step 2 — Audit Check 1: Value Imports Used Only as Types\n\n### Detection\n\nFor every `import { A, B } from 'module'` statement, check whether each\nimported name is used **only** in type positions (`: TypeName`, `as TypeName`,\n`\u003CTypeName>` generics, `implements TypeName`). If a name never appears in a\nvalue position (instantiation, function call, assignment), it should be a\ntype-only import.\n\n```typescript\n\u002F\u002F ❌ Bad — Foo is only used as a type annotation\nimport { Foo, bar } from '.\u002Fmodule';\nconst x: Foo = bar();\n\n\u002F\u002F ✅ Good — split into value import + type import\nimport { bar } from '.\u002Fmodule';\nimport type { Foo } from '.\u002Fmodule';\n```\n\n### Fix Pattern\n\n1. Identify all names in the import that are type-only.\n2. Remove them from the value import (delete the value import entirely if all names are type-only).\n3. Add (or merge into an existing) `import type { ... } from 'module'` statement.\n\n---\n\n## Step 3 — Audit Check 2: Duplicate Imports from the Same Module\n\n### Detection\n\nScan for two or more `import` statements that reference the **same module path**:\n\n```typescript\n\u002F\u002F ❌ Bad — two imports from the same source\nimport { ComponentA } from '.\u002Fcomponents';\nimport { ComponentB } from '.\u002Fcomponents';\n```\n\n### Fix Pattern\n\nMerge all named imports from the same module into a single statement:\n\n```typescript\n\u002F\u002F ✅ Good\nimport { ComponentA, ComponentB } from '.\u002Fcomponents';\n```\n\nIf there is a mix of value and type imports from the same module, keep them as two separate lines (`import { ... }` and `import type { ... }`), but ensure there is at most one of each kind per module path.\n\n---\n\n## Step 4 — Audit Check 3: Classes That Should Extend a Base Class\n\n### Detection\n\nLook for class declarations that:\n- Implement an interface that implies a base class, OR\n- Are described in comments \u002F documentation as extending something, OR\n- Contain methods\u002Fproperties that are defined on a known base class\n\n```typescript\n\u002F\u002F ❌ Missing base class\nclass MyPanel implements PanelInterface {\n  render() { ... }\n}\n\n\u002F\u002F ✅ Correct\nclass MyPanel extends BasePanel implements PanelInterface {\n  render() { ... }\n}\n```\n\n### Fix Pattern\n\nAdd `extends BaseClass` between the class name and any `implements` clause:\n\n```typescript\nclass ClassName extends BaseClass implements InterfaceName { ... }\n```\n\nEnsure the base class is imported if it is not already.\n\n---\n\n## Step 5 — Audit Check 4: Missing Re-exports in Barrel Files\n\n### Detection\n\nA barrel file (`index.ts`) should re-export everything that is part of the\npublic API. Common gaps:\n\n- A new file was added but never added to `index.ts`\n- A named export inside a file is not forwarded by the barrel\n\n```typescript\n\u002F\u002F src\u002Fcomponents\u002FMyWidget.ts\nexport class MyWidget { ... }\nexport type MyWidgetProps = { ... }\n\n\u002F\u002F src\u002Fcomponents\u002Findex.ts — ❌ missing MyWidget\nexport { SomeOtherThing } from '.\u002FSomeOtherThing';\n```\n\n### Fix Pattern\n\nAdd the missing re-export line:\n\n```typescript\n\u002F\u002F src\u002Fcomponents\u002Findex.ts — ✅ fixed\nexport { SomeOtherThing } from '.\u002FSomeOtherThing';\nexport { MyWidget } from '.\u002FMyWidget';\nexport type { MyWidgetProps } from '.\u002FMyWidget';\n```\n\nUse `export type { ... }` for type-only exports to maintain strict type\u002Fvalue separation.\n\n---\n\n## Step 6 — Apply Fixes and Verify\n\n### Order of operations\n\n1. Fix **duplicate imports** first (consolidation may surface type-only candidates).\n2. Fix **value vs. type imports** (split imports).\n3. Fix **missing base class** extensions.\n4. Fix **barrel re-exports** last (they depend on the other files being correct).\n\n### Verification checklist\n\nAfter edits, confirm:\n\n- [ ] No two `import` statements reference the same module path (same kind).\n- [ ] All names used only as types are in `import type { ... }` statements.\n- [ ] Every class that should extend a base class does so.\n- [ ] Every public export in every source file appears in the barrel `index.ts`.\n- [ ] The project compiles without errors (`tsc --noEmit`).\n\n---\n\n## Quick Reference: Import Patterns\n\n```typescript\n\u002F\u002F Value import\nimport { foo, bar } from '.\u002Fmodule';\n\n\u002F\u002F Type-only import\nimport type { Foo, Bar } from '.\u002Fmodule';\n\n\u002F\u002F Mixed (value + type from same module — two lines)\nimport { foo } from '.\u002Fmodule';\nimport type { Foo } from '.\u002Fmodule';\n\n\u002F\u002F Re-export value\nexport { foo } from '.\u002Fmodule';\n\n\u002F\u002F Re-export type\nexport type { Foo } from '.\u002Fmodule';\n\n\u002F\u002F Re-export everything\nexport * from '.\u002Fmodule';\nexport type * from '.\u002Fmodule';  \u002F\u002F TypeScript 5.0+\n```\n\n---\n\n## Notes\n\n- Always prefer **explicit named exports** over `export *` in barrel files for better tree-shaking and discoverability.\n- If the project uses `verbatimModuleSyntax` or `isolatedModules` in `tsconfig.json`, `import type` is **required** for type-only imports — the compiler will error otherwise.\n- Run `tsc --noEmit` after each fix category to catch regressions early.",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","showcase\u002Fskills\u002Ftypescript-import-audit","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill typescript-import-audit",{"tool":55,"command":56},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill typescript-import-audit",{"tool":58,"command":59},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill typescript-import-audit","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Ftypescript-import-audit\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},".skill_id","OTHER","其他",37,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Ftypescript-import-audit\u002F.skill_id",[70,91,107,116,141,157],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":38},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[77,78,79,20,80,81,82,83,25,84,85,86,31,87,88,89,35,90],"check","write","write special chars ts check","filters","characters","Existing","type-checking","errors","script","output","files","only","template","python",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":38},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[98,99,78,35,100,90,101,102,103,104,105,89,106,28,81,25,85],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":113,"publishedAt":38},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[114,78,81,115,85,102,89,35,90,25],"write special chars heredoc","shell",{"skillNo":117,"name":118,"nameZh":6,"description":119,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":120,"categories":121,"keywords":122,"publishedAt":38},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[],[123,124,125,126,127,20,128,129,130,131,132,25,133,134,135,136,137,138,139,140],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":142,"name":143,"nameZh":6,"description":144,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":145,"categories":146,"keywords":147,"publishedAt":38},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[148,149,150,151,25,152,28,153,154,155,156],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":163,"publishedAt":38},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[164,165,166,167,168,169,35,36,170,171],"directory","verify directory structure","structure","verify","access","first","diagnose","file access"]