Skip to content

aipoch/open-science / resources/skills/skill-creator

skill-creator

Verified

Create, revise, evaluate, publish, and improve Open-Science Skills through the native JavaScript host.skills composer. Use when the user wants a reusable workflow, an existing Skill changed, test cases or benchmarks for a Skill, or better Skill triggering.

scripts/generate-report.js

View on GitHub
'use strict'
/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/explicit-function-return-type */

const { escapeHtml } = require('./utils')

const generateReport = (benchmark, title = 'Skill evaluation report') => {
  const configurations = Object.entries(benchmark.run_summary ?? {}).filter(
    ([name]) => name !== 'delta'
  )
  const rows = configurations
    .map(
      ([name, summary]) =>
        `<tr><th>${escapeHtml(name)}</th><td>${Number(summary.pass_rate?.mean ?? 0).toFixed(
          3
        )}</td><td>${Number(summary.time_seconds?.mean ?? 0).toFixed(1)}</td><td>${Math.round(
          summary.tokens?.mean ?? 0
        )}</td></tr>`
    )
    .join('')
  const notes = (benchmark.notes ?? []).map((note) => `<li>${escapeHtml(note)}</li>`).join('')

  return `<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'">
<title>${escapeHtml(title)}</title><style>body{font:14px system-ui;margin:2rem;max-width:72rem}table{border-collapse:collapse}th,td{border:1px solid #ccc;padding:.5rem;text-align:left}</style></head>
<body><h1>${escapeHtml(title)}</h1><table><thead><tr><th>Configuration</th><th>Pass rate</th><th>Seconds</th><th>Tokens</th></tr></thead><tbody>${rows}</tbody></table><h2>Notes</h2><ul>${notes}</ul></body></html>`
}

module.exports = { generateReport }
finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the workStars: 322kUpdated Claude CodeCodexVerifiedInstall
systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixesStars: 322kUpdated Claude CodeCodexVerifiedInstall
test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation codeStars: 322kUpdated Claude CodeCodexVerifiedInstall
skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.Stars: 197kUpdated Claude CodeCodexVerifiedInstall