skillfed

Fix Schema

Fix Schema resolves session log validation failures by updating Zod schemas to handle new data formats without breaking existing JSONL files. It guides you through locating the relevant schema, updating type definitions, adding tests, and creating a pull request with all changes verified.

Fix Schema updates Zod schemas to resolve session log validation errors while preserving backward compatibility.

AI-generated summary based on this skill's SKILL.md

1,262 154 MIT updated by d-kimuson

Install

d-kimuson/claude-code-viewer/fix-schema · repository language: TypeScript

git clone https://github.com/d-kimuson/claude-code-viewer
cp -r claude-code-viewer/.agents/skills/fix-schema ~/.claude/skills/fix-schema
npx skillfed install d-kimuson/claude-code-viewer/fix-schema

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does Fix Schema handle zod schema parse errors?

Fix Schema resolves Zod schema parse errors by identifying validation failures in session logs, updating the schema definitions to accommodate new data formats, and ensuring backward compatibility with existing JSONL files. The tool guides you through locating the relevant schema, modifying type definitions, and verifying changes before creating a pull request.

Can Fix Schema update JSON schema while maintaining backward compatibility?

Yes. Fix Schema is designed to update JSON schemas for backward compatibility by supporting new data formats in session logs without breaking existing format support. It automates the process of identifying incompatible changes, updating TypeScript types, and running validation tests to confirm that schema modifications don't corrupt or reject previously valid data.

What does Fix Schema do to fix type errors in schema?

Fix Schema resolves TypeScript type errors by updating conversation schemas, fixing parse errors in type definitions, and ensuring type safety across your codebase. It automates schema fixes and creates pull requests with comprehensive type safety verification, allowing you to address validation failures systematically.

How can Fix Schema help with session log schema validation?

Fix Schema addresses session log schema validation by detecting Zod validation failures, updating schemas to handle new JSON data formats, and running tests to ensure changes don't break existing data. It provides automated guidance for locating schemas, updating types, adding tests, and creating verified pull requests with all modifications.

Does Fix Schema automate schema fixes and create pull requests?

Yes. Fix Schema automates schema fixes by identifying validation errors, updating type definitions, and creating pull requests with type safety verification included. The tool streamlines the entire process from error detection through schema updates to PR creation, ensuring all changes are tested and validated before submission.

What license does Fix Schema use?

Fix Schema is released under the MIT license, allowing free use, modification, and distribution of the tool for both commercial and personal projects.

SKILL.md

rendered from the published skill — quoted content, verbatim

<role> Fix schema parse errors in session logs by updating Zod schemas to support new data formats while maintaining backward compatibility. Create PR after verification. </role>

<input> User provides failing JSON data from session logs. The data structure indicates what needs to be supported. </input>

<workflow> 1. Locate and update schema: - Identify schema file in src/lib/conversation-schema/ based on JSON type field - Update schema to support new data format - Maintain backward compatibility with existing JSONL files

2. Fix type errors:

  • Update affected components to handle new schema types
  • Follow project type safety rules (no as casting)

3. Add tests:

  • Create or update test files for modified schemas
  • Verify both old and new formats parse successfully

4. Verify and commit:

  • Run pnpm typecheck (must pass)
  • Run pnpm test (must pass)
  • Run pnpm fix
  • Commit changes

5. Create PR:

  • Push branch
  • Create draft PR with summary of schema changes </workflow>

<principles> - **Backward

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 1 file
.agents/skills/fix-schema/SKILL.md

Related skills

Tags

schema-validation type-safety backward-compatibility zod-schemas json-parsing pr-automation typescript-fixes data-migration