leniu-dev 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/auto-test-generator.md +315 -0
- package/.claude/agents/bug-analyzer.md +103 -0
- package/.claude/agents/code-reviewer.md +122 -0
- package/.claude/agents/code-scanner.md +145 -0
- package/.claude/agents/image-reader.md +154 -0
- package/.claude/agents/loki-runner.md +80 -0
- package/.claude/agents/mysql-runner.md +81 -0
- package/.claude/agents/project-manager.md +159 -0
- package/.claude/agents/requirements-analyzer.md +175 -0
- package/.claude/agents/task-fetcher.md +75 -0
- package/.claude/audio/completed.wav +0 -0
- package/.claude/commands/add-todo.md +255 -0
- package/.claude/commands/auto-test.md +252 -0
- package/.claude/commands/check.md +210 -0
- package/.claude/commands/crud.md +454 -0
- package/.claude/commands/dev.md +532 -0
- package/.claude/commands/init-config.md +154 -0
- package/.claude/commands/init-docs.md +681 -0
- package/.claude/commands/next.md +281 -0
- package/.claude/commands/opsx-apply.md +147 -0
- package/.claude/commands/opsx-archive.md +105 -0
- package/.claude/commands/opsx-bulk-archive.md +237 -0
- package/.claude/commands/opsx-continue.md +109 -0
- package/.claude/commands/opsx-explore.md +281 -0
- package/.claude/commands/opsx-ff.md +92 -0
- package/.claude/commands/opsx-new.md +65 -0
- package/.claude/commands/opsx-onboard.md +397 -0
- package/.claude/commands/opsx-sync.md +129 -0
- package/.claude/commands/opsx-verify.md +159 -0
- package/.claude/commands/progress.md +264 -0
- package/.claude/commands/release.md +109 -0
- package/.claude/commands/start.md +199 -0
- package/.claude/commands/sync.md +307 -0
- package/.claude/commands/update-status.md +428 -0
- package/.claude/docs/Mixin/344/275/277/347/224/250/346/214/207/345/215/227.md +299 -0
- package/.claude/docs/README.md +167 -0
- package/.claude/docs//345/211/215/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +599 -0
- package/.claude/docs//345/220/216/347/253/257/345/274/200/345/217/221/346/214/207/345/215/227.md +726 -0
- package/.claude/docs//345/267/245/344/275/234/346/265/201/345/274/200/345/217/221/346/214/207/345/215/227.md +714 -0
- package/.claude/docs//345/267/245/345/205/267/347/261/273/344/275/277/347/224/250/346/214/207/345/215/227.md +463 -0
- package/.claude/docs//346/225/260/346/215/256/345/272/223/350/256/276/350/256/241/350/247/204/350/214/203.md +390 -0
- package/.claude/docs//346/226/260/345/212/237/350/203/275/345/274/200/345/217/221/346/265/201/347/250/213/350/247/204/350/214/203.md +688 -0
- package/.claude/docs//346/226/260/351/241/271/347/233/256/345/274/200/345/217/221/346/265/201/347/250/213.md +365 -0
- package/.claude/docs//346/241/206/346/236/266/350/257/264/346/230/216.md +393 -0
- package/.claude/docs//350/267/257/347/224/261/351/205/215/347/275/256/346/214/207/345/215/227.md +246 -0
- package/.claude/framework-config.json +73 -0
- package/.claude/hooks/lib/notify.js +310 -0
- package/.claude/hooks/pre-tool-use.js +117 -0
- package/.claude/hooks/skill-forced-eval.js +161 -0
- package/.claude/hooks/stop.js +55 -0
- package/.claude/notify-config.json +9 -0
- package/.claude/settings.json +57 -0
- package/.claude/skills/add-skill/SKILL.md +488 -0
- package/.claude/skills/analyze-requirements/SKILL.md +112 -0
- package/.claude/skills/api-development/SKILL.md +315 -0
- package/.claude/skills/architecture-design/SKILL.md +152 -0
- package/.claude/skills/auto-test/SKILL.md +625 -0
- package/.claude/skills/auto-test/references/api-conventions.md +260 -0
- package/.claude/skills/backend-annotations/SKILL.md +248 -0
- package/.claude/skills/banana-image/CHANGELOG.md +37 -0
- package/.claude/skills/banana-image/README.md +146 -0
- package/.claude/skills/banana-image/SKILL.md +171 -0
- package/.claude/skills/banana-image/assets/logo.png +0 -0
- package/.claude/skills/banana-image/references/advanced-usage.md +189 -0
- package/.claude/skills/banana-image/scripts/apply_template.py +125 -0
- package/.claude/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.claude/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.claude/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.claude/skills/banana-image/scripts/package.json +18 -0
- package/.claude/skills/banana-image/scripts/requirements.txt +10 -0
- package/.claude/skills/banana-image/templates/poster.json +22 -0
- package/.claude/skills/banana-image/templates/product.json +17 -0
- package/.claude/skills/banana-image/templates/social.json +22 -0
- package/.claude/skills/banana-image/templates/thumbnail.json +17 -0
- package/.claude/skills/brainstorm/SKILL.md +216 -0
- package/.claude/skills/bug-detective/SKILL.md +295 -0
- package/.claude/skills/bug-detective/references/error-patterns.md +242 -0
- package/.claude/skills/chrome-cdp/SKILL.md +81 -0
- package/.claude/skills/chrome-cdp/scripts/cdp.mjs +838 -0
- package/.claude/skills/chrome-cdp/scripts/run-cdp.sh +7 -0
- package/.claude/skills/code-patterns/SKILL.md +163 -0
- package/.claude/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.claude/skills/codex-code-review/SKILL.md +327 -0
- package/.claude/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.claude/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.claude/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.claude/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.claude/skills/crud-development/SKILL.md +328 -0
- package/.claude/skills/data-permission/SKILL.md +221 -0
- package/.claude/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.claude/skills/database-ops/SKILL.md +210 -0
- package/.claude/skills/error-handler/SKILL.md +310 -0
- package/.claude/skills/file-oss-management/SKILL.md +260 -0
- package/.claude/skills/file-oss-management/references/entities.md +105 -0
- package/.claude/skills/file-oss-management/references/service-impl.md +104 -0
- package/.claude/skills/fix-bug/SKILL.md +269 -0
- package/.claude/skills/git-workflow/SKILL.md +179 -0
- package/.claude/skills/jenkins-deploy/SKILL.md +134 -0
- package/.claude/skills/jenkins-deploy/assets/env_param.template.json +51 -0
- package/.claude/skills/jenkins-deploy/assets/jk_build.py +400 -0
- package/.claude/skills/json-serialization/SKILL.md +341 -0
- package/.claude/skills/lanhu-design/SKILL.md +99 -0
- package/.claude/skills/leniu-api-development/SKILL.md +319 -0
- package/.claude/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.claude/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.claude/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.claude/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.claude/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.claude/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.claude/skills/leniu-crud-development/SKILL.md +404 -0
- package/.claude/skills/leniu-crud-development/references/templates.md +597 -0
- package/.claude/skills/leniu-customization-location/SKILL.md +410 -0
- package/.claude/skills/leniu-data-permission/SKILL.md +341 -0
- package/.claude/skills/leniu-database-ops/SKILL.md +426 -0
- package/.claude/skills/leniu-error-handler/SKILL.md +462 -0
- package/.claude/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.claude/skills/leniu-java-entity/SKILL.md +237 -0
- package/.claude/skills/leniu-java-entity/references/templates.md +237 -0
- package/.claude/skills/leniu-java-logging/SKILL.md +229 -0
- package/.claude/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.claude/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.claude/skills/leniu-java-mq/SKILL.md +338 -0
- package/.claude/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.claude/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.claude/skills/leniu-java-task/SKILL.md +367 -0
- package/.claude/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.claude/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.claude/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.claude/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.claude/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.claude/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.claude/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.claude/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.claude/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.claude/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.claude/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.claude/skills/leniu-report-scenario/references/export.md +553 -0
- package/.claude/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.claude/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.claude/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.claude/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.claude/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.claude/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.claude/skills/leniu-security-guard/SKILL.md +306 -0
- package/.claude/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.claude/skills/loki-log-query/SKILL.md +430 -0
- package/.claude/skills/mysql-debug/SKILL.md +406 -0
- package/.claude/skills/performance-doctor/SKILL.md +297 -0
- package/.claude/skills/project-navigator/SKILL.md +211 -0
- package/.claude/skills/redis-cache/SKILL.md +282 -0
- package/.claude/skills/redis-cache/references/listeners.md +23 -0
- package/.claude/skills/scheduled-jobs/SKILL.md +277 -0
- package/.claude/skills/security-guard/SKILL.md +245 -0
- package/.claude/skills/security-guard/references/encrypt-config.md +103 -0
- package/.claude/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.claude/skills/sms-mail/SKILL.md +346 -0
- package/.claude/skills/sms-mail/references/mail-config.md +88 -0
- package/.claude/skills/sms-mail/references/sms-config.md +74 -0
- package/.claude/skills/social-login/SKILL.md +328 -0
- package/.claude/skills/social-login/references/provider-configs.md +118 -0
- package/.claude/skills/store-pc/SKILL.md +366 -0
- package/.claude/skills/sync-back-merge/SKILL.md +66 -0
- package/.claude/skills/task-tracker/SKILL.md +307 -0
- package/.claude/skills/tech-decision/SKILL.md +393 -0
- package/.claude/skills/tenant-management/SKILL.md +272 -0
- package/.claude/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.claude/skills/test-development/SKILL.md +301 -0
- package/.claude/skills/test-development/references/parameterized-examples.md +119 -0
- package/.claude/skills/ui-pc/SKILL.md +438 -0
- package/.claude/skills/utils-toolkit/SKILL.md +354 -0
- package/.claude/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.claude/skills/websocket-sse/SKILL.md +350 -0
- package/.claude/skills/workflow-engine/SKILL.md +249 -0
- package/.claude/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.claude/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.claude/templates/env-config.md +27 -0
- package/.claude/templates//345/276/205/345/212/236/346/270/205/345/215/225/346/250/241/346/235/277.md +56 -0
- package/.claude/templates//351/234/200/346/261/202/346/226/207/346/241/243/346/250/241/346/235/277.md +85 -0
- package/.claude/templates//351/241/271/347/233/256/347/212/266/346/200/201/346/250/241/346/235/277.md +43 -0
- package/.codex/skills/add-skill/SKILL.md +488 -0
- package/.codex/skills/add-todo/SKILL.md +269 -0
- package/.codex/skills/analyze-requirements/SKILL.md +112 -0
- package/.codex/skills/api-development/SKILL.md +315 -0
- package/.codex/skills/architecture-design/SKILL.md +152 -0
- package/.codex/skills/auto-test/SKILL.md +453 -0
- package/.codex/skills/auto-test/references/api-conventions.md +260 -0
- package/.codex/skills/backend-annotations/SKILL.md +248 -0
- package/.codex/skills/banana-image/CHANGELOG.md +37 -0
- package/.codex/skills/banana-image/README.md +146 -0
- package/.codex/skills/banana-image/SKILL.md +171 -0
- package/.codex/skills/banana-image/assets/logo.png +0 -0
- package/.codex/skills/banana-image/references/advanced-usage.md +189 -0
- package/.codex/skills/banana-image/scripts/apply_template.py +125 -0
- package/.codex/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.codex/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.codex/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.codex/skills/banana-image/scripts/package.json +18 -0
- package/.codex/skills/banana-image/scripts/requirements.txt +10 -0
- package/.codex/skills/banana-image/templates/poster.json +22 -0
- package/.codex/skills/banana-image/templates/product.json +17 -0
- package/.codex/skills/banana-image/templates/social.json +22 -0
- package/.codex/skills/banana-image/templates/thumbnail.json +17 -0
- package/.codex/skills/brainstorm/SKILL.md +216 -0
- package/.codex/skills/bug-detective/SKILL.md +295 -0
- package/.codex/skills/bug-detective/references/error-patterns.md +242 -0
- package/.codex/skills/check/SKILL.md +367 -0
- package/.codex/skills/code-patterns/SKILL.md +163 -0
- package/.codex/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.codex/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.codex/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.codex/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.codex/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.codex/skills/crud/SKILL.md +265 -0
- package/.codex/skills/crud-development/SKILL.md +328 -0
- package/.codex/skills/data-permission/SKILL.md +221 -0
- package/.codex/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.codex/skills/database-ops/SKILL.md +210 -0
- package/.codex/skills/dev/SKILL.md +187 -0
- package/.codex/skills/error-handler/SKILL.md +310 -0
- package/.codex/skills/file-oss-management/SKILL.md +260 -0
- package/.codex/skills/file-oss-management/references/entities.md +105 -0
- package/.codex/skills/file-oss-management/references/service-impl.md +104 -0
- package/.codex/skills/fix-bug/SKILL.md +269 -0
- package/.codex/skills/git-workflow/SKILL.md +179 -0
- package/.codex/skills/init-docs/SKILL.md +194 -0
- package/.codex/skills/jenkins-deploy/SKILL.md +134 -0
- package/.codex/skills/json-serialization/SKILL.md +341 -0
- package/.codex/skills/lanhu-design/SKILL.md +99 -0
- package/.codex/skills/leniu-api-development/SKILL.md +319 -0
- package/.codex/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.codex/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.codex/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.codex/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.codex/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.codex/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.codex/skills/leniu-crud-development/SKILL.md +404 -0
- package/.codex/skills/leniu-crud-development/references/templates.md +597 -0
- package/.codex/skills/leniu-customization-location/SKILL.md +410 -0
- package/.codex/skills/leniu-data-permission/SKILL.md +341 -0
- package/.codex/skills/leniu-database-ops/SKILL.md +426 -0
- package/.codex/skills/leniu-error-handler/SKILL.md +462 -0
- package/.codex/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.codex/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.codex/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.codex/skills/leniu-java-entity/SKILL.md +237 -0
- package/.codex/skills/leniu-java-entity/references/templates.md +237 -0
- package/.codex/skills/leniu-java-logging/SKILL.md +229 -0
- package/.codex/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.codex/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.codex/skills/leniu-java-mq/SKILL.md +338 -0
- package/.codex/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.codex/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.codex/skills/leniu-java-task/SKILL.md +367 -0
- package/.codex/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.codex/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.codex/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.codex/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.codex/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.codex/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.codex/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.codex/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.codex/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.codex/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.codex/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.codex/skills/leniu-report-scenario/references/export.md +553 -0
- package/.codex/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.codex/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.codex/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.codex/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.codex/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.codex/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.codex/skills/leniu-security-guard/SKILL.md +306 -0
- package/.codex/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.codex/skills/loki-log-query/SKILL.md +430 -0
- package/.codex/skills/loki-log-query/environments.json +45 -0
- package/.codex/skills/mysql-debug/SKILL.md +406 -0
- package/.codex/skills/next/SKILL.md +137 -0
- package/.codex/skills/openspec-apply-change/SKILL.md +165 -0
- package/.codex/skills/openspec-archive-change/SKILL.md +122 -0
- package/.codex/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.codex/skills/openspec-continue-change/SKILL.md +126 -0
- package/.codex/skills/openspec-explore/SKILL.md +299 -0
- package/.codex/skills/openspec-ff-change/SKILL.md +109 -0
- package/.codex/skills/openspec-new-change/SKILL.md +82 -0
- package/.codex/skills/openspec-onboard/SKILL.md +414 -0
- package/.codex/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.codex/skills/openspec-verify-change/SKILL.md +176 -0
- package/.codex/skills/performance-doctor/SKILL.md +297 -0
- package/.codex/skills/progress/SKILL.md +193 -0
- package/.codex/skills/project-navigator/SKILL.md +211 -0
- package/.codex/skills/redis-cache/SKILL.md +282 -0
- package/.codex/skills/redis-cache/references/listeners.md +23 -0
- package/.codex/skills/scheduled-jobs/SKILL.md +277 -0
- package/.codex/skills/security-guard/SKILL.md +245 -0
- package/.codex/skills/security-guard/references/encrypt-config.md +103 -0
- package/.codex/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.codex/skills/skill-creator/LICENSE.txt +202 -0
- package/.codex/skills/skill-creator/SKILL.md +479 -0
- package/.codex/skills/skill-creator/agents/analyzer.md +274 -0
- package/.codex/skills/skill-creator/agents/comparator.md +202 -0
- package/.codex/skills/skill-creator/agents/grader.md +223 -0
- package/.codex/skills/skill-creator/assets/eval_review.html +146 -0
- package/.codex/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.codex/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.codex/skills/skill-creator/references/schemas.md +430 -0
- package/.codex/skills/skill-creator/scripts/__init__.py +0 -0
- package/.codex/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.codex/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.codex/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.codex/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.codex/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.codex/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.codex/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.codex/skills/skill-creator/scripts/utils.py +47 -0
- package/.codex/skills/sms-mail/SKILL.md +346 -0
- package/.codex/skills/sms-mail/references/mail-config.md +88 -0
- package/.codex/skills/sms-mail/references/sms-config.md +74 -0
- package/.codex/skills/social-login/SKILL.md +328 -0
- package/.codex/skills/social-login/references/provider-configs.md +118 -0
- package/.codex/skills/start/SKILL.md +154 -0
- package/.codex/skills/store-pc/SKILL.md +366 -0
- package/.codex/skills/sync/SKILL.md +149 -0
- package/.codex/skills/sync-back-merge/SKILL.md +66 -0
- package/.codex/skills/task-tracker/SKILL.md +307 -0
- package/.codex/skills/tech-decision/SKILL.md +393 -0
- package/.codex/skills/tenant-management/SKILL.md +272 -0
- package/.codex/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.codex/skills/test-development/SKILL.md +301 -0
- package/.codex/skills/test-development/references/parameterized-examples.md +119 -0
- package/.codex/skills/ui-pc/SKILL.md +438 -0
- package/.codex/skills/update-status/SKILL.md +159 -0
- package/.codex/skills/utils-toolkit/SKILL.md +354 -0
- package/.codex/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.codex/skills/websocket-sse/SKILL.md +350 -0
- package/.codex/skills/workflow-engine/SKILL.md +249 -0
- package/.codex/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.codex/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/agents/bug-analyzer.md +102 -0
- package/.cursor/agents/code-reviewer.md +122 -0
- package/.cursor/agents/code-scanner.md +145 -0
- package/.cursor/agents/image-reader.md +154 -0
- package/.cursor/agents/loki-runner.md +80 -0
- package/.cursor/agents/mysql-runner.md +81 -0
- package/.cursor/agents/project-manager.md +159 -0
- package/.cursor/agents/requirements-analyzer.md +141 -0
- package/.cursor/agents/task-fetcher.md +75 -0
- package/.cursor/audio/completed.wav +0 -0
- package/.cursor/commands/opsx-apply.md +152 -0
- package/.cursor/commands/opsx-archive.md +157 -0
- package/.cursor/commands/opsx-bulk-archive.md +242 -0
- package/.cursor/commands/opsx-continue.md +114 -0
- package/.cursor/commands/opsx-explore.md +174 -0
- package/.cursor/commands/opsx-ff.md +94 -0
- package/.cursor/commands/opsx-new.md +69 -0
- package/.cursor/commands/opsx-onboard.md +525 -0
- package/.cursor/commands/opsx-sync.md +134 -0
- package/.cursor/commands/opsx-verify.md +164 -0
- package/.cursor/hooks/cursor-pre-tool-use.js +122 -0
- package/.cursor/hooks/cursor-skill-eval.js +466 -0
- package/.cursor/hooks/lib/notify.js +310 -0
- package/.cursor/hooks/stop.js +55 -0
- package/.cursor/hooks.json +23 -0
- package/.cursor/mcp.json +22 -0
- package/.cursor/rules/skill-activation.mdc +99 -0
- package/.cursor/skills/add-skill/SKILL.md +488 -0
- package/.cursor/skills/analyze-requirements/SKILL.md +112 -0
- package/.cursor/skills/api-development/SKILL.md +315 -0
- package/.cursor/skills/architecture-design/SKILL.md +152 -0
- package/.cursor/skills/auto-test/SKILL.md +453 -0
- package/.cursor/skills/auto-test/references/api-conventions.md +260 -0
- package/.cursor/skills/backend-annotations/SKILL.md +248 -0
- package/.cursor/skills/banana-image/CHANGELOG.md +37 -0
- package/.cursor/skills/banana-image/README.md +146 -0
- package/.cursor/skills/banana-image/SKILL.md +171 -0
- package/.cursor/skills/banana-image/assets/logo.png +0 -0
- package/.cursor/skills/banana-image/references/advanced-usage.md +189 -0
- package/.cursor/skills/banana-image/scripts/apply_template.py +125 -0
- package/.cursor/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/.cursor/skills/banana-image/scripts/batch_prep.py +82 -0
- package/.cursor/skills/banana-image/scripts/package-lock.json +1437 -0
- package/.cursor/skills/banana-image/scripts/package.json +18 -0
- package/.cursor/skills/banana-image/scripts/requirements.txt +10 -0
- package/.cursor/skills/banana-image/templates/poster.json +22 -0
- package/.cursor/skills/banana-image/templates/product.json +17 -0
- package/.cursor/skills/banana-image/templates/social.json +22 -0
- package/.cursor/skills/banana-image/templates/thumbnail.json +17 -0
- package/.cursor/skills/brainstorm/SKILL.md +216 -0
- package/.cursor/skills/bug-detective/SKILL.md +295 -0
- package/.cursor/skills/bug-detective/references/error-patterns.md +242 -0
- package/.cursor/skills/code-patterns/SKILL.md +163 -0
- package/.cursor/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/.cursor/skills/collaborating-with-codex/SKILL.md +180 -0
- package/.cursor/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/.cursor/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/.cursor/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/.cursor/skills/crud-development/SKILL.md +328 -0
- package/.cursor/skills/data-permission/SKILL.md +221 -0
- package/.cursor/skills/data-permission/references/custom-data-scope.md +90 -0
- package/.cursor/skills/database-ops/SKILL.md +210 -0
- package/.cursor/skills/error-handler/SKILL.md +310 -0
- package/.cursor/skills/file-oss-management/SKILL.md +260 -0
- package/.cursor/skills/file-oss-management/references/entities.md +105 -0
- package/.cursor/skills/file-oss-management/references/service-impl.md +104 -0
- package/.cursor/skills/fix-bug/SKILL.md +269 -0
- package/.cursor/skills/git-workflow/SKILL.md +179 -0
- package/.cursor/skills/jenkins-deploy/SKILL.md +134 -0
- package/.cursor/skills/json-serialization/SKILL.md +341 -0
- package/.cursor/skills/lanhu-design/SKILL.md +99 -0
- package/.cursor/skills/leniu-api-development/SKILL.md +319 -0
- package/.cursor/skills/leniu-api-development/references/real-examples.md +273 -0
- package/.cursor/skills/leniu-architecture-design/SKILL.md +383 -0
- package/.cursor/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/.cursor/skills/leniu-brainstorm/SKILL.md +242 -0
- package/.cursor/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/.cursor/skills/leniu-code-patterns/SKILL.md +411 -0
- package/.cursor/skills/leniu-crud-development/SKILL.md +404 -0
- package/.cursor/skills/leniu-crud-development/references/templates.md +597 -0
- package/.cursor/skills/leniu-customization-location/SKILL.md +410 -0
- package/.cursor/skills/leniu-data-permission/SKILL.md +341 -0
- package/.cursor/skills/leniu-database-ops/SKILL.md +426 -0
- package/.cursor/skills/leniu-error-handler/SKILL.md +462 -0
- package/.cursor/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/.cursor/skills/leniu-java-code-style/SKILL.md +510 -0
- package/.cursor/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/.cursor/skills/leniu-java-entity/SKILL.md +237 -0
- package/.cursor/skills/leniu-java-entity/references/templates.md +237 -0
- package/.cursor/skills/leniu-java-logging/SKILL.md +229 -0
- package/.cursor/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/.cursor/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/.cursor/skills/leniu-java-mq/SKILL.md +338 -0
- package/.cursor/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/.cursor/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/.cursor/skills/leniu-java-task/SKILL.md +367 -0
- package/.cursor/skills/leniu-marketing-scenario/SKILL.md +448 -0
- package/.cursor/skills/leniu-marketing-scenario/references/pay-meal-rules.md +197 -0
- package/.cursor/skills/leniu-marketing-scenario/references/price-rules.md +286 -0
- package/.cursor/skills/leniu-marketing-scenario/references/recharge-rules.md +188 -0
- package/.cursor/skills/leniu-redis-cache/SKILL.md +331 -0
- package/.cursor/skills/leniu-report-scenario/SKILL.md +508 -0
- package/.cursor/skills/leniu-report-scenario/references/amount-handling.md +448 -0
- package/.cursor/skills/leniu-report-scenario/references/analysis-module.md +64 -0
- package/.cursor/skills/leniu-report-scenario/references/customization-table-fields.md +93 -0
- package/.cursor/skills/leniu-report-scenario/references/customization.md +356 -0
- package/.cursor/skills/leniu-report-scenario/references/data-permission.md +182 -0
- package/.cursor/skills/leniu-report-scenario/references/export.md +553 -0
- package/.cursor/skills/leniu-report-scenario/references/mealtime.md +197 -0
- package/.cursor/skills/leniu-report-scenario/references/query-param.md +274 -0
- package/.cursor/skills/leniu-report-scenario/references/report-tables.md +162 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-customization.md +112 -0
- package/.cursor/skills/leniu-report-scenario/references/standard-table-fields.md +113 -0
- package/.cursor/skills/leniu-report-scenario/references/total-line.md +179 -0
- package/.cursor/skills/leniu-security-guard/SKILL.md +306 -0
- package/.cursor/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/.cursor/skills/loki-log-query/SKILL.md +430 -0
- package/.cursor/skills/loki-log-query/environments.json +45 -0
- package/.cursor/skills/mysql-debug/SKILL.md +406 -0
- package/.cursor/skills/openspec-apply-change/SKILL.md +165 -0
- package/.cursor/skills/openspec-archive-change/SKILL.md +122 -0
- package/.cursor/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/.cursor/skills/openspec-continue-change/SKILL.md +126 -0
- package/.cursor/skills/openspec-explore/SKILL.md +299 -0
- package/.cursor/skills/openspec-ff-change/SKILL.md +109 -0
- package/.cursor/skills/openspec-new-change/SKILL.md +82 -0
- package/.cursor/skills/openspec-onboard/SKILL.md +414 -0
- package/.cursor/skills/openspec-sync-specs/SKILL.md +146 -0
- package/.cursor/skills/openspec-verify-change/SKILL.md +176 -0
- package/.cursor/skills/performance-doctor/SKILL.md +297 -0
- package/.cursor/skills/project-navigator/SKILL.md +211 -0
- package/.cursor/skills/redis-cache/SKILL.md +282 -0
- package/.cursor/skills/redis-cache/references/listeners.md +23 -0
- package/.cursor/skills/scheduled-jobs/SKILL.md +277 -0
- package/.cursor/skills/security-guard/SKILL.md +245 -0
- package/.cursor/skills/security-guard/references/encrypt-config.md +103 -0
- package/.cursor/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/.cursor/skills/skill-creator/LICENSE.txt +202 -0
- package/.cursor/skills/skill-creator/SKILL.md +479 -0
- package/.cursor/skills/skill-creator/agents/analyzer.md +274 -0
- package/.cursor/skills/skill-creator/agents/comparator.md +202 -0
- package/.cursor/skills/skill-creator/agents/grader.md +223 -0
- package/.cursor/skills/skill-creator/assets/eval_review.html +146 -0
- package/.cursor/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/.cursor/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/.cursor/skills/skill-creator/references/schemas.md +430 -0
- package/.cursor/skills/skill-creator/scripts/__init__.py +0 -0
- package/.cursor/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/.cursor/skills/skill-creator/scripts/generate_report.py +326 -0
- package/.cursor/skills/skill-creator/scripts/improve_description.py +248 -0
- package/.cursor/skills/skill-creator/scripts/package_skill.py +136 -0
- package/.cursor/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/.cursor/skills/skill-creator/scripts/run_eval.py +310 -0
- package/.cursor/skills/skill-creator/scripts/run_loop.py +332 -0
- package/.cursor/skills/skill-creator/scripts/utils.py +47 -0
- package/.cursor/skills/sms-mail/SKILL.md +346 -0
- package/.cursor/skills/sms-mail/references/mail-config.md +88 -0
- package/.cursor/skills/sms-mail/references/sms-config.md +74 -0
- package/.cursor/skills/social-login/SKILL.md +328 -0
- package/.cursor/skills/social-login/references/provider-configs.md +118 -0
- package/.cursor/skills/store-pc/SKILL.md +366 -0
- package/.cursor/skills/sync-back-merge/SKILL.md +66 -0
- package/.cursor/skills/task-tracker/SKILL.md +307 -0
- package/.cursor/skills/tech-decision/SKILL.md +393 -0
- package/.cursor/skills/tenant-management/SKILL.md +272 -0
- package/.cursor/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/.cursor/skills/test-development/SKILL.md +301 -0
- package/.cursor/skills/test-development/references/parameterized-examples.md +119 -0
- package/.cursor/skills/ui-pc/SKILL.md +438 -0
- package/.cursor/skills/utils-toolkit/SKILL.md +354 -0
- package/.cursor/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/.cursor/skills/websocket-sse/SKILL.md +350 -0
- package/.cursor/skills/workflow-engine/SKILL.md +249 -0
- package/.cursor/skills/yunxiao-task-management/SKILL.md +401 -0
- package/.cursor/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
- package/.cursor/templates/env-config.md +27 -0
- package/AGENTS.md +275 -0
- package/CLAUDE.md +285 -0
- package/README.md +104 -0
- package/bin/index.js +3069 -0
- package/init.sh +178 -0
- package/package.json +40 -0
- package/scripts/build-skills.js +180 -0
- package/src/platform-map.json +100 -0
- package/src/skills/add-skill/SKILL.md +488 -0
- package/src/skills/add-todo/SKILL.md +269 -0
- package/src/skills/analyze-requirements/SKILL.md +112 -0
- package/src/skills/api-development/SKILL.md +315 -0
- package/src/skills/architecture-design/SKILL.md +152 -0
- package/src/skills/backend-annotations/SKILL.md +248 -0
- package/src/skills/banana-image/CHANGELOG.md +37 -0
- package/src/skills/banana-image/README.md +146 -0
- package/src/skills/banana-image/SKILL.md +171 -0
- package/src/skills/banana-image/assets/logo.png +0 -0
- package/src/skills/banana-image/references/advanced-usage.md +189 -0
- package/src/skills/banana-image/scripts/apply_template.py +125 -0
- package/src/skills/banana-image/scripts/banana_image_exec.ts +412 -0
- package/src/skills/banana-image/scripts/batch_prep.py +82 -0
- package/src/skills/banana-image/scripts/package-lock.json +1437 -0
- package/src/skills/banana-image/scripts/package.json +18 -0
- package/src/skills/banana-image/scripts/requirements.txt +10 -0
- package/src/skills/banana-image/templates/poster.json +22 -0
- package/src/skills/banana-image/templates/product.json +17 -0
- package/src/skills/banana-image/templates/social.json +22 -0
- package/src/skills/banana-image/templates/thumbnail.json +17 -0
- package/src/skills/brainstorm/SKILL.md +216 -0
- package/src/skills/bug-detective/SKILL.md +295 -0
- package/src/skills/bug-detective/references/error-patterns.md +242 -0
- package/src/skills/check/SKILL.md +367 -0
- package/src/skills/code-patterns/SKILL.md +163 -0
- package/src/skills/code-patterns/references/leniu-code-patterns.md +87 -0
- package/src/skills/codex-code-review/SKILL.md +327 -0
- package/src/skills/collaborating-with-codex/SKILL.md +180 -0
- package/src/skills/collaborating-with-codex/scripts/codex_bridge.py +275 -0
- package/src/skills/collaborating-with-gemini/SKILL.md +194 -0
- package/src/skills/collaborating-with-gemini/scripts/gemini_bridge.py +275 -0
- package/src/skills/crud/SKILL.md +265 -0
- package/src/skills/crud-development/SKILL.md +328 -0
- package/src/skills/data-permission/SKILL.md +221 -0
- package/src/skills/data-permission/references/custom-data-scope.md +90 -0
- package/src/skills/database-ops/SKILL.md +210 -0
- package/src/skills/dev/SKILL.md +187 -0
- package/src/skills/error-handler/SKILL.md +310 -0
- package/src/skills/file-oss-management/SKILL.md +260 -0
- package/src/skills/file-oss-management/references/entities.md +105 -0
- package/src/skills/file-oss-management/references/service-impl.md +104 -0
- package/src/skills/fix-bug/SKILL.md +269 -0
- package/src/skills/git-workflow/SKILL.md +179 -0
- package/src/skills/init-docs/SKILL.md +194 -0
- package/src/skills/json-serialization/SKILL.md +341 -0
- package/src/skills/leniu-api-development/SKILL.md +319 -0
- package/src/skills/leniu-api-development/references/real-examples.md +273 -0
- package/src/skills/leniu-architecture-design/SKILL.md +383 -0
- package/src/skills/leniu-backend-annotations/SKILL.md +277 -0
- package/src/skills/leniu-brainstorm/SKILL.md +242 -0
- package/src/skills/leniu-brainstorm/references/business-scenarios.md +162 -0
- package/src/skills/leniu-code-patterns/SKILL.md +411 -0
- package/src/skills/leniu-crud-development/SKILL.md +404 -0
- package/src/skills/leniu-crud-development/references/templates.md +597 -0
- package/src/skills/leniu-customization-location/SKILL.md +410 -0
- package/src/skills/leniu-data-permission/SKILL.md +341 -0
- package/src/skills/leniu-database-ops/SKILL.md +426 -0
- package/src/skills/leniu-error-handler/SKILL.md +462 -0
- package/src/skills/leniu-java-amount-handling/SKILL.md +461 -0
- package/src/skills/leniu-java-code-style/SKILL.md +510 -0
- package/src/skills/leniu-java-concurrent/SKILL.md +400 -0
- package/src/skills/leniu-java-entity/SKILL.md +237 -0
- package/src/skills/leniu-java-entity/references/templates.md +237 -0
- package/src/skills/leniu-java-export/SKILL.md +570 -0
- package/src/skills/leniu-java-logging/SKILL.md +229 -0
- package/src/skills/leniu-java-logging/references/data-mask.md +46 -0
- package/src/skills/leniu-java-logging/references/logging-scenarios.md +113 -0
- package/src/skills/leniu-java-mq/SKILL.md +338 -0
- package/src/skills/leniu-java-mybatis/SKILL.md +267 -0
- package/src/skills/leniu-java-mybatis/references/report-mapper.md +88 -0
- package/src/skills/leniu-java-report-query-param/SKILL.md +291 -0
- package/src/skills/leniu-java-task/SKILL.md +367 -0
- package/src/skills/leniu-java-total-line/SKILL.md +196 -0
- package/src/skills/leniu-marketing-price-rule-customizer/SKILL.md +301 -0
- package/src/skills/leniu-marketing-recharge-rule-customizer/SKILL.md +285 -0
- package/src/skills/leniu-mealtime/SKILL.md +215 -0
- package/src/skills/leniu-redis-cache/SKILL.md +331 -0
- package/src/skills/leniu-report-customization/SKILL.md +415 -0
- package/src/skills/leniu-report-customization/references/table-fields.md +93 -0
- package/src/skills/leniu-report-standard-customization/SKILL.md +391 -0
- package/src/skills/leniu-report-standard-customization/references/analysis-module.md +64 -0
- package/src/skills/leniu-report-standard-customization/references/table-fields.md +113 -0
- package/src/skills/leniu-security-guard/SKILL.md +306 -0
- package/src/skills/leniu-utils-toolkit/SKILL.md +380 -0
- package/src/skills/loki-log-query/SKILL.md +400 -0
- package/src/skills/loki-log-query/environments.json +45 -0
- package/src/skills/mysql-debug/SKILL.md +400 -0
- package/src/skills/next/SKILL.md +137 -0
- package/src/skills/openspec-apply-change/SKILL.md +165 -0
- package/src/skills/openspec-archive-change/SKILL.md +122 -0
- package/src/skills/openspec-bulk-archive-change/SKILL.md +254 -0
- package/src/skills/openspec-continue-change/SKILL.md +126 -0
- package/src/skills/openspec-explore/SKILL.md +299 -0
- package/src/skills/openspec-ff-change/SKILL.md +109 -0
- package/src/skills/openspec-new-change/SKILL.md +82 -0
- package/src/skills/openspec-onboard/SKILL.md +414 -0
- package/src/skills/openspec-sync-specs/SKILL.md +146 -0
- package/src/skills/openspec-verify-change/SKILL.md +176 -0
- package/src/skills/performance-doctor/SKILL.md +297 -0
- package/src/skills/progress/SKILL.md +193 -0
- package/src/skills/project-navigator/SKILL.md +211 -0
- package/src/skills/redis-cache/SKILL.md +282 -0
- package/src/skills/redis-cache/references/listeners.md +23 -0
- package/src/skills/scheduled-jobs/SKILL.md +277 -0
- package/src/skills/security-guard/SKILL.md +245 -0
- package/src/skills/security-guard/references/encrypt-config.md +103 -0
- package/src/skills/security-guard/references/sensitive-strategies.md +42 -0
- package/src/skills/skill-creator/LICENSE.txt +202 -0
- package/src/skills/skill-creator/SKILL.md +479 -0
- package/src/skills/skill-creator/agents/analyzer.md +274 -0
- package/src/skills/skill-creator/agents/comparator.md +202 -0
- package/src/skills/skill-creator/agents/grader.md +223 -0
- package/src/skills/skill-creator/assets/eval_review.html +146 -0
- package/src/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/src/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/src/skills/skill-creator/references/schemas.md +430 -0
- package/src/skills/skill-creator/scripts/__init__.py +0 -0
- package/src/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/src/skills/skill-creator/scripts/generate_report.py +326 -0
- package/src/skills/skill-creator/scripts/improve_description.py +248 -0
- package/src/skills/skill-creator/scripts/package_skill.py +136 -0
- package/src/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/src/skills/skill-creator/scripts/run_eval.py +310 -0
- package/src/skills/skill-creator/scripts/run_loop.py +332 -0
- package/src/skills/skill-creator/scripts/utils.py +47 -0
- package/src/skills/sms-mail/SKILL.md +346 -0
- package/src/skills/sms-mail/references/mail-config.md +88 -0
- package/src/skills/sms-mail/references/sms-config.md +74 -0
- package/src/skills/social-login/SKILL.md +328 -0
- package/src/skills/social-login/references/provider-configs.md +118 -0
- package/src/skills/start/SKILL.md +154 -0
- package/src/skills/store-pc/SKILL.md +366 -0
- package/src/skills/sync/SKILL.md +149 -0
- package/src/skills/sync-back-merge/SKILL.md +66 -0
- package/src/skills/task-tracker/SKILL.md +307 -0
- package/src/skills/tech-decision/SKILL.md +393 -0
- package/src/skills/tenant-management/SKILL.md +272 -0
- package/src/skills/tenant-management/references/tenant-scenarios.md +91 -0
- package/src/skills/test-development/SKILL.md +301 -0
- package/src/skills/test-development/references/parameterized-examples.md +119 -0
- package/src/skills/ui-pc/SKILL.md +438 -0
- package/src/skills/update-status/SKILL.md +159 -0
- package/src/skills/utils-toolkit/SKILL.md +354 -0
- package/src/skills/utils-toolkit/references/redis-utils-api.md +56 -0
- package/src/skills/websocket-sse/SKILL.md +350 -0
- package/src/skills/workflow-engine/SKILL.md +249 -0
- package/src/skills/yunxiao-task-management/SKILL.md +401 -0
- package/src/skills/yunxiao-task-management/templates//346/217/220/346/265/213/345/215/225/346/250/241/346/235/277.html +17 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Generate an HTML report from run_loop.py output.
|
|
3
|
+
|
|
4
|
+
Takes the JSON output from run_loop.py and generates a visual HTML report
|
|
5
|
+
showing each description attempt with check/x for each test case.
|
|
6
|
+
Distinguishes between train and test queries.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
import argparse
|
|
10
|
+
import html
|
|
11
|
+
import json
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def generate_html(data: dict, auto_refresh: bool = False, skill_name: str = "") -> str:
|
|
17
|
+
"""Generate HTML report from loop output data. If auto_refresh is True, adds a meta refresh tag."""
|
|
18
|
+
history = data.get("history", [])
|
|
19
|
+
holdout = data.get("holdout", 0)
|
|
20
|
+
title_prefix = html.escape(skill_name + " \u2014 ") if skill_name else ""
|
|
21
|
+
|
|
22
|
+
# Get all unique queries from train and test sets, with should_trigger info
|
|
23
|
+
train_queries: list[dict] = []
|
|
24
|
+
test_queries: list[dict] = []
|
|
25
|
+
if history:
|
|
26
|
+
for r in history[0].get("train_results", history[0].get("results", [])):
|
|
27
|
+
train_queries.append({"query": r["query"], "should_trigger": r.get("should_trigger", True)})
|
|
28
|
+
if history[0].get("test_results"):
|
|
29
|
+
for r in history[0].get("test_results", []):
|
|
30
|
+
test_queries.append({"query": r["query"], "should_trigger": r.get("should_trigger", True)})
|
|
31
|
+
|
|
32
|
+
refresh_tag = ' <meta http-equiv="refresh" content="5">\n' if auto_refresh else ""
|
|
33
|
+
|
|
34
|
+
html_parts = ["""<!DOCTYPE html>
|
|
35
|
+
<html>
|
|
36
|
+
<head>
|
|
37
|
+
<meta charset="utf-8">
|
|
38
|
+
""" + refresh_tag + """ <title>""" + title_prefix + """Skill Description Optimization</title>
|
|
39
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
40
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
41
|
+
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@500;600&family=Lora:wght@400;500&display=swap" rel="stylesheet">
|
|
42
|
+
<style>
|
|
43
|
+
body {
|
|
44
|
+
font-family: 'Lora', Georgia, serif;
|
|
45
|
+
max-width: 100%;
|
|
46
|
+
margin: 0 auto;
|
|
47
|
+
padding: 20px;
|
|
48
|
+
background: #faf9f5;
|
|
49
|
+
color: #141413;
|
|
50
|
+
}
|
|
51
|
+
h1 { font-family: 'Poppins', sans-serif; color: #141413; }
|
|
52
|
+
.explainer {
|
|
53
|
+
background: white;
|
|
54
|
+
padding: 15px;
|
|
55
|
+
border-radius: 6px;
|
|
56
|
+
margin-bottom: 20px;
|
|
57
|
+
border: 1px solid #e8e6dc;
|
|
58
|
+
color: #b0aea5;
|
|
59
|
+
font-size: 0.875rem;
|
|
60
|
+
line-height: 1.6;
|
|
61
|
+
}
|
|
62
|
+
.summary {
|
|
63
|
+
background: white;
|
|
64
|
+
padding: 15px;
|
|
65
|
+
border-radius: 6px;
|
|
66
|
+
margin-bottom: 20px;
|
|
67
|
+
border: 1px solid #e8e6dc;
|
|
68
|
+
}
|
|
69
|
+
.summary p { margin: 5px 0; }
|
|
70
|
+
.best { color: #788c5d; font-weight: bold; }
|
|
71
|
+
.table-container {
|
|
72
|
+
overflow-x: auto;
|
|
73
|
+
width: 100%;
|
|
74
|
+
}
|
|
75
|
+
table {
|
|
76
|
+
border-collapse: collapse;
|
|
77
|
+
background: white;
|
|
78
|
+
border: 1px solid #e8e6dc;
|
|
79
|
+
border-radius: 6px;
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
min-width: 100%;
|
|
82
|
+
}
|
|
83
|
+
th, td {
|
|
84
|
+
padding: 8px;
|
|
85
|
+
text-align: left;
|
|
86
|
+
border: 1px solid #e8e6dc;
|
|
87
|
+
white-space: normal;
|
|
88
|
+
word-wrap: break-word;
|
|
89
|
+
}
|
|
90
|
+
th {
|
|
91
|
+
font-family: 'Poppins', sans-serif;
|
|
92
|
+
background: #141413;
|
|
93
|
+
color: #faf9f5;
|
|
94
|
+
font-weight: 500;
|
|
95
|
+
}
|
|
96
|
+
th.test-col {
|
|
97
|
+
background: #6a9bcc;
|
|
98
|
+
}
|
|
99
|
+
th.query-col { min-width: 200px; }
|
|
100
|
+
td.description {
|
|
101
|
+
font-family: monospace;
|
|
102
|
+
font-size: 11px;
|
|
103
|
+
word-wrap: break-word;
|
|
104
|
+
max-width: 400px;
|
|
105
|
+
}
|
|
106
|
+
td.result {
|
|
107
|
+
text-align: center;
|
|
108
|
+
font-size: 16px;
|
|
109
|
+
min-width: 40px;
|
|
110
|
+
}
|
|
111
|
+
td.test-result {
|
|
112
|
+
background: #f0f6fc;
|
|
113
|
+
}
|
|
114
|
+
.pass { color: #788c5d; }
|
|
115
|
+
.fail { color: #c44; }
|
|
116
|
+
.rate {
|
|
117
|
+
font-size: 9px;
|
|
118
|
+
color: #b0aea5;
|
|
119
|
+
display: block;
|
|
120
|
+
}
|
|
121
|
+
tr:hover { background: #faf9f5; }
|
|
122
|
+
.score {
|
|
123
|
+
display: inline-block;
|
|
124
|
+
padding: 2px 6px;
|
|
125
|
+
border-radius: 4px;
|
|
126
|
+
font-weight: bold;
|
|
127
|
+
font-size: 11px;
|
|
128
|
+
}
|
|
129
|
+
.score-good { background: #eef2e8; color: #788c5d; }
|
|
130
|
+
.score-ok { background: #fef3c7; color: #d97706; }
|
|
131
|
+
.score-bad { background: #fceaea; color: #c44; }
|
|
132
|
+
.train-label { color: #b0aea5; font-size: 10px; }
|
|
133
|
+
.test-label { color: #6a9bcc; font-size: 10px; font-weight: bold; }
|
|
134
|
+
.best-row { background: #f5f8f2; }
|
|
135
|
+
th.positive-col { border-bottom: 3px solid #788c5d; }
|
|
136
|
+
th.negative-col { border-bottom: 3px solid #c44; }
|
|
137
|
+
th.test-col.positive-col { border-bottom: 3px solid #788c5d; }
|
|
138
|
+
th.test-col.negative-col { border-bottom: 3px solid #c44; }
|
|
139
|
+
.legend { font-family: 'Poppins', sans-serif; display: flex; gap: 20px; margin-bottom: 10px; font-size: 13px; align-items: center; }
|
|
140
|
+
.legend-item { display: flex; align-items: center; gap: 6px; }
|
|
141
|
+
.legend-swatch { width: 16px; height: 16px; border-radius: 3px; display: inline-block; }
|
|
142
|
+
.swatch-positive { background: #141413; border-bottom: 3px solid #788c5d; }
|
|
143
|
+
.swatch-negative { background: #141413; border-bottom: 3px solid #c44; }
|
|
144
|
+
.swatch-test { background: #6a9bcc; }
|
|
145
|
+
.swatch-train { background: #141413; }
|
|
146
|
+
</style>
|
|
147
|
+
</head>
|
|
148
|
+
<body>
|
|
149
|
+
<h1>""" + title_prefix + """Skill Description Optimization</h1>
|
|
150
|
+
<div class="explainer">
|
|
151
|
+
<strong>Optimizing your skill's description.</strong> This page updates automatically as Claude tests different versions of your skill's description. Each row is an iteration — a new description attempt. The columns show test queries: green checkmarks mean the skill triggered correctly (or correctly didn't trigger), red crosses mean it got it wrong. The "Train" score shows performance on queries used to improve the description; the "Test" score shows performance on held-out queries the optimizer hasn't seen. When it's done, Claude will apply the best-performing description to your skill.
|
|
152
|
+
</div>
|
|
153
|
+
"""]
|
|
154
|
+
|
|
155
|
+
# Summary section
|
|
156
|
+
best_test_score = data.get('best_test_score')
|
|
157
|
+
best_train_score = data.get('best_train_score')
|
|
158
|
+
html_parts.append(f"""
|
|
159
|
+
<div class="summary">
|
|
160
|
+
<p><strong>Original:</strong> {html.escape(data.get('original_description', 'N/A'))}</p>
|
|
161
|
+
<p class="best"><strong>Best:</strong> {html.escape(data.get('best_description', 'N/A'))}</p>
|
|
162
|
+
<p><strong>Best Score:</strong> {data.get('best_score', 'N/A')} {'(test)' if best_test_score else '(train)'}</p>
|
|
163
|
+
<p><strong>Iterations:</strong> {data.get('iterations_run', 0)} | <strong>Train:</strong> {data.get('train_size', '?')} | <strong>Test:</strong> {data.get('test_size', '?')}</p>
|
|
164
|
+
</div>
|
|
165
|
+
""")
|
|
166
|
+
|
|
167
|
+
# Legend
|
|
168
|
+
html_parts.append("""
|
|
169
|
+
<div class="legend">
|
|
170
|
+
<span style="font-weight:600">Query columns:</span>
|
|
171
|
+
<span class="legend-item"><span class="legend-swatch swatch-positive"></span> Should trigger</span>
|
|
172
|
+
<span class="legend-item"><span class="legend-swatch swatch-negative"></span> Should NOT trigger</span>
|
|
173
|
+
<span class="legend-item"><span class="legend-swatch swatch-train"></span> Train</span>
|
|
174
|
+
<span class="legend-item"><span class="legend-swatch swatch-test"></span> Test</span>
|
|
175
|
+
</div>
|
|
176
|
+
""")
|
|
177
|
+
|
|
178
|
+
# Table header
|
|
179
|
+
html_parts.append("""
|
|
180
|
+
<div class="table-container">
|
|
181
|
+
<table>
|
|
182
|
+
<thead>
|
|
183
|
+
<tr>
|
|
184
|
+
<th>Iter</th>
|
|
185
|
+
<th>Train</th>
|
|
186
|
+
<th>Test</th>
|
|
187
|
+
<th class="query-col">Description</th>
|
|
188
|
+
""")
|
|
189
|
+
|
|
190
|
+
# Add column headers for train queries
|
|
191
|
+
for qinfo in train_queries:
|
|
192
|
+
polarity = "positive-col" if qinfo["should_trigger"] else "negative-col"
|
|
193
|
+
html_parts.append(f' <th class="{polarity}">{html.escape(qinfo["query"])}</th>\n')
|
|
194
|
+
|
|
195
|
+
# Add column headers for test queries (different color)
|
|
196
|
+
for qinfo in test_queries:
|
|
197
|
+
polarity = "positive-col" if qinfo["should_trigger"] else "negative-col"
|
|
198
|
+
html_parts.append(f' <th class="test-col {polarity}">{html.escape(qinfo["query"])}</th>\n')
|
|
199
|
+
|
|
200
|
+
html_parts.append(""" </tr>
|
|
201
|
+
</thead>
|
|
202
|
+
<tbody>
|
|
203
|
+
""")
|
|
204
|
+
|
|
205
|
+
# Find best iteration for highlighting
|
|
206
|
+
if test_queries:
|
|
207
|
+
best_iter = max(history, key=lambda h: h.get("test_passed") or 0).get("iteration")
|
|
208
|
+
else:
|
|
209
|
+
best_iter = max(history, key=lambda h: h.get("train_passed", h.get("passed", 0))).get("iteration")
|
|
210
|
+
|
|
211
|
+
# Add rows for each iteration
|
|
212
|
+
for h in history:
|
|
213
|
+
iteration = h.get("iteration", "?")
|
|
214
|
+
train_passed = h.get("train_passed", h.get("passed", 0))
|
|
215
|
+
train_total = h.get("train_total", h.get("total", 0))
|
|
216
|
+
test_passed = h.get("test_passed")
|
|
217
|
+
test_total = h.get("test_total")
|
|
218
|
+
description = h.get("description", "")
|
|
219
|
+
train_results = h.get("train_results", h.get("results", []))
|
|
220
|
+
test_results = h.get("test_results", [])
|
|
221
|
+
|
|
222
|
+
# Create lookups for results by query
|
|
223
|
+
train_by_query = {r["query"]: r for r in train_results}
|
|
224
|
+
test_by_query = {r["query"]: r for r in test_results} if test_results else {}
|
|
225
|
+
|
|
226
|
+
# Compute aggregate correct/total runs across all retries
|
|
227
|
+
def aggregate_runs(results: list[dict]) -> tuple[int, int]:
|
|
228
|
+
correct = 0
|
|
229
|
+
total = 0
|
|
230
|
+
for r in results:
|
|
231
|
+
runs = r.get("runs", 0)
|
|
232
|
+
triggers = r.get("triggers", 0)
|
|
233
|
+
total += runs
|
|
234
|
+
if r.get("should_trigger", True):
|
|
235
|
+
correct += triggers
|
|
236
|
+
else:
|
|
237
|
+
correct += runs - triggers
|
|
238
|
+
return correct, total
|
|
239
|
+
|
|
240
|
+
train_correct, train_runs = aggregate_runs(train_results)
|
|
241
|
+
test_correct, test_runs = aggregate_runs(test_results)
|
|
242
|
+
|
|
243
|
+
# Determine score classes
|
|
244
|
+
def score_class(correct: int, total: int) -> str:
|
|
245
|
+
if total > 0:
|
|
246
|
+
ratio = correct / total
|
|
247
|
+
if ratio >= 0.8:
|
|
248
|
+
return "score-good"
|
|
249
|
+
elif ratio >= 0.5:
|
|
250
|
+
return "score-ok"
|
|
251
|
+
return "score-bad"
|
|
252
|
+
|
|
253
|
+
train_class = score_class(train_correct, train_runs)
|
|
254
|
+
test_class = score_class(test_correct, test_runs)
|
|
255
|
+
|
|
256
|
+
row_class = "best-row" if iteration == best_iter else ""
|
|
257
|
+
|
|
258
|
+
html_parts.append(f""" <tr class="{row_class}">
|
|
259
|
+
<td>{iteration}</td>
|
|
260
|
+
<td><span class="score {train_class}">{train_correct}/{train_runs}</span></td>
|
|
261
|
+
<td><span class="score {test_class}">{test_correct}/{test_runs}</span></td>
|
|
262
|
+
<td class="description">{html.escape(description)}</td>
|
|
263
|
+
""")
|
|
264
|
+
|
|
265
|
+
# Add result for each train query
|
|
266
|
+
for qinfo in train_queries:
|
|
267
|
+
r = train_by_query.get(qinfo["query"], {})
|
|
268
|
+
did_pass = r.get("pass", False)
|
|
269
|
+
triggers = r.get("triggers", 0)
|
|
270
|
+
runs = r.get("runs", 0)
|
|
271
|
+
|
|
272
|
+
icon = "✓" if did_pass else "✗"
|
|
273
|
+
css_class = "pass" if did_pass else "fail"
|
|
274
|
+
|
|
275
|
+
html_parts.append(f' <td class="result {css_class}">{icon}<span class="rate">{triggers}/{runs}</span></td>\n')
|
|
276
|
+
|
|
277
|
+
# Add result for each test query (with different background)
|
|
278
|
+
for qinfo in test_queries:
|
|
279
|
+
r = test_by_query.get(qinfo["query"], {})
|
|
280
|
+
did_pass = r.get("pass", False)
|
|
281
|
+
triggers = r.get("triggers", 0)
|
|
282
|
+
runs = r.get("runs", 0)
|
|
283
|
+
|
|
284
|
+
icon = "✓" if did_pass else "✗"
|
|
285
|
+
css_class = "pass" if did_pass else "fail"
|
|
286
|
+
|
|
287
|
+
html_parts.append(f' <td class="result test-result {css_class}">{icon}<span class="rate">{triggers}/{runs}</span></td>\n')
|
|
288
|
+
|
|
289
|
+
html_parts.append(" </tr>\n")
|
|
290
|
+
|
|
291
|
+
html_parts.append(""" </tbody>
|
|
292
|
+
</table>
|
|
293
|
+
</div>
|
|
294
|
+
""")
|
|
295
|
+
|
|
296
|
+
html_parts.append("""
|
|
297
|
+
</body>
|
|
298
|
+
</html>
|
|
299
|
+
""")
|
|
300
|
+
|
|
301
|
+
return "".join(html_parts)
|
|
302
|
+
|
|
303
|
+
|
|
304
|
+
def main():
|
|
305
|
+
parser = argparse.ArgumentParser(description="Generate HTML report from run_loop output")
|
|
306
|
+
parser.add_argument("input", help="Path to JSON output from run_loop.py (or - for stdin)")
|
|
307
|
+
parser.add_argument("-o", "--output", default=None, help="Output HTML file (default: stdout)")
|
|
308
|
+
parser.add_argument("--skill-name", default="", help="Skill name to include in the report title")
|
|
309
|
+
args = parser.parse_args()
|
|
310
|
+
|
|
311
|
+
if args.input == "-":
|
|
312
|
+
data = json.load(sys.stdin)
|
|
313
|
+
else:
|
|
314
|
+
data = json.loads(Path(args.input).read_text())
|
|
315
|
+
|
|
316
|
+
html_output = generate_html(data, skill_name=args.skill_name)
|
|
317
|
+
|
|
318
|
+
if args.output:
|
|
319
|
+
Path(args.output).write_text(html_output)
|
|
320
|
+
print(f"Report written to {args.output}", file=sys.stderr)
|
|
321
|
+
else:
|
|
322
|
+
print(html_output)
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
if __name__ == "__main__":
|
|
326
|
+
main()
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""Improve a skill description based on eval results.
|
|
3
|
+
|
|
4
|
+
Takes eval results (from run_eval.py) and generates an improved description
|
|
5
|
+
using Claude with extended thinking.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
import argparse
|
|
9
|
+
import json
|
|
10
|
+
import re
|
|
11
|
+
import sys
|
|
12
|
+
from pathlib import Path
|
|
13
|
+
|
|
14
|
+
import anthropic
|
|
15
|
+
|
|
16
|
+
from scripts.utils import parse_skill_md
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def improve_description(
|
|
20
|
+
client: anthropic.Anthropic,
|
|
21
|
+
skill_name: str,
|
|
22
|
+
skill_content: str,
|
|
23
|
+
current_description: str,
|
|
24
|
+
eval_results: dict,
|
|
25
|
+
history: list[dict],
|
|
26
|
+
model: str,
|
|
27
|
+
test_results: dict | None = None,
|
|
28
|
+
log_dir: Path | None = None,
|
|
29
|
+
iteration: int | None = None,
|
|
30
|
+
) -> str:
|
|
31
|
+
"""Call Claude to improve the description based on eval results."""
|
|
32
|
+
failed_triggers = [
|
|
33
|
+
r for r in eval_results["results"]
|
|
34
|
+
if r["should_trigger"] and not r["pass"]
|
|
35
|
+
]
|
|
36
|
+
false_triggers = [
|
|
37
|
+
r for r in eval_results["results"]
|
|
38
|
+
if not r["should_trigger"] and not r["pass"]
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
# Build scores summary
|
|
42
|
+
train_score = f"{eval_results['summary']['passed']}/{eval_results['summary']['total']}"
|
|
43
|
+
if test_results:
|
|
44
|
+
test_score = f"{test_results['summary']['passed']}/{test_results['summary']['total']}"
|
|
45
|
+
scores_summary = f"Train: {train_score}, Test: {test_score}"
|
|
46
|
+
else:
|
|
47
|
+
scores_summary = f"Train: {train_score}"
|
|
48
|
+
|
|
49
|
+
prompt = f"""You are optimizing a skill description for a Claude Code skill called "{skill_name}". A "skill" is sort of like a prompt, but with progressive disclosure -- there's a title and description that Claude sees when deciding whether to use the skill, and then if it does use the skill, it reads the .md file which has lots more details and potentially links to other resources in the skill folder like helper files and scripts and additional documentation or examples.
|
|
50
|
+
|
|
51
|
+
The description appears in Claude's "available_skills" list. When a user sends a query, Claude decides whether to invoke the skill based solely on the title and on this description. Your goal is to write a description that triggers for relevant queries, and doesn't trigger for irrelevant ones.
|
|
52
|
+
|
|
53
|
+
Here's the current description:
|
|
54
|
+
<current_description>
|
|
55
|
+
"{current_description}"
|
|
56
|
+
</current_description>
|
|
57
|
+
|
|
58
|
+
Current scores ({scores_summary}):
|
|
59
|
+
<scores_summary>
|
|
60
|
+
"""
|
|
61
|
+
if failed_triggers:
|
|
62
|
+
prompt += "FAILED TO TRIGGER (should have triggered but didn't):\n"
|
|
63
|
+
for r in failed_triggers:
|
|
64
|
+
prompt += f' - "{r["query"]}" (triggered {r["triggers"]}/{r["runs"]} times)\n'
|
|
65
|
+
prompt += "\n"
|
|
66
|
+
|
|
67
|
+
if false_triggers:
|
|
68
|
+
prompt += "FALSE TRIGGERS (triggered but shouldn't have):\n"
|
|
69
|
+
for r in false_triggers:
|
|
70
|
+
prompt += f' - "{r["query"]}" (triggered {r["triggers"]}/{r["runs"]} times)\n'
|
|
71
|
+
prompt += "\n"
|
|
72
|
+
|
|
73
|
+
if history:
|
|
74
|
+
prompt += "PREVIOUS ATTEMPTS (do NOT repeat these — try something structurally different):\n\n"
|
|
75
|
+
for h in history:
|
|
76
|
+
train_s = f"{h.get('train_passed', h.get('passed', 0))}/{h.get('train_total', h.get('total', 0))}"
|
|
77
|
+
test_s = f"{h.get('test_passed', '?')}/{h.get('test_total', '?')}" if h.get('test_passed') is not None else None
|
|
78
|
+
score_str = f"train={train_s}" + (f", test={test_s}" if test_s else "")
|
|
79
|
+
prompt += f'<attempt {score_str}>\n'
|
|
80
|
+
prompt += f'Description: "{h["description"]}"\n'
|
|
81
|
+
if "results" in h:
|
|
82
|
+
prompt += "Train results:\n"
|
|
83
|
+
for r in h["results"]:
|
|
84
|
+
status = "PASS" if r["pass"] else "FAIL"
|
|
85
|
+
prompt += f' [{status}] "{r["query"][:80]}" (triggered {r["triggers"]}/{r["runs"]})\n'
|
|
86
|
+
if h.get("note"):
|
|
87
|
+
prompt += f'Note: {h["note"]}\n'
|
|
88
|
+
prompt += "</attempt>\n\n"
|
|
89
|
+
|
|
90
|
+
prompt += f"""</scores_summary>
|
|
91
|
+
|
|
92
|
+
Skill content (for context on what the skill does):
|
|
93
|
+
<skill_content>
|
|
94
|
+
{skill_content}
|
|
95
|
+
</skill_content>
|
|
96
|
+
|
|
97
|
+
Based on the failures, write a new and improved description that is more likely to trigger correctly. When I say "based on the failures", it's a bit of a tricky line to walk because we don't want to overfit to the specific cases you're seeing. So what I DON'T want you to do is produce an ever-expanding list of specific queries that this skill should or shouldn't trigger for. Instead, try to generalize from the failures to broader categories of user intent and situations where this skill would be useful or not useful. The reason for this is twofold:
|
|
98
|
+
|
|
99
|
+
1. Avoid overfitting
|
|
100
|
+
2. The list might get loooong and it's injected into ALL queries and there might be a lot of skills, so we don't want to blow too much space on any given description.
|
|
101
|
+
|
|
102
|
+
Concretely, your description should not be more than about 100-200 words, even if that comes at the cost of accuracy.
|
|
103
|
+
|
|
104
|
+
Here are some tips that we've found to work well in writing these descriptions:
|
|
105
|
+
- The skill should be phrased in the imperative -- "Use this skill for" rather than "this skill does"
|
|
106
|
+
- The skill description should focus on the user's intent, what they are trying to achieve, vs. the implementation details of how the skill works.
|
|
107
|
+
- The description competes with other skills for Claude's attention — make it distinctive and immediately recognizable.
|
|
108
|
+
- If you're getting lots of failures after repeated attempts, change things up. Try different sentence structures or wordings.
|
|
109
|
+
|
|
110
|
+
I'd encourage you to be creative and mix up the style in different iterations since you'll have multiple opportunities to try different approaches and we'll just grab the highest-scoring one at the end.
|
|
111
|
+
|
|
112
|
+
Please respond with only the new description text in <new_description> tags, nothing else."""
|
|
113
|
+
|
|
114
|
+
response = client.messages.create(
|
|
115
|
+
model=model,
|
|
116
|
+
max_tokens=16000,
|
|
117
|
+
thinking={
|
|
118
|
+
"type": "enabled",
|
|
119
|
+
"budget_tokens": 10000,
|
|
120
|
+
},
|
|
121
|
+
messages=[{"role": "user", "content": prompt}],
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
# Extract thinking and text from response
|
|
125
|
+
thinking_text = ""
|
|
126
|
+
text = ""
|
|
127
|
+
for block in response.content:
|
|
128
|
+
if block.type == "thinking":
|
|
129
|
+
thinking_text = block.thinking
|
|
130
|
+
elif block.type == "text":
|
|
131
|
+
text = block.text
|
|
132
|
+
|
|
133
|
+
# Parse out the <new_description> tags
|
|
134
|
+
match = re.search(r"<new_description>(.*?)</new_description>", text, re.DOTALL)
|
|
135
|
+
description = match.group(1).strip().strip('"') if match else text.strip().strip('"')
|
|
136
|
+
|
|
137
|
+
# Log the transcript
|
|
138
|
+
transcript: dict = {
|
|
139
|
+
"iteration": iteration,
|
|
140
|
+
"prompt": prompt,
|
|
141
|
+
"thinking": thinking_text,
|
|
142
|
+
"response": text,
|
|
143
|
+
"parsed_description": description,
|
|
144
|
+
"char_count": len(description),
|
|
145
|
+
"over_limit": len(description) > 1024,
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
# If over 1024 chars, ask the model to shorten it
|
|
149
|
+
if len(description) > 1024:
|
|
150
|
+
shorten_prompt = f"Your description is {len(description)} characters, which exceeds the hard 1024 character limit. Please rewrite it to be under 1024 characters while preserving the most important trigger words and intent coverage. Respond with only the new description in <new_description> tags."
|
|
151
|
+
shorten_response = client.messages.create(
|
|
152
|
+
model=model,
|
|
153
|
+
max_tokens=16000,
|
|
154
|
+
thinking={
|
|
155
|
+
"type": "enabled",
|
|
156
|
+
"budget_tokens": 10000,
|
|
157
|
+
},
|
|
158
|
+
messages=[
|
|
159
|
+
{"role": "user", "content": prompt},
|
|
160
|
+
{"role": "assistant", "content": text},
|
|
161
|
+
{"role": "user", "content": shorten_prompt},
|
|
162
|
+
],
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
shorten_thinking = ""
|
|
166
|
+
shorten_text = ""
|
|
167
|
+
for block in shorten_response.content:
|
|
168
|
+
if block.type == "thinking":
|
|
169
|
+
shorten_thinking = block.thinking
|
|
170
|
+
elif block.type == "text":
|
|
171
|
+
shorten_text = block.text
|
|
172
|
+
|
|
173
|
+
match = re.search(r"<new_description>(.*?)</new_description>", shorten_text, re.DOTALL)
|
|
174
|
+
shortened = match.group(1).strip().strip('"') if match else shorten_text.strip().strip('"')
|
|
175
|
+
|
|
176
|
+
transcript["rewrite_prompt"] = shorten_prompt
|
|
177
|
+
transcript["rewrite_thinking"] = shorten_thinking
|
|
178
|
+
transcript["rewrite_response"] = shorten_text
|
|
179
|
+
transcript["rewrite_description"] = shortened
|
|
180
|
+
transcript["rewrite_char_count"] = len(shortened)
|
|
181
|
+
description = shortened
|
|
182
|
+
|
|
183
|
+
transcript["final_description"] = description
|
|
184
|
+
|
|
185
|
+
if log_dir:
|
|
186
|
+
log_dir.mkdir(parents=True, exist_ok=True)
|
|
187
|
+
log_file = log_dir / f"improve_iter_{iteration or 'unknown'}.json"
|
|
188
|
+
log_file.write_text(json.dumps(transcript, indent=2))
|
|
189
|
+
|
|
190
|
+
return description
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
def main():
|
|
194
|
+
parser = argparse.ArgumentParser(description="Improve a skill description based on eval results")
|
|
195
|
+
parser.add_argument("--eval-results", required=True, help="Path to eval results JSON (from run_eval.py)")
|
|
196
|
+
parser.add_argument("--skill-path", required=True, help="Path to skill directory")
|
|
197
|
+
parser.add_argument("--history", default=None, help="Path to history JSON (previous attempts)")
|
|
198
|
+
parser.add_argument("--model", required=True, help="Model for improvement")
|
|
199
|
+
parser.add_argument("--verbose", action="store_true", help="Print thinking to stderr")
|
|
200
|
+
args = parser.parse_args()
|
|
201
|
+
|
|
202
|
+
skill_path = Path(args.skill_path)
|
|
203
|
+
if not (skill_path / "SKILL.md").exists():
|
|
204
|
+
print(f"Error: No SKILL.md found at {skill_path}", file=sys.stderr)
|
|
205
|
+
sys.exit(1)
|
|
206
|
+
|
|
207
|
+
eval_results = json.loads(Path(args.eval_results).read_text())
|
|
208
|
+
history = []
|
|
209
|
+
if args.history:
|
|
210
|
+
history = json.loads(Path(args.history).read_text())
|
|
211
|
+
|
|
212
|
+
name, _, content = parse_skill_md(skill_path)
|
|
213
|
+
current_description = eval_results["description"]
|
|
214
|
+
|
|
215
|
+
if args.verbose:
|
|
216
|
+
print(f"Current: {current_description}", file=sys.stderr)
|
|
217
|
+
print(f"Score: {eval_results['summary']['passed']}/{eval_results['summary']['total']}", file=sys.stderr)
|
|
218
|
+
|
|
219
|
+
client = anthropic.Anthropic()
|
|
220
|
+
new_description = improve_description(
|
|
221
|
+
client=client,
|
|
222
|
+
skill_name=name,
|
|
223
|
+
skill_content=content,
|
|
224
|
+
current_description=current_description,
|
|
225
|
+
eval_results=eval_results,
|
|
226
|
+
history=history,
|
|
227
|
+
model=args.model,
|
|
228
|
+
)
|
|
229
|
+
|
|
230
|
+
if args.verbose:
|
|
231
|
+
print(f"Improved: {new_description}", file=sys.stderr)
|
|
232
|
+
|
|
233
|
+
# Output as JSON with both the new description and updated history
|
|
234
|
+
output = {
|
|
235
|
+
"description": new_description,
|
|
236
|
+
"history": history + [{
|
|
237
|
+
"description": current_description,
|
|
238
|
+
"passed": eval_results["summary"]["passed"],
|
|
239
|
+
"failed": eval_results["summary"]["failed"],
|
|
240
|
+
"total": eval_results["summary"]["total"],
|
|
241
|
+
"results": eval_results["results"],
|
|
242
|
+
}],
|
|
243
|
+
}
|
|
244
|
+
print(json.dumps(output, indent=2))
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
if __name__ == "__main__":
|
|
248
|
+
main()
|