bench: add skill benchmarking framework with promptfoo#39
Draft
iskysun96 wants to merge 7 commits into
Draft
Conversation
Add a structured eval framework for all 15 AI skills (7 Move + 8 TS SDK) using promptfoo. Measures compilation success, security pattern compliance, V2 syntax adherence, TypeScript type-checking, SDK pattern correctness, token usage, cost, and latency. - 10 assertion scripts (compile-check, test-check, security patterns, etc.) - 5 Move fixture contracts (NFT, FA, insecure, unoptimized, V1 legacy) - 29 test cases across 15 skill configs - Prompt builder that composes SKILL.md + pattern files into prompt.json - Runner scripts for full/partial/single skill evaluation Note: CI workflow (.github/workflows/skill-eval.yml) is created locally but excluded from this push due to OAuth scope. Push it manually or via the GitHub UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix model ID from claude-sonnet-4-5-20250929 to claude-sonnet-4-5-20250514 - Add pull-requests: write permission to CI workflow for PR comments Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🔬 Skill Eval Results
Failure Detailsmove_analyze-gas-optimization_20260311move_deploy-contracts_20260311move_generate-tests_20260311move_modernize-move_20260311move_security-audit_20260311move_write-contracts_20260311sdk_ts-sdk-account_20260311sdk_ts-sdk-address_20260311sdk_ts-sdk-client_20260311sdk_ts-sdk-transactions_20260311sdk_ts-sdk-types_20260311sdk_ts-sdk-view-and-query_20260311Generated by skill-eval CI |
- Revert model ID to claude-sonnet-4-5-20250929 (the 20250514 variant doesn't exist) - Bump promptfoo 0.103.5 → 0.120.26 (adds Claude 4.x model support) - Bump @aptos-labs/ts-sdk 1.33.1 → 5.2.1 (fixes deprecation warnings) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…h tests
file:// paths in tests.yaml resolved relative to config directory (3 levels
deep) but used ../../ (2 levels). Fixed to ../../../ across 12 skills.
Also loosened overly strict keyword assertions for deploy-contracts
("testnet" → "network") and search-aptos-examples
("primary_fungible_store" → "fungible").
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… evals
promptfoo was not substituting {{task}} variables in JSON prompt files,
causing all test cases within a skill to receive identical prompts and
produce identical responses. Switched from static prompt.json to prompt.js
functions that explicitly inject vars (task, contractCode, sourceCode).
Also:
- Fix SDK skill paths in build-prompts.js (use-typescript-sdk → per-skill SKILL.md)
- Add format-results.js for per-assertion failure output in CI
- Enhance CI workflow with failure detail reporting in summary + PR comments
- Remove prompt.json build artifacts from git tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
What's included
Usage
Test plan
cd bench && npm installsucceedsnpm run build-promptsgenerates prompt.json for all 15 skillsnpm run setupcreates cached workspacesnpm run evalcompletes all 29 test cases (requiresANTHROPIC_API_KEY)npx promptfoo viewshows web UI with results🤖 Generated with Claude Code