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.

Coding & Development ★ 2
View on GitHub ↗

Install

dsh plugin --profile web add dsh-protect-generated-files

README 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

Alternatives

omdsh-dev/dsh-at-file · shaokeyibb/dsh-plugin-product-subagents · KYinCode/dsh-project-mcp-bridge

More plugins in Coding & Development

Browse more in Coding & Development

Guides for Coding & Development plugins