Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Nifty Generated: Protect Generated FilesNew to Visual Studio Code? Get it now.
Nifty Generated: Protect Generated Files

Nifty Generated: Protect Generated Files

Nifty

| (0) | Free
Mark generated files in the Explorer, warn before anyone (or any AI agent) edits them, and optionally make them read-only.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Nifty Generated

Mark generated files in the Explorer, warn before anyone (or any AI agent) edits them, and optionally make them read-only.

Maintained. No sign-in. No telemetry. Works in VS Code, Cursor, Windsurf, VSCodium and other editors that use Open VSX.

Why

API clients, protobuf code, GraphQL types, Prisma clients, lockfiles: generated files look like normal code, and it's easy for you, a teammate or an AI agent to "fix" one, only for the change to vanish the next time it's regenerated. VS Code has no way to show which files are generated (#15370).

Features

Editing a generated API client: the G badges in the Explorer, the Generated padlock in the status bar and a warning with Undo Changes

List Generated Files: files found through .gitattributes, a Go header and a settings pattern, each with the reason

Generated files written to .cursorignore in a managed block below the project's own entries

  • Knows what's generated, automatically:
    • .gitattributes rules with linguist-generated (the same markers GitHub uses to collapse generated files in pull requests), including nested .gitattributes and -linguist-generated exceptions.
    • File headers such as @generated, DO NOT EDIT, auto-generated, and Go's standard // Code generated … DO NOT EDIT.
    • Your own patterns, e.g. *.pb.go, prisma/client/**, *.generated.ts.
  • Visible at a glance. Generated files get a faded G badge in the Explorer, and a Generated padlock appears in the status bar when you open one.
  • Stops accidental edits. The first time a generated file changes in a session, whether you typed it or an AI agent did, you get a warning with a one-click Undo Changes.
  • Read-only if you want. Turn on nifty.generated.readOnly and generated files open read-only.
  • Keep AI agents out. Add Generated Files to an AI Ignore File writes the list to .cursorignore, .aiignore, .codeiumignore or .geminiignore, in a managed block that updates in place and leaves your own entries alone.
  • List Generated Files shows them all in a quick-pick.
  • Works in the browser on vscode.dev and github.dev.

Commands

Command What it does
Nifty Generated: Is This File Generated? Explains why (also on right-click in the Explorer)
Nifty Generated: List Generated Files Browse all generated files
Nifty Generated: Add Generated Files to an AI Ignore File… Update .cursorignore, .aiignore and similar
Nifty Generated: Reload .gitattributes Re-read the rules

Settings

Setting Default What it does
nifty.generated.patterns [] Extra globs for generated files
nifty.generated.detectHeaders true Look for @generated / DO NOT EDIT headers
nifty.generated.warnOnEdit true Warn on the first edit to a generated file
nifty.generated.readOnly false Open generated files read-only
nifty.generated.explorerBadge true Show the G badge in the Explorer
nifty.generated.maxFiles 10000 Files checked when listing

Install

  • VS Code: search for "Nifty Generated" in the Extensions view, or install from the Visual Studio Marketplace.
  • Cursor, Windsurf, VSCodium, Kiro, Antigravity: install from Open VSX.

Privacy

This extension collects no telemetry, needs no account and makes no network requests.

More Nifty tools

  • Nifty AI Review: Review AI Agent Changes: Review what an AI agent changed, hunk by hunk: checkpoints before it runs, accept or reject each change, leave comments, and send your feedback back to the agent. (Open VSX)
  • Nifty Dependency Guard: Package Security Check: Catch risky dependencies before you install them: made-up (AI-hallucinated) packages, lookalike names, brand-new versions, install scripts and deprecations, in package.json and requirements.txt. (Open VSX)
  • Nifty gRPC: gRPC Client & Proto Support: Call gRPC services from .grpc files and edit .proto files: unary and streaming calls, metadata, TLS, request templates from your protos, outline and error checking. (Open VSX)
  • Nifty OpenAPI: Outline, Checks and Try It for API Specs: Edit OpenAPI and Swagger files with an outline, $ref navigation and completion, error checking, example payloads, and Try it requests for your REST client. (Open VSX)
  • Nifty Paste JSON as Code: JSON to Types: Turn JSON on your clipboard into types for TypeScript, C#, Go, Rust, Python, Java, Kotlin, Swift, Dart and more. (Open VSX)
  • Nifty REST Client: .http Files & HTTP Requests: Send HTTP requests from .http files: variables, environments, request chaining, response viewer, cURL import and export, and history. No account, no cloud. (Open VSX)

See all 100+ Nifty extensions and web tools at https://getnifty.dev

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft