Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

generator-audit

БесплатноБез исполняемых скриптовНе проверен

Audit LinkML generators for conformance to the project's architecture, conventions, and design ethos (how a generator is built, not whether its output is…

linkmlот linkml★ 716 звёзд на GitHub

Об этом скилле

Generator Audit Skill

Audit whether LinkML generator(s) follow our documented architecture and design ethos — not whether their output is correct (that's the compliance suite's job), but whether the generator itself is built the way our generators are supposed to be built. The goal is that a generator handed to an outside contributor keeps tracking our core conventions without core-team review on every change.

If the user names a generator (e.g. jsonschema, pydantic, or a path under packages/linkml/src/linkml/generators/), do a deep single-generator audit. Otherwise, survey all generators and rank them by how far each has drifted from the ethos, most-divergent first.

Read generator source structure. Do not run generators, diff generated artifacts, or execute the compliance suite — those test output, and this is about how the code is written. (You should check whether a generator is registered for compliance and has tests, as conformance signals — see Layer 3 — but don't run them.)

The reference: how our generators are supposed to work

There is no single spec doc; the contract lives in the code. Ground the audit in these:

  • Base class — packages/linkml/src/linkml/utils/generator.py. Generator is an abc.ABCMeta @dataclass. Its module docstring states the central rule: generators are either old-style (SchemaLoader + visitor pattern) or new-style (SchemaView, no visitor), and new generators must always be SchemaView-based (issue #923).
  • Shared machinery — packages/linkml/src/linkml/generators/common/: LifecycleMixin (lifecycle.py), BuildResult (build.py), TemplateModel (template.py), plus naming.py, subproperty.py, ifabsent_processor.py, type_designators.py. Reusing these instead of reinventing them is the ethos.
  • Exemplars — packages/linkml/src/linkml/generators/jsonschemagen.py (dict-subclass output strategy) and packages/linkml/src/linkml/generators/pydanticgen/ (model/template-driven strategy). Use them as worked examples of each criterion below.
  • Governance intent — docs/maintainers/generator-governance.md for why per-generator conformance matters.

The exemplars are references, not gospel. They demonstrate the conventions but they are not guaranteed perfect. Where an exemplar itself violates a rubric principle (a lingering deprecated field, an inconsistency, a hand-rolled shortcut), the rubric governs — flag the exemplar's deviation if it's relevant, and never treat "jsonschemagen/pydanticgen does it this way" as license for the audited generator to do the same when it conflicts with the rubric below. When the two exemplars disagree with each other, say so and reason from the rubric.

Findings vs. maturity tier — read this before scoring

Separate two very different things, and never conflate them:

  • Findings = things that are wrong relative to what the generator is trying to be. These are defects at any altitude: mutating shared schema state without a deep copy, a uses_schemaloader flag that contradicts the generator's actual style, reinventing common/ logic, defining lifecycle hooks instead of firing them, swallowed errors, missing tests. Findings are actionable and belong in the report as work to do.
  • Maturity tier = a label describing where a generator sits on the architecture curve (modern SchemaView vs. legacy visitor/SchemaLoader). Being a legacy visitor generator is not a finding — most of these predate the SchemaView direction (#923) and porting them is a large, separately-tracked migration, not something to charge against the current code. Report it as a tier with a pointer to the target pattern, not as a failure.

The "new generators must be SchemaView" rule is a gate on new or materially-changed generators (apply it in review of a generator PR), not a retroactive verdict on the existing legacy set. When you audit an existing legacy generator, label its tier and move on; only raise findings for things wrong within that generator's own design.

The rubric

Assess each generator across three layers. Interface issues are cheap to fix; ethos issues are the ones that actually matter for keeping a contributor-owned generator on-model. Classify each item as a finding (defect) or a tier label per the section above.

Layer 1 — Interface & structural conformance (mechanical)

  • @dataclass subclass of Generator (or OOCodeGenerator for object-oriented code generators).
  • Declares the self-identifying ClassVars: generatorname = os.path.basename(__file__), generatorversion, valid_formats (first entry is the default), file_extension.
  • Sets uses_schemaloader = False (see Layer 2 — this is the load-bearing one).
  • __post_init__ calls super().__post_init__().
  • Overrides serialize(self, **kwargs) -> str and returns a string.
  • CLI entrypoint: @shared_arguments(TheGenerator) + `@click.comma
Полный SKILL.md на GitHub

Установить generator-audit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Grep
Glob
Bash

FAQ

Что делает скилл generator-audit?

Audit LinkML generators for conformance to the project's architecture, conventions, and design ethos (how a generator is built, not whether its output is correct). Use when reviewing a generator PR, before handing a generator to a contributor, or to survey which generators have drifted from the SchemaView / common-machinery conventions. Optionally scope to one generator by name (e.g. jsonschema); omit to survey all.

Как установить скилл generator-audit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл generator-audit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить generator-audit с