You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Skills across this marketplace instruct agents to create ephemeral files with mktemp, and the flag forms in use are either deprecated or not portable to macOS. There is currently no single documented form that is both.
Verified empirically in this environment (Git Bash on Windows, GNU coreutils 8.32):
$ mktemp --help | grep -A1 '^ -t'
-t interpret TEMPLATE as a single file name component,
relative to a directory: $TMPDIR, if set; else the
GNU's own help text marks -t[deprecated]. Meanwhile --tmpdir is a GNU long option that BSD mktemp does not implement, so it is unavailable on macOS — which several of these skills explicitly claim to support, since they emit open <path> for macOS in the very same instruction block.
So today a skill author picks between a deprecated flag and a non-portable one.
Why this matters more than it looks
A baremktemp with a relative template is actively dangerous, which is what pushes authors toward these flags in the first place:
$ cd <a repo worktree>
$ mktemp -u fc-test-XXXXXX
fc-test-tdvDNS # relative — creates the file IN THE REPO
$ mktemp -u -t fc-test-XXXXXX
/tmp/fc-test-s5WOPv # correct
$ mktemp -u
/tmp/tmp.wU8JAOjsg6 # correct
GNU's implicit --tmpdir applies only when no template is given. A producer supplying a relative template to preserve a readable filename — mktemp clarify-XXXXXX.html, the natural thing to write — creates the file in the current working directory. For a skill running inside a consumer's repository, that violates the topic-docs ephemeral tier's own "Never in the repo" rule and leaves an untracked file in their tree.
So the flag is not optional decoration; it is what keeps the file out of the repo. Which makes "there is no correct flag" a real gap rather than a style nit.
Scope
The flag choice originates in plugins/architecture/skills/improve/actions/deepening.md and has since been copied into other skills, including the five touched by PR #1708. It is a marketplace-wide inheritance, not a defect introduced by any one PR.
A sweep for mktemp across plugins/** will find the full set; every call site needs the same answer, so this wants one decision recorded in an owner doc rather than five independent judgements.
Proposed work
Determine a mktemp form that is non-deprecated and portable across GNU coreutils and BSD/macOS, verified by actually running it on both rather than by reading man pages. A candidate worth testing first is setting the directory explicitly and passing an absolute template:
which sidesteps both -t and --tmpdir. Confirm the .html suffix survives on BSD — GNU auto-implies --suffix when the template does not end in X, and BSD's behavior here needs checking, not assuming.
Record the chosen form in the topic-docs ephemeral tier as the normative instruction, so rule 1 names a specific portable invocation instead of "the platform's temp primitive".
Migrate every existing call site to that form.
State plainly what happens where no portable form exists, if that turns out to be the case — an honest per-platform branch beats a form that silently misbehaves on one of them.
Acceptance criteria
A portable, non-deprecated mktemp form is identified and verified by execution on both GNU and BSD, with the outputs recorded.
The topic-docs ephemeral tier names that exact form.
Every mktemp call site under plugins/** uses it; a sweep confirms no bare-relative-template invocations remain.
If no single portable form exists, the per-platform branch is documented explicitly rather than left to the author.
References
docs/conventions/topic-docs/README.md — the ephemeral tier and its "Never in the repo" rule
plugins/architecture/skills/improve/actions/deepening.md — origin of the current flag choice
Context
Skills across this marketplace instruct agents to create ephemeral files with
mktemp, and the flag forms in use are either deprecated or not portable to macOS. There is currently no single documented form that is both.Verified empirically in this environment (Git Bash on Windows, GNU coreutils 8.32):
GNU's own help text marks
-t[deprecated]. Meanwhile--tmpdiris a GNU long option that BSDmktempdoes not implement, so it is unavailable on macOS — which several of these skills explicitly claim to support, since they emitopen <path>for macOS in the very same instruction block.So today a skill author picks between a deprecated flag and a non-portable one.
Why this matters more than it looks
A bare
mktempwith a relative template is actively dangerous, which is what pushes authors toward these flags in the first place:GNU's implicit
--tmpdirapplies only when no template is given. A producer supplying a relative template to preserve a readable filename —mktemp clarify-XXXXXX.html, the natural thing to write — creates the file in the current working directory. For a skill running inside a consumer's repository, that violates the topic-docs ephemeral tier's own "Never in the repo" rule and leaves an untracked file in their tree.So the flag is not optional decoration; it is what keeps the file out of the repo. Which makes "there is no correct flag" a real gap rather than a style nit.
Scope
The flag choice originates in
plugins/architecture/skills/improve/actions/deepening.mdand has since been copied into other skills, including the five touched by PR #1708. It is a marketplace-wide inheritance, not a defect introduced by any one PR.A sweep for
mktempacrossplugins/**will find the full set; every call site needs the same answer, so this wants one decision recorded in an owner doc rather than five independent judgements.Proposed work
Determine a
mktempform that is non-deprecated and portable across GNU coreutils and BSD/macOS, verified by actually running it on both rather than by reading man pages. A candidate worth testing first is setting the directory explicitly and passing an absolute template:which sidesteps both
-tand--tmpdir. Confirm the.htmlsuffix survives on BSD — GNU auto-implies--suffixwhen the template does not end inX, and BSD's behavior here needs checking, not assuming.Record the chosen form in the topic-docs ephemeral tier as the normative instruction, so rule 1 names a specific portable invocation instead of "the platform's temp primitive".
Migrate every existing call site to that form.
State plainly what happens where no portable form exists, if that turns out to be the case — an honest per-platform branch beats a form that silently misbehaves on one of them.
Acceptance criteria
mktempform is identified and verified by execution on both GNU and BSD, with the outputs recorded.mktempcall site underplugins/**uses it; a sweep confirms no bare-relative-template invocations remain.References
docs/conventions/topic-docs/README.md— the ephemeral tier and its "Never in the repo" ruleplugins/architecture/skills/improve/actions/deepening.md— origin of the current flag choicemktemp --help(-tmarked deprecated); BSDmktemp(1)has no--tmpdir