gendoc-shared

Validate and initialize the gendoc state file before downstream skills run.

Updated Apr 22, 2026
One-click install
npx skills add https://github.com/ibalasite/gendoc --skill gendoc-shared
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gendoc-shared
Source: https://github.com/ibalasite/gendoc/tree/main/skills/gendoc-shared
Command: npx skills add https://github.com/ibalasite/gendoc --skill gendoc-shared

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

gendoc-shared provides a standardized entrypoint for gendoc, implementing the §-1 R-01 State File Guard to ensure a valid, up-to-date state file exists before downstream skills run. It centralizes initialization and safety checks, reducing manual error and improving resilience.

Core Features & Use Cases

  • Initialization guard: detects missing or old state files and triggers full configuration via gendoc-config.
  • State integrity: validates JSON structure, writes atomically, preserves critical fields across updates.
  • Compatibility checks: detects legacy schemas (e.g., old _INIT_STATE formats) and halts with actionable guidance.
  • Reuse across skills: provides a common, safe baseline for all gendoc steps, ensuring consistent start state.
  • Use Case: when starting a new project, the shared guard ensures the state machine is prepared and safe for first-run.

Quick Start

Execute /gendoc-config to perform a full initialization and setup of the state machine for gendoc-shared.

Frequently Asked Questions about gendoc-shared

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

FAQPage Schema
How do I guard a state file before running execution steps?

To guard a state file, this shared logic validates the existence and integrity of the JSON state machine before downstream steps run, triggering initialization if the file is missing. It ensures a safe baseline for all subsequent execution stages.

What happens when an outdated state schema is detected?

When an outdated state schema is detected, the guard halts execution and provides actionable guidance to resolve the legacy format. This compatibility check prevents errors from processing old or invalid state structures.

How do I write JSON state atomically while preserving critical fields?

You can write JSON state atomically using a safe helper that preserves client_type, execution_mode, and max_rounds during updates. This enforces versioning and maintains data integrity across configuration changes.

Do I need to manually initialize the state machine for a new project?

You do not need to manually initialize the state machine for a new project. The initialization guard detects missing state files and triggers full configuration automatically, preparing a safe first-run environment.

Why does the state file guard halt execution when it finds a legacy schema?

The state file guard halts execution upon finding a legacy schema to prevent data corruption. It enforces strict versioning and provides actionable guidance to update the old format before proceeding.