[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HY92PKBTJS6TFRG4F27919":3,"skill-same:01M6HY92PKBTJS6TFRG4F27919":65},{"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":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":44,"ownerDescription":6,"updatedAt":45,"install":46,"resources":58},"01M6HY92PKBTJS6TFRG4F27919","typescript-compile-check-resilient-fallback",null,"A resilient workflow for running TypeScript compile checks (tsc --noEmit) that falls back gracefully when npx or direct binary invocations fail, and distinguishes pre-existing errors from newly introduced ones.","HKUDS\u002FAgentPilot","HKUDS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118165258?v=4","01M6HW8VRNZP64G0P4MVJW2KKQ","✨Data Intelligence Lab@HKU✨","01M6HW8VWZVHBRHYH3T330PFWV",8024,"MIT","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Ftypescript-compile-check-resilient-fallback\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32],"typescript","compile","check","fallback","typescript compile check resilient fallback","typescript compile check resilient","workflow","direct","npx","back","binary","errors","for","Existing","2026-11-10 10:12:30",false,"---\nname: typescript-compile-check-resilient-fallback\ndescription: A resilient workflow for running TypeScript compile checks (tsc --noEmit) that falls back gracefully when npx or direct binary invocations fail, and distinguishes pre-existing errors from newly introduced ones.\n---\n\n# TypeScript Compile-Check Resilient Fallback\n\nUse this workflow whenever you need to verify that TypeScript files compile\ncleanly after creating or modifying them, especially in environments where\n`npx` or direct `.\u002Fnode_modules\u002F.bin\u002Ftsc` invocations may return unexpected\nerrors.\n\n---\n\n## Step 1 — Attempt Primary Invocation\n\nRun the compile check with `run_shell` using the standard approach:\n\n```bash\nnpx tsc --noEmit\n```\n\nor, if you already know the project root:\n\n```bash\n.\u002Fnode_modules\u002F.bin\u002Ftsc --noEmit\n```\n\n**Evaluate the result:**\n- If it exits cleanly (exit code 0, no unexpected output) → done.\n- If it exits with **TypeScript diagnostic errors** → proceed to Step 3.\n- If it exits with an **unknown \u002F tool-level error** (e.g., `npx` not found,\n  permission denied, spawn error, unclear non-zero exit unrelated to TS\n  diagnostics) → proceed to Step 2.\n\n---\n\n## Step 2 — Fallback via `shell_agent`\n\nWhen the primary invocation fails with an unknown error, delegate to\n`shell_agent` so it can resolve environment issues automatically:\n\n> Task: \"From the project directory `\u003CPROJECT_DIR>`, run\n> `node node_modules\u002Ftypescript\u002Fbin\u002Ftsc --noEmit` and report all\n> TypeScript diagnostic errors.\"\n\nExample `shell_agent` task string:\n\n```\nFrom \u002Fpath\u002Fto\u002Fproject, run:\n  node node_modules\u002Ftypescript\u002Fbin\u002Ftsc --noEmit\nCapture the full stdout\u002Fstderr output and return it.\n```\n\n`shell_agent` will handle PATH issues, working-directory changes, and\nretry on transient failures automatically.\n\n---\n\n## Step 3 — Filter Pre-Existing Errors\n\nTypeScript projects frequently have pre-existing errors in files you did\n**not** touch. To avoid false regressions:\n\n1. **Identify the baseline error count** for the project (e.g., determined\n   at task start or documented in task context). A common baseline is\n   **11 pre-existing errors** in unrelated files.\n2. **Collect the full diagnostic list** from tsc output.\n3. **Filter** to keep only errors whose file path matches a file you\n   created or modified in this task.\n4. **Evaluate:**\n   - Zero errors in your new\u002Fmodified files → ✅ no regression introduced.\n   - One or more errors in your new\u002Fmodified files → ❌ fix them before\n     proceeding.\n\n### Filtering heuristic (pseudocode)\n\n```\nall_errors   = parse_tsc_output(tsc_stdout)\nmy_files     = [list of files created\u002Fmodified in this task]\nnew_errors   = [e for e in all_errors if e.file in my_files]\n\nif len(new_errors) == 0:\n    print(\"✅ No new TypeScript errors introduced.\")\nelse:\n    for err in new_errors:\n        print(f\"❌ {err.file}:{err.line} — {err.message}\")\n    raise Exception(\"Fix TypeScript errors before continuing.\")\n```\n\n---\n\n## Step 4 — Fix and Re-Run\n\nIf new errors are found:\n1. Fix the errors in your file(s).\n2. Repeat from **Step 1**.\n\n---\n\n## Decision Tree Summary\n\n```\nrun_shell: npx tsc --noEmit\n        │\n        ├─ clean exit ──────────────────────────────► ✅ Done\n        │\n        ├─ TS diagnostic errors ────────────────────► Step 3 (filter)\n        │\n        └─ unknown\u002Ftool error\n                │\n                └─ shell_agent: node ...\u002Ftsc --noEmit\n                        │\n                        ├─ TS diagnostic errors ────► Step 3 (filter)\n                        └─ clean exit ──────────────► ✅ Done\n```\n\n---\n\n## Notes\n\n- Always run tsc from the **project root** (where `tsconfig.json` lives).\n- The `node node_modules\u002Ftypescript\u002Fbin\u002Ftsc` invocation is the most portable\n  fallback because it bypasses `npx`, shell PATH lookups, and binary\n  permission issues entirely.\n- When the baseline error count is unknown, run tsc **before** making any\n  changes and record the count; that becomes your baseline.\n- Only report\u002Fact on errors in files **you own**; never attempt to fix\n  pre-existing errors in third-party or unrelated project files unless\n  explicitly asked.","# TypeScript Compile-Check Resilient Fallback\n\nUse this workflow whenever you need to verify that TypeScript files compile\ncleanly after creating or modifying them, especially in environments where\n`npx` or direct `.\u002Fnode_modules\u002F.bin\u002Ftsc` invocations may return unexpected\nerrors.\n\n---\n\n## Step 1 — Attempt Primary Invocation\n\nRun the compile check with `run_shell` using the standard approach:\n\n```bash\nnpx tsc --noEmit\n```\n\nor, if you already know the project root:\n\n```bash\n.\u002Fnode_modules\u002F.bin\u002Ftsc --noEmit\n```\n\n**Evaluate the result:**\n- If it exits cleanly (exit code 0, no unexpected output) → done.\n- If it exits with **TypeScript diagnostic errors** → proceed to Step 3.\n- If it exits with an **unknown \u002F tool-level error** (e.g., `npx` not found,\n  permission denied, spawn error, unclear non-zero exit unrelated to TS\n  diagnostics) → proceed to Step 2.\n\n---\n\n## Step 2 — Fallback via `shell_agent`\n\nWhen the primary invocation fails with an unknown error, delegate to\n`shell_agent` so it can resolve environment issues automatically:\n\n> Task: \"From the project directory `\u003CPROJECT_DIR>`, run\n> `node node_modules\u002Ftypescript\u002Fbin\u002Ftsc --noEmit` and report all\n> TypeScript diagnostic errors.\"\n\nExample `shell_agent` task string:\n\n```\nFrom \u002Fpath\u002Fto\u002Fproject, run:\n  node node_modules\u002Ftypescript\u002Fbin\u002Ftsc --noEmit\nCapture the full stdout\u002Fstderr output and return it.\n```\n\n`shell_agent` will handle PATH issues, working-directory changes, and\nretry on transient failures automatically.\n\n---\n\n## Step 3 — Filter Pre-Existing Errors\n\nTypeScript projects frequently have pre-existing errors in files you did\n**not** touch. To avoid false regressions:\n\n1. **Identify the baseline error count** for the project (e.g., determined\n   at task start or documented in task context). A common baseline is\n   **11 pre-existing errors** in unrelated files.\n2. **Collect the full diagnostic list** from tsc output.\n3. **Filter** to keep only errors whose file path matches a file you\n   created or modified in this task.\n4. **Evaluate:**\n   - Zero errors in your new\u002Fmodified files → ✅ no regression introduced.\n   - One or more errors in your new\u002Fmodified files → ❌ fix them before\n     proceeding.\n\n### Filtering heuristic (pseudocode)\n\n```\nall_errors   = parse_tsc_output(tsc_stdout)\nmy_files     = [list of files created\u002Fmodified in this task]\nnew_errors   = [e for e in all_errors if e.file in my_files]\n\nif len(new_errors) == 0:\n    print(\"✅ No new TypeScript errors introduced.\")\nelse:\n    for err in new_errors:\n        print(f\"❌ {err.file}:{err.line} — {err.message}\")\n    raise Exception(\"Fix TypeScript errors before continuing.\")\n```\n\n---\n\n## Step 4 — Fix and Re-Run\n\nIf new errors are found:\n1. Fix the errors in your file(s).\n2. Repeat from **Step 1**.\n\n---\n\n## Decision Tree Summary\n\n```\nrun_shell: npx tsc --noEmit\n        │\n        ├─ clean exit ──────────────────────────────► ✅ Done\n        │\n        ├─ TS diagnostic errors ────────────────────► Step 3 (filter)\n        │\n        └─ unknown\u002Ftool error\n                │\n                └─ shell_agent: node ...\u002Ftsc --noEmit\n                        │\n                        ├─ TS diagnostic errors ────► Step 3 (filter)\n                        └─ clean exit ──────────────► ✅ Done\n```\n\n---\n\n## Notes\n\n- Always run tsc from the **project root** (where `tsconfig.json` lives).\n- The `node node_modules\u002Ftypescript\u002Fbin\u002Ftsc` invocation is the most portable\n  fallback because it bypasses `npx`, shell PATH lookups, and binary\n  permission issues entirely.\n- When the baseline error count is unknown, run tsc **before** making any\n  changes and record the count; that becomes your baseline.\n- Only report\u002Fact on errors in files **you own**; never attempt to fix\n  pre-existing errors in third-party or unrelated project files unless\n  explicitly asked.",{"name":5,"description":7},"main","6b84b0689ca0d9e7b1e4061188ff6b60758e0f8a","openspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Ftypescript-compile-check-resilient-fallback",941,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot","https:\u002F\u002Fgithub.com\u002FHKUDS","https:\u002F\u002Fsites.google.com\u002Fview\u002Fchaoh","2026-11-12 22:26:39",{"source":8,"skillName":5,"commands":47,"prompt":56,"zipAvailable":57},[48,50,53],{"tool":27,"command":49},"npx skills add HKUDS\u002FAgentPilot --skill typescript-compile-check-resilient-fallback",{"tool":51,"command":52},"bunx","bunx skills add HKUDS\u002FAgentPilot --skill typescript-compile-check-resilient-fallback",{"tool":54,"command":55},"pnpm","pnpm dlx skills add HKUDS\u002FAgentPilot --skill typescript-compile-check-resilient-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Ftypescript-compile-check-resilient-fallback\u002FSKILL.md",true,[59],{"path":60,"resourceType":61,"resourceTypeDesc":62,"sizeBytes":63,"sourceHtmlUrl":64},".skill_id","OTHER","其他",57,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Ftypescript-compile-check-resilient-fallback\u002F.skill_id",[66,86,105,130,153,172],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":33},"01M6HYB297NDABRERJRVG0K8R0","agentpilot","Set up AgentPilot and use its single entry to prepare missing inputs and run configured RSI experiments. Use when the user requests AgentPilot installation or work with AgentPilot.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fplugins\u002Fagentpilot\u002Fskills\u002Fagentpilot\u002FSKILL.md",[],[68,73,74,75,76,77,78,79,80,81,82,83,84,85],"prepare","requests","with","missing","installation","rsi","up","use","user","work","SET","run","experiments",{"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":33},"01M6HYAYWXTTE1J7DJM0MFNQ4H","remember","Review auto-memory entries and propose promotions to OPENSPACE.md, OPENSPACE.local.md, or retained auto-memory topics; detect duplicates, stale facts, conflicts, and ambiguous entries before making changes.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fskills\u002Fremember\u002FSKILL.md",[],[88,93,94,95,96,97,98,99,100,101,102,103,104],"memory","review","auto","openspace","changes","facts","detect","entries","local","conflicts","stale","duplicates",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":116,"publishedAt":33},"01M6HYAVMPM4SBDV60R2B5HPV8","skill-discovery","Search reusable OpenSpace skills locally, and browse cloud packages step by step when a cloud skill may help. Reusing proven skills saves tokens, improves reliability, and extends your capabilities beyond built-in tools.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fskill-discovery\u002FSKILL.md",[111],{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[117,118,119,96,120,121,122,123,124,125,126,127,128,129],"skill discovery","discovery","reusable","step by step","tokens","packages","help","cloud","reliability","capabilities","browse","search","Tools",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":137,"publishedAt":33},"01M6HYAR811B3RB0M50RBEDGN6","delegate-task","Delegate tasks to OpenSpace — a full-stack autonomous worker for coding, DevOps, web research, and desktop automation, backed by an extensive MCP tool and skill library. Skills auto-improve through use, reducing token consumption over time. A cloud community lets agents share and collectively evolve reusable skills.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fdelegate-task\u002FSKILL.md",[136],{"categoryNo":112,"categoryName":113,"taxonomyType":114,"taxonomyTypeDesc":115},[138,139,140,96,141,142,143,144,145,119,95,80,146,147,148,31,149,150,151,152],"delegate","task","delegate task","time","improve","desktop automation","worker","community","autonomous","tool","stack","share","tasks","automation","MCP",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":33},"01M6HYAM9FSGV6E52AYENDQXYH","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[160,161,21,162,163,164,165,166,167,168,19,169,32,170,31,30,171],"write special chars ts check","write","type","files","filters","only","template","file","python","output","type-checking","script",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":176,"categories":177,"keywords":178,"publishedAt":33},"01M6HYAH05HGV7SVWSVR8PJRQD","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[179,180,161,75,31,171,181,182,183,184,185,166,167,186,187,168],"write special chars readback","readback","helper","post","via","scripts","read","verification","cleanup"]