{"record":{"id":"4596bcb3bc8bee9e","repo":"CoplayDev/unity-mcp","slug":"remote-directory-not-found-normalizedsubdir","errorCode":null,"errorMessage":"Remote directory not found: {normalizedSubdir}","messagePattern":"Remote directory not found: (.+?)","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"MCPForUnity/Editor/Setup/SkillSyncService.cs","lineNumber":239,"sourceCode":"                    ? remotePath\n                    : remotePath.Substring(subdirPrefix.Length);\n                if (string.IsNullOrWhiteSpace(relativePath) || string.IsNullOrWhiteSpace(entry.sha))\n                {\n                    continue;\n                }\n\n                if (!TryNormalizeRelativePath(relativePath, out var safeRelativePath))\n                {\n                    log?.Invoke($\"Skip unsafe remote path: {remotePath}\");\n                    continue;\n                }\n\n                remoteFiles[safeRelativePath] = entry.sha.Trim().ToLowerInvariant();\n            }\n\n            if (remoteFiles.Count == 0)\n            {\n                throw new InvalidOperationException($\"Remote directory not found: {normalizedSubdir}\");\n            }\n\n            log?.Invoke($\"Remote file count: {remoteFiles.Count}\");\n            return new RemoteSnapshot(commitSha, normalizedSubdir, remoteFiles);\n        }\n\n        private static string FetchBranchHeadCommitSha(HttpClient client, GitHubRepoInfo repoInfo, string branch, Action<string> log)\n        {\n            var branchApiUrl = BuildBranchApiUrl(repoInfo, branch);\n            log?.Invoke($\"Fetching branch head commit...\");\n            var branchJson = DownloadString(client, branchApiUrl);\n            var branchResponse = JsonUtility.FromJson<GitHubBranchResponse>(branchJson);\n            var commitSha = branchResponse?.commit?.sha?.Trim();\n            if (string.IsNullOrWhiteSpace(commitSha))\n            {\n                throw new InvalidOperationException($\"Failed to resolve branch head commit SHA for: {branch}\");\n            }\n","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/CoplayDev/unity-mcp/blob/c21bf496bca87d54e75bad048563c3adb1782081/MCPForUnity/Editor/Setup/SkillSyncService.cs#L221-L257","documentation":"After filtering the full tree by the skill subdir prefix, zero blob entries remained. The configured SkillSubdir (.claude/skills/unity-mcp-skill) does not exist at the fetched commit, so there is nothing to sync.","triggerScenarios":"The branch does not contain the skill directory; the directory was renamed or moved; the wrong branch was selected; a fork removed the skill files.","commonSituations":"Syncing against a branch that predates the skill directory; fork reorganized the repo layout; typo in the configured subdir (hardcoded constant).","solutions":["Confirm the directory exists in the repo at the target branch via the GitHub UI.","Switch to a branch that contains the skill files (main or beta).","If the directory was renamed upstream, update to the latest version of the package.","Use the default repo (CoplayDev/unity-mcp) which is known to contain the directory."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Confirm the skill directory exists on the target branch before syncing.","Prefer the default repo/branch unless you maintain a fork with the same layout.","Watch for upstream directory renames when upgrading the package."],"tags":["github","config","branch","missing"],"backgroundTag":null,"analyzedSha":"c21bf496bca87d54e75bad048563c3adb1782081","analyzedAt":"2026-08-13T17:36:56.095Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}