code-generation

Detect stale code-generation outputs and refresh them via the repo's generator workflow.

1|1|Updated May 3, 2026
One-click install
npx skills add https://github.com/matt-riley/agent-skills --skill code-generation-matt-riley
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-generation
Source: https://github.com/matt-riley/agent-skills/tree/main/skills/code-generation
Command: npx skills add https://github.com/matt-riley/agent-skills --skill code-generation-matt-riley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires git, python3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Run and troubleshoot repository code generation after detecting the generator contract. Use when schema, query, spec, or template inputs changed, or generated output may be stale.

Core Features & Use Cases

  • Discover and invoke the repo's code-generation workflow to refresh artefacts in response to changed inputs.
  • Validate generated outputs against the repo contract, diff changes, and determine whether to commit or regenerate in CI/local environments.
  • Provide guardrails for safe regeneration, including tracing diffs back to generator inputs and avoiding manual edits of generated files.

Quick Start

Run the code-generation workflow to refresh generated artifacts after modifying generator-backed inputs.

Frequently Asked Questions about code-generation

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

FAQPage Schema
How do I refresh generated code when my repository schema or spec inputs change?

To refresh generated code after input changes, discover the repository's generation entrypoints and execute the generator to update artifacts. This validates resulting diffs and enforces proper handling of committed versus ephemeral files.

What is the best way to detect and fix stale generated outputs in a local development environment?

Detect and fix stale generated outputs by running the code-generation workflow to compare current inputs against committed artifacts. It identifies stale files, runs the generator, and validates the resulting diff to ensure synchronization.

Do I need git and python3 to run the code-generation workflow?

Yes, you need git and python3 installed to run the code-generation workflow. Git handles diff validation and artifact management, while python3 executes the generation scripts that discover and refresh repository artifacts.

Can I use this code-generation workflow to validate diffs in a CI pipeline?

Yes, you can use the code-generation workflow in CI to validate diffs. It executes the generator, compares changes, and determines whether artifacts should be committed or regenerated, ensuring pipeline integrity against the repo contract.

Why should I avoid manual edits to generated files when using a code generator?

Avoid manual edits to generated files because the code-generation workflow provides guardrails tracing diffs back to generator inputs. Manual changes break this traceability and will be overwritten during the next regeneration cycle.

When should I regenerate code artifacts instead of committing the current diff?

Regenerate code artifacts instead of committing when generated outputs are stale or violate the repo contract. The workflow discovers generation entrypoints and enforces proper handling of committed versus ephemeral artifacts to determine the correct action.