no-edit-generated

Prevent manual edits to GraphQL codegen files and enforce npm run codegen workflows.

2|Updated Aug 18, 2025
One-click install
npx skills add https://github.com/ESO-Toolkit/eso-toolkit --skill no-edit-generated
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: no-edit-generated
Source: https://github.com/ESO-Toolkit/eso-toolkit/tree/main/.github/skills/no-edit-generated
Command: npx skills add https://github.com/ESO-Toolkit/eso-toolkit --skill no-edit-generated

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents developers from manually editing auto-generated files, which leads to merge conflicts and wasted effort, ensuring code integrity and maintainability.

Core Features & Use Cases

  • Conflict Prevention: Identifies and guides users away from editing files that should be regenerated.
  • Workflow Guidance: Provides clear instructions on when and how to regenerate code, especially after schema changes or merge conflicts.
  • Use Case: When you encounter a merge conflict in a file like src/graphql/generated/types.ts, this Skill reminds you to run npm run codegen instead of manually resolving the conflict.

Quick Start

Run npm run codegen to regenerate generated files.

Frequently Asked Questions about no-edit-generated

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resolve merge conflicts in GraphQL codegen generated files?

To resolve merge conflicts in GraphQL codegen generated files, do not manually edit the files; instead, run `npm run codegen` to regenerate the code and overwrite the conflicts.

Why should I never edit generated files in a TypeScript project?

You should never edit generated files in a TypeScript project because manual changes cause merge conflicts and outdated types, leading to wasted effort and breaking code integrity during schema updates.

What is the best way to update GraphQL generated types after a schema change?

The best way to update GraphQL generated types after a schema change is to run the regeneration workflow using `npm run codegen` rather than applying manual modifications to the generated output.

Does manually editing codegen output break the developer workflow?

Manually editing codegen output breaks the developer workflow by introducing persistent merge conflicts and outdated types that conflict with the automated regeneration process.

When do I need to run npm run codegen instead of fixing code directly?

You need to run `npm run codegen` instead of fixing code directly whenever you encounter merge conflicts in generated files or after a GraphQL schema change that requires updated TypeScript types.