一键导入
gitignore-worktree-debugging
Diagnose missing files in git worktrees — when a file exists in the main worktree but not in a linked worktree, check .gitignore
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Diagnose missing files in git worktrees — when a file exists in the main worktree but not in a linked worktree, check .gitignore
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Expert instructions to implement and verify ML-DSA-65 post-quantum cryptographic signatures and agentic workflow security.
Post-quantum cryptography secrets management system for protecting API keys, tokens, and private data. Includes the 10 browser_secrets_* MCP tools (betterbrowsermcp v0.7.0+ rotates v0.8.0+), the append-only audit log at ~/.config/pqc-secrets/audit.log, and the PQC Rust binary (ML-KEM-768 + AES-256-GCM).
Integrate ML-KEM-768 + AES-256-GCM key persistence into a Node.js server via a Python UV inline script
Debug silent JS failures from template literal backslash escaping when embedding JS strings in server-rendered HTML
| name | gitignore-worktree-debugging |
| description | Diagnose missing files in git worktrees — when a file exists in the main worktree but not in a linked worktree, check .gitignore |
| source | auto-skill |
| extracted_at | 2026-05-30T00:47:23.478Z |
When files that exist in the main worktree are mysteriously absent from a linked git worktree, the cause is almost always .gitignore.
foo.txt exists and works in the main worktree (/repo)git worktree add is missing foo.txtgit ls-files foo.txt returns nothing or shows it's untrackedfoo.txt from process.cwd()git worktree add creates a fresh checkout of the branch. Gitignored files are never tracked, so they're never checked out into the new worktree. The file only exists in the main worktree because someone created it there manually (or it was force-added in a past commit that has since been undone).
# 1. Confirm the file exists on disk in the main repo but isn't tracked
git ls-files foo.txt # empty → not tracked
ls -la foo.txt # exists on disk → gitignored
# 2. Confirm gitignore is the culprit
git check-ignore foo.txt # prints the path if ignored
# 3. Check which gitignore rule matches
grep -n 'foo' .gitignore # find the blocking pattern
.gitignoregit add -f foo.txt to force-add it.gitignore change and the newly tracked fileIf the file genuinely shouldn't be tracked (contains secrets), the application must generate or download it at runtime rather than relying on it being present in the working directory.
The AGENTS.md workflow requires one worktree per task. If essential runtime files are gitignored, every new worktree will be broken. This creates a misleading situation where the code "works in the main repo" but fails in every worktree — leading to wasted debugging time chasing phantom issues.
.gitignore for entries that match runtime-required non-secret files