Command Palette

Search for a command to run...

Назад к скиллам
скилл № 92060

regenerate-sqlx-metadata

Regenerate committed SQLx offline query metadata for ag-store, ag-harness, or agentty after changing checked queries or migrations, using disposable databases…

БесплатноБез исполняемых скриптов
agentty-xyzот agentty-xyz★ 46 звёзд на GitHub

Установить regenerate-sqlx-metadata в Claude Code и Claude Desktop

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

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

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

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

Regenerate SQLx Metadata

Use this skill when a change adds, edits, or removes a checked SQLx query macro, or a migration the checked queries depend on. Install the SQLx CLI first. The commands below reset disposable databases under target/sqlx/; never point them at a real database. Preserve the committed metadata so checked macros keep working offline.

Steps

  1. Identify the crate that owns the changed queries. The committed metadata directories are crates/ag-store/.sqlx/, crates/ag-harness/.sqlx/, and crates/agentty/.sqlx/; keep the cache in the crate containing the checked queries.

  2. For store queries, run from the repository root:

    mkdir -p target/sqlx
    sqlx_database_url="sqlite://${PWD}/target/sqlx/ag-store.sqlite"
    (
      cd crates/ag-store
      DATABASE_URL="${sqlx_database_url}" cargo sqlx database reset -y
      AGENTTY_STORE_DATABASE_URL="${sqlx_database_url}" cargo sqlx prepare -- --all-targets --all-features
    )
    

    The store uses a crate-specific database variable so its native-harness dependencies continue to compile against their own offline metadata during preparation.

  3. For harness queries, which have their own migrations and metadata cache, run from the repository root:

    mkdir -p target/sqlx
    sqlx_database_url="sqlite://${PWD}/target/sqlx/ag-harness.sqlite"
    (
      cd crates/ag-harness
      DATABASE_URL="${sqlx_database_url}" cargo sqlx database reset -y
      DATABASE_URL="${sqlx_database_url}" cargo sqlx prepare -- --all-targets
    )
    
  4. For agentty queries, which are test and E2E support queries checked against the store schema, run from the repository root. Also run this step after a store migration change, because those queries depend on the store tables:

    mkdir -p target/sqlx
    sqlx_database_url="sqlite://${PWD}/target/sqlx/agentty.sqlite"
    (
      cd crates/ag-store
      DATABASE_URL="${sqlx_database_url}" cargo sqlx database reset -y
    )
    (
      cd crates/agentty
      AGENTTY_STORE_DATABASE_URL="${sqlx_database_url}" cargo sqlx prepare -- --all-targets
    )
    

    crates/agentty/sqlx.toml reads the same store variable, so leave DATABASE_URL unset here; otherwise the harness queries compiled as a dependency are checked against the store database and fail.

  5. Review the changed .sqlx/ files together with the query changes, then validate through skills/validate-changes/SKILL.md.

Handoff

Report the crates whose metadata was regenerated, the .sqlx/ files added, changed, or removed, and the checks run.

Полный SKILL.md на GitHub

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

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

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл regenerate-sqlx-metadata?

Regenerate committed SQLx offline query metadata for ag-store, ag-harness, or agentty after changing checked queries or migrations, using disposable databases under target/sqlx/.

Как установить скилл regenerate-sqlx-metadata?

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

Скилл regenerate-sqlx-metadata запускает скрипты?

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

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

Сравнить regenerate-sqlx-metadata с