Write Case logo

Write Case

Community
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).

Overview

Publisherjameskomo
Repositoryconfig-drift-checker
Skill namewrite-case
Stars
33
Forks
1
Bundled files
Instructions only
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by jameskomo on GitHub. Read the source before you install it.

Installation

Install the Write Case AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/jameskomo/config-drift-checker/tree/main/config-drift-checker/skills/write-case
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Write Case in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Write Case on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Write Case is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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.

Frequently asked questions

What does the Write Case AI skill do?

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).

Why use Write Case on TypingMind?

Because you install it once and use it with any model. Write Case is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Write Case in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/jameskomo/config-drift-checker/tree/main/config-drift-checker/skills/write-case. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Write Case?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Write Case?

As many as you like. As long as a model supports skills, you can use Write Case with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Write Case AI skill free?

It is published on GitHub by jameskomo. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇