hkust-taco/mlscript/hkmc2-difftests
Claude Code and agent skill by hkust-taco/mlscript
- community
Checking that the SKILL.md file is still in the repository.
Work with HKMC2 DiffTests where golden snapshots are embedded in `.mls` files as `//│ ...` lines and updated in place by the test runner. Use when editing or reviewing files under `hkmc2/shared/src/test/**/*.mls`, running `hkmc2DiffTests` or watcher loops, diagnosing mismatches between diagnostics and expectations (`:e`, `:re`, `:expect`, etc.), or deciding whether rewritten snapshot lines should be committed.
Install
npx vskill@latest install hkust-taco/mlscript/hkmc2-difftestsSKILL.md
General
Please review /AGENTS.md.
HKMC2 DiffTests
Run HKMC2 inline golden-file tests and treat file rewrites as first-class test output.
Quick Workflow
- Verify local environment once per machine.
- Edit
.mlstest blocks and test commands. Usehkmc2/shared/src/test/mlscript/HkScratch.mlsfor temporary experiments, or create a new.mlsfile for a new test case. - Run direct
sbtcommands (nevercs launch sbtfor this repo). - Review rewritten
//│lines with git diff. - Fix code and rerun tests until output is as desired. No need to revert intermediate failures: they'll be updated in place.
- Revert temporary
HkScratch.mlsedits before committing.
Read execution-workflow.md for exact commands and onboarding flow.
Block Model And Rewrite Model
- Parse each
.mlsfile as sequential blocks, usually split by blank lines. - Parse
:commandlines as per-block options. - Ignore existing
//│ ...lines as old snapshots. - Compile/run the block and emit fresh
//│ ...lines. - Rewrite the file in place when generated output differs.
- Fail only on policy violations (unexpected diagnostics, missing expected diagnostics, failed
:expect, etc.).
Do not treat rewritten files as automatic failures. Treat them as candidate snapshot updates and review them.
Command Semantics To Apply
:js: execute JS backend for the block.:silent: suppress auto-printing of defined values.:expect <text>: assert final rendered result equals exact text.:pe,:e,:re,:ge,:w: expect parse/type/runtime/codegen/warning diagnostics.:fixmeor:todo: tolerate temporary failures under current policy.:wasm,:wat,:fwat,:swat: enable lower-level backend outputs.
Read commands-and-policies.md when you need deeper behavior details or troubleshooting logic.
Discovery Scope
- Discover test files from
hkmc2/shared/src/test/**/*.mls. - Diff runs exclude paths containing
stagingandmlscript-compile. - Assume
.mlsis the only supported extension for these diff tests.
Guardrails
- Use repo README commands as source of truth for test execution.
- Use direct
sbt ...commands for this project. - For focused runs or updates on specific test files, follow the targeted workflows documented in
README.md(for exampletestOnly ... -- -z ..., focused sets, andChangedTests.cmdwith watcher). - Run
npm installbefore JS/Wasm-heavy test workflows when dependencies are missing. - Prefer reviewing
git diff/git statusimmediately after a diff-test run. - Reset only unintended rewritten test files; keep intentional snapshot updates.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/hkmc2-difftests/SKILL.md
Popularity
- Repository stars
- 227
- Repository forks
- 42
- Repository npm downloads, 7 days
- 9
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 20 Sep 2026, a month ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/hkust-taco/mlscript/hkmc2-difftests)