acus9345/dsh-protect-generated-files
Refuses write and edit calls on generated files and lockfiles — and in-place shell edits of them — then tells the model how the file is supposed to change instead.
Stops the class of edit that looks fine and gets wiped: a version patched into pnpm-lock.yaml, a typo fixed in generated protobuf Go, a type corrected in Prisma's client. It refuses write and edit calls on generated files and lockfiles, and also refuses sed -i, perl -pi, redirection and tee against them — but instead of a bare no it quotes the header that marks the file generated and names the command to run, such as editing the SQL and running sqlc generate.
Install
dsh plugin --profile web add dsh-protect-generated-filesREADME install line; npm dsh-protect-generated-files, latest 0.2.3, registry repository resolves to this repo. Each profile keeps its own plugin list, so the README says to add it to headless and acp as well if you use them; it is active right after installing.
Compatibility
Works in the web profile and equally in headless (scripts and CI) and acp (editor integrations), one install per profile. Settings tune how it decides a file is generated, and the README documents when a hand edit is the right call.
Details
- Repo: acus9345/dsh-protect-generated-files
- Category: Coding & Development
- Stars: 2
- Version: 0.2.3 (npm); MIT
Alternatives
omdsh-dev/dsh-at-file · shaokeyibb/dsh-plugin-product-subagents · KYinCode/dsh-project-mcp-bridge