Index of every page on this site: llms.txt
All skills
joshmedeski avatar

/config-schema-sync

@b3b3aa2
by Josh Medeskijoshmedeski/sesh2.9k stars
141
Run it yourself

Use when reviewing, writing, or committing changes that touch model/config.go or any TOML config struct in this repo. Verifies that every added, renamed, or removed TOML field has a matching update in sesh.schema.json so the JSON schema used by TOML editors (via `#:schema` directive) stays in sync with the Go config model. Trigger whenever a diff touches files under model/, configurator/, or any struct tagged with `toml:"..."`.

  • 1 file
  • 2.9 KB
  • Updated 3 months ago
  • GitHub
Use this Skill: https://skilld.dev/gh/joshmedeski/sesh/config-schema-sync

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

SKILL.md

≈113 tokens for metadata: the name and description. ≈606 when used: this file.

Description uses 5.7% of example budget

Before choosing a Skill, your Agent reads its name and description. All available Skills share that space.

  • A shorter description leaves more room for other Skills. This entry exceeds our 1% size suggestion.

In our Claude Code example, all Skill names and descriptions share 8,000 characters. This Skill uses ≈452 characters, or 5.7%.

The 1% threshold is a size suggestion. Longer descriptions can still fit.

Your model, settings, and other Skills decide how much text your Agent can read.

Example settings and source

The example uses a 200k-token context and default Claude Code settings. The count includes the name, description, separators, and when_to_use when present. Codex also counts local file paths.

Skit's source and limits: Codex 0.160.1, Claude Code 2.1.292.

Config ↔ Schema Sync Check

The sesh.schema.json file at the repo root is the public JSON Schema that TOML editors load via #:schema https://github.com/joshmedeski/sesh/raw/main/sesh.schema.json. Any config field that exists in Go but is missing from the schema produces "Additional properties are not allowed" errors for users (see issue #367 for precedent).

When to run this check

Run whenever a change touches any of:

  • model/config.go
  • Any Go struct with toml:"..." tags
  • Files under configurator/

Procedure

  1. List the TOML fields added/renamed/removed in the diff:

    git diff --unified=0 -- model/config.go configurator/ | rg 'toml:"[^"]+"'
  2. For every changed field, verify sesh.schema.json matches. Map the Go struct to its schema location:

    Go struct Schema path
    Config top-level properties
    DefaultSessionConfig properties.default_session.properties
    SessionConfig properties.session.items.properties
    WindowConfig properties.window.items.properties
    WildcardConfig properties.wildcard.items.properties

    Check each changed field:

    rg '"<field_name>"' sesh.schema.json
  3. Report discrepancies. For each field present in Go but missing (or stale) in the schema, either:

    • Add it to the schema with an appropriate type, description, and default where applicable, or
    • Flag it in the review output so the author can decide.
  4. Preserve schema conventions when editing:

    • additionalProperties: false on nested objects — keep it.
    • description is required and should mirror the field's purpose (not just restate the name).
    • Include default when the Go zero-value is meaningful.
    • Use type: "string" | "boolean" | "integer" | "array" matching the Go type.

Quick diff-check one-liner

# Extract TOML field names from Go, compare against schema
comm -23 \
  <(rg -o 'toml:"([^,"]+)' -r '$1' model/config.go | sort -u) \
  <(rg -o '"([a-z_]+)":\s*\{' -r '$1' sesh.schema.json | sort -u)

Any field printed is in Go but not in the schema — investigate.

Do not

  • Do not bump the schema $id URL.
  • Do not remove additionalProperties: false to "fix" a missing field — add the field instead.
  • Do not add fields to the schema that are not yet merged in Go; the schema should track main.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at b3b3aa2. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 days ago.

Activeupdated 3 months ago
metadata
{
  "internal": true
}

README badge

README badge for joshmedeski/sesh/config-schema-sync