Логотип Write Case

Write Case

Сообщество
jameskomo
write-case

Author or fix an eval case (prompt.md, graders/*.md, case.yaml) for a Claude Code plugin, skill, or hook in the official `claude plugin eval` format. Use when the user says "write an eval for", "add a test case for this skill/hook", "my grader is wrong", or "how do I assert the hook fired". Do not use to run the suite or explain a red result (that is run), or to fix the setup after a regression (that is repair).

Обзор

Издательjameskomo
Репозиторийconfig-drift-checker
Название навыкаwrite-case
Звёзды
33
Форки
1
Встроенные файлы
Только инструкции
Ссылки
  • Инструкции в формате Markdown

    Файл SKILL.md, который модель загружает по необходимости, поэтому токены расходуются только при подходящем запросе.

  • Работает с любой языковой моделью

    Навыки ИИ — это обычный Markdown, а не код для конкретного поставщика, поэтому они работают с GPT, Claude, Gemini, Grok и локальными моделями.

  • Всё необходимое — в инструкциях

    Всё необходимое для модели содержится в инструкциях — никаких дополнительных файлов для синхронизации.

  • Открытый исходный код

    Опубликовано на GitHub: jameskomo. Перед установкой изучите исходные материалы.

Установка

Установите навык ИИ Write Case в TypingMind, чтобы использовать его с любой LLM, или добавьте его в другой агент, который умеет читать SKILL.md.

1

Установка в TypingMind

TypingMind устанавливает навык прямо из его папки на GitHub: читает SKILL.md, собирает файлы ресурсов и сохраняет результат локально.

  1. Откройте приложение и перейдите в раздел «Плагины → Навыки».
  2. Выберите «Установить из GitHub».
  3. Вставьте указанную ниже ссылку на папку навыка и подтвердите установку.
    https://github.com/jameskomo/config-drift-checker/tree/main/config-drift-checker/skills/write-case
  4. Включите навык в каждом чате, где хотите его использовать.
Плагины → Навыки → Новый навык → По ссылке GitHub, затем вставьте ссылку на папку и нажмите «Продолжить».
2

Установка в другом агенте

Любой агент с поддержкой формата Agent Skills может использовать этот навык — скопируйте папку в каталог навыков этого агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/jameskomo/config-drift-checker.git /tmp/config-drift-checker
mkdir -p .claude/skills
cp -r /tmp/config-drift-checker/config-drift-checker/skills/write-case .claude/skills/write-case
После копирования перезапустите Claude Code, чтобы загрузить новый навык.

Использование в TypingMind

Включите навык Write Case в любом чате TypingMind, и дальше модель всё сделает сама. Его название и описание хранятся в системном промпте, а при появлении подходящего запроса модель сама загружает полные инструкции. Вам не нужно вызывать навык вручную, и до фактического использования он не расходует токены.

Модель сама загружает навык Write Case, как только появляется подходящий для него запрос.

Работает с любой моделью ИИ

Навыки ИИ — это обычные инструкции в Markdown, а не код для конкретного поставщика, поэтому навык Write Case не привязан к модели, для которой он был создан. Установите его один раз в TypingMind и используйте с GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama или локальной моделью, которую запускаете самостоятельно, — со своими API-ключами.

  • Загружается только при необходимости

    Системный промпт содержит только название и описание. Инструкции загружаются при первом подходящем запросе, поэтому неиспользуемый навык не расходует токены.

  • Меняйте модели прямо в чате

    Навык состоит из инструкций, а не кода, поэтому смена модели не нарушает его работу: новая модель читает тот же файл SKILL.md.

Инструкции навыка

Это содержимое файла SKILL.md, которое загружает модель. Прочитайте его перед установкой: навык — это инструкции, которым будет следовать ваша модель.

config-drift-checker: write-case

Layout: <plugin>/evals/<case-dir>/prompt.md, graders/<name>.md, optional case.yaml.

prompt.md frontmatter: name, description (one sentence a reviewer would read in the report: what this case proves and which part of the setup it exercises), tags: [..], a covers.yaml sidecar next to prompt.md (the rule ids this case exercises; node ${CLAUDE_PLUGIN_ROOT}/tools/config-coverage.mjs <plugin> --list prints them; a negative-trigger case covers nothing, that is correct). Target ids the --list output marks · (uncovered) before adding a second case for a ✓ one. Every new case should move the coverage %, which the Action reports and can enforce with coverage-min. runs (3), max_turns, timeout_seconds, allowed_tools: [Bash] (only what the case needs), model. Body = the user prompt, written the way a real user would write it (do not mention the skill or hook by name).

graders/*.md frontmatter type:

  • regex: pattern, flags, match: contains|not_contains|count:N, target
  • tool_used: tool, input_match, min, max
  • file_exists: path (glob), exists
  • llm: focus (never target: the official runner rejects it on llm graders); the file body is the criteria (one paragraph; "score 1 only if all hold")
  • any grader: weight, and arm: with-only or arm: both (the only two values the official runner accepts)

What target (regex) and focus (llm) can point at, exactly as claude plugin eval defines it: last_message (default), trace, files (the list of paths Claude created, not their contents), or { source: file, path: <path> } (the contents of one workspace file after the run). To grade code, either ask the agent to print it ("Print the complete Java source in your reply") and grade last_message, or grade the file it must write with { source: file, path: ... }. Body = one sentence a reviewer would understand.

case.yaml (schema_version: "1.1", and name equal to the case's directory name so --case globs match the folder under both runners): context.scaffold_script names a script file in the case directory (scaffold.sh), never an inline script: it gives the agent a state to act on (a git repo, a file, a branch). The official runner runs it with no EVAL_* variables, so a script that needs the plugin's files locates itself: ROOT="${EVAL_PLUGIN_ROOT:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}". context.add_dirs lists read-only fixture directories.

Rules that came from real failures

  1. not_contains graders must match code position (^\s*@Autowired, flag m), never a word that can appear in prose, because the model will say "I avoided X".
  2. A negative-trigger case (tool_used: Skill, max: 0, arm: both) for every skill.
  3. Hook cases: choose a command the model will attempt in a scratch repo (git reset --hard HEAD, git clean -fd), not one it refuses on its own (git push --force origin main). Assert three things: attempted (tool_used Bash), reported blocked (regex), not succeeded (regex not_contains on success phrases like "HEAD is now at|ran successfully").
  4. tool_used: Skill graders are indicators under ablation, not score. That is correct; add arm: both only when the assertion must hold without the plugin too.
  5. Keep prompts short and realistic; put setup in scaffold_script, not in the prompt.
  6. Regex over Java/TS: never rely on name\([^)]*\) to find a method; parameter annotations contain parentheses. Anchor on something unique and flat (the mapping annotation string, the record name) and use a bounded lazy window [\s\S]{0,900}?.
  7. Test every regex against a hand-written snippet of the expected code with node -e before spending an agent run; a grader that fails a correct answer costs more trust than it saves.
  8. Safety (learned the hard way): the without-arm has no guard, and workspaces do not sandbox Docker, the network, or the host. A hook case's command must be harmless when it succeeds: scratch git repo, or a stub binary created by scaffold_script in .eval-bin/ (printf '#!/usr/bin/env bash\necho stub $*\n' > .eval-bin/docker-compose; chmod +x …). The runner's safety net blocks compose down -v / prune / force-push / rm -rf outside the workspace unless the binary is stubbed. Check for name:/container_name: in compose files and for real remotes before writing the prompt.
  9. Turn budgets: real-code cases need max_turns: 30 (read → edit 2–4 files → test); single-file or prose cases 12; hook cases 6. Runs that hit the cap are scored as-is and flagged TRUNCATED; a signal to raise the budget, not a failure of the setup.

Часто задаваемые вопросы

Что делает навык ИИ Write Case?

Author or fix an eval case (prompt.md, graders/*.md, case.yaml) for a Claude Code plugin, skill, or hook in the official `claude plugin eval` format. Use when the user says "write an eval for", "add a test case for this skill/hook", "my grader is wrong", or "how do I assert the hook fired". Do not use to run the suite or explain a red result (that is run), or to fix the setup after a regression (that is repair).

Зачем использовать Write Case в TypingMind?

Потому что вы устанавливаете навык один раз и используете его с любой моделью. Write Case — это обычный текст в формате Markdown, а не код для конкретного поставщика, поэтому один и тот же навык работает с GPT-5, Claude, Gemini, Grok или локальной моделью. Вы можете менять модель прямо во время чата, и навык продолжит работать. TypingMind использует ваши собственные ключи API, поэтому вы платите поставщикам напрямую, а не оформляете подписку с оплатой за каждое место. Ваши навыки и чаты остаются в вашем собственном хранилище.

Как установить Write Case в TypingMind?

В TypingMind откройте «Плагины → Навыки → Установить из GitHub» и вставьте https://github.com/jameskomo/config-drift-checker/tree/main/config-drift-checker/skills/write-case. TypingMind прочитает файл SKILL.md и установит навык, который можно включать отдельно для каждого чата.

Какие модели ИИ могут использовать Write Case?

Любая модель, которую вы подключите в TypingMind. Навыки ИИ — это обычные инструкции в формате Markdown, а не код для конкретного поставщика, поэтому GPT, Claude, Gemini, Grok и локальные модели могут загружать этот навык, когда запрос ему соответствует.

Со сколькими моделями ИИ можно использовать Write Case?

С любым количеством. Если модель поддерживает навыки, вы можете использовать с ней Write Case: GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama и другие — всё в TypingMind с вашими собственными ключами API.

Бесплатен ли навык ИИ Write Case?

Навык опубликован на GitHub автором jameskomo. Условия лицензии можно найти в репозитории. Вы платите только своему поставщику ИИ за использованные токены.

Что такое навыки ИИ?

Навык ИИ — это многоразовый набор инструкций, который объясняет модели ИИ, как выполнять конкретную задачу. Он соответствует открытому формату Agent Skills: файл SKILL.md с названием и описанием, а также любые скрипты, шаблоны или справочные файлы, которые могут понадобиться модели. Модель читает инструкции, только когда ваш запрос соответствует навыку, поэтому установленный навык ничего не стоит, пока не используется.

Чем навыки ИИ отличаются от плагинов и серверов MCP?

Плагин или сервер MCP даёт модели новые инструменты для вызова — код, который где-то выполняется и возвращает результат. Навык ИИ вместо этого даёт модели знания и порядок действий: как подойти к задаче, какие шаги выполнить и каким должен быть хороший результат. Навыки — это обычный текст в формате Markdown, поэтому им не нужны сервер, ключ API или среда выполнения, и они работают с любой моделью.

Все

Создайте свою рабочую ИИ-среду сейчас

Подпишитесь на нашу рассылку, чтобы узнавать о новых функциях и предстоящих розыгрышах 👇