tribunal-kit 9.2.3 → 9.2.5
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/.agent/.manifest.json +78 -78
- package/.agent/.shared/ui-ux-pro-max/README.md +4 -4
- package/.agent/.tribunal/session.jsonl +15 -0
- package/.agent/ADRs/ADR-001-system-architecture-intelligence.md +49 -0
- package/.agent/ARCHITECTURE.md +63 -63
- package/.agent/agents/accessibility-reviewer.md +109 -109
- package/.agent/agents/agent-shield-auditor.md +18 -0
- package/.agent/agents/ai-code-reviewer.md +223 -223
- package/.agent/agents/anti-pattern-reviewer.md +104 -104
- package/.agent/agents/api-architect.md +89 -89
- package/.agent/agents/architecture-auditor.md +195 -0
- package/.agent/agents/backend-specialist.md +242 -242
- package/.agent/agents/cloud-engineer.md +120 -120
- package/.agent/agents/code-archaeologist.md +186 -186
- package/.agent/agents/complexity-reviewer.md +76 -76
- package/.agent/agents/database-architect.md +206 -206
- package/.agent/agents/db-latency-auditor.md +237 -237
- package/.agent/agents/debugger.md +215 -215
- package/.agent/agents/dependency-reviewer.md +124 -124
- package/.agent/agents/devops-engineer.md +240 -240
- package/.agent/agents/documentation-writer.md +228 -228
- package/.agent/agents/explorer-agent.md +186 -186
- package/.agent/agents/frontend-reviewer.md +195 -195
- package/.agent/agents/frontend-specialist.md +122 -122
- package/.agent/agents/game-developer.md +68 -68
- package/.agent/agents/harness-manager.md +49 -0
- package/.agent/agents/human-gate-negotiator.md +22 -0
- package/.agent/agents/interaction-reviewer.md +123 -123
- package/.agent/agents/kernel-scheduler.md +56 -0
- package/.agent/agents/logic-reviewer.md +147 -147
- package/.agent/agents/memory-archivist.md +37 -0
- package/.agent/agents/minimalist-reviewer.md +104 -104
- package/.agent/agents/mobile-developer.md +216 -216
- package/.agent/agents/mobile-reviewer.md +180 -180
- package/.agent/agents/orchestrator.md +268 -263
- package/.agent/agents/penetration-tester.md +180 -180
- package/.agent/agents/performance-optimizer.md +202 -202
- package/.agent/agents/performance-reviewer.md +180 -180
- package/.agent/agents/pipeline-reviewer.md +144 -144
- package/.agent/agents/precedence-reviewer.md +266 -266
- package/.agent/agents/product-manager.md +167 -167
- package/.agent/agents/product-owner.md +103 -103
- package/.agent/agents/product-reviewer.md +103 -103
- package/.agent/agents/project-planner.md +181 -176
- package/.agent/agents/qa-automation-engineer.md +244 -244
- package/.agent/agents/resilience-reviewer.md +108 -108
- package/.agent/agents/schema-reviewer.md +87 -87
- package/.agent/agents/security-auditor.md +204 -199
- package/.agent/agents/seo-specialist.md +213 -213
- package/.agent/agents/sql-reviewer.md +180 -180
- package/.agent/agents/supervisor-agent.md +202 -202
- package/.agent/agents/swarm-worker-contracts.md +170 -170
- package/.agent/agents/swarm-worker-registry.md +99 -99
- package/.agent/agents/system-architect.md +260 -105
- package/.agent/agents/test-coverage-reviewer.md +181 -181
- package/.agent/agents/test-engineer.md +138 -138
- package/.agent/agents/throughput-optimizer.md +316 -316
- package/.agent/agents/type-safety-reviewer.md +202 -202
- package/.agent/agents/ui-ux-auditor.md +80 -80
- package/.agent/agents/ui-visual-auditor.md +102 -102
- package/.agent/agents/ux-reviewer.md +109 -109
- package/.agent/agents/visual-reviewer.md +103 -103
- package/.agent/agents/vitals-reviewer.md +245 -245
- package/.agent/config/claude.json +18 -18
- package/.agent/config/plugin.json +102 -102
- package/.agent/config/slash-commands.json +115 -115
- package/.agent/config/specialist-registry.json +415 -415
- package/.agent/config/system-prompt.md +258 -258
- package/.agent/history/arch-mapper-cache.json +6712 -0
- package/.agent/history/architecture.idx.json +5746 -0
- package/.agent/mcp_config.json +32 -32
- package/.agent/patterns/generator.md +11 -11
- package/.agent/patterns/inversion.md +14 -14
- package/.agent/patterns/pipeline.md +11 -11
- package/.agent/patterns/reviewer.md +15 -15
- package/.agent/patterns/tool-wrapper.md +11 -11
- package/.agent/plans/implementation_plan.md +48 -0
- package/.agent/plans/task.md +35 -0
- package/.agent/routing_index.json +2060 -2060
- package/.agent/rules/GEMINI.md +437 -437
- package/.agent/rules/GEMINI_PLANNER.md +82 -82
- package/.agent/rules/kernel.md +86 -86
- package/.agent/scripts/_colors.js +210 -210
- package/.agent/scripts/_utils.js +373 -377
- package/.agent/scripts/architecture_mapper.js +625 -0
- package/.agent/scripts/ast_context_loader.js +137 -137
- package/.agent/scripts/auto_preview.js +203 -203
- package/.agent/scripts/browser_audit.js +102 -102
- package/.agent/scripts/bundle_analyzer.js +287 -287
- package/.agent/scripts/case_law_manager.js +887 -887
- package/.agent/scripts/checklist.js +300 -300
- package/.agent/scripts/cicd_validator.js +305 -305
- package/.agent/scripts/context_broker.js +962 -962
- package/.agent/scripts/context_compiler.js +1143 -1112
- package/.agent/scripts/contract_engine.js +402 -402
- package/.agent/scripts/dependency_analyzer.js +313 -313
- package/.agent/scripts/graph_builder.js +384 -384
- package/.agent/scripts/graph_visualizer.js +390 -390
- package/.agent/scripts/graph_zoom.js +181 -181
- package/.agent/scripts/guardrail_engine.js +785 -785
- package/.agent/scripts/harness_manager.js +60 -0
- package/.agent/scripts/impact_classifier.js +192 -192
- package/.agent/scripts/inner_loop_validator.js +472 -472
- package/.agent/scripts/integrity_manifest.js +484 -484
- package/.agent/scripts/lint_runner.js +218 -218
- package/.agent/scripts/marathon_harness.js +986 -986
- package/.agent/scripts/mcp_server.js +181 -0
- package/.agent/scripts/memory_archivist.js +97 -0
- package/.agent/scripts/memory_consolidator.js +37 -0
- package/.agent/scripts/memory_engine.js +782 -742
- package/.agent/scripts/minify_context.js +111 -111
- package/.agent/scripts/minimal_change_engine.js +445 -445
- package/.agent/scripts/mutation_runner.js +307 -305
- package/.agent/scripts/payload_schemas.js +164 -164
- package/.agent/scripts/pipeline_engine.js +906 -891
- package/.agent/scripts/prompt_compiler.js +272 -272
- package/.agent/scripts/schema_validator.js +326 -326
- package/.agent/scripts/security_scan.js +390 -390
- package/.agent/scripts/session_logger.js +115 -0
- package/.agent/scripts/session_manager.js +299 -289
- package/.agent/scripts/signal_detector.js +175 -175
- package/.agent/scripts/skill_evolution.js +997 -997
- package/.agent/scripts/skill_integrator.js +304 -304
- package/.agent/scripts/socratic_gate_policy.js +63 -63
- package/.agent/scripts/strengthen_skills.js +199 -199
- package/.agent/scripts/swarm_dispatcher.js +983 -906
- package/.agent/scripts/syscall_registry.js +105 -0
- package/.agent/scripts/test_runner.js +209 -209
- package/.agent/scripts/token_budget_broker.js +165 -165
- package/.agent/scripts/trace_engine.js +126 -126
- package/.agent/scripts/verify_all.js +276 -276
- package/.agent/scripts/visual_audit.js +87 -87
- package/.agent/skill_topic_map.json +314 -287
- package/.agent/skills/12-principles-of-animation/SKILL.md +51 -51
- package/.agent/skills/60fps-animation/SKILL.md +91 -91
- package/.agent/skills/accessible-animation/SKILL.md +189 -189
- package/.agent/skills/adapt/SKILL.md +56 -56
- package/.agent/skills/adr-generation/SKILL.md +57 -0
- package/.agent/skills/advanced-rag-pipelines/SKILL.md +94 -94
- package/.agent/skills/agent-organizer/SKILL.md +117 -117
- package/.agent/skills/agent-syscall-guidelines/SKILL.md +25 -0
- package/.agent/skills/agentic-patterns/SKILL.md +281 -281
- package/.agent/skills/agentic-workflows-2026/SKILL.md +91 -83
- package/.agent/skills/agentshield-security/SKILL.md +26 -0
- package/.agent/skills/ai-app-hardening/SKILL.md +51 -51
- package/.agent/skills/ai-prompt-injection-defense/SKILL.md +162 -162
- package/.agent/skills/animation-on-scroll/SKILL.md +196 -196
- package/.agent/skills/animation-systems/SKILL.md +198 -198
- package/.agent/skills/antfu-conventions/SKILL.md +54 -54
- package/.agent/skills/api-patterns/SKILL.md +218 -218
- package/.agent/skills/api-security-auditor/SKILL.md +155 -155
- package/.agent/skills/app-builder/SKILL.md +535 -535
- package/.agent/skills/app-builder/templates/SKILL.md +108 -108
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -76
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -92
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -88
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -88
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -83
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -90
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -90
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -126
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +127 -127
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +172 -172
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +139 -139
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -83
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +122 -122
- package/.agent/skills/appflow-wireframe/SKILL.md +96 -96
- package/.agent/skills/apple-design/SKILL.md +89 -89
- package/.agent/skills/architecture/SKILL.md +188 -188
- package/.agent/skills/architecture-drift/SKILL.md +45 -0
- package/.agent/skills/audit-and-fix/SKILL.md +100 -100
- package/.agent/skills/authentication-best-practices/SKILL.md +157 -157
- package/.agent/skills/autonomous-execution/SKILL.md +76 -0
- package/.agent/skills/backend-security-expert/SKILL.md +73 -73
- package/.agent/skills/baseline-ui/SKILL.md +55 -55
- package/.agent/skills/bash-linux/SKILL.md +139 -139
- package/.agent/skills/behavioral-modes/SKILL.md +200 -200
- package/.agent/skills/better-colors/SKILL.md +116 -116
- package/.agent/skills/better-typography/SKILL.md +90 -90
- package/.agent/skills/better-ui/SKILL.md +130 -130
- package/.agent/skills/bolder/SKILL.md +49 -49
- package/.agent/skills/brainstorming/SKILL.md +460 -460
- package/.agent/skills/browser-audit/SKILL.md +102 -102
- package/.agent/skills/browser-native-ai/SKILL.md +72 -72
- package/.agent/skills/build-primitive/SKILL.md +50 -50
- package/.agent/skills/building-native-ui/SKILL.md +162 -162
- package/.agent/skills/cicd-pro/SKILL.md +412 -412
- package/.agent/skills/clarify/SKILL.md +55 -55
- package/.agent/skills/clean-code/SKILL.md +367 -367
- package/.agent/skills/cloud-architect/SKILL.md +409 -409
- package/.agent/skills/cobejs/SKILL.md +70 -70
- package/.agent/skills/code-review-checklist/SKILL.md +163 -163
- package/.agent/skills/codebase-design/SKILL.md +76 -76
- package/.agent/skills/colorize/SKILL.md +57 -57
- package/.agent/skills/compact-landing/SKILL.md +50 -50
- package/.agent/skills/company-logos/SKILL.md +54 -54
- package/.agent/skills/config-validator/SKILL.md +125 -125
- package/.agent/skills/containerization-pro/SKILL.md +422 -422
- package/.agent/skills/context-engineering-pro/SKILL.md +69 -62
- package/.agent/skills/create-design-md/SKILL.md +92 -92
- package/.agent/skills/critique/SKILL.md +79 -79
- package/.agent/skills/csharp-developer/SKILL.md +478 -478
- package/.agent/skills/data-validation-schemas/SKILL.md +297 -297
- package/.agent/skills/database-design/SKILL.md +219 -219
- package/.agent/skills/delight/SKILL.md +46 -46
- package/.agent/skills/deployment-procedures/SKILL.md +132 -132
- package/.agent/skills/design-lab/SKILL.md +42 -42
- package/.agent/skills/devops-engineer/SKILL.md +305 -305
- package/.agent/skills/devops-incident-responder/SKILL.md +103 -103
- package/.agent/skills/diagnosing-bugs/SKILL.md +172 -172
- package/.agent/skills/distill/SKILL.md +45 -45
- package/.agent/skills/documentation-templates/SKILL.md +251 -251
- package/.agent/skills/domain-modeling/SKILL.md +61 -61
- package/.agent/skills/duckdb-analytical-sql/SKILL.md +51 -51
- package/.agent/skills/edge-ai-mobile/SKILL.md +42 -42
- package/.agent/skills/edge-computing/SKILL.md +143 -143
- package/.agent/skills/emil-design-eng/SKILL.md +134 -134
- package/.agent/skills/error-resilience/SKILL.md +403 -403
- package/.agent/skills/expo-router-v4/SKILL.md +72 -72
- package/.agent/skills/extract-design-system/SKILL.md +120 -120
- package/.agent/skills/fabel-protocol/SKILL.md +282 -277
- package/.agent/skills/failure-mode-analysis/SKILL.md +48 -0
- package/.agent/skills/fixing-accessibility/SKILL.md +87 -87
- package/.agent/skills/fixing-metadata/SKILL.md +83 -83
- package/.agent/skills/fixing-motion-performance/SKILL.md +78 -78
- package/.agent/skills/framer-motion-expert/SKILL.md +237 -237
- package/.agent/skills/frontend-design/SKILL.md +103 -103
- package/.agent/skills/frontend-security-expert/SKILL.md +56 -56
- package/.agent/skills/game-design-expert/SKILL.md +92 -92
- package/.agent/skills/game-engineering-expert/SKILL.md +108 -108
- package/.agent/skills/generative-ui-expert/SKILL.md +100 -100
- package/.agent/skills/geo-fundamentals/SKILL.md +108 -108
- package/.agent/skills/git-pro/SKILL.md +401 -401
- package/.agent/skills/github-operations/SKILL.md +295 -295
- package/.agent/skills/gpt-taste/SKILL.md +50 -50
- package/.agent/skills/graph-engineering/SKILL.md +28 -0
- package/.agent/skills/gsap-core/SKILL.md +277 -277
- package/.agent/skills/gsap-frameworks/SKILL.md +168 -168
- package/.agent/skills/gsap-performance/SKILL.md +94 -94
- package/.agent/skills/gsap-plugins/SKILL.md +441 -441
- package/.agent/skills/gsap-react/SKILL.md +213 -213
- package/.agent/skills/gsap-scrolltrigger/SKILL.md +312 -312
- package/.agent/skills/gsap-timeline/SKILL.md +122 -122
- package/.agent/skills/gsap-utils/SKILL.md +299 -299
- package/.agent/skills/harden/SKILL.md +55 -55
- package/.agent/skills/harness-protocol/SKILL.md +48 -40
- package/.agent/skills/hf-cli/SKILL.md +239 -0
- package/.agent/skills/hf-cloud-aws-context-discovery/SKILL.md +74 -0
- package/.agent/skills/hf-cloud-python-env-setup/SKILL.md +90 -0
- package/.agent/skills/hf-cloud-python-env-setup/requirements.txt +17 -0
- package/.agent/skills/hf-cloud-python-env-setup/scripts/check_versions.py +29 -0
- package/.agent/skills/hf-cloud-python-env-setup/scripts/setup_env.py +143 -0
- package/.agent/skills/hf-cloud-sagemaker-deployment-planner/SKILL.md +90 -0
- package/.agent/skills/hf-cloud-sagemaker-iam-preflight/SKILL.md +102 -0
- package/.agent/skills/hf-cloud-sagemaker-iam-preflight/references/minimum-permissions.json +47 -0
- package/.agent/skills/hf-cloud-sagemaker-iam-preflight/references/trust-policy.json +12 -0
- package/.agent/skills/hf-cloud-sagemaker-iam-preflight/scripts/check_role.py +184 -0
- package/.agent/skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py +118 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/SKILL.md +419 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/references/deployment-template.md +59 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py +148 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py +327 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py +434 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py +506 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/scripts/invoke_endpoint.py +180 -0
- package/.agent/skills/hf-cloud-sagemaker-production-defaults/scripts/teardown.py +246 -0
- package/.agent/skills/hf-cloud-serving-image-selection/SKILL.md +220 -0
- package/.agent/skills/hf-cloud-serving-image-selection/references/model-to-image.md +111 -0
- package/.agent/skills/hf-cloud-serving-image-selection/scripts/mirror_image.py +145 -0
- package/.agent/skills/hf-mem/SKILL.md +79 -0
- package/.agent/skills/huggingface-best/SKILL.md +134 -0
- package/.agent/skills/huggingface-community-evals/SKILL.md +207 -0
- package/.agent/skills/huggingface-community-evals/examples/.env.example +3 -0
- package/.agent/skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/.agent/skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/.agent/skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/.agent/skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/.agent/skills/huggingface-datasets/SKILL.md +107 -0
- package/.agent/skills/huggingface-gradio/SKILL.md +298 -0
- package/.agent/skills/huggingface-gradio/examples.md +613 -0
- package/.agent/skills/huggingface-llm-trainer/SKILL.md +738 -0
- package/.agent/skills/huggingface-llm-trainer/references/gguf_conversion.md +296 -0
- package/.agent/skills/huggingface-llm-trainer/references/hardware_guide.md +283 -0
- package/.agent/skills/huggingface-llm-trainer/references/hub_saving.md +364 -0
- package/.agent/skills/huggingface-llm-trainer/references/local_training_macos.md +231 -0
- package/.agent/skills/huggingface-llm-trainer/references/reliability_principles.md +371 -0
- package/.agent/skills/huggingface-llm-trainer/references/trackio_guide.md +191 -0
- package/.agent/skills/huggingface-llm-trainer/references/training_methods.md +150 -0
- package/.agent/skills/huggingface-llm-trainer/references/training_patterns.md +203 -0
- package/.agent/skills/huggingface-llm-trainer/references/troubleshooting.md +282 -0
- package/.agent/skills/huggingface-llm-trainer/references/unsloth.md +313 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/convert_to_gguf.py +424 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/dataset_inspector.py +417 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/estimate_cost.py +150 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/hf_benchmarks.py +659 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/train_dpo_example.py +106 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/train_grpo_example.py +89 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/train_sft_example.py +122 -0
- package/.agent/skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py +512 -0
- package/.agent/skills/huggingface-local-models/SKILL.md +113 -0
- package/.agent/skills/huggingface-local-models/references/hardware.md +38 -0
- package/.agent/skills/huggingface-local-models/references/hub-discovery.md +178 -0
- package/.agent/skills/huggingface-local-models/references/quantization.md +256 -0
- package/.agent/skills/huggingface-lora-space-builder/SKILL.md +394 -0
- package/.agent/skills/huggingface-lora-space-builder/references/adapting-to-the-lora.md +113 -0
- package/.agent/skills/huggingface-lora-space-builder/references/base-models/krea-2.md +63 -0
- package/.agent/skills/huggingface-lora-space-builder/references/base-models/ltx.md +205 -0
- package/.agent/skills/huggingface-lora-space-builder/references/base-models/qwen-image.md +144 -0
- package/.agent/skills/huggingface-lora-space-builder/references/creative-mode.md +262 -0
- package/.agent/skills/huggingface-lora-space-builder/references/tasks.md +124 -0
- package/.agent/skills/huggingface-lora-space-builder/references/zerogpu-and-publishing.md +196 -0
- package/.agent/skills/huggingface-paper-publisher/SKILL.md +624 -0
- package/.agent/skills/huggingface-paper-publisher/examples/example_usage.md +326 -0
- package/.agent/skills/huggingface-paper-publisher/references/quick_reference.md +216 -0
- package/.agent/skills/huggingface-paper-publisher/scripts/paper_manager.py +606 -0
- package/.agent/skills/huggingface-paper-publisher/templates/arxiv.md +299 -0
- package/.agent/skills/huggingface-paper-publisher/templates/ml-report.md +358 -0
- package/.agent/skills/huggingface-paper-publisher/templates/modern.md +319 -0
- package/.agent/skills/huggingface-paper-publisher/templates/standard.md +201 -0
- package/.agent/skills/huggingface-papers/SKILL.md +239 -0
- package/.agent/skills/huggingface-spaces/README.md +9 -0
- package/.agent/skills/huggingface-spaces/SKILL.md +242 -0
- package/.agent/skills/huggingface-spaces/references/3d-cuda-extensions.md +109 -0
- package/.agent/skills/huggingface-spaces/references/3d-generation.md +98 -0
- package/.agent/skills/huggingface-spaces/references/3d-gsplat.md +53 -0
- package/.agent/skills/huggingface-spaces/references/3d-models.md +227 -0
- package/.agent/skills/huggingface-spaces/references/3d-outputs.md +114 -0
- package/.agent/skills/huggingface-spaces/references/buckets.md +89 -0
- package/.agent/skills/huggingface-spaces/references/debugging.md +236 -0
- package/.agent/skills/huggingface-spaces/references/gradio.md +200 -0
- package/.agent/skills/huggingface-spaces/references/grants.md +63 -0
- package/.agent/skills/huggingface-spaces/references/inference-providers.md +97 -0
- package/.agent/skills/huggingface-spaces/references/known-errors.md +232 -0
- package/.agent/skills/huggingface-spaces/references/requirements.md +169 -0
- package/.agent/skills/huggingface-spaces/references/zerogpu.md +349 -0
- package/.agent/skills/huggingface-tool-builder/SKILL.md +120 -0
- package/.agent/skills/huggingface-tool-builder/references/baseline_hf_api.py +57 -0
- package/.agent/skills/huggingface-tool-builder/references/baseline_hf_api.sh +40 -0
- package/.agent/skills/huggingface-tool-builder/references/baseline_hf_api.tsx +57 -0
- package/.agent/skills/huggingface-tool-builder/references/find_models_by_paper.sh +230 -0
- package/.agent/skills/huggingface-tool-builder/references/hf_enrich_models.sh +96 -0
- package/.agent/skills/huggingface-tool-builder/references/hf_model_card_frontmatter.sh +188 -0
- package/.agent/skills/huggingface-tool-builder/references/hf_model_papers_auth.sh +171 -0
- package/.agent/skills/huggingface-trackio/SKILL.md +142 -0
- package/.agent/skills/huggingface-trackio/references/alerts.md +196 -0
- package/.agent/skills/huggingface-trackio/references/logging_metrics.md +212 -0
- package/.agent/skills/huggingface-trackio/references/retrieving_metrics.md +251 -0
- package/.agent/skills/huggingface-vision-trainer/SKILL.md +593 -0
- package/.agent/skills/huggingface-vision-trainer/references/finetune_sam2_trainer.md +254 -0
- package/.agent/skills/huggingface-vision-trainer/references/hub_saving.md +618 -0
- package/.agent/skills/huggingface-vision-trainer/references/image_classification_training_notebook.md +279 -0
- package/.agent/skills/huggingface-vision-trainer/references/object_detection_training_notebook.md +700 -0
- package/.agent/skills/huggingface-vision-trainer/references/reliability_principles.md +310 -0
- package/.agent/skills/huggingface-vision-trainer/references/timm_trainer.md +91 -0
- package/.agent/skills/huggingface-vision-trainer/scripts/dataset_inspector.py +814 -0
- package/.agent/skills/huggingface-vision-trainer/scripts/estimate_cost.py +217 -0
- package/.agent/skills/huggingface-vision-trainer/scripts/image_classification_training.py +383 -0
- package/.agent/skills/huggingface-vision-trainer/scripts/object_detection_training.py +710 -0
- package/.agent/skills/huggingface-vision-trainer/scripts/sam_segmentation_training.py +382 -0
- package/.agent/skills/huggingface-zerogpu/SKILL.md +289 -0
- package/.agent/skills/huggingface-zerogpu/references/concurrency.md +79 -0
- package/.agent/skills/huggingface-zerogpu/references/cuda-and-deps.md +66 -0
- package/.agent/skills/huggingface-zerogpu/references/how-quota-works.md +74 -0
- package/.agent/skills/huggingface-zerogpu/references/how-zerogpu-works.md +50 -0
- package/.agent/skills/human-gate-negotiation/SKILL.md +30 -0
- package/.agent/skills/i18n-localization/SKILL.md +134 -134
- package/.agent/skills/impeccable/SKILL.md +52 -52
- package/.agent/skills/improve-codebase-architecture/SKILL.md +48 -48
- package/.agent/skills/improve-ui/SKILL.md +70 -70
- package/.agent/skills/intelligent-routing/SKILL.md +204 -198
- package/.agent/skills/knowledge-graph/SKILL.md +71 -71
- package/.agent/skills/landing-page/SKILL.md +65 -65
- package/.agent/skills/lint-and-validate/SKILL.md +224 -224
- package/.agent/skills/llm-engineering/SKILL.md +360 -360
- package/.agent/skills/local-first/SKILL.md +138 -138
- package/.agent/skills/local-first-architecture/SKILL.md +62 -62
- package/.agent/skills/lottie-animation/SKILL.md +62 -62
- package/.agent/skills/marquee-loop/SKILL.md +72 -72
- package/.agent/skills/masked-reveal/SKILL.md +230 -230
- package/.agent/skills/mcp-builder/SKILL.md +105 -105
- package/.agent/skills/micro-interaction/SKILL.md +253 -253
- package/.agent/skills/mobile-design/SKILL.md +245 -245
- package/.agent/skills/monorepo-management/SKILL.md +295 -295
- package/.agent/skills/morphing-icons/SKILL.md +348 -348
- package/.agent/skills/motion-engineering/SKILL.md +197 -197
- package/.agent/skills/nextjs-react-expert/SKILL.md +218 -218
- package/.agent/skills/nodejs-best-practices/SKILL.md +542 -542
- package/.agent/skills/observability/SKILL.md +303 -303
- package/.agent/skills/opentelemetry-observability/SKILL.md +51 -51
- package/.agent/skills/page-transition-animation/SKILL.md +86 -86
- package/.agent/skills/parallel-agents/SKILL.md +110 -110
- package/.agent/skills/performance-profiling/SKILL.md +230 -230
- package/.agent/skills/plan-writing/SKILL.md +127 -127
- package/.agent/skills/platform-engineer/SKILL.md +108 -108
- package/.agent/skills/platform-engineering-opentofu/SKILL.md +59 -59
- package/.agent/skills/playwright-ai-e2e/SKILL.md +52 -52
- package/.agent/skills/playwright-best-practices/SKILL.md +149 -149
- package/.agent/skills/polish/SKILL.md +39 -39
- package/.agent/skills/powershell-windows/SKILL.md +122 -122
- package/.agent/skills/pricing-page/SKILL.md +48 -48
- package/.agent/skills/product-aware-heuristics/SKILL.md +390 -390
- package/.agent/skills/progressive-blur/SKILL.md +80 -80
- package/.agent/skills/project-idioms/SKILL.md +91 -91
- package/.agent/skills/property-based-testing/SKILL.md +50 -50
- package/.agent/skills/python-patterns/SKILL.md +220 -220
- package/.agent/skills/python-pro/SKILL.md +305 -305
- package/.agent/skills/quieter/SKILL.md +49 -49
- package/.agent/skills/react-doctor/SKILL.md +51 -51
- package/.agent/skills/react-specialist/SKILL.md +280 -280
- package/.agent/skills/readme-builder/SKILL.md +270 -270
- package/.agent/skills/realtime-patterns/SKILL.md +283 -283
- package/.agent/skills/red-team-tactics/SKILL.md +191 -191
- package/.agent/skills/redesign-skill/SKILL.md +46 -46
- package/.agent/skills/review-animations/SKILL.md +45 -45
- package/.agent/skills/review-animations/STANDARDS.md +87 -87
- package/.agent/skills/rust-pro/SKILL.md +652 -652
- package/.agent/skills/semantic-filesystem-navigation/SKILL.md +24 -0
- package/.agent/skills/seo-fundamentals/SKILL.md +139 -139
- package/.agent/skills/server-management/SKILL.md +178 -178
- package/.agent/skills/session-log-interrogation/SKILL.md +29 -0
- package/.agent/skills/shadcn-ui-expert/SKILL.md +196 -196
- package/.agent/skills/shape/SKILL.md +56 -56
- package/.agent/skills/skill-creator/SKILL.md +177 -177
- package/.agent/skills/soft-skill/SKILL.md +53 -53
- package/.agent/skills/sounds-on-the-web/SKILL.md +76 -76
- package/.agent/skills/sql-pro/SKILL.md +624 -624
- package/.agent/skills/subagent-driven-development/SKILL.md +32 -0
- package/.agent/skills/supabase-postgres-best-practices/SKILL.md +57 -57
- package/.agent/skills/svg-animation/SKILL.md +356 -356
- package/.agent/skills/swiftui-expert/SKILL.md +164 -164
- package/.agent/skills/swiss-design/SKILL.md +44 -44
- package/.agent/skills/system-design-pro/SKILL.md +188 -318
- package/.agent/skills/systematic-debugging/SKILL.md +129 -124
- package/.agent/skills/systematic-debugging/condition-based-waiting.md +120 -120
- package/.agent/skills/systematic-debugging/defense-in-depth.md +128 -128
- package/.agent/skills/systematic-debugging/root-cause-tracing.md +183 -183
- package/.agent/skills/tailwind-patterns/SKILL.md +583 -583
- package/.agent/skills/taste-skill/SKILL.md +52 -52
- package/.agent/skills/tdd-workflow/SKILL.md +105 -105
- package/.agent/skills/test-result-analyzer/SKILL.md +270 -270
- package/.agent/skills/testing-patterns/SKILL.md +534 -534
- package/.agent/skills/thermo-nuclear-code-quality-review/SKILL.md +62 -62
- package/.agent/skills/thinking-protocol/SKILL.md +21 -21
- package/.agent/skills/to-spring-or-not-to-spring/SKILL.md +43 -43
- package/.agent/skills/train-sentence-transformers/SKILL.md +109 -0
- package/.agent/skills/train-sentence-transformers/references/base_model_selection.md +79 -0
- package/.agent/skills/train-sentence-transformers/references/dataset_formats.md +128 -0
- package/.agent/skills/train-sentence-transformers/references/evaluators_cross_encoder.md +116 -0
- package/.agent/skills/train-sentence-transformers/references/evaluators_multi_vector_encoder.md +101 -0
- package/.agent/skills/train-sentence-transformers/references/evaluators_sentence_transformer.md +151 -0
- package/.agent/skills/train-sentence-transformers/references/evaluators_sparse_encoder.md +121 -0
- package/.agent/skills/train-sentence-transformers/references/hardware_guide.md +105 -0
- package/.agent/skills/train-sentence-transformers/references/hf_jobs_execution.md +173 -0
- package/.agent/skills/train-sentence-transformers/references/losses_cross_encoder.md +137 -0
- package/.agent/skills/train-sentence-transformers/references/losses_multi_vector_encoder.md +100 -0
- package/.agent/skills/train-sentence-transformers/references/losses_sentence_transformer.md +246 -0
- package/.agent/skills/train-sentence-transformers/references/losses_sparse_encoder.md +106 -0
- package/.agent/skills/train-sentence-transformers/references/model_architectures.md +178 -0
- package/.agent/skills/train-sentence-transformers/references/prompts_and_instructions.md +160 -0
- package/.agent/skills/train-sentence-transformers/references/training_args.md +270 -0
- package/.agent/skills/train-sentence-transformers/references/troubleshooting.md +225 -0
- package/.agent/skills/train-sentence-transformers/scripts/mine_hard_negatives.py +199 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_cross_encoder_distillation_example.py +254 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_cross_encoder_example.py +253 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py +282 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_multi_vector_encoder_example.py +240 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_distillation_example.py +303 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_example.py +227 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_make_multilingual_example.py +308 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_matryoshka_example.py +212 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_multi_dataset_example.py +258 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_static_embedding_example.py +273 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sentence_transformer_with_lora_example.py +275 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sparse_encoder_distillation_example.py +262 -0
- package/.agent/skills/train-sentence-transformers/scripts/train_sparse_encoder_example.py +237 -0
- package/.agent/skills/transformers-js/SKILL.md +692 -0
- package/.agent/skills/transformers-js/references/CACHE.md +339 -0
- package/.agent/skills/transformers-js/references/CONFIGURATION.md +438 -0
- package/.agent/skills/transformers-js/references/EXAMPLES.md +620 -0
- package/.agent/skills/transformers-js/references/MODEL_ARCHITECTURES.md +167 -0
- package/.agent/skills/transformers-js/references/MODEL_REGISTRY.md +197 -0
- package/.agent/skills/transformers-js/references/PIPELINE_OPTIONS.md +557 -0
- package/.agent/skills/transformers-js/references/TEXT_GENERATION.md +315 -0
- package/.agent/skills/transitions-dev/SKILL.md +90 -90
- package/.agent/skills/trend-researcher/SKILL.md +198 -198
- package/.agent/skills/tribunal-instincts-memory/SKILL.md +31 -0
- package/.agent/skills/trl-training/SKILL.md +318 -0
- package/.agent/skills/typescript-advanced/SKILL.md +306 -306
- package/.agent/skills/typeset/SKILL.md +60 -60
- package/.agent/skills/ui-reasoning-engine/SKILL.md +155 -155
- package/.agent/skills/ui-skill-packs/SKILL.md +57 -57
- package/.agent/skills/ui-skills-root/SKILL.md +69 -69
- package/.agent/skills/ui-ux-pro-max/SKILL.md +110 -110
- package/.agent/skills/ui-ux-researcher/SKILL.md +199 -199
- package/.agent/skills/vector-search-pgvector/SKILL.md +70 -70
- package/.agent/skills/verification-before-completion/SKILL.md +107 -107
- package/.agent/skills/vue-expert/SKILL.md +259 -259
- package/.agent/skills/vulnerability-scanner/SKILL.md +378 -378
- package/.agent/skills/web-accessibility-auditor/SKILL.md +179 -179
- package/.agent/skills/web-design-guidelines/SKILL.md +49 -49
- package/.agent/skills/web-quality-audit/SKILL.md +47 -47
- package/.agent/skills/webapp-testing/SKILL.md +128 -128
- package/.agent/skills/webgpu-performance/SKILL.md +88 -88
- package/.agent/skills/whimsy-injector/SKILL.md +305 -305
- package/.agent/skills/workflow-optimizer/SKILL.md +188 -188
- package/.agent/skills/zero-trust-passkeys/SKILL.md +82 -82
- package/.agent/templates/DESIGN.md +843 -843
- package/.agent/templates/design-tokens.json +140 -140
- package/.agent/templates/sdd/implementer-prompt.md +62 -62
- package/.agent/templates/sdd/re-review-prompt.md +36 -36
- package/.agent/templates/sdd/task-reviewer-prompt.md +78 -78
- package/.agent/workflows/acf.md +153 -153
- package/.agent/workflows/api-tester.md +189 -189
- package/.agent/workflows/assimilate.md +21 -0
- package/.agent/workflows/audit-live.md +53 -53
- package/.agent/workflows/audit.md +172 -167
- package/.agent/workflows/brainstorm.md +157 -157
- package/.agent/workflows/changelog.md +152 -152
- package/.agent/workflows/compare-web.md +35 -35
- package/.agent/workflows/context.md +102 -102
- package/.agent/workflows/contract.md +79 -79
- package/.agent/workflows/create.md +182 -182
- package/.agent/workflows/debug.md +201 -201
- package/.agent/workflows/deploy.md +215 -215
- package/.agent/workflows/enhance.md +165 -165
- package/.agent/workflows/fix-ci.md +94 -94
- package/.agent/workflows/fix.md +149 -149
- package/.agent/workflows/generate.md +216 -211
- package/.agent/workflows/htop.md +22 -0
- package/.agent/workflows/marathon.md +291 -286
- package/.agent/workflows/migrate.md +198 -198
- package/.agent/workflows/minimal.md +101 -101
- package/.agent/workflows/orchestrate.md +205 -205
- package/.agent/workflows/performance-benchmarker.md +148 -148
- package/.agent/workflows/pipeline.md +165 -165
- package/.agent/workflows/plan.md +206 -206
- package/.agent/workflows/preview.md +116 -116
- package/.agent/workflows/refactor.md +207 -207
- package/.agent/workflows/resume.md +20 -0
- package/.agent/workflows/review-ai.md +139 -139
- package/.agent/workflows/review.md +155 -155
- package/.agent/workflows/sdd.md +137 -137
- package/.agent/workflows/session.md +135 -135
- package/.agent/workflows/skill-enhancement-engine.md +84 -84
- package/.agent/workflows/status.md +112 -112
- package/.agent/workflows/strengthen-skills.md +174 -174
- package/.agent/workflows/super-prompt.md +146 -146
- package/.agent/workflows/swarm.md +218 -218
- package/.agent/workflows/team-mode.md +22 -0
- package/.agent/workflows/test.md +224 -224
- package/.agent/workflows/tribunal-backend.md +149 -149
- package/.agent/workflows/tribunal-cicd.md +109 -109
- package/.agent/workflows/tribunal-database.md +142 -142
- package/.agent/workflows/tribunal-frontend.md +157 -157
- package/.agent/workflows/tribunal-full.md +156 -156
- package/.agent/workflows/tribunal-mobile.md +142 -142
- package/.agent/workflows/tribunal-performance.md +149 -149
- package/.agent/workflows/tribunal-speed.md +222 -222
- package/.agent/workflows/tribunal-ui.md +97 -97
- package/.agent/workflows/ui-ux-pro-max.md +103 -103
- package/.agents/skills/12-principles-of-animation/SKILL.md +51 -51
- package/.agents/skills/60fps-animation/SKILL.md +91 -91
- package/.agents/skills/accessible-animation/SKILL.md +189 -189
- package/.agents/skills/adapt/SKILL.md +56 -56
- package/.agents/skills/adr-generation/SKILL.md +57 -0
- package/.agents/skills/advanced-rag-pipelines/SKILL.md +94 -94
- package/.agents/skills/agent-organizer/SKILL.md +117 -117
- package/.agents/skills/agent-syscall-guidelines/SKILL.md +25 -0
- package/.agents/skills/agentic-patterns/SKILL.md +281 -281
- package/.agents/skills/agentic-workflows-2026/SKILL.md +91 -83
- package/.agents/skills/agentshield-security/SKILL.md +26 -0
- package/.agents/skills/ai-app-hardening/SKILL.md +51 -51
- package/.agents/skills/ai-prompt-injection-defense/SKILL.md +162 -162
- package/.agents/skills/animation-on-scroll/SKILL.md +196 -196
- package/.agents/skills/animation-systems/SKILL.md +198 -198
- package/.agents/skills/antfu-conventions/SKILL.md +54 -54
- package/.agents/skills/api-patterns/SKILL.md +218 -218
- package/.agents/skills/api-security-auditor/SKILL.md +155 -155
- package/.agents/skills/app-builder/SKILL.md +535 -535
- package/.agents/skills/app-builder/templates/SKILL.md +108 -108
- package/.agents/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -76
- package/.agents/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -92
- package/.agents/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -88
- package/.agents/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -88
- package/.agents/skills/app-builder/templates/express-api/TEMPLATE.md +83 -83
- package/.agents/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -90
- package/.agents/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -90
- package/.agents/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -126
- package/.agents/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +127 -127
- package/.agents/skills/app-builder/templates/nextjs-static/TEMPLATE.md +172 -172
- package/.agents/skills/app-builder/templates/nuxt-app/TEMPLATE.md +139 -139
- package/.agents/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -83
- package/.agents/skills/app-builder/templates/react-native-app/TEMPLATE.md +122 -122
- package/.agents/skills/appflow-wireframe/SKILL.md +96 -96
- package/.agents/skills/apple-design/SKILL.md +89 -89
- package/.agents/skills/architecture/SKILL.md +188 -188
- package/.agents/skills/architecture-drift/SKILL.md +45 -0
- package/.agents/skills/audit-and-fix/SKILL.md +100 -100
- package/.agents/skills/authentication-best-practices/SKILL.md +157 -157
- package/.agents/skills/autonomous-execution/SKILL.md +76 -0
- package/.agents/skills/backend-security-expert/SKILL.md +73 -73
- package/.agents/skills/baseline-ui/SKILL.md +55 -55
- package/.agents/skills/bash-linux/SKILL.md +139 -139
- package/.agents/skills/behavioral-modes/SKILL.md +200 -200
- package/.agents/skills/better-colors/SKILL.md +116 -116
- package/.agents/skills/better-typography/SKILL.md +90 -90
- package/.agents/skills/better-ui/SKILL.md +130 -130
- package/.agents/skills/bolder/SKILL.md +49 -49
- package/.agents/skills/brainstorming/SKILL.md +460 -460
- package/.agents/skills/browser-audit/SKILL.md +102 -102
- package/.agents/skills/browser-native-ai/SKILL.md +72 -72
- package/.agents/skills/build-primitive/SKILL.md +50 -50
- package/.agents/skills/building-native-ui/SKILL.md +162 -162
- package/.agents/skills/cicd-pro/SKILL.md +412 -412
- package/.agents/skills/clarify/SKILL.md +55 -55
- package/.agents/skills/clean-code/SKILL.md +367 -367
- package/.agents/skills/cloud-architect/SKILL.md +409 -409
- package/.agents/skills/cobejs/SKILL.md +70 -70
- package/.agents/skills/code-review-checklist/SKILL.md +163 -163
- package/.agents/skills/codebase-design/SKILL.md +76 -76
- package/.agents/skills/colorize/SKILL.md +57 -57
- package/.agents/skills/compact-landing/SKILL.md +50 -50
- package/.agents/skills/company-logos/SKILL.md +54 -54
- package/.agents/skills/config-validator/SKILL.md +125 -125
- package/.agents/skills/containerization-pro/SKILL.md +422 -422
- package/.agents/skills/context-engineering-pro/SKILL.md +69 -62
- package/.agents/skills/create-design-md/SKILL.md +92 -92
- package/.agents/skills/critique/SKILL.md +79 -79
- package/.agents/skills/csharp-developer/SKILL.md +478 -478
- package/.agents/skills/data-validation-schemas/SKILL.md +297 -297
- package/.agents/skills/database-design/SKILL.md +219 -219
- package/.agents/skills/delight/SKILL.md +46 -46
- package/.agents/skills/deployment-procedures/SKILL.md +132 -132
- package/.agents/skills/design-lab/SKILL.md +42 -42
- package/.agents/skills/devops-engineer/SKILL.md +305 -305
- package/.agents/skills/devops-incident-responder/SKILL.md +103 -103
- package/.agents/skills/diagnosing-bugs/SKILL.md +172 -172
- package/.agents/skills/distill/SKILL.md +45 -45
- package/.agents/skills/documentation-templates/SKILL.md +251 -251
- package/.agents/skills/domain-modeling/SKILL.md +61 -61
- package/.agents/skills/duckdb-analytical-sql/SKILL.md +51 -51
- package/.agents/skills/edge-ai-mobile/SKILL.md +42 -42
- package/.agents/skills/edge-computing/SKILL.md +143 -143
- package/.agents/skills/emil-design-eng/SKILL.md +134 -134
- package/.agents/skills/error-resilience/SKILL.md +403 -403
- package/.agents/skills/expo-router-v4/SKILL.md +72 -72
- package/.agents/skills/extract-design-system/SKILL.md +120 -120
- package/.agents/skills/fabel-protocol/SKILL.md +282 -277
- package/.agents/skills/failure-mode-analysis/SKILL.md +48 -0
- package/.agents/skills/fixing-accessibility/SKILL.md +87 -87
- package/.agents/skills/fixing-metadata/SKILL.md +83 -83
- package/.agents/skills/fixing-motion-performance/SKILL.md +78 -78
- package/.agents/skills/framer-motion-expert/SKILL.md +237 -237
- package/.agents/skills/frontend-design/SKILL.md +103 -103
- package/.agents/skills/frontend-security-expert/SKILL.md +56 -56
- package/.agents/skills/game-design-expert/SKILL.md +92 -92
- package/.agents/skills/game-engineering-expert/SKILL.md +108 -108
- package/.agents/skills/generative-ui-expert/SKILL.md +100 -100
- package/.agents/skills/geo-fundamentals/SKILL.md +108 -108
- package/.agents/skills/git-pro/SKILL.md +401 -401
- package/.agents/skills/github-operations/SKILL.md +295 -295
- package/.agents/skills/gpt-taste/SKILL.md +50 -50
- package/.agents/skills/graph-engineering/SKILL.md +28 -0
- package/.agents/skills/gsap-core/SKILL.md +277 -277
- package/.agents/skills/gsap-frameworks/SKILL.md +168 -168
- package/.agents/skills/gsap-performance/SKILL.md +94 -94
- package/.agents/skills/gsap-plugins/SKILL.md +441 -441
- package/.agents/skills/gsap-react/SKILL.md +213 -213
- package/.agents/skills/gsap-scrolltrigger/SKILL.md +312 -312
- package/.agents/skills/gsap-timeline/SKILL.md +122 -122
- package/.agents/skills/gsap-utils/SKILL.md +299 -299
- package/.agents/skills/harden/SKILL.md +55 -55
- package/.agents/skills/harness-protocol/SKILL.md +48 -40
- package/.agents/skills/hf-cli/SKILL.md +239 -0
- package/.agents/skills/hf-cloud-aws-context-discovery/SKILL.md +74 -0
- package/.agents/skills/hf-cloud-python-env-setup/SKILL.md +90 -0
- package/.agents/skills/hf-cloud-python-env-setup/requirements.txt +17 -0
- package/.agents/skills/hf-cloud-python-env-setup/scripts/check_versions.py +29 -0
- package/.agents/skills/hf-cloud-python-env-setup/scripts/setup_env.py +143 -0
- package/.agents/skills/hf-cloud-sagemaker-deployment-planner/SKILL.md +90 -0
- package/.agents/skills/hf-cloud-sagemaker-iam-preflight/SKILL.md +102 -0
- package/.agents/skills/hf-cloud-sagemaker-iam-preflight/references/minimum-permissions.json +47 -0
- package/.agents/skills/hf-cloud-sagemaker-iam-preflight/references/trust-policy.json +12 -0
- package/.agents/skills/hf-cloud-sagemaker-iam-preflight/scripts/check_role.py +184 -0
- package/.agents/skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py +118 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/SKILL.md +419 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/references/deployment-template.md +59 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py +148 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py +327 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py +434 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py +506 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/scripts/invoke_endpoint.py +180 -0
- package/.agents/skills/hf-cloud-sagemaker-production-defaults/scripts/teardown.py +246 -0
- package/.agents/skills/hf-cloud-serving-image-selection/SKILL.md +220 -0
- package/.agents/skills/hf-cloud-serving-image-selection/references/model-to-image.md +111 -0
- package/.agents/skills/hf-cloud-serving-image-selection/scripts/mirror_image.py +145 -0
- package/.agents/skills/hf-mem/SKILL.md +79 -0
- package/.agents/skills/huggingface-best/SKILL.md +134 -0
- package/.agents/skills/huggingface-community-evals/SKILL.md +207 -0
- package/.agents/skills/huggingface-community-evals/examples/.env.example +3 -0
- package/.agents/skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/.agents/skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/.agents/skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/.agents/skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/.agents/skills/huggingface-datasets/SKILL.md +107 -0
- package/.agents/skills/huggingface-gradio/SKILL.md +298 -0
- package/.agents/skills/huggingface-gradio/examples.md +613 -0
- package/.agents/skills/huggingface-llm-trainer/SKILL.md +738 -0
- package/.agents/skills/huggingface-llm-trainer/references/gguf_conversion.md +296 -0
- package/.agents/skills/huggingface-llm-trainer/references/hardware_guide.md +283 -0
- package/.agents/skills/huggingface-llm-trainer/references/hub_saving.md +364 -0
- package/.agents/skills/huggingface-llm-trainer/references/local_training_macos.md +231 -0
- package/.agents/skills/huggingface-llm-trainer/references/reliability_principles.md +371 -0
- package/.agents/skills/huggingface-llm-trainer/references/trackio_guide.md +191 -0
- package/.agents/skills/huggingface-llm-trainer/references/training_methods.md +150 -0
- package/.agents/skills/huggingface-llm-trainer/references/training_patterns.md +203 -0
- package/.agents/skills/huggingface-llm-trainer/references/troubleshooting.md +282 -0
- package/.agents/skills/huggingface-llm-trainer/references/unsloth.md +313 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/convert_to_gguf.py +424 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/dataset_inspector.py +417 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/estimate_cost.py +150 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/hf_benchmarks.py +659 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/train_dpo_example.py +106 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/train_grpo_example.py +89 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/train_sft_example.py +122 -0
- package/.agents/skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py +512 -0
- package/.agents/skills/huggingface-local-models/SKILL.md +113 -0
- package/.agents/skills/huggingface-local-models/references/hardware.md +38 -0
- package/.agents/skills/huggingface-local-models/references/hub-discovery.md +178 -0
- package/.agents/skills/huggingface-local-models/references/quantization.md +256 -0
- package/.agents/skills/huggingface-lora-space-builder/SKILL.md +394 -0
- package/.agents/skills/huggingface-lora-space-builder/references/adapting-to-the-lora.md +113 -0
- package/.agents/skills/huggingface-lora-space-builder/references/base-models/krea-2.md +63 -0
- package/.agents/skills/huggingface-lora-space-builder/references/base-models/ltx.md +205 -0
- package/.agents/skills/huggingface-lora-space-builder/references/base-models/qwen-image.md +144 -0
- package/.agents/skills/huggingface-lora-space-builder/references/creative-mode.md +262 -0
- package/.agents/skills/huggingface-lora-space-builder/references/tasks.md +124 -0
- package/.agents/skills/huggingface-lora-space-builder/references/zerogpu-and-publishing.md +196 -0
- package/.agents/skills/huggingface-paper-publisher/SKILL.md +624 -0
- package/.agents/skills/huggingface-paper-publisher/examples/example_usage.md +326 -0
- package/.agents/skills/huggingface-paper-publisher/references/quick_reference.md +216 -0
- package/.agents/skills/huggingface-paper-publisher/scripts/paper_manager.py +606 -0
- package/.agents/skills/huggingface-paper-publisher/templates/arxiv.md +299 -0
- package/.agents/skills/huggingface-paper-publisher/templates/ml-report.md +358 -0
- package/.agents/skills/huggingface-paper-publisher/templates/modern.md +319 -0
- package/.agents/skills/huggingface-paper-publisher/templates/standard.md +201 -0
- package/.agents/skills/huggingface-papers/SKILL.md +239 -0
- package/.agents/skills/huggingface-spaces/README.md +9 -0
- package/.agents/skills/huggingface-spaces/SKILL.md +242 -0
- package/.agents/skills/huggingface-spaces/references/3d-cuda-extensions.md +109 -0
- package/.agents/skills/huggingface-spaces/references/3d-generation.md +98 -0
- package/.agents/skills/huggingface-spaces/references/3d-gsplat.md +53 -0
- package/.agents/skills/huggingface-spaces/references/3d-models.md +227 -0
- package/.agents/skills/huggingface-spaces/references/3d-outputs.md +114 -0
- package/.agents/skills/huggingface-spaces/references/buckets.md +89 -0
- package/.agents/skills/huggingface-spaces/references/debugging.md +236 -0
- package/.agents/skills/huggingface-spaces/references/gradio.md +200 -0
- package/.agents/skills/huggingface-spaces/references/grants.md +63 -0
- package/.agents/skills/huggingface-spaces/references/inference-providers.md +97 -0
- package/.agents/skills/huggingface-spaces/references/known-errors.md +232 -0
- package/.agents/skills/huggingface-spaces/references/requirements.md +169 -0
- package/.agents/skills/huggingface-spaces/references/zerogpu.md +349 -0
- package/.agents/skills/huggingface-tool-builder/SKILL.md +120 -0
- package/.agents/skills/huggingface-tool-builder/references/baseline_hf_api.py +57 -0
- package/.agents/skills/huggingface-tool-builder/references/baseline_hf_api.sh +40 -0
- package/.agents/skills/huggingface-tool-builder/references/baseline_hf_api.tsx +57 -0
- package/.agents/skills/huggingface-tool-builder/references/find_models_by_paper.sh +230 -0
- package/.agents/skills/huggingface-tool-builder/references/hf_enrich_models.sh +96 -0
- package/.agents/skills/huggingface-tool-builder/references/hf_model_card_frontmatter.sh +188 -0
- package/.agents/skills/huggingface-tool-builder/references/hf_model_papers_auth.sh +171 -0
- package/.agents/skills/huggingface-trackio/SKILL.md +142 -0
- package/.agents/skills/huggingface-trackio/references/alerts.md +196 -0
- package/.agents/skills/huggingface-trackio/references/logging_metrics.md +212 -0
- package/.agents/skills/huggingface-trackio/references/retrieving_metrics.md +251 -0
- package/.agents/skills/huggingface-vision-trainer/SKILL.md +593 -0
- package/.agents/skills/huggingface-vision-trainer/references/finetune_sam2_trainer.md +254 -0
- package/.agents/skills/huggingface-vision-trainer/references/hub_saving.md +618 -0
- package/.agents/skills/huggingface-vision-trainer/references/image_classification_training_notebook.md +279 -0
- package/.agents/skills/huggingface-vision-trainer/references/object_detection_training_notebook.md +700 -0
- package/.agents/skills/huggingface-vision-trainer/references/reliability_principles.md +310 -0
- package/.agents/skills/huggingface-vision-trainer/references/timm_trainer.md +91 -0
- package/.agents/skills/huggingface-vision-trainer/scripts/dataset_inspector.py +814 -0
- package/.agents/skills/huggingface-vision-trainer/scripts/estimate_cost.py +217 -0
- package/.agents/skills/huggingface-vision-trainer/scripts/image_classification_training.py +383 -0
- package/.agents/skills/huggingface-vision-trainer/scripts/object_detection_training.py +710 -0
- package/.agents/skills/huggingface-vision-trainer/scripts/sam_segmentation_training.py +382 -0
- package/.agents/skills/huggingface-zerogpu/SKILL.md +289 -0
- package/.agents/skills/huggingface-zerogpu/references/concurrency.md +79 -0
- package/.agents/skills/huggingface-zerogpu/references/cuda-and-deps.md +66 -0
- package/.agents/skills/huggingface-zerogpu/references/how-quota-works.md +74 -0
- package/.agents/skills/huggingface-zerogpu/references/how-zerogpu-works.md +50 -0
- package/.agents/skills/human-gate-negotiation/SKILL.md +30 -0
- package/.agents/skills/i18n-localization/SKILL.md +134 -134
- package/.agents/skills/impeccable/SKILL.md +52 -52
- package/.agents/skills/improve-codebase-architecture/SKILL.md +48 -48
- package/.agents/skills/improve-ui/SKILL.md +70 -70
- package/.agents/skills/intelligent-routing/SKILL.md +204 -198
- package/.agents/skills/knowledge-graph/SKILL.md +71 -71
- package/.agents/skills/landing-page/SKILL.md +65 -65
- package/.agents/skills/lint-and-validate/SKILL.md +224 -224
- package/.agents/skills/llm-engineering/SKILL.md +360 -360
- package/.agents/skills/local-first/SKILL.md +138 -138
- package/.agents/skills/local-first-architecture/SKILL.md +62 -62
- package/.agents/skills/lottie-animation/SKILL.md +62 -62
- package/.agents/skills/marquee-loop/SKILL.md +72 -72
- package/.agents/skills/masked-reveal/SKILL.md +230 -230
- package/.agents/skills/mcp-builder/SKILL.md +105 -105
- package/.agents/skills/micro-interaction/SKILL.md +253 -253
- package/.agents/skills/mobile-design/SKILL.md +245 -245
- package/.agents/skills/monorepo-management/SKILL.md +295 -295
- package/.agents/skills/morphing-icons/SKILL.md +348 -348
- package/.agents/skills/motion-engineering/SKILL.md +197 -197
- package/.agents/skills/nextjs-react-expert/SKILL.md +218 -218
- package/.agents/skills/nodejs-best-practices/SKILL.md +542 -542
- package/.agents/skills/observability/SKILL.md +303 -303
- package/.agents/skills/opentelemetry-observability/SKILL.md +51 -51
- package/.agents/skills/page-transition-animation/SKILL.md +86 -86
- package/.agents/skills/parallel-agents/SKILL.md +110 -110
- package/.agents/skills/performance-profiling/SKILL.md +230 -230
- package/.agents/skills/plan-writing/SKILL.md +127 -127
- package/.agents/skills/platform-engineer/SKILL.md +108 -108
- package/.agents/skills/platform-engineering-opentofu/SKILL.md +59 -59
- package/.agents/skills/playwright-ai-e2e/SKILL.md +52 -52
- package/.agents/skills/playwright-best-practices/SKILL.md +149 -149
- package/.agents/skills/polish/SKILL.md +39 -39
- package/.agents/skills/powershell-windows/SKILL.md +122 -122
- package/.agents/skills/pricing-page/SKILL.md +48 -48
- package/.agents/skills/product-aware-heuristics/SKILL.md +390 -390
- package/.agents/skills/progressive-blur/SKILL.md +80 -80
- package/.agents/skills/project-idioms/SKILL.md +91 -91
- package/.agents/skills/property-based-testing/SKILL.md +50 -50
- package/.agents/skills/python-patterns/SKILL.md +220 -220
- package/.agents/skills/python-pro/SKILL.md +305 -305
- package/.agents/skills/quieter/SKILL.md +49 -49
- package/.agents/skills/react-doctor/SKILL.md +51 -51
- package/.agents/skills/react-specialist/SKILL.md +280 -280
- package/.agents/skills/readme-builder/SKILL.md +270 -270
- package/.agents/skills/realtime-patterns/SKILL.md +283 -283
- package/.agents/skills/red-team-tactics/SKILL.md +191 -191
- package/.agents/skills/redesign-skill/SKILL.md +46 -46
- package/.agents/skills/review-animations/SKILL.md +45 -45
- package/.agents/skills/review-animations/STANDARDS.md +87 -87
- package/.agents/skills/rust-pro/SKILL.md +652 -652
- package/.agents/skills/semantic-filesystem-navigation/SKILL.md +24 -0
- package/.agents/skills/seo-fundamentals/SKILL.md +139 -139
- package/.agents/skills/server-management/SKILL.md +178 -178
- package/.agents/skills/session-log-interrogation/SKILL.md +29 -0
- package/.agents/skills/shadcn-ui-expert/SKILL.md +196 -196
- package/.agents/skills/shape/SKILL.md +56 -56
- package/.agents/skills/skill-creator/SKILL.md +177 -177
- package/.agents/skills/soft-skill/SKILL.md +53 -53
- package/.agents/skills/sounds-on-the-web/SKILL.md +76 -76
- package/.agents/skills/sql-pro/SKILL.md +624 -624
- package/.agents/skills/subagent-driven-development/SKILL.md +32 -0
- package/.agents/skills/supabase-postgres-best-practices/SKILL.md +57 -57
- package/.agents/skills/svg-animation/SKILL.md +356 -356
- package/.agents/skills/swiftui-expert/SKILL.md +164 -164
- package/.agents/skills/swiss-design/SKILL.md +44 -44
- package/.agents/skills/system-design-pro/SKILL.md +188 -318
- package/.agents/skills/systematic-debugging/SKILL.md +129 -124
- package/.agents/skills/systematic-debugging/condition-based-waiting.md +120 -120
- package/.agents/skills/systematic-debugging/defense-in-depth.md +128 -128
- package/.agents/skills/systematic-debugging/root-cause-tracing.md +183 -183
- package/.agents/skills/tailwind-patterns/SKILL.md +583 -583
- package/.agents/skills/taste-skill/SKILL.md +52 -52
- package/.agents/skills/tdd-workflow/SKILL.md +105 -105
- package/.agents/skills/test-result-analyzer/SKILL.md +270 -270
- package/.agents/skills/testing-patterns/SKILL.md +534 -534
- package/.agents/skills/thermo-nuclear-code-quality-review/SKILL.md +62 -62
- package/.agents/skills/thinking-protocol/SKILL.md +21 -21
- package/.agents/skills/to-spring-or-not-to-spring/SKILL.md +43 -43
- package/.agents/skills/train-sentence-transformers/SKILL.md +109 -0
- package/.agents/skills/train-sentence-transformers/references/base_model_selection.md +79 -0
- package/.agents/skills/train-sentence-transformers/references/dataset_formats.md +128 -0
- package/.agents/skills/train-sentence-transformers/references/evaluators_cross_encoder.md +116 -0
- package/.agents/skills/train-sentence-transformers/references/evaluators_multi_vector_encoder.md +101 -0
- package/.agents/skills/train-sentence-transformers/references/evaluators_sentence_transformer.md +151 -0
- package/.agents/skills/train-sentence-transformers/references/evaluators_sparse_encoder.md +121 -0
- package/.agents/skills/train-sentence-transformers/references/hardware_guide.md +105 -0
- package/.agents/skills/train-sentence-transformers/references/hf_jobs_execution.md +173 -0
- package/.agents/skills/train-sentence-transformers/references/losses_cross_encoder.md +137 -0
- package/.agents/skills/train-sentence-transformers/references/losses_multi_vector_encoder.md +100 -0
- package/.agents/skills/train-sentence-transformers/references/losses_sentence_transformer.md +246 -0
- package/.agents/skills/train-sentence-transformers/references/losses_sparse_encoder.md +106 -0
- package/.agents/skills/train-sentence-transformers/references/model_architectures.md +178 -0
- package/.agents/skills/train-sentence-transformers/references/prompts_and_instructions.md +160 -0
- package/.agents/skills/train-sentence-transformers/references/training_args.md +270 -0
- package/.agents/skills/train-sentence-transformers/references/troubleshooting.md +225 -0
- package/.agents/skills/train-sentence-transformers/scripts/mine_hard_negatives.py +199 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_cross_encoder_distillation_example.py +254 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_cross_encoder_example.py +253 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py +282 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_multi_vector_encoder_example.py +240 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_distillation_example.py +303 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_example.py +227 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_make_multilingual_example.py +308 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_matryoshka_example.py +212 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_multi_dataset_example.py +258 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_static_embedding_example.py +273 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sentence_transformer_with_lora_example.py +275 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sparse_encoder_distillation_example.py +262 -0
- package/.agents/skills/train-sentence-transformers/scripts/train_sparse_encoder_example.py +237 -0
- package/.agents/skills/transformers-js/SKILL.md +692 -0
- package/.agents/skills/transformers-js/references/CACHE.md +339 -0
- package/.agents/skills/transformers-js/references/CONFIGURATION.md +438 -0
- package/.agents/skills/transformers-js/references/EXAMPLES.md +620 -0
- package/.agents/skills/transformers-js/references/MODEL_ARCHITECTURES.md +167 -0
- package/.agents/skills/transformers-js/references/MODEL_REGISTRY.md +197 -0
- package/.agents/skills/transformers-js/references/PIPELINE_OPTIONS.md +557 -0
- package/.agents/skills/transformers-js/references/TEXT_GENERATION.md +315 -0
- package/.agents/skills/transitions-dev/SKILL.md +90 -90
- package/.agents/skills/trend-researcher/SKILL.md +198 -198
- package/.agents/skills/tribunal-instincts-memory/SKILL.md +31 -0
- package/.agents/skills/trl-training/SKILL.md +318 -0
- package/.agents/skills/typescript-advanced/SKILL.md +306 -306
- package/.agents/skills/typeset/SKILL.md +60 -60
- package/.agents/skills/ui-reasoning-engine/SKILL.md +155 -155
- package/.agents/skills/ui-skill-packs/SKILL.md +57 -57
- package/.agents/skills/ui-skills-root/SKILL.md +69 -69
- package/.agents/skills/ui-ux-pro-max/SKILL.md +110 -110
- package/.agents/skills/ui-ux-researcher/SKILL.md +199 -199
- package/.agents/skills/vector-search-pgvector/SKILL.md +70 -70
- package/.agents/skills/verification-before-completion/SKILL.md +107 -107
- package/.agents/skills/vue-expert/SKILL.md +259 -259
- package/.agents/skills/vulnerability-scanner/SKILL.md +378 -378
- package/.agents/skills/web-accessibility-auditor/SKILL.md +179 -179
- package/.agents/skills/web-design-guidelines/SKILL.md +49 -49
- package/.agents/skills/web-quality-audit/SKILL.md +47 -47
- package/.agents/skills/webapp-testing/SKILL.md +128 -128
- package/.agents/skills/webgpu-performance/SKILL.md +88 -88
- package/.agents/skills/whimsy-injector/SKILL.md +305 -305
- package/.agents/skills/workflow-optimizer/SKILL.md +188 -188
- package/.agents/skills/zero-trust-passkeys/SKILL.md +82 -82
- package/AGENTS.md +93 -93
- package/CLAUDE.md +444 -444
- package/CONTRIBUTING.md +134 -134
- package/README.md +242 -542
- package/SECURITY.md +58 -52
- package/bin/adapter-install.js +264 -264
- package/bin/global-store.js +48 -48
- package/bin/mcp-server.js +1653 -1653
- package/bin/proxy-server.js +122 -122
- package/bin/spawn-agent.js +45 -45
- package/bin/tk-proxy.js +34 -34
- package/bin/tribunal-kit.js +113 -113
- package/bin/wrapper.js +209 -211
- package/hooks/hooks-cursor.json +10 -10
- package/hooks/hooks.json +10 -10
- package/hooks/session-start.js +77 -77
- package/mcp_config.json +18 -18
- package/package.json +169 -179
- package/{.claude-plugin → plugins/claude}/marketplace.json +14 -14
- package/{.claude-plugin → plugins/claude}/plugin.json +26 -26
- package/{.codex-plugin → plugins/codex}/plugin.json +41 -41
- package/{plugin.json → plugins/core-plugin.json} +26 -26
- package/{.cursor-plugin → plugins/cursor}/plugin.json +26 -26
- package/{.devin-plugin → plugins/devin}/plugin.json +14 -14
- package/{gemini-extension.json → plugins/gemini/extension.json} +6 -6
- package/{.hermes-plugin → plugins/hermes}/__init__.py +102 -102
- package/{.hermes-plugin → plugins/hermes}/plugin.yaml +6 -6
- package/{.kimi-plugin → plugins/kimi}/plugin.json +34 -34
- package/{marketplace.json → plugins/marketplace.json} +14 -14
- package/{.opencode → plugins/opencode}/INSTALL.md +42 -42
- package/{.opencode → plugins/opencode}/plugins/tribunal.js +110 -110
- package/{.opencode → plugins/opencode}/rules.md +258 -258
- package/{.pi → plugins/pi}/extensions/tribunal.ts +130 -130
- package/scripts/apply-version.js +57 -57
- package/scripts/audit_skill_sdo.js +89 -89
- package/scripts/benchmark.js +231 -231
- package/scripts/build-graph.js +71 -71
- package/scripts/changelog.js +190 -190
- package/scripts/clean-pycache.js +42 -42
- package/scripts/context_compiler.js +1143 -1117
- package/scripts/fix-vbc.js +96 -96
- package/scripts/fix-vbc.ps1 +3 -3
- package/scripts/modernize_skills.js +268 -268
- package/scripts/package-cores.js +116 -116
- package/scripts/skill_enhancement_engine.js +608 -608
- package/scripts/stress_benchmark.js +358 -358
- package/scripts/sync-skills.js +61 -61
- package/scripts/sync-version.js +177 -177
- package/scripts/telemetry_gc.js +156 -156
- package/scripts/validate-payload.js +73 -73
- package/scripts/visual_audit.js +136 -136
- package/skills/12-principles-of-animation/SKILL.md +51 -51
- package/skills/60fps-animation/SKILL.md +91 -91
- package/skills/accessible-animation/SKILL.md +189 -189
- package/skills/adapt/SKILL.md +56 -56
- package/skills/adr-generation/SKILL.md +57 -0
- package/skills/advanced-rag-pipelines/SKILL.md +94 -94
- package/skills/agent-organizer/SKILL.md +117 -117
- package/skills/agent-syscall-guidelines/SKILL.md +25 -0
- package/skills/agentic-patterns/SKILL.md +281 -281
- package/skills/agentic-workflows-2026/SKILL.md +91 -83
- package/skills/agentshield-security/SKILL.md +26 -0
- package/skills/ai-app-hardening/SKILL.md +51 -51
- package/skills/ai-prompt-injection-defense/SKILL.md +162 -162
- package/skills/animation-on-scroll/SKILL.md +196 -196
- package/skills/animation-systems/SKILL.md +198 -198
- package/skills/antfu-conventions/SKILL.md +54 -54
- package/skills/api-patterns/SKILL.md +218 -218
- package/skills/api-security-auditor/SKILL.md +155 -155
- package/skills/app-builder/SKILL.md +535 -535
- package/skills/app-builder/templates/SKILL.md +108 -108
- package/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -76
- package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -92
- package/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -88
- package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -88
- package/skills/app-builder/templates/express-api/TEMPLATE.md +83 -83
- package/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -90
- package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -90
- package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +126 -126
- package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +127 -127
- package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +172 -172
- package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +139 -139
- package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -83
- package/skills/app-builder/templates/react-native-app/TEMPLATE.md +122 -122
- package/skills/appflow-wireframe/SKILL.md +96 -96
- package/skills/apple-design/SKILL.md +89 -89
- package/skills/architecture/SKILL.md +188 -188
- package/skills/architecture-drift/SKILL.md +45 -0
- package/skills/audit-and-fix/SKILL.md +100 -100
- package/skills/authentication-best-practices/SKILL.md +157 -157
- package/skills/autonomous-execution/SKILL.md +76 -0
- package/skills/backend-security-expert/SKILL.md +73 -73
- package/skills/baseline-ui/SKILL.md +55 -55
- package/skills/bash-linux/SKILL.md +139 -139
- package/skills/behavioral-modes/SKILL.md +200 -200
- package/skills/better-colors/SKILL.md +116 -116
- package/skills/better-typography/SKILL.md +90 -90
- package/skills/better-ui/SKILL.md +130 -130
- package/skills/bolder/SKILL.md +49 -49
- package/skills/brainstorming/SKILL.md +460 -460
- package/skills/browser-audit/SKILL.md +102 -102
- package/skills/browser-native-ai/SKILL.md +72 -72
- package/skills/build-primitive/SKILL.md +50 -50
- package/skills/building-native-ui/SKILL.md +162 -162
- package/skills/cicd-pro/SKILL.md +412 -412
- package/skills/clarify/SKILL.md +55 -55
- package/skills/clean-code/SKILL.md +367 -367
- package/skills/cloud-architect/SKILL.md +409 -409
- package/skills/cobejs/SKILL.md +70 -70
- package/skills/code-review-checklist/SKILL.md +163 -163
- package/skills/codebase-design/SKILL.md +76 -76
- package/skills/colorize/SKILL.md +57 -57
- package/skills/compact-landing/SKILL.md +50 -50
- package/skills/company-logos/SKILL.md +54 -54
- package/skills/config-validator/SKILL.md +125 -125
- package/skills/containerization-pro/SKILL.md +422 -422
- package/skills/context-engineering-pro/SKILL.md +69 -62
- package/skills/create-design-md/SKILL.md +92 -92
- package/skills/critique/SKILL.md +79 -79
- package/skills/csharp-developer/SKILL.md +478 -478
- package/skills/data-validation-schemas/SKILL.md +297 -297
- package/skills/database-design/SKILL.md +219 -219
- package/skills/delight/SKILL.md +46 -46
- package/skills/deployment-procedures/SKILL.md +132 -132
- package/skills/design-lab/SKILL.md +42 -42
- package/skills/devops-engineer/SKILL.md +305 -305
- package/skills/devops-incident-responder/SKILL.md +103 -103
- package/skills/diagnosing-bugs/SKILL.md +172 -172
- package/skills/distill/SKILL.md +45 -45
- package/skills/documentation-templates/SKILL.md +251 -251
- package/skills/domain-modeling/SKILL.md +61 -61
- package/skills/duckdb-analytical-sql/SKILL.md +51 -51
- package/skills/edge-ai-mobile/SKILL.md +42 -42
- package/skills/edge-computing/SKILL.md +143 -143
- package/skills/emil-design-eng/SKILL.md +134 -134
- package/skills/error-resilience/SKILL.md +403 -403
- package/skills/expo-router-v4/SKILL.md +72 -72
- package/skills/extract-design-system/SKILL.md +120 -120
- package/skills/fabel-protocol/SKILL.md +282 -277
- package/skills/failure-mode-analysis/SKILL.md +48 -0
- package/skills/fixing-accessibility/SKILL.md +87 -87
- package/skills/fixing-metadata/SKILL.md +83 -83
- package/skills/fixing-motion-performance/SKILL.md +78 -78
- package/skills/framer-motion-expert/SKILL.md +237 -237
- package/skills/frontend-design/SKILL.md +103 -103
- package/skills/frontend-security-expert/SKILL.md +56 -56
- package/skills/game-design-expert/SKILL.md +92 -92
- package/skills/game-engineering-expert/SKILL.md +108 -108
- package/skills/generative-ui-expert/SKILL.md +100 -100
- package/skills/geo-fundamentals/SKILL.md +108 -108
- package/skills/git-pro/SKILL.md +401 -401
- package/skills/github-operations/SKILL.md +295 -295
- package/skills/gpt-taste/SKILL.md +50 -50
- package/skills/graph-engineering/SKILL.md +28 -0
- package/skills/gsap-core/SKILL.md +277 -277
- package/skills/gsap-frameworks/SKILL.md +168 -168
- package/skills/gsap-performance/SKILL.md +94 -94
- package/skills/gsap-plugins/SKILL.md +441 -441
- package/skills/gsap-react/SKILL.md +213 -213
- package/skills/gsap-scrolltrigger/SKILL.md +312 -312
- package/skills/gsap-timeline/SKILL.md +122 -122
- package/skills/gsap-utils/SKILL.md +299 -299
- package/skills/harden/SKILL.md +55 -55
- package/skills/harness-protocol/SKILL.md +48 -40
- package/skills/hf-cli/SKILL.md +239 -0
- package/skills/hf-cloud-aws-context-discovery/SKILL.md +74 -0
- package/skills/hf-cloud-python-env-setup/SKILL.md +90 -0
- package/skills/hf-cloud-python-env-setup/requirements.txt +17 -0
- package/skills/hf-cloud-python-env-setup/scripts/check_versions.py +29 -0
- package/skills/hf-cloud-python-env-setup/scripts/setup_env.py +143 -0
- package/skills/hf-cloud-sagemaker-deployment-planner/SKILL.md +90 -0
- package/skills/hf-cloud-sagemaker-iam-preflight/SKILL.md +102 -0
- package/skills/hf-cloud-sagemaker-iam-preflight/references/minimum-permissions.json +47 -0
- package/skills/hf-cloud-sagemaker-iam-preflight/references/trust-policy.json +12 -0
- package/skills/hf-cloud-sagemaker-iam-preflight/scripts/check_role.py +184 -0
- package/skills/hf-cloud-sagemaker-iam-preflight/scripts/create_role.py +118 -0
- package/skills/hf-cloud-sagemaker-production-defaults/SKILL.md +419 -0
- package/skills/hf-cloud-sagemaker-production-defaults/references/deployment-template.md +59 -0
- package/skills/hf-cloud-sagemaker-production-defaults/scripts/_common.py +148 -0
- package/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy.py +327 -0
- package/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_async.py +434 -0
- package/skills/hf-cloud-sagemaker-production-defaults/scripts/deploy_ic.py +506 -0
- package/skills/hf-cloud-sagemaker-production-defaults/scripts/invoke_endpoint.py +180 -0
- package/skills/hf-cloud-sagemaker-production-defaults/scripts/teardown.py +246 -0
- package/skills/hf-cloud-serving-image-selection/SKILL.md +220 -0
- package/skills/hf-cloud-serving-image-selection/references/model-to-image.md +111 -0
- package/skills/hf-cloud-serving-image-selection/scripts/mirror_image.py +145 -0
- package/skills/hf-mem/SKILL.md +79 -0
- package/skills/huggingface-best/SKILL.md +134 -0
- package/skills/huggingface-community-evals/SKILL.md +207 -0
- package/skills/huggingface-community-evals/examples/.env.example +3 -0
- package/skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/skills/huggingface-datasets/SKILL.md +107 -0
- package/skills/huggingface-gradio/SKILL.md +298 -0
- package/skills/huggingface-gradio/examples.md +613 -0
- package/skills/huggingface-llm-trainer/SKILL.md +738 -0
- package/skills/huggingface-llm-trainer/references/gguf_conversion.md +296 -0
- package/skills/huggingface-llm-trainer/references/hardware_guide.md +283 -0
- package/skills/huggingface-llm-trainer/references/hub_saving.md +364 -0
- package/skills/huggingface-llm-trainer/references/local_training_macos.md +231 -0
- package/skills/huggingface-llm-trainer/references/reliability_principles.md +371 -0
- package/skills/huggingface-llm-trainer/references/trackio_guide.md +191 -0
- package/skills/huggingface-llm-trainer/references/training_methods.md +150 -0
- package/skills/huggingface-llm-trainer/references/training_patterns.md +203 -0
- package/skills/huggingface-llm-trainer/references/troubleshooting.md +282 -0
- package/skills/huggingface-llm-trainer/references/unsloth.md +313 -0
- package/skills/huggingface-llm-trainer/scripts/convert_to_gguf.py +424 -0
- package/skills/huggingface-llm-trainer/scripts/dataset_inspector.py +417 -0
- package/skills/huggingface-llm-trainer/scripts/estimate_cost.py +150 -0
- package/skills/huggingface-llm-trainer/scripts/hf_benchmarks.py +659 -0
- package/skills/huggingface-llm-trainer/scripts/train_dpo_example.py +106 -0
- package/skills/huggingface-llm-trainer/scripts/train_grpo_example.py +89 -0
- package/skills/huggingface-llm-trainer/scripts/train_sft_example.py +122 -0
- package/skills/huggingface-llm-trainer/scripts/unsloth_sft_example.py +512 -0
- package/skills/huggingface-local-models/SKILL.md +113 -0
- package/skills/huggingface-local-models/references/hardware.md +38 -0
- package/skills/huggingface-local-models/references/hub-discovery.md +178 -0
- package/skills/huggingface-local-models/references/quantization.md +256 -0
- package/skills/huggingface-lora-space-builder/SKILL.md +394 -0
- package/skills/huggingface-lora-space-builder/references/adapting-to-the-lora.md +113 -0
- package/skills/huggingface-lora-space-builder/references/base-models/krea-2.md +63 -0
- package/skills/huggingface-lora-space-builder/references/base-models/ltx.md +205 -0
- package/skills/huggingface-lora-space-builder/references/base-models/qwen-image.md +144 -0
- package/skills/huggingface-lora-space-builder/references/creative-mode.md +262 -0
- package/skills/huggingface-lora-space-builder/references/tasks.md +124 -0
- package/skills/huggingface-lora-space-builder/references/zerogpu-and-publishing.md +196 -0
- package/skills/huggingface-paper-publisher/SKILL.md +624 -0
- package/skills/huggingface-paper-publisher/examples/example_usage.md +326 -0
- package/skills/huggingface-paper-publisher/references/quick_reference.md +216 -0
- package/skills/huggingface-paper-publisher/scripts/paper_manager.py +606 -0
- package/skills/huggingface-paper-publisher/templates/arxiv.md +299 -0
- package/skills/huggingface-paper-publisher/templates/ml-report.md +358 -0
- package/skills/huggingface-paper-publisher/templates/modern.md +319 -0
- package/skills/huggingface-paper-publisher/templates/standard.md +201 -0
- package/skills/huggingface-papers/SKILL.md +239 -0
- package/skills/huggingface-spaces/README.md +9 -0
- package/skills/huggingface-spaces/SKILL.md +242 -0
- package/skills/huggingface-spaces/references/3d-cuda-extensions.md +109 -0
- package/skills/huggingface-spaces/references/3d-generation.md +98 -0
- package/skills/huggingface-spaces/references/3d-gsplat.md +53 -0
- package/skills/huggingface-spaces/references/3d-models.md +227 -0
- package/skills/huggingface-spaces/references/3d-outputs.md +114 -0
- package/skills/huggingface-spaces/references/buckets.md +89 -0
- package/skills/huggingface-spaces/references/debugging.md +236 -0
- package/skills/huggingface-spaces/references/gradio.md +200 -0
- package/skills/huggingface-spaces/references/grants.md +63 -0
- package/skills/huggingface-spaces/references/inference-providers.md +97 -0
- package/skills/huggingface-spaces/references/known-errors.md +232 -0
- package/skills/huggingface-spaces/references/requirements.md +169 -0
- package/skills/huggingface-spaces/references/zerogpu.md +349 -0
- package/skills/huggingface-tool-builder/SKILL.md +120 -0
- package/skills/huggingface-tool-builder/references/baseline_hf_api.py +57 -0
- package/skills/huggingface-tool-builder/references/baseline_hf_api.sh +40 -0
- package/skills/huggingface-tool-builder/references/baseline_hf_api.tsx +57 -0
- package/skills/huggingface-tool-builder/references/find_models_by_paper.sh +230 -0
- package/skills/huggingface-tool-builder/references/hf_enrich_models.sh +96 -0
- package/skills/huggingface-tool-builder/references/hf_model_card_frontmatter.sh +188 -0
- package/skills/huggingface-tool-builder/references/hf_model_papers_auth.sh +171 -0
- package/skills/huggingface-trackio/SKILL.md +142 -0
- package/skills/huggingface-trackio/references/alerts.md +196 -0
- package/skills/huggingface-trackio/references/logging_metrics.md +212 -0
- package/skills/huggingface-trackio/references/retrieving_metrics.md +251 -0
- package/skills/huggingface-vision-trainer/SKILL.md +593 -0
- package/skills/huggingface-vision-trainer/references/finetune_sam2_trainer.md +254 -0
- package/skills/huggingface-vision-trainer/references/hub_saving.md +618 -0
- package/skills/huggingface-vision-trainer/references/image_classification_training_notebook.md +279 -0
- package/skills/huggingface-vision-trainer/references/object_detection_training_notebook.md +700 -0
- package/skills/huggingface-vision-trainer/references/reliability_principles.md +310 -0
- package/skills/huggingface-vision-trainer/references/timm_trainer.md +91 -0
- package/skills/huggingface-vision-trainer/scripts/dataset_inspector.py +814 -0
- package/skills/huggingface-vision-trainer/scripts/estimate_cost.py +217 -0
- package/skills/huggingface-vision-trainer/scripts/image_classification_training.py +383 -0
- package/skills/huggingface-vision-trainer/scripts/object_detection_training.py +710 -0
- package/skills/huggingface-vision-trainer/scripts/sam_segmentation_training.py +382 -0
- package/skills/huggingface-zerogpu/SKILL.md +289 -0
- package/skills/huggingface-zerogpu/references/concurrency.md +79 -0
- package/skills/huggingface-zerogpu/references/cuda-and-deps.md +66 -0
- package/skills/huggingface-zerogpu/references/how-quota-works.md +74 -0
- package/skills/huggingface-zerogpu/references/how-zerogpu-works.md +50 -0
- package/skills/human-gate-negotiation/SKILL.md +30 -0
- package/skills/i18n-localization/SKILL.md +134 -134
- package/skills/impeccable/SKILL.md +52 -52
- package/skills/improve-codebase-architecture/SKILL.md +48 -48
- package/skills/improve-ui/SKILL.md +70 -70
- package/skills/intelligent-routing/SKILL.md +204 -198
- package/skills/knowledge-graph/SKILL.md +71 -71
- package/skills/landing-page/SKILL.md +65 -65
- package/skills/lint-and-validate/SKILL.md +224 -224
- package/skills/llm-engineering/SKILL.md +360 -360
- package/skills/local-first/SKILL.md +138 -138
- package/skills/local-first-architecture/SKILL.md +62 -62
- package/skills/lottie-animation/SKILL.md +62 -62
- package/skills/marquee-loop/SKILL.md +72 -72
- package/skills/masked-reveal/SKILL.md +230 -230
- package/skills/mcp-builder/SKILL.md +105 -105
- package/skills/micro-interaction/SKILL.md +253 -253
- package/skills/mobile-design/SKILL.md +245 -245
- package/skills/monorepo-management/SKILL.md +295 -295
- package/skills/morphing-icons/SKILL.md +348 -348
- package/skills/motion-engineering/SKILL.md +197 -197
- package/skills/nextjs-react-expert/SKILL.md +218 -218
- package/skills/nodejs-best-practices/SKILL.md +542 -542
- package/skills/observability/SKILL.md +303 -303
- package/skills/opentelemetry-observability/SKILL.md +51 -51
- package/skills/page-transition-animation/SKILL.md +86 -86
- package/skills/parallel-agents/SKILL.md +110 -110
- package/skills/performance-profiling/SKILL.md +230 -230
- package/skills/plan-writing/SKILL.md +127 -127
- package/skills/platform-engineer/SKILL.md +108 -108
- package/skills/platform-engineering-opentofu/SKILL.md +59 -59
- package/skills/playwright-ai-e2e/SKILL.md +52 -52
- package/skills/playwright-best-practices/SKILL.md +149 -149
- package/skills/polish/SKILL.md +39 -39
- package/skills/powershell-windows/SKILL.md +122 -122
- package/skills/pricing-page/SKILL.md +48 -48
- package/skills/product-aware-heuristics/SKILL.md +390 -390
- package/skills/progressive-blur/SKILL.md +80 -80
- package/skills/project-idioms/SKILL.md +91 -91
- package/skills/property-based-testing/SKILL.md +50 -50
- package/skills/python-patterns/SKILL.md +220 -220
- package/skills/python-pro/SKILL.md +305 -305
- package/skills/quieter/SKILL.md +49 -49
- package/skills/react-doctor/SKILL.md +51 -51
- package/skills/react-specialist/SKILL.md +280 -280
- package/skills/readme-builder/SKILL.md +270 -270
- package/skills/realtime-patterns/SKILL.md +283 -283
- package/skills/red-team-tactics/SKILL.md +191 -191
- package/skills/redesign-skill/SKILL.md +46 -46
- package/skills/review-animations/SKILL.md +45 -45
- package/skills/review-animations/STANDARDS.md +87 -87
- package/skills/rust-pro/SKILL.md +652 -652
- package/skills/semantic-filesystem-navigation/SKILL.md +24 -0
- package/skills/seo-fundamentals/SKILL.md +139 -139
- package/skills/server-management/SKILL.md +178 -178
- package/skills/session-log-interrogation/SKILL.md +29 -0
- package/skills/shadcn-ui-expert/SKILL.md +196 -196
- package/skills/shape/SKILL.md +56 -56
- package/skills/skill-creator/SKILL.md +177 -177
- package/skills/soft-skill/SKILL.md +53 -53
- package/skills/sounds-on-the-web/SKILL.md +76 -76
- package/skills/sql-pro/SKILL.md +624 -624
- package/skills/subagent-driven-development/SKILL.md +32 -0
- package/skills/supabase-postgres-best-practices/SKILL.md +57 -57
- package/skills/svg-animation/SKILL.md +356 -356
- package/skills/swiftui-expert/SKILL.md +164 -164
- package/skills/swiss-design/SKILL.md +44 -44
- package/skills/system-design-pro/SKILL.md +188 -318
- package/skills/systematic-debugging/SKILL.md +129 -124
- package/skills/systematic-debugging/condition-based-waiting.md +120 -120
- package/skills/systematic-debugging/defense-in-depth.md +128 -128
- package/skills/systematic-debugging/root-cause-tracing.md +183 -183
- package/skills/tailwind-patterns/SKILL.md +583 -583
- package/skills/taste-skill/SKILL.md +52 -52
- package/skills/tdd-workflow/SKILL.md +105 -105
- package/skills/test-result-analyzer/SKILL.md +270 -270
- package/skills/testing-patterns/SKILL.md +534 -534
- package/skills/thermo-nuclear-code-quality-review/SKILL.md +62 -62
- package/skills/thinking-protocol/SKILL.md +21 -21
- package/skills/to-spring-or-not-to-spring/SKILL.md +43 -43
- package/skills/train-sentence-transformers/SKILL.md +109 -0
- package/skills/train-sentence-transformers/references/base_model_selection.md +79 -0
- package/skills/train-sentence-transformers/references/dataset_formats.md +128 -0
- package/skills/train-sentence-transformers/references/evaluators_cross_encoder.md +116 -0
- package/skills/train-sentence-transformers/references/evaluators_multi_vector_encoder.md +101 -0
- package/skills/train-sentence-transformers/references/evaluators_sentence_transformer.md +151 -0
- package/skills/train-sentence-transformers/references/evaluators_sparse_encoder.md +121 -0
- package/skills/train-sentence-transformers/references/hardware_guide.md +105 -0
- package/skills/train-sentence-transformers/references/hf_jobs_execution.md +173 -0
- package/skills/train-sentence-transformers/references/losses_cross_encoder.md +137 -0
- package/skills/train-sentence-transformers/references/losses_multi_vector_encoder.md +100 -0
- package/skills/train-sentence-transformers/references/losses_sentence_transformer.md +246 -0
- package/skills/train-sentence-transformers/references/losses_sparse_encoder.md +106 -0
- package/skills/train-sentence-transformers/references/model_architectures.md +178 -0
- package/skills/train-sentence-transformers/references/prompts_and_instructions.md +160 -0
- package/skills/train-sentence-transformers/references/training_args.md +270 -0
- package/skills/train-sentence-transformers/references/troubleshooting.md +225 -0
- package/skills/train-sentence-transformers/scripts/mine_hard_negatives.py +199 -0
- package/skills/train-sentence-transformers/scripts/train_cross_encoder_distillation_example.py +254 -0
- package/skills/train-sentence-transformers/scripts/train_cross_encoder_example.py +253 -0
- package/skills/train-sentence-transformers/scripts/train_cross_encoder_listwise_example.py +282 -0
- package/skills/train-sentence-transformers/scripts/train_multi_vector_encoder_example.py +240 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_distillation_example.py +303 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_example.py +227 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_make_multilingual_example.py +308 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_matryoshka_example.py +212 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_multi_dataset_example.py +258 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_static_embedding_example.py +273 -0
- package/skills/train-sentence-transformers/scripts/train_sentence_transformer_with_lora_example.py +275 -0
- package/skills/train-sentence-transformers/scripts/train_sparse_encoder_distillation_example.py +262 -0
- package/skills/train-sentence-transformers/scripts/train_sparse_encoder_example.py +237 -0
- package/skills/transformers-js/SKILL.md +692 -0
- package/skills/transformers-js/references/CACHE.md +339 -0
- package/skills/transformers-js/references/CONFIGURATION.md +438 -0
- package/skills/transformers-js/references/EXAMPLES.md +620 -0
- package/skills/transformers-js/references/MODEL_ARCHITECTURES.md +167 -0
- package/skills/transformers-js/references/MODEL_REGISTRY.md +197 -0
- package/skills/transformers-js/references/PIPELINE_OPTIONS.md +557 -0
- package/skills/transformers-js/references/TEXT_GENERATION.md +315 -0
- package/skills/transitions-dev/SKILL.md +90 -90
- package/skills/trend-researcher/SKILL.md +198 -198
- package/skills/tribunal-instincts-memory/SKILL.md +31 -0
- package/skills/trl-training/SKILL.md +318 -0
- package/skills/typescript-advanced/SKILL.md +306 -306
- package/skills/typeset/SKILL.md +60 -60
- package/skills/ui-reasoning-engine/SKILL.md +155 -155
- package/skills/ui-skill-packs/SKILL.md +57 -57
- package/skills/ui-skills-root/SKILL.md +69 -69
- package/skills/ui-ux-pro-max/SKILL.md +110 -110
- package/skills/ui-ux-researcher/SKILL.md +199 -199
- package/skills/vector-search-pgvector/SKILL.md +70 -70
- package/skills/verification-before-completion/SKILL.md +107 -107
- package/skills/vue-expert/SKILL.md +259 -259
- package/skills/vulnerability-scanner/SKILL.md +378 -378
- package/skills/web-accessibility-auditor/SKILL.md +179 -179
- package/skills/web-design-guidelines/SKILL.md +49 -49
- package/skills/web-quality-audit/SKILL.md +47 -47
- package/skills/webapp-testing/SKILL.md +128 -128
- package/skills/webgpu-performance/SKILL.md +88 -88
- package/skills/whimsy-injector/SKILL.md +305 -305
- package/skills/workflow-optimizer/SKILL.md +188 -188
- package/skills/zero-trust-passkeys/SKILL.md +82 -82
- package/{dist → src}/browser/audit.js +229 -229
- package/{dist → src}/browser/case_bridge.js +189 -189
- package/{dist → src}/browser/cdp.js +513 -513
- package/{dist → src}/browser/compare.js +110 -110
- package/{dist → src}/browser/discovery.js +140 -140
- package/{dist → src}/browser/idpi.js +142 -142
- package/{dist → src}/browser/index.js +89 -89
- package/{dist → src}/browser/launcher.js +154 -154
- package/{dist → src}/browser/sentinel.js +202 -202
- package/{dist → src}/browser/synapse.js +251 -251
- package/{dist → src}/browser/trimmer.js +210 -210
- package/{dist → src}/commands/align.js +201 -201
- package/{dist → src}/commands/audit-web.js +112 -112
- package/{dist → src}/commands/browse.js +56 -56
- package/{dist → src}/commands/case.js +71 -73
- package/{dist → src}/commands/compare-web.js +61 -61
- package/{dist → src}/commands/compile.js +91 -91
- package/{dist → src}/commands/context.js +71 -71
- package/{dist → src}/commands/contract.js +440 -440
- package/{dist → src}/commands/deconstruct.js +58 -58
- package/{dist → src}/commands/graph.js +44 -44
- package/{dist → src}/commands/guardrail.js +275 -275
- package/{dist → src}/commands/heal.js +99 -99
- package/{dist → src}/commands/hook.js +28 -28
- package/{dist → src}/commands/init.js +393 -393
- package/{dist → src}/commands/learn.js +119 -117
- package/{dist → src}/commands/marathon.js +45 -45
- package/{dist → src}/commands/memory.js +508 -508
- package/{dist → src}/commands/minimal.js +71 -71
- package/{dist → src}/commands/mutate.js +30 -30
- package/{dist → src}/commands/native.js +264 -264
- package/{dist → src}/commands/optimize.js +332 -328
- package/{dist → src}/commands/sdd.js +265 -229
- package/{dist → src}/commands/status.js +66 -66
- package/{dist → src}/commands/sync.js +25 -25
- package/{dist → src}/commands/uninstall.js +54 -54
- package/{dist → src}/commands/update.js +37 -37
- package/{dist → src}/commands/validate.js +58 -58
- package/{dist → src}/esm/index.mjs +1 -1
- package/{dist → src}/mcp/server.js +8 -8
- package/{dist → src}/tui/banner.js +1 -1
- package/{dist → src}/tui/index.js +21 -21
- package/{dist → src}/tui/reviewer-grid.js +90 -90
- package/{dist → src}/tui/shimmer.js +91 -91
- package/{dist → src}/tui/theme.js +130 -130
- package/{dist → src}/tui/tree.js +93 -93
- package/{dist → src}/tui/wizard.js +148 -148
- package/{dist → src}/types.js +8 -8
- package/{dist → src}/utils/fs.js +102 -102
- package/{dist → src}/utils/hasher.js +142 -142
- package/{dist → src}/utils/helpers.js +53 -53
- package/{dist → src}/utils/logger.js +54 -54
- package/{dist → src}/utils/version.js +157 -157
- package/.agent/history/README.md +0 -53
- package/.agent/history/architecture-explorer.html +0 -352
- package/.agent/history/architecture-graph.yaml +0 -619
- package/.agent/history/case-law/cases/template-case.json +0 -19
- package/.agent/history/graph-cache.json +0 -1042
- package/.agent/history/integrity_manifest.json +0 -4694
- package/.agent/history/memory/.memory.idx +0 -7596
- package/.agent/history/memory/MEMORY.md +0 -512
- package/.agent/history/memory.db +0 -0
- package/.agent/history/snapshots/.opencode__plugins__tribunal.js.json +0 -12
- package/.agent/history/snapshots/.pi__extensions__tribunal.ts.json +0 -12
- package/.agent/history/snapshots/bin__adapter-install.js.json +0 -13
- package/.agent/history/snapshots/bin__global-store.js.json +0 -15
- package/.agent/history/snapshots/bin__mcp-server.js.json +0 -21
- package/.agent/history/snapshots/bin__proxy-server.js.json +0 -20
- package/.agent/history/snapshots/bin__spawn-agent.js.json +0 -12
- package/.agent/history/snapshots/bin__tk-proxy.js.json +0 -21
- package/.agent/history/snapshots/bin__tribunal-kit.js.json +0 -21
- package/.agent/history/snapshots/bin__wrapper.js.json +0 -14
- package/.agent/history/snapshots/eslint.config.js.json +0 -8
- package/.agent/history/snapshots/hooks__session-start.js.json +0 -11
- package/.agent/history/snapshots/scripts__apply-version.js.json +0 -11
- package/.agent/history/snapshots/scripts__audit_skill_sdo.js.json +0 -11
- package/.agent/history/snapshots/scripts__benchmark.js.json +0 -14
- package/.agent/history/snapshots/scripts__changelog.js.json +0 -12
- package/.agent/history/snapshots/scripts__clean-pycache.js.json +0 -11
- package/.agent/history/snapshots/scripts__context_compiler.js.json +0 -17
- package/.agent/history/snapshots/scripts__fix-vbc.js.json +0 -11
- package/.agent/history/snapshots/scripts__modernize_skills.js.json +0 -11
- package/.agent/history/snapshots/scripts__package-cores.js.json +0 -12
- package/.agent/history/snapshots/scripts__skill_enhancement_engine.js.json +0 -11
- package/.agent/history/snapshots/scripts__stress_benchmark.js.json +0 -15
- package/.agent/history/snapshots/scripts__sync-skills.js.json +0 -11
- package/.agent/history/snapshots/scripts__sync-version.js.json +0 -11
- package/.agent/history/snapshots/scripts__telemetry_gc.js.json +0 -11
- package/.agent/history/snapshots/scripts__validate-payload.js.json +0 -11
- package/.agent/history/snapshots/scripts__visual_audit.js.json +0 -11
- package/.agent/history/snapshots/test__integration__bridges.test.js.json +0 -13
- package/.agent/history/snapshots/test__integration__browser_cli.test.js.json +0 -12
- package/.agent/history/snapshots/test__integration__graceful_degradation.test.js.json +0 -12
- package/.agent/history/snapshots/test__integration__init.test.js.json +0 -13
- package/.agent/history/snapshots/test__integration__minimal_change_pipeline.test.js.json +0 -13
- package/.agent/history/snapshots/test__integration__parallel_tribunal.test.js.json +0 -12
- package/.agent/history/snapshots/test__integration__routing.test.js.json +0 -11
- package/.agent/history/snapshots/test__integration__swarm_dispatcher.test.js.json +0 -13
- package/.agent/history/snapshots/test__integration__sync_status.test.js.json +0 -13
- package/.agent/history/snapshots/test__integration__wave2.test.js.json +0 -13
- package/.agent/history/snapshots/test__integration__wrapper.test.js.json +0 -13
- package/.agent/history/snapshots/test__unit__align.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__args.test.js.json +0 -20
- package/.agent/history/snapshots/test__unit__ast_context_loader.test.js.json +0 -12
- package/.agent/history/snapshots/test__unit__audit_release.test.js.json +0 -16
- package/.agent/history/snapshots/test__unit__browser_case_bridge.test.js.json +0 -11
- package/.agent/history/snapshots/test__unit__browser_discovery.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__browser_idpi.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__browser_sentinel.test.js.json +0 -11
- package/.agent/history/snapshots/test__unit__browser_synapse.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__browser_trimmer.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__case_law_manager.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__cicd_validator.test.js.json +0 -12
- package/.agent/history/snapshots/test__unit__compile.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__context_broker.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__context_compiler.test.js.json +0 -26
- package/.agent/history/snapshots/test__unit__contract_engine.test.js.json +0 -13
- package/.agent/history/snapshots/test__unit__copyDir.test.js.json +0 -23
- package/.agent/history/snapshots/test__unit__graph_tools.test.js.json +0 -11
- package/.agent/history/snapshots/test__unit__guardrail_engine.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__impact_classifier.test.js.json +0 -12
- package/.agent/history/snapshots/test__unit__init.test.js.json +0 -14
- package/.agent/history/snapshots/test__unit__inner_loop_validator.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__integrity_manifest.test.js.json +0 -13
- package/.agent/history/snapshots/test__unit__learn.test.js.json +0 -11
- package/.agent/history/snapshots/test__unit__marathon.test.js.json +0 -22
- package/.agent/history/snapshots/test__unit__mcp_server.test.js.json +0 -16
- package/.agent/history/snapshots/test__unit__memory.test.js.json +0 -13
- package/.agent/history/snapshots/test__unit__minimal_change.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__native.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__optimize.test.js.json +0 -13
- package/.agent/history/snapshots/test__unit__path_resolution.test.js.json +0 -14
- package/.agent/history/snapshots/test__unit__platform_download_audit.test.js.json +0 -11
- package/.agent/history/snapshots/test__unit__production_readiness_evidence.test.js.json +0 -21
- package/.agent/history/snapshots/test__unit__prompt_compiler.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__sdd_integration.test.js.json +0 -12
- package/.agent/history/snapshots/test__unit__selfInstall.test.js.json +0 -23
- package/.agent/history/snapshots/test__unit__semver.test.js.json +0 -20
- package/.agent/history/snapshots/test__unit__skill_evolution.test.js.json +0 -11
- package/.agent/history/snapshots/test__unit__stress.test.js.json +0 -15
- package/.agent/history/snapshots/test__unit__swarm_dispatcher.test.js.json +0 -12
- package/.agent/history/snapshots/test__unit__token_budget_broker.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__tui.test.js.json +0 -10
- package/.agent/history/snapshots/test__unit__utils.test.js.json +0 -10
- package/.agents/plugins/marketplace.json +0 -20
- package/.claude/CLAUDE.md +0 -442
- /package/{dist → src}/cli.js +0 -0
- /package/{dist → src}/index.d.ts +0 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# 3D generation Spaces
|
|
2
|
+
|
|
3
|
+
Building a Space whose output is a 3D asset — image (occasionally text) in, downloadable and in-browser-viewable **mesh** (GLB/OBJ/PLY/STL) or **gaussian splat** (`.ply`/`.splat`) out. Read this whenever the user wants a Space/demo/playground for a 3D generation model, whether a stock checkpoint or their own finetuned variant. NeRF pipelines and world/scene models (HunyuanWorld, HY-World) are not covered.
|
|
4
|
+
|
|
5
|
+
The standard workflow in `SKILL.md` applies (create → build → iterate → verify). This file is the 3D entry point; the sub-references below cover the 3D-specific deltas.
|
|
6
|
+
|
|
7
|
+
## Sub-references
|
|
8
|
+
|
|
9
|
+
| When to read | File |
|
|
10
|
+
|---|---|
|
|
11
|
+
| CUDA/C++ extension handling — prebuilt wheels, startup-compile tricks, the dominant failure mode | `[3d-cuda-extensions.md](3d-cuda-extensions.md)` |
|
|
12
|
+
| Output formats (GLB/OBJ/PLY/STL, splats), viewers, orientation, preprocessing, temp-file patterns | `[3d-outputs.md](3d-outputs.md)` |
|
|
13
|
+
| Model selection details and per-family recipes (TRELLIS, Hunyuan3D, TripoSR, SF3D, …) | `[3d-models.md](3d-models.md)` |
|
|
14
|
+
| Gaussian-splat deliverables (TripoSplat, LGM) — pure-PyTorch splat decode | `[3d-gsplat.md](3d-gsplat.md)` |
|
|
15
|
+
|
|
16
|
+
## What makes 3D Spaces different
|
|
17
|
+
|
|
18
|
+
1. **Native extensions.** These models need CUDA/C++ extensions (nvdiffrast, rasterizers, marching cubes, texture bakers) that cannot compile at Space build time. Working Spaces use prebuilt wheels or startup-compile tricks — [`3d-cuda-extensions.md`](3d-cuda-extensions.md). Getting this wrong is the dominant failure mode.
|
|
19
|
+
2. **Vendored model code.** None of the major 3D models are cleanly pip-installable; every official Space carries the model library as a source tree in the Space repo. There is no `diffusers`-style one-liner. (Don't trust PyPI lookalikes: `trellis-3d` ships the Python tree without the CUDA extensions or the real dependency set.)
|
|
20
|
+
|
|
21
|
+
Both points make **"duplicate the official Space, then edit"** beat "assemble from scratch" here more than for any other model class.
|
|
22
|
+
|
|
23
|
+
## Picking a model
|
|
24
|
+
|
|
25
|
+
| Priority | Pick | Why | Reference |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| Best quality, PBR textures | **TRELLIS.2** | current quality bar; MIT; ≥24 GB (fits ZeroGPU large) | [`3d-models.md`](3d-models.md) |
|
|
28
|
+
| Textured output, finetuning story | **Hunyuan3D-2.1** (2.0 for lighter/faster) | official training code → common finetune target; PBR paint stage; non-commercial license | [`3d-models.md`](3d-models.md) |
|
|
29
|
+
| Speed / high-traffic / simplicity | **TripoSR** (untextured, MIT) or **SF3D** (textured, gated) | single forward pass, ~60s duration, tiny codebase | [`3d-models.md`](3d-models.md) |
|
|
30
|
+
| Gaussians alongside mesh, multi-image input | **TRELLIS 1** | dual gaussian+mesh decoder; lighter than TRELLIS.2 | [`3d-models.md`](3d-models.md) |
|
|
31
|
+
| Gaussian splats as the deliverable | **TripoSplat** (or LGM) | pure-PyTorch splat decode, no rasterizer needed; `gr.Model3D` renders splat `.ply` natively | [`3d-gsplat.md`](3d-gsplat.md) |
|
|
32
|
+
|
|
33
|
+
**Check gating and license in Phase 0, not at first build.** `stabilityai/stable-fast-3d` and `stable-point-aware-3d` are gated (`gated: auto`) — the user must have accepted the license and the Space needs `HF_TOKEN` as a secret; verify access with `hf repos info` / `HfApi().model_info()` up front. `tencent/Hunyuan3D-*` is ungated but **non-commercial** — flag before the Space goes public. TRELLIS/TripoSR/TripoSplat/LGM are MIT. Apple SHARP is research-only (`apple-amlr`).
|
|
34
|
+
|
|
35
|
+
If the model isn't covered by a reference file (Direct3D, TripoSG, Step1X-3D, a new release…), proceed by analogy with the user's agreement: find its official/most-liked *working* Space, fetch its actual files, and apply the same analysis — never guess a 3D dependency stack from memory.
|
|
36
|
+
|
|
37
|
+
## Deployment path: duplicate vs build
|
|
38
|
+
|
|
39
|
+
**Duplicate the official Space** (default for stock checkpoints, and for finetunes that are a `from_pretrained` swap — each reference file documents the swap):
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
from huggingface_hub import HfApi
|
|
43
|
+
api = HfApi()
|
|
44
|
+
api.duplicate_repo("tencent/Hunyuan3D-2", to_id=f"{username}/my-hunyuan3d",
|
|
45
|
+
repo_type="space", private=True, space_hardware="zero-a10g",
|
|
46
|
+
space_secrets=[{"key": "HF_TOKEN", "value": hf_token}], # only if a gated/private repo is involved
|
|
47
|
+
exist_ok=True)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
(`duplicate_space` is the deprecated older name.) Confirm the source Space is currently RUNNING first (`hf spaces info <id> --expand runtime`) — a paused/broken source means bitrot. Duplication copies *files only*; pass `space_hardware=`/`space_secrets=` explicitly. Then `hf download <repo> --repo-type space --local-dir .`, make the minimal edits (checkpoint repo-id, title/README, UI trims), and push back with `hf upload ... --repo-type space`. **Resist rewriting working extension-handling code you don't fully understand** — sitecustomize patches, `ctypes.CDLL` preloads, autotune caches, and `zero.startup()` calls all look redundant until removed.
|
|
51
|
+
|
|
52
|
+
**Build from source** (custom UI, shape-only trims, no live official Space): start from the TripoSR skeleton (the ~200-line app documented in [`3d-models.md`](3d-models.md) — the cleanest template), vendor the model library tree from the official Space or GitHub, and follow [`3d-cuda-extensions.md`](3d-cuda-extensions.md). Budget more debugging iterations than an image-model Space.
|
|
53
|
+
|
|
54
|
+
Either way, **fetch the official Space's live files first** (`https://huggingface.co/spaces/{id}/raw/main/{path}`) and treat them — not the reference files' pins — as source of truth. The reference files record what shipped as of mid-2026; the ZeroGPU runtime moves and official Spaces track it.
|
|
55
|
+
|
|
56
|
+
## UI design
|
|
57
|
+
|
|
58
|
+
Read [`3d-outputs.md`](3d-outputs.md) for formats, viewers, preprocessing, and temp-file patterns. Baseline image-to-3D UI:
|
|
59
|
+
|
|
60
|
+
- **Input**: image upload → visible preprocessing preview (background removal + crop — show what the model actually receives) → generate.
|
|
61
|
+
- **Controls**: only the knobs this model responds to. Seed + randomize always; then per family: sampler steps/guidance (TRELLIS, Hunyuan3D), marching-cubes resolution (TripoSR), remesh/vertex-count/texture-size (SF3D), decimation + texture size at extraction (TRELLIS.2). Don't surface every config field of a research codebase.
|
|
62
|
+
- **Output**: `gr.Model3D` (untextured meshes, splats) or `LitModel3D` with HDR lighting (textured/PBR), plus `gr.DownloadButton`s for GLB and secondary formats. Two-stage models (TRELLIS) show a fast turntable preview before the slower GLB extraction.
|
|
63
|
+
- **Examples**: 3–6 known-good images lifted from the official Space's assets, `cache_examples=True, cache_mode="lazy"`.
|
|
64
|
+
|
|
65
|
+
## Verify: 3D-specific additions
|
|
66
|
+
|
|
67
|
+
On top of the standard smoke test in `SKILL.md` §7:
|
|
68
|
+
|
|
69
|
+
1. These apps expose **chained endpoints, not one `/predict`** — e.g. TripoSR: `/preprocess` (image → segmented image) then `/generate` (→ mesh files). `Client(...).view_api()` first, then call in sequence, feeding the first result into the second via `handle_file(...)`.
|
|
70
|
+
2. **Validate the returned file, not its existence.** Meshes:
|
|
71
|
+
|
|
72
|
+
```python
|
|
73
|
+
import trimesh
|
|
74
|
+
m = trimesh.load("out.glb", force="scene")
|
|
75
|
+
geoms = list(m.geometry.values()) if hasattr(m, "geometry") else [m]
|
|
76
|
+
assert geoms and sum(g.faces.shape[0] for g in geoms) > 0, "empty mesh"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Gaussian splat `.ply` (no faces — check point count and splat attributes):
|
|
80
|
+
|
|
81
|
+
```python
|
|
82
|
+
from plyfile import PlyData
|
|
83
|
+
v = PlyData.read("out.ply")["vertex"]
|
|
84
|
+
assert v.count > 1000, "suspiciously few gaussians"
|
|
85
|
+
assert {"f_dc_0", "opacity", "scale_0", "rot_0"} <= set(v.data.dtype.names), "not a gaussian ply"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
3. **Look at it in the browser once.** Orientation (upright? facing forward?), texture presence, viewer lighting — the failure modes a programmatic check can't catch ([`3d-outputs.md`](3d-outputs.md) → Orientation).
|
|
89
|
+
4. Startup-time extension compiles fail *silently* (app still boots, feature degrades) — grep the run log from the top even when everything looks green. Failure checklist: bottom of [`3d-cuda-extensions.md`](3d-cuda-extensions.md).
|
|
90
|
+
|
|
91
|
+
## What to avoid
|
|
92
|
+
|
|
93
|
+
- Assembling a TRELLIS/Hunyuan-class Space from scratch when a running official Space exists to duplicate.
|
|
94
|
+
- Trusting reference-file version pins over the live official Space's files.
|
|
95
|
+
- Compiling CUDA extensions via `requirements.txt` (no nvcc at build time), or `pip install`-ing PyPI lookalike packages for the model libraries.
|
|
96
|
+
- Returning meshes/gaussians as in-memory objects from `@spaces.GPU` functions — write files, return paths.
|
|
97
|
+
- Fixed output filenames (`output.glb`) — concurrent users clobber each other.
|
|
98
|
+
- Declaring green after `RUNNING` + a returned file. Load the mesh, count faces/points, and look at it once.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Gaussian splatting reference
|
|
2
|
+
|
|
3
|
+
Image-to-3D models whose output is a **gaussian splat** (a point cloud of oriented 3D gaussians) rather than a mesh. Deliverable file: gaussian `.ply` (the INRIA convention — the interchange format everything reads) and optionally `.splat` (antimatter15 32-byte records; smaller, no view-dependent color).
|
|
4
|
+
|
|
5
|
+
| Model | Repo | License / gating | Official Space (working reference) |
|
|
6
|
+
|---|---|---|---|
|
|
7
|
+
| TripoSplat | `VAST-AI/TripoSplat` | **MIT, ungated** | `VAST-AI/TripoSplat` (ZeroGPU, running, Gradio 6) |
|
|
8
|
+
| LGM | `ashawkey/LGM` (+ `dylanebert/LGM` diffusers port) | **MIT, ungated** | `dylanebert/LGM-mini` and `ashawkey/LGM` (ZeroGPU, running) |
|
|
9
|
+
| Apple SHARP | `apple/Sharp` | **apple-amlr — research-only**, ungated | `notaneimu/ml-sharp-3d-viewer` (currently CPU; code is ZeroGPU-ready) |
|
|
10
|
+
| Splatter Image | `szymanowiczs/splatter-image-v1` | MIT | `szymanowiczs/splatter_image` (ZeroGPU, running; old Gradio, minimal skeleton) |
|
|
11
|
+
| Splatt3R (stereo pair → scene) | `brandonsmart/splatt3r_v1.0` | research code | `brandonsmart/splatt3r` (ZeroGPU, running) |
|
|
12
|
+
|
|
13
|
+
TRELLIS 1 also exports gaussian `.ply` alongside its mesh — covered in `3d-models.md`.
|
|
14
|
+
|
|
15
|
+
> **Verify against the live official Space before writing files.** Facts below are as of 2026-07.
|
|
16
|
+
|
|
17
|
+
## The one decision that shapes everything: rasterize server-side or not?
|
|
18
|
+
|
|
19
|
+
Rendering gaussians on the server needs a CUDA rasterizer (`diff-gaussian-rasterization` or `gsplat`). Prebuilt Blackwell (sm_120) wheel availability is narrow: the `multimodalart/zerogpu-blackwell-wheels` dataset (see [`requirements.md`](requirements.md)) ships `diff_gaussian_rasterization` with the **upstream Inria API only** (2-tuple return) — the ashawkey fork most LGM-family code imports (4-tuple with alpha+depth) has no wheel, and gsplat's own wheel index tops out at torch 2.4/cu124. Two viable shapes:
|
|
20
|
+
|
|
21
|
+
**Shape A — no server-side rendering (default, strongly preferred).** The model decodes gaussians as plain PyTorch tensors; you write a `.ply` and let the *browser* render it. No CUDA extension at all — `requirements.txt` can be as small as `gradio, torch, torchvision, numpy, safetensors, pillow, tqdm` (TripoSplat's, in full). This is how every modern splat Space works (TripoSplat, SHARP, Splatt3R, Splatter Image; Splatt3R's requirements literally comment out the rasterizer dep).
|
|
22
|
+
|
|
23
|
+
**Shape B — a real rasterizer (only for server-rendered orbit videos).** If the code uses the upstream Inria API, take the prebuilt wheel from `requirements.md`'s dataset and be done. `ashawkey/LGM` needs its fork, so its Space JIT-builds it — the GPU-worker bootstrap documented in `3d-cuda-extensions.md` Strategy 3: `@spaces.GPU(duration=600)` setup function at module import, `CUDA_HOME=/cuda-image/usr/local/cuda-13.0`, `TORCH_CUDA_ARCH_LIST="12.0"`, sitecustomize no-op of `_check_cuda_version`, `pip install --no-build-isolation --no-deps git+https://github.com/graphdeco-inria/diff-gaussian-rasterization.git`, then `ctypes.CDLL(".../libcudart.so.13", RTLD_GLOBAL)`. Copy it from `dylanebert/LGM-mini` verbatim. Don't take this on unless the user explicitly wants server-rendered video output.
|
|
24
|
+
|
|
25
|
+
## Viewing splats
|
|
26
|
+
|
|
27
|
+
- **`gr.Model3D` renders gaussian `.ply` and `.splat` natively** (Babylon.js; supported at least since Gradio 4.25, current in 6.x). Return the file path like any other output. `display_mode` is ignored for splats; `clear_color`, `camera_position`, `height` still apply. This is the zero-effort default — use it.
|
|
28
|
+
- **Custom JS viewers** give better splat sorting and controls when the demo is the product: TripoSplat serves a Spark.js (`@sparkjsdev/spark`) viewer page in an iframe; ml-sharp vendors a static PlayCanvas SuperSplat build and serves it via `gr.set_static_paths(...)` + `gr.HTML` iframe with `/gradio_api/file=...` URLs. Only go here if `gr.Model3D`'s rendering visibly undersells the model.
|
|
29
|
+
- Always add a `gr.DownloadButton` for the `.ply` — splat users take the file to their own viewer/engine.
|
|
30
|
+
|
|
31
|
+
## Output writing
|
|
32
|
+
|
|
33
|
+
Gaussian `.ply` (INRIA convention): binary little-endian, vertex props `x,y,z,nx,ny,nz,f_dc_0..2,(f_rest_*),opacity(logit),scale_0..2(log),rot_0..3(quat)`. Model codebases ship their own writer (`save_ply` in LGM/SHARP/TripoSplat) — use it; don't hand-roll unless porting.
|
|
34
|
+
|
|
35
|
+
Optional `.splat` conversion for lighter downloads (~32 bytes/gaussian, drops view-dependent SH): TripoSplat's `triposplat.py::to_splat_bytes` is a complete pure-numpy reference — position f32×3, scale f32×3 (linear), RGBA u8×4 (`rgb = (f_dc·0.2820948 + 0.5)·255`, alpha = sigmoid(opacity)), quaternion u8×4 (`q·128+128`), records sorted by opacity×volume.
|
|
36
|
+
|
|
37
|
+
Watch orientation here too: splat conventions differ from viewers' (TripoSplat applies `[[1,0,0],[0,0,-1],[0,1,0]]` on export). If the splat renders sideways in `gr.Model3D`, fix it at export, same as meshes.
|
|
38
|
+
|
|
39
|
+
## ZeroGPU pickle discipline (bites harder here)
|
|
40
|
+
|
|
41
|
+
Gaussian objects in these codebases are custom classes (often holding CUDA tensors or locks) — **they cannot cross the `@spaces.GPU` boundary**. Two proven patterns:
|
|
42
|
+
|
|
43
|
+
- Do *everything* — preprocess, sample, decode, `.ply` write — inside one decorated function and return only path strings (TripoSplat, with an explicit comment to that effect).
|
|
44
|
+
- Never decorate bound methods; wrap module-level functions (`spaces.GPU(duration=180)(predict_to_ply)` — ml-sharp, whose `ModelWrapper` holds a non-picklable `threading.RLock`).
|
|
45
|
+
|
|
46
|
+
Durations: TripoSplat and LGM-mini run on the bare `@spaces.GPU` default 60s; SHARP uses 180. Splat decoding is fast — the multiview-diffusion stage (LGM) is what eats time.
|
|
47
|
+
|
|
48
|
+
## Model-specific notes
|
|
49
|
+
|
|
50
|
+
- **TripoSplat** — the current default pick: MIT, running official ZeroGPU Space, fp16 weights well within 48 GB, ~262k gaussians per generation, BiRefNet background removal built in. Caveat when duplicating: the official Space uses a fully custom Gradio 6 `gradio.Server` + `index.html` frontend, not `gr.Blocks` — its HTTP API is bespoke, so either keep it wholesale or rebuild a plain `gr.Blocks` + `gr.Model3D` UI around `TripoSplatPipeline` (the pipeline code is self-contained in `triposplat.py`/`model.py`). Weights download at startup via `hf download VAST-AI/TripoSplat --local-dir ckpts`.
|
|
51
|
+
- **LGM** — image → 4 multiview images (ImageDream) → gaussians. `dylanebert/LGM-mini` is the clean diffusers-style duplicate target (both pipelines via `from_pretrained(..., trust_remote_code=True)`, output straight into `gr.Model3D`); `ashawkey/LGM` is the video-rendering variant (Shape B). Both carry an xformers→SDPA monkeypatch for Blackwell — keep it when duplicating (the `xformers 0.0.34` Blackwell wheel in `requirements.md`'s dataset makes the patch unnecessary if you modernize the requirements instead, but the patch is harmless).
|
|
52
|
+
- **SHARP** — pip-installable (`sharp @ git+https://github.com/apple/ml-sharp.git@<sha>`), predicts a camera-space *scene* splat from one photo. Research-only license (`apple-amlr`) — tell the user before they build anything commercial. `preload_from_hub` in the frontmatter pre-bakes the checkpoint into the Space image.
|
|
53
|
+
- **Splatter Image** — the minimal skeleton (~CVPR 2024, per-pixel gaussians, MIT): good template bones, but its Space pins Gradio 4.27 and a cu113 torch via `pre-requirements.txt` — modernize rather than copy pins.
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# 3D models: TRELLIS / TRELLIS.2, TripoSR, Stable Fast 3D, SPAR3D, Hunyuan3D
|
|
2
|
+
|
|
3
|
+
Per-family deployment recipes for mesh-generation models, distilled from the live files of their official Spaces. Gaussian splatting models live in [`3d-gsplat.md`](3d-gsplat.md); the overall workflow in [`3d-generation.md`](3d-generation.md).
|
|
4
|
+
|
|
5
|
+
## TRELLIS family
|
|
6
|
+
|
|
7
|
+
The TRELLIS family covers `microsoft/TRELLIS-image-large` (TRELLIS 1, ~1.2B) and `microsoft/TRELLIS.2-4B` (TRELLIS.2). Both are image-to-3D. Both are MIT licensed and ungated — no token needed to download weights.
|
|
8
|
+
|
|
9
|
+
| Variant | Model repo | Output | VRAM | Official Space (working reference) |
|
|
10
|
+
|---|---|---|---|---|
|
|
11
|
+
| TRELLIS 1 | `microsoft/TRELLIS-image-large` (mirror: `JeffreyXiang/TRELLIS-image-large`) | Gaussians + mesh → textured GLB, gaussian `.ply` | ~16 GB | `trellis-community/TRELLIS` (ZeroGPU, running) |
|
|
12
|
+
| TRELLIS.2 | `microsoft/TRELLIS.2-4B` | High-fidelity PBR-textured GLB | ≥24 GB | `microsoft/TRELLIS.2` (ZeroGPU, running) |
|
|
13
|
+
|
|
14
|
+
There is no usable pip package (`trellis-3d` on PyPI ships only the pure-Python tree without the CUDA extensions or real dependency set; nothing exists for TRELLIS.2). **Both official Spaces vendor the library source (`trellis/` or `trellis2/`) directly in the Space repo.** Deploying means duplicating the official Space or copying its tree — not `pip install`.
|
|
15
|
+
|
|
16
|
+
> **Verify against the live official Space before writing files.** Every pin below (torch/CUDA/Python versions, wheel URLs) reflects what the official Space shipped as of 2026-07 and tracks the ZeroGPU runtime, which changes. Fetch the current files first — `hf download <space-id> --repo-type space --local-dir .` or read `https://huggingface.co/spaces/<space-id>/raw/main/requirements.txt` — and treat those as source of truth.
|
|
17
|
+
|
|
18
|
+
### TRELLIS.2 recipe (prebuilt-wheels strategy)
|
|
19
|
+
|
|
20
|
+
The `microsoft/TRELLIS.2` Space compiles nothing: every CUDA extension is a prebuilt wheel whose tags match the ZeroGPU runtime exactly (`+torch2.11.0.cu130`, `cp312`, built for Blackwell sm_120). Its frontmatter pins `python_version: 3.12` and `sdk_version: 6.1.0`, and requirements.txt (as of 2026-07) is:
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
--extra-index-url https://download.pytorch.org/whl/cu130
|
|
24
|
+
|
|
25
|
+
torch==2.11.0
|
|
26
|
+
torchvision==0.26.0
|
|
27
|
+
triton==3.6.0
|
|
28
|
+
pillow==12.0.0
|
|
29
|
+
imageio==2.37.2
|
|
30
|
+
imageio-ffmpeg==0.6.0
|
|
31
|
+
tqdm==4.67.1
|
|
32
|
+
easydict==1.13
|
|
33
|
+
opencv-python-headless==4.12.0.88
|
|
34
|
+
trimesh==4.10.1
|
|
35
|
+
transformers==4.57.3
|
|
36
|
+
zstandard==0.25.0
|
|
37
|
+
kornia==0.8.2
|
|
38
|
+
timm==1.0.22
|
|
39
|
+
git+https://github.com/EasternJournalist/utils3d.git@9a4eb15e4021b67b12c460c7057d642626897ec8
|
|
40
|
+
https://github.com/adithyaxx/flash-attention/releases/download/v2.8.3/flash_attn-2.8.3+cu13torch2.11cxx11abiTRUE-cp312-cp312-linux_x86_64.whl
|
|
41
|
+
https://github.com/LDYang694/Storages/releases/download/rtxpro6000/flex_gemm-1.0.0%2Btorch2.11.0.cu130-cp312-cp312-linux_x86_64.whl
|
|
42
|
+
https://github.com/LDYang694/Storages/releases/download/rtxpro6000/nvdiffrast-0.4.0%2Btorch2.11.0.cu130-cp312-cp312-linux_x86_64.whl
|
|
43
|
+
https://github.com/LDYang694/Storages/releases/download/rtxpro6000/nvdiffrec_render-0.0.0%2Btorch2.11.0.cu130-cp312-cp312-linux_x86_64.whl
|
|
44
|
+
https://github.com/LDYang694/Storages/releases/download/rtxpro6000/cumesh-0.0.1%2Btorch2.11.0.cu130-cp312-cp312-linux_x86_64.whl
|
|
45
|
+
https://github.com/LDYang694/Storages/releases/download/rtxpro6000/o_voxel-0.0.1%2Btorch2.11.0.cu130-cp312-cp312-linux_x86_64.whl
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Wheel tags, torch pin, and `python_version:` must agree — see `3d-cuda-extensions.md` for the tag anatomy. TRELLIS.2 uses `flex_gemm` for sparse conv (no spconv).
|
|
49
|
+
|
|
50
|
+
Module-level setup (order matters — env vars before any torch/trellis import):
|
|
51
|
+
|
|
52
|
+
```python
|
|
53
|
+
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "expandable_segments:True"
|
|
54
|
+
os.environ["ATTN_BACKEND"] = "flash_attn"
|
|
55
|
+
os.environ["FLEX_GEMM_AUTOTUNE_CACHE_PATH"] = os.path.join(..., "autotune_cache.json")
|
|
56
|
+
|
|
57
|
+
pipeline = Trellis2ImageTo3DPipeline.from_pretrained("microsoft/TRELLIS.2-4B")
|
|
58
|
+
pipeline.rembg_model = None # official Space outsources rembg to briaai/BRIA-RMBG-2.0 via gradio_client
|
|
59
|
+
pipeline.low_vram = False
|
|
60
|
+
pipeline.cuda()
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Keep `autotune_cache.json` when duplicating.** The Space commits a pre-computed flex_gemm autotune cache so kernel autotuning doesn't re-run on every fresh ZeroGPU worker. Deleting it makes first-request latency much worse.
|
|
64
|
+
|
|
65
|
+
GPU functions in the official Space: `@spaces.GPU(duration=120)` on generation (`pipeline.run(...)` with per-stage sampler params, `pipeline_type` of `512` / `1024_cascade` / `1536_cascade`) and `@spaces.GPU(duration=120)` on GLB extraction (`pipeline.decode_latent(...)` + `o_voxel.postprocess.to_glb(...)`). Generation and extraction are split into two GPU calls with latents passed between them as CPU numpy in `gr.State` — keep that split; it lets users re-extract at different decimation/texture sizes without regenerating.
|
|
66
|
+
|
|
67
|
+
### TRELLIS 1 recipe (JIT-compile strategy)
|
|
68
|
+
|
|
69
|
+
The `trellis-community/TRELLIS` Space demonstrates the other viable strategy: compile nvdiffrast + diff-gaussian-rasterization **at first boot on a GPU worker**, inside `@spaces.GPU(duration=600)`, using the nvcc that ZeroGPU mounts at runtime (`/cuda-image/usr/local/cuda-13.0`). Its requirements.txt (torch 2.8.0, `spconv-cu120==2.3.6`, `xformers`, `rembg`, no python_version pin → 3.10) installs everything that *can* come from PyPI; the JIT step handles the rest with:
|
|
70
|
+
|
|
71
|
+
- `TORCH_CUDA_ARCH_LIST="12.0"` (Blackwell — nvcc can't probe a GPU that isn't attached yet)
|
|
72
|
+
- a `sitecustomize.py` that no-ops `torch.utils.cpp_extension._check_cuda_version` (torch built for cu128, nvcc is 13.0)
|
|
73
|
+
- `pip install --no-build-isolation ./extensions/nvdiffrast` (vendored source), then the mip-splatting `diff-gaussian-rasterization` from a shallow git clone
|
|
74
|
+
- afterwards, `ctypes.CDLL("<cuda-libdir>/libcudart.so.13", mode=ctypes.RTLD_GLOBAL)` so the freshly built extensions find the CUDA 13 runtime
|
|
75
|
+
|
|
76
|
+
Backend env vars, set at the very top of `app.py`: `SPCONV_ALGO=native`, `ATTN_BACKEND=xformers`. Because ZeroGPU is Blackwell, xformers must be forced onto Cutlass kernels (its Flash-Attn-3 dispatch crashes on sm_120) — the Space monkeypatches `xformers.ops.memory_efficient_attention` to default `op=(fmha.cutlass.FwOp, fmha.cutlass.BwOp)`. Don't drop that patch when duplicating.
|
|
77
|
+
|
|
78
|
+
GPU functions: `@spaces.GPU(duration=120)` for generate-and-extract-GLB (single- and multi-image modes, 120-frame turntable preview video via `render_utils.render_video`, GLB via `postprocessing_utils.to_glb(gs, mesh, simplify=0.95, texture_size=1024)`); bare `@spaces.GPU` for gaussian `.ply` extraction. Viewer: `LitModel3D` from `gradio_litmodel3d==0.0.1` (installed at runtime with `--no-deps` if missing). The Space also sets `demo.launch(mcp_server=True)` — TRELLIS demos double as MCP servers; keep it.
|
|
79
|
+
|
|
80
|
+
### Deploying a finetuned TRELLIS variant
|
|
81
|
+
|
|
82
|
+
Both pipelines resolve everything from a `pipeline.json` at the model repo root, so a finetuned checkpoint that keeps the repo layout is a one-line swap:
|
|
83
|
+
|
|
84
|
+
```python
|
|
85
|
+
pipeline = TrellisImageTo3DPipeline.from_pretrained("user/my-finetuned-trellis") # or Trellis2ImageTo3DPipeline
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
If the finetuned repo is private, pass the token via env (`HF_TOKEN` Space secret) — `from_pretrained` in the vendored trellis code goes through `huggingface_hub` and picks it up. If the user only has raw checkpoint files (no `pipeline.json`), copy `pipeline.json` + config layout from the base repo into their model repo first.
|
|
89
|
+
|
|
90
|
+
### Picking between the two
|
|
91
|
+
|
|
92
|
+
- **TRELLIS.2** — best quality, PBR materials, 3 resolution tiers; heavier (≥24 GB, fine on ZeroGPU large's 48 GB), Gradio 6, Python 3.12. Default choice for a new Space.
|
|
93
|
+
- **TRELLIS 1** — lighter (~16 GB), dual gaussian+mesh output (the gaussian `.ply` path matters if the user wants splats), multi-image conditioning modes, and the community Space is a cleaner codebase to modify. Choose when the user wants gaussians, multi-image input, or minimal VRAM.
|
|
94
|
+
|
|
95
|
+
### Durations and misc
|
|
96
|
+
|
|
97
|
+
- Generation: `duration=120` is what both official Spaces use; TRELLIS.2 at 1536³ pushes ~60s of pure compute on H100-class hardware, so don't go below 120.
|
|
98
|
+
- Call `torch.cuda.empty_cache()` at the end of each GPU function (both Spaces do) — sequential calls on a warm worker otherwise accumulate.
|
|
99
|
+
- TRELLIS.2's mesh simplify cap: `mesh.simplify(16777216)` — nvdiffrast's face-count limit.
|
|
100
|
+
- Preprocessing (alpha-bbox crop, resize to ≤1024, background removal) runs on CPU outside the GPU function.
|
|
101
|
+
|
|
102
|
+
## Mesh workhorses: TripoSR, Stable Fast 3D, SPAR3D, Hunyuan3D
|
|
103
|
+
|
|
104
|
+
Two groups in this file. The **fast tier** (TripoSR, SF3D, SPAR3D): single-forward-pass image-to-mesh, seconds per generation, small VRAM, simple codebases — pick when the user wants a snappy demo, a high-traffic public Space (short `@spaces.GPU` durations = less quota per click and better queue priority), or can accept lower fidelity than TRELLIS.2. And **Hunyuan3D-2/2.1** (Tencent): two-stage — a flow-matching DiT generates the shape, then an optional multiview-diffusion "Paint" stage textures it — pick when the user wants textured output and TRELLIS.2 doesn't fit, or when they finetuned a Hunyuan3D DiT (the 2.1 release includes official training code, so finetuned shape checkpoints are common).
|
|
105
|
+
|
|
106
|
+
| Model | Repo | Output | License / gating | Official Space |
|
|
107
|
+
|---|---|---|---|---|
|
|
108
|
+
| TripoSR | `stabilityai/TripoSR` | untextured mesh (OBJ + GLB) | **MIT, ungated** | `stabilityai/TripoSR` (ZeroGPU, running) |
|
|
109
|
+
| Stable Fast 3D (SF3D) | `stabilityai/stable-fast-3d` | UV-unwrapped **textured** GLB | stabilityai-ai-community, **gated (auto)** | `stabilityai/stable-fast-3d` (ZeroGPU, running) |
|
|
110
|
+
| SPAR3D | `stabilityai/stable-point-aware-3d` | textured GLB + editable point cloud | stabilityai-ai-community, **gated (auto)** | `stabilityai/stable-point-aware-3d` (dedicated L4, **currently BUILD_ERROR** — reference code only) |
|
|
111
|
+
| Hunyuan3D-2.0 | `tencent/Hunyuan3D-2` (subfolder `hunyuan3d-dit-v2-0`; also `-mini`, `-mv`) | GLB, RGB-textured (Paint 2.0) | tencent-hunyuan-community, **ungated, non-commercial** | `tencent/Hunyuan3D-2` (ZeroGPU, running) |
|
|
112
|
+
| Hunyuan3D-2.1 | `tencent/Hunyuan3D-2.1` (subfolder `hunyuan3d-dit-v2-1`) | GLB, **PBR**-textured (Paint 2.1) | tencent-hunyuan-community, **ungated, non-commercial** | `tencent/Hunyuan3D-2.1` (ZeroGPU, **paused** — code is still the reference) |
|
|
113
|
+
|
|
114
|
+
**Licenses and gating matter here.** The two Stability models are `gated: auto` — the deploying user must accept the license on the model page, and the Space needs their `HF_TOKEN` as a secret to download weights at startup; if the gate isn't accepted, `from_pretrained` fails with 401 at build — check before publishing. The Hunyuan models are ungated (no token needed) but the community license restricts commercial use — surface that before the user flips a Space public. TripoSR is MIT and needs nothing.
|
|
115
|
+
|
|
116
|
+
> **Verify against the live official Space before writing files.** Pins below are as of 2026-07. Fetch current files via `https://huggingface.co/spaces/<id>/raw/main/<path>` first.
|
|
117
|
+
|
|
118
|
+
### TripoSR — the minimal recipe (~200-line app)
|
|
119
|
+
|
|
120
|
+
The simplest working 3D Space on the Hub, and the best starting skeleton for a from-scratch mesh demo. `tsr/` package vendored in the Space; frontmatter pins `python_version: 3.10.13`, `sdk_version: 4.20.1`.
|
|
121
|
+
|
|
122
|
+
One CUDA extension, JIT-built at module import (marching cubes):
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
subprocess.run(
|
|
126
|
+
shlex.split("pip install --no-build-isolation git+https://github.com/tatsy/torchmcubes.git"),
|
|
127
|
+
env={**os.environ, "TORCH_CUDA_ARCH_LIST": "12.0+PTX"}, # no GPU visible at startup — force Blackwell arch
|
|
128
|
+
check=True,
|
|
129
|
+
)
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
requirements.txt carries the build toolchain for it (`scikit-build-core>=0.10`, `pybind11>=2.10`, `cmake`, `ninja`) plus `rembg`, `onnxruntime`, `trimesh`, `omegaconf`, `einops`, `transformers`, `Pillow`, `huggingface-hub`. No torch pin (base image). (A prebuilt `torchmcubes` Blackwell wheel now exists in the dataset described in [`requirements.md`](requirements.md) — cleaner than the JIT build when building fresh.)
|
|
133
|
+
|
|
134
|
+
```python
|
|
135
|
+
model = TSR.from_pretrained("stabilityai/TripoSR", config_name="config.yaml", weight_name="model.ckpt")
|
|
136
|
+
model.renderer.set_chunk_size(131072)
|
|
137
|
+
model.to(device)
|
|
138
|
+
|
|
139
|
+
@spaces.GPU # default 60s is plenty — the forward pass is ~1s
|
|
140
|
+
def generate(image, mc_resolution):
|
|
141
|
+
scene_codes = model(image, device)
|
|
142
|
+
mesh = model.extract_mesh(scene_codes, resolution=mc_resolution)[0]
|
|
143
|
+
mesh = to_gradio_3d_orientation(mesh) # axis fix — see 3d-outputs.md
|
|
144
|
+
... # export OBJ + GLB to NamedTemporaryFiles, return both paths
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Preprocessing on CPU, outside the GPU function: `rembg` background removal → `resize_foreground(image, 0.85)` → composite onto gray. UI: input image + "marching cubes resolution" slider (32–320) + two `gr.Model3D` tabs (OBJ and GLB).
|
|
148
|
+
|
|
149
|
+
### Stable Fast 3D — textured output, source-built extensions
|
|
150
|
+
|
|
151
|
+
`sf3d/` vendored; frontmatter `python_version: 3.10.13`, `sdk_version: 4.41.0`. Two vendored extension source dirs built at module import (they're commented out in requirements.txt with a note — the "HF hack"):
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
os.system(
|
|
155
|
+
'CPPFLAGS="-include utility" TORCH_CUDA_ARCH_LIST="12.0+PTX" USE_CUDA=1 '
|
|
156
|
+
"pip install -vv --no-build-isolation ./texture_baker ./uv_unwrapper"
|
|
157
|
+
)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
`texture_baker` is a torch CUDAExtension (the `CPPFLAGS="-include utility"` is required for its build), `uv_unwrapper` a plain C++ extension. Other deps of note: `open_clip_torch`, `rembg[gpu]`, `pynanoinstantmeshes` + `gpytoolbox` (remeshing), `gradio-litmodel3d==0.0.1`.
|
|
161
|
+
|
|
162
|
+
```python
|
|
163
|
+
model = SF3D.from_pretrained("stabilityai/stable-fast-3d",
|
|
164
|
+
config_name="config.yaml", weight_name="model.safetensors")
|
|
165
|
+
model.eval().to(device) # gated repo — needs HF_TOKEN secret with accepted license
|
|
166
|
+
|
|
167
|
+
@spaces.GPU # default 60s
|
|
168
|
+
def run(input_image, remesh_option, vertex_count, texture_size):
|
|
169
|
+
with torch.autocast(device_type=device, dtype=torch.bfloat16):
|
|
170
|
+
model_batch = create_batch(input_image)
|
|
171
|
+
...
|
|
172
|
+
trimesh_mesh.export(tmp.name, file_type="glb", include_normals=True)
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
UI controls that earn their place: foreground ratio, remesh (None/Triangle/Quad), target vertex count, texture size (512–2048). Viewer: `LitModel3D` with selectable HDR environment maps — textured output deserves image-based lighting (see [`3d-outputs.md`](3d-outputs.md)).
|
|
176
|
+
|
|
177
|
+
### SPAR3D — reference code only, don't duplicate blindly
|
|
178
|
+
|
|
179
|
+
Two-stage: point-cloud diffusion → mesh, with a `gradio_pointcloudeditor` step so users can edit the intermediate point cloud before meshing. Distinctive UI idea worth stealing. But the official Space runs on **dedicated L4, not ZeroGPU** (no `import spaces`, torch pinned to 2.5.1, real nvcc assumed) and is currently in BUILD_ERROR. To deploy SPAR3D on ZeroGPU you'd port it: add `spaces`, drop the torch pin, apply the SF3D extension-build pattern (same vendored `texture_baker`/`uv_unwrapper` + a prebuilt `pynim` wheel), and decorate the two stages. Budget real debugging time; propose SF3D instead unless the user specifically needs the point-cloud editing stage. Its background removal uses `transparent-background` (InSPyReNet) rather than rembg.
|
|
180
|
+
|
|
181
|
+
### Hunyuan3D-2 / 2.1 — textured two-stage generation
|
|
182
|
+
|
|
183
|
+
Both official Spaces vendor the model code in the Space repo (`hy3dgen/` for 2.0; `hy3dshape/` + `hy3dpaint/` for 2.1) — there's a `setup.py` but nothing is pip-installed; imports resolve from cwd. Two native extensions are handled at module-import time in `gradio_app.py`:
|
|
184
|
+
|
|
185
|
+
```python
|
|
186
|
+
# custom_rasterizer: prebuilt CUDA wheel committed to the Space repo (no nvcc at build time)
|
|
187
|
+
subprocess.run(shlex.split("pip install custom_rasterizer-0.1-cp310-cp310-linux_x86_64.whl"), check=True)
|
|
188
|
+
# mesh painter: CPU-only pybind11 extension, compiled with plain g++ in seconds
|
|
189
|
+
os.system("cd /home/user/app/hy3dpaint/DifferentiableRenderer && bash compile_mesh_painter.sh")
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The cp310 wheel means Python 3.10 — pin `python_version: "3.10"` explicitly when duplicating so a runtime default bump can't break it.
|
|
193
|
+
|
|
194
|
+
**Requirements notes (2.1)** — fully pinned; the non-obvious entries: `--extra-index-url https://download.blender.org/pypi/` + `bpy==4.0` (Blender-as-pip; installs headless with no display setup — see [`3d-outputs.md`](3d-outputs.md) → Headless Blender — though the Space's OBJ→GLB conversion actually runs on trimesh+pygltflib); `realesrgan==0.3.0` + `basicsr==1.4.2` (texture upscaling — needs the Space's `torchvision_fix.py` shim, applied at the top of `gradio_app.py` *and* again before the texgen import, because basicsr imports the removed `torchvision.transforms.functional_tensor`); `cupy-cuda12x`, `pymeshlab`, `xatlas`, `open3d`, `trimesh`, `pygltflib` (mesh stack); **no torch pin**; `pydantic==2.10.6` (gradio compat).
|
|
195
|
+
|
|
196
|
+
**Model loading** (module level):
|
|
197
|
+
|
|
198
|
+
```python
|
|
199
|
+
from hy3dshape.pipelines import Hunyuan3DDiTFlowMatchingPipeline # hy3dgen.shapegen on 2.0
|
|
200
|
+
shape_pipe = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(
|
|
201
|
+
"tencent/Hunyuan3D-2.1", subfolder="hunyuan3d-dit-v2-1", use_safetensors=False,
|
|
202
|
+
) # 2.0: repo "tencent/Hunyuan3D-2", subfolder "hunyuan3d-dit-v2-0", use_safetensors=True, + .enable_flashvdm()
|
|
203
|
+
|
|
204
|
+
# Texture stage — wrap in try/except and degrade to shape-only if it fails (official HAS_TEXTUREGEN pattern)
|
|
205
|
+
from hy3dpaint.textureGenPipeline import Hunyuan3DPaintPipeline, Hunyuan3DPaintConfig
|
|
206
|
+
paint_pipe = Hunyuan3DPaintPipeline(Hunyuan3DPaintConfig(max_num_view=8, resolution=768))
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**GPU decorators**: `@spaces.GPU(duration=40–60)` shape-only; `@spaces.GPU(duration=90)` (2.0) / `@spaces.GPU(duration=180)` (2.1 PBR) shape+texture. VRAM (2.1, per its README): ~10 GB shape, ~21 GB texture, ~29 GB both — fits ZeroGPU large, but the full PBR path is the heaviest recipe in these references; don't shave the duration.
|
|
210
|
+
|
|
211
|
+
**Output path gotcha (2.1)**: textured meshes export as **OBJ first, then convert to GLB** via the Space's `convert_utils` (obj2gltf with PBR materials) — direct GLB export from the paint pipeline core-dumps. Keep the conversion step when duplicating.
|
|
212
|
+
|
|
213
|
+
**Serving quirk**: both official Spaces use a custom `<model-viewer>` HTML iframe + FastAPI `StaticFiles` + `gr.mount_gradio_app` + manual `uvicorn.run` instead of `demo.launch()` — which requires calling `from spaces import zero; zero.startup()` manually before uvicorn. **When building fresh rather than duplicating, skip all of this** — export a GLB, show it in `gr.Model3D`/`LitModel3D`, and let `demo.launch()` do its job. Only keep the iframe machinery when duplicating wholesale.
|
|
214
|
+
|
|
215
|
+
**Local-run pattern worth copying**: 2.1's `gradio_app.py` defines a no-op `spaces.GPU` decorator when not running on Spaces (`ENV != "Huggingface"`), so the same file runs on a local GPU box unchanged.
|
|
216
|
+
|
|
217
|
+
**Deploying a finetuned Hunyuan3D variant** — the official 2.1 release ships training code (`hy3dshape/` includes trainers and configs), so "I finetuned Hunyuan3D, make me a demo" is a real request. The shape pipeline resolves `subfolder` inside the model repo:
|
|
218
|
+
|
|
219
|
+
```python
|
|
220
|
+
shape_pipe = Hunyuan3DDiTFlowMatchingPipeline.from_pretrained(
|
|
221
|
+
"user/my-finetuned-hunyuan3d", subfolder="hunyuan3d-dit-v2-1",
|
|
222
|
+
)
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
If the user's repo keeps the official layout (config + checkpoint under the dit subfolder), it's a repo-id swap; if they saved a bare checkpoint, mirror the base repo's subfolder structure into their repo first. Finetunes are almost always **shape-only** — keep the stock Paint stage from the base repo for texturing (it conditions on the input image, not the shape checkpoint). Private repo → `HF_TOKEN` Space secret.
|
|
226
|
+
|
|
227
|
+
**Which Hunyuan variant**: **2.1** — PBR texturing, the one with official training code, the default for finetunes, heaviest. **2.0** — lighter, faster (flashvdm), RGB textures, official Space actually running today (known-good duplicate target); `-mini` and `-mv` (multiview-conditioned) subfolder variants live in the same repo. **Shape-only demo** (skip Paint entirely) — halves the dependency surface (no bpy/realesrgan/basicsr/cupy) and cuts duration to 40–60s; offer it when the user just wants geometry.
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# Mesh outputs: formats, viewers, preprocessing
|
|
2
|
+
|
|
3
|
+
## Formats
|
|
4
|
+
|
|
5
|
+
**GLB is the default output format.** It's self-contained (geometry + materials + textures in one binary file), renders in every in-browser viewer, and is what all the major official 3D Spaces produce. Offer OBJ/PLY/STL as secondary downloads, not as the primary view.
|
|
6
|
+
|
|
7
|
+
| Format | Carries | When to offer |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| GLB | geometry + normals + UVs + PBR materials + embedded textures | always — primary output |
|
|
10
|
+
| OBJ (+MTL) | geometry, UVs; textures via sidecar files | DCC-tool users; note multi-file awkwardness in a web download |
|
|
11
|
+
| PLY | geometry, vertex colors; also the container for gaussian splats (see `3d-gsplat.md`) | point clouds, vertex-colored meshes, splats |
|
|
12
|
+
| STL | bare geometry | 3D-printing crowd |
|
|
13
|
+
|
|
14
|
+
Conversion is trimesh one-liners — the Hunyuan3D Spaces expose exactly this as an "export" accordion:
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
mesh = trimesh.load("out.glb")
|
|
18
|
+
mesh.export("out.obj") # or .ply / .stl — inferred from extension
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Two exceptions to "just use trimesh":
|
|
22
|
+
|
|
23
|
+
- **PBR materials**: trimesh's GLB export handles baseColor fine but degrades full PBR (metallic/roughness/normal maps). Hunyuan3D-2.1 exports OBJ then converts with obj2gltf specifically because its direct GLB export core-dumps — when a pipeline ships its own exporter (`to_glb`, `convert_utils`, `o_voxel.postprocess`), use it instead of round-tripping through trimesh.
|
|
24
|
+
- **Normals**: pass `include_normals=True` on trimesh GLB exports (SF3D does) — missing normals render matte-black in some viewers.
|
|
25
|
+
|
|
26
|
+
## Orientation
|
|
27
|
+
|
|
28
|
+
The #1 "it works but looks wrong" bug. Model output conventions (often Z-up, or −Y-forward from the training renders) don't match the viewers' glTF convention (Y-up, +Z toward camera), so meshes come out lying face-down or backwards. TripoSR's fix:
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
def to_gradio_3d_orientation(mesh):
|
|
32
|
+
mesh.apply_transform(trimesh.transformations.rotation_matrix(-np.pi/2, [1, 0, 0])) # Z-up → Y-up
|
|
33
|
+
mesh.apply_transform(trimesh.transformations.rotation_matrix( np.pi/2, [0, 1, 0]))
|
|
34
|
+
return mesh
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The exact rotation is per-model — copy it from the official Space's app (search for `rotation_matrix` or `apply_transform`). If output is mirrored, the model bakes a flipped X; TripoSR's OBJ export flips `mesh.vertices[:, 0]` back. Verify orientation visually during the smoke-test; it can't be caught from exit codes.
|
|
38
|
+
|
|
39
|
+
## Viewers
|
|
40
|
+
|
|
41
|
+
- **`gr.Model3D`** — built-in, zero extra deps, fine for untextured or baseColor meshes; also renders gaussian splat `.ply`/`.splat` natively (see `3d-gsplat.md`). Useful kwargs: `display_mode="solid"` (default point cloud rendering ruins meshes in some versions; ignored for splats), `clear_color=(0.25, 0.25, 0.25, 1.0)`, `height=...`. Default choice.
|
|
42
|
+
- **`LitModel3D`** (`gradio_litmodel3d==0.0.1`, a Hub custom component) — adds image-based lighting with HDR environment maps. Worth the extra dep for **textured/PBR** output, where flat lighting hides the texture quality (SF3D and trellis-community both use it, SF3D with a selectable `.hdr` set). Textured model + plain `gr.Model3D` undersells the result.
|
|
43
|
+
- **Custom `<model-viewer>` iframe + FastAPI static mount** — what the Hunyuan Spaces do. Maximum control, but requires abandoning `demo.launch()` for manual uvicorn plus a manual `spaces.zero.startup()` call. Don't build this fresh; only keep it when duplicating a Space that already has it.
|
|
44
|
+
- **Turntable preview** — TRELLIS renders a 120-frame orbit video (`imageio.mimsave`, fps=15) shown in `gr.Video` *before* the user commits to GLB extraction; TRELLIS.2 uses a base64-JPEG JS orbiter. Good pattern when extraction is a separate, slower step; skip it for fast-tier models where the mesh is ready immediately.
|
|
45
|
+
|
|
46
|
+
Always pair the viewer with `gr.DownloadButton` for the raw file — the viewer is a preview, the file is the deliverable.
|
|
47
|
+
|
|
48
|
+
## Input preprocessing (image-to-3D)
|
|
49
|
+
|
|
50
|
+
Every image-to-3D model expects a **segmented foreground object**, roughly centered, on neutral/transparent background. The shared recipe, run on CPU *outside* the GPU function:
|
|
51
|
+
|
|
52
|
+
1. **Respect an existing alpha channel.** If the upload is RGBA with a real alpha, skip segmentation (TRELLIS checks this first).
|
|
53
|
+
2. **Otherwise remove the background** — `rembg` (u2net, onnxruntime; the common choice), `transparent-background` (InSPyReNet; SPAR3D), or BiRefNet. TRELLIS.2 outsources to the `briaai/BRIA-RMBG-2.0` Space via `gradio_client` — fine for an official Space, but a fragile external dependency for a user Space; prefer local rembg.
|
|
54
|
+
3. **Crop to the alpha bbox, resize** (≤1024 for TRELLIS-class, 512 for fast tier), **rescale the foreground** to ~85% of frame (`foreground_ratio` slider in the Stability Spaces), composite onto neutral gray or keep alpha.
|
|
55
|
+
|
|
56
|
+
Show the preprocessed image in the UI before generation — users need to see what the model actually gets, and a bad segmentation explains a bad mesh. Loading the rembg session at startup (TRELLIS runs one dummy `preprocess_image` at boot) avoids a first-click latency spike.
|
|
57
|
+
|
|
58
|
+
## Temp files and concurrency
|
|
59
|
+
|
|
60
|
+
Handlers run concurrently; never write to fixed paths. The pattern used by the official Spaces:
|
|
61
|
+
|
|
62
|
+
```python
|
|
63
|
+
demo = gr.Blocks(delete_cache=(600, 600)) # sweep files older than 600s every 600s
|
|
64
|
+
|
|
65
|
+
@demo.load(outputs=...)
|
|
66
|
+
def start_session(req: gr.Request):
|
|
67
|
+
session_dir = os.path.join(TMP_ROOT, str(req.session_hash))
|
|
68
|
+
os.makedirs(session_dir, exist_ok=True)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
or simply `tempfile.NamedTemporaryFile(suffix=".glb", delete=False)` per call (TripoSR/SF3D). Either works; never a bare `"output.glb"`.
|
|
72
|
+
|
|
73
|
+
## Headless Blender (bpy / renders)
|
|
74
|
+
|
|
75
|
+
Blender shows up in 3D Spaces two ways: as the **`bpy` pip module** (`--extra-index-url https://download.blender.org/pypi/` + `bpy==<pin>`; Hunyuan3D-2.1 pins `bpy==4.0` — which installs cleanly on ZeroGPU with no display setup, though that Space's actual GLB conversion runs on trimesh+pygltflib), or as a **standalone binary** driven by a render script (TRELLIS-dataset-toolkit-style turntables, rigging/preprocessing tools). Spaces containers have no display; the working patterns, all verified from running Spaces:
|
|
76
|
+
|
|
77
|
+
- **pip `bpy` needs no xvfb.** Mesh ops, Cycles, and Workbench renders work headless — bpy creates its GL context via EGL/Mesa, not X11. The `packages.txt` seen in every working bpy demo Space (e.g. `radames/gradio-blender-bpy`) is just:
|
|
78
|
+
|
|
79
|
+
```
|
|
80
|
+
libegl1-mesa-dev
|
|
81
|
+
libgl1-mesa-dev
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
ZeroGPU gotcha: **`import bpy` takes 30–60 s** — never import it inside a `@spaces.GPU` function (it burns the duration budget and aborts the task). Import at module scope, or run a persistent bpy worker in the main process (`VAST-AI/SkinTokens` does file-based IPC to one).
|
|
85
|
+
- **A modern Blender binary (≥3.4) needs no xvfb either**: download the tarball at startup, run `blender -b -noaudio --python script.py -- <args>` as a subprocess (`MajorDaniel/UniRig` on ZeroGPU). `packages.txt` then carries the binary's shared-lib deps: `libx11-6 libxi6 libxrender1 libxxf86vm1 libfontconfig1 libsm6 libxkbcommon0 libxkbcommon-x11-0 libgl1-mesa-glx`. Blender's manual is explicit that CLI/background rendering needs no display; a GPU Cycles subprocess must be launched from **inside** `@spaces.GPU` (it inherits the worker's CUDA), while display/env setup is process-global and belongs at module scope.
|
|
86
|
+
- **Reach for Xvfb only when forced**: a pinned pre-3.4 Blender binary (no EGL headless support yet), EEVEE on legacy setups, or non-Blender GL stacks (Open3D/VTK offscreen, pyglet). On the **gradio SDK**, don't launch raw `Xvfb :99 &` — the container lacks the `/tmp/.X11-unix` permissions for it (UniRig documents this) — use `pyvirtualdisplay` at module scope, the pattern `gradient-spaces/GuideFlow3D` uses to render Cycles through Blender 3.0.1 headlessly. `packages.txt`:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
xvfb
|
|
90
|
+
libx11-6
|
|
91
|
+
libgl1
|
|
92
|
+
libxrender1
|
|
93
|
+
libxi6
|
|
94
|
+
libxkbcommon-x11-0
|
|
95
|
+
libsm6
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
and at the very top of `app.py`, before anything touches Blender/GL (plus `pyvirtualdisplay` in requirements.txt):
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
if os.environ.get("DISPLAY") is None:
|
|
102
|
+
from pyvirtualdisplay import Display # drives Xvfb with user-owned sockets
|
|
103
|
+
display = Display(visible=0, size=(1920, 1080))
|
|
104
|
+
display.start()
|
|
105
|
+
os.environ.setdefault("DISPLAY", f":{display.display}")
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
On the **Docker SDK** you control the image: `xvfb-run -a -s '-screen 0 1024x768x24' <cmd>` (or `Xvfb :99 ... & export DISPLAY=:99`), adding Mesa software-GL env on CPU hardware (`LIBGL_ALWAYS_SOFTWARE=1`, `GALLIUM_DRIVER=llvm`).
|
|
109
|
+
- **Keep Space renders on Cycles.** EEVEE is GPU-rasterization by design (no CPU path — headless EEVEE exists on Linux ≥3.4 via EGL, but under Xvfb/software-GL it crawls); Cycles renders fine on CPU or on CUDA inside `@spaces.GPU`.
|
|
110
|
+
- **pyrender** (not Blender, but the same "needs GL" problem): use EGL, not Xvfb — `os.environ["PYOPENGL_PLATFORM"] = "egl"` with `libgl1-mesa-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev` in packages.txt (`H-Liu1997/EMAGE` on ZeroGPU).
|
|
111
|
+
|
|
112
|
+
## Examples
|
|
113
|
+
|
|
114
|
+
`gr.Examples` with a handful of good input images makes or breaks first impressions of a 3D demo. Source them from the official Space's `assets/`/`examples/` dir (they're chosen to work well) or the model repo. On ZeroGPU use `cache_examples=True, cache_mode="lazy"`. Objects that demo well: single centered objects with clear silhouettes — figurines, shoes, furniture, vehicles. Objects that demo poorly: scenes, flat images, humans (most mesh models aren't trained for them), thin structures.
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Persistent storage with Buckets
|
|
2
|
+
|
|
3
|
+
Spaces are stateless. All data is wiped on restart / rebuild. For state that must survive (user uploads, generations, dynamic feeds, logs, growing databases): mount an HF **Bucket** — S3-like object storage living at `hf://buckets/<ns>/<bucket>`.
|
|
4
|
+
|
|
5
|
+
Buckets are paid (per-TB storage). Check `whoami.canPay` and confirm with the user before creating one. Pricing + free tier: https://huggingface.co/storage.
|
|
6
|
+
|
|
7
|
+
Full docs: https://huggingface.co/docs/hub/storage-buckets.
|
|
8
|
+
|
|
9
|
+
## Create + attach
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
hf buckets create <ns>/<bucket-name> # --private optional
|
|
13
|
+
hf spaces volumes set <ns>/<space> -v hf://buckets/<ns>/<bucket-name>:/data
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
After this, writes to `/data/` in the Space are durable. Reads come from the bucket via the Xet storage backend.
|
|
17
|
+
|
|
18
|
+
To make the bucket files publicly addressable: leave the bucket public. Public bucket files are served at `https://huggingface.co/buckets/<ns>/<bucket>/resolve/<path>` (HTTP 302 redirect to a signed CDN URL). The Space writes once and the public URL works forever — no streaming proxy needed.
|
|
19
|
+
|
|
20
|
+
## Write-durable, read-fast pattern
|
|
21
|
+
|
|
22
|
+
For a feed-style Space (e.g. a community jam where users save generations and browse a public timeline), don't re-scan disk on every request. Module-level disk scan → in-memory list → every write appends to both:
|
|
23
|
+
|
|
24
|
+
```python
|
|
25
|
+
import os, json, uuid
|
|
26
|
+
from datetime import datetime, timezone
|
|
27
|
+
|
|
28
|
+
BUCKET_ID = "<ns>/<bucket-name>"
|
|
29
|
+
BUCKET_URL = f"https://huggingface.co/buckets/{BUCKET_ID}/resolve"
|
|
30
|
+
_feed = []
|
|
31
|
+
|
|
32
|
+
def _load_feed():
|
|
33
|
+
root = "/data/songs"
|
|
34
|
+
if not os.path.isdir(root):
|
|
35
|
+
return
|
|
36
|
+
for sid in os.listdir(root):
|
|
37
|
+
meta = f"{root}/{sid}/meta.json"
|
|
38
|
+
if os.path.isfile(meta):
|
|
39
|
+
_feed.append(json.load(open(meta)))
|
|
40
|
+
_feed.sort(key=lambda s: s["created_at"], reverse=True)
|
|
41
|
+
|
|
42
|
+
_load_feed() # one scan at startup
|
|
43
|
+
|
|
44
|
+
@app.api(name="save", time_limit=60)
|
|
45
|
+
def save(audio_bytes: bytes, title: str):
|
|
46
|
+
sid = uuid.uuid4().hex[:12]
|
|
47
|
+
d = f"/data/songs/{sid}"; os.makedirs(d, exist_ok=True)
|
|
48
|
+
open(f"{d}/audio.wav", "wb").write(audio_bytes)
|
|
49
|
+
meta = {"id": sid, "title": title,
|
|
50
|
+
"url": f"{BUCKET_URL}/songs/{sid}/audio.wav",
|
|
51
|
+
"created_at": datetime.now(timezone.utc).isoformat()}
|
|
52
|
+
json.dump(meta, open(f"{d}/meta.json", "w"))
|
|
53
|
+
_feed.insert(0, meta) # cache stays current — no re-scan
|
|
54
|
+
return meta
|
|
55
|
+
|
|
56
|
+
@app.api(name="feed", concurrency_limit=10)
|
|
57
|
+
def feed(): return _feed[:50] # zero disk I/O
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Reference Space using this pattern: https://huggingface.co/spaces/victor/ace-step-jam
|
|
61
|
+
|
|
62
|
+
## Anti-pattern: bucket as model-weights cache
|
|
63
|
+
|
|
64
|
+
**Do NOT** `snapshot_download(..., local_dir="/data/weights")` and load checkpoints from there. Bucket I/O is S3-paced; reading a 22 GB `safetensors` from `/data` during `from_pretrained` stalls past any `@spaces.GPU` duration cap.
|
|
65
|
+
|
|
66
|
+
For model weights, let HF Hub re-download to local container disk on each cold start. With `HF_HUB_ENABLE_HF_TRANSFER=1` (set in the runtime by default) this is fast — typically much faster than streaming the same bytes through bucket I/O at request time.
|
|
67
|
+
|
|
68
|
+
Bucket I/O is fine for occasional metadata reads (the feed pattern above) or saving user information. It is *not* fine as the path your model loader streams gigabytes through every cold start.
|
|
69
|
+
|
|
70
|
+
## Cache redirects
|
|
71
|
+
|
|
72
|
+
`/home/user/.cache` is read-only on ZeroGPU. Redirect transient caches at the top of `app.py`, before any library import that uses them:
|
|
73
|
+
|
|
74
|
+
```python
|
|
75
|
+
import os
|
|
76
|
+
os.environ.setdefault("HF_HOME", "/data/.cache/huggingface") # or /tmp on non-bucket Spaces
|
|
77
|
+
os.environ.setdefault("HF_MODULES_CACHE", "/tmp/hf_modules")
|
|
78
|
+
os.environ.setdefault("MPLCONFIGDIR", "/tmp/matplotlib")
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Missing redirections fail silently or at first matplotlib / transformers / diffusers import.
|
|
82
|
+
|
|
83
|
+
## Write access from the Space
|
|
84
|
+
|
|
85
|
+
The Space's `HF_TOKEN` secret needs write permission on the bucket. Set via Settings → Secrets in the Space UI, or `hf spaces secrets set <id> HF_TOKEN=<token>`.
|
|
86
|
+
|
|
87
|
+
## Security note
|
|
88
|
+
|
|
89
|
+
Public bucket files are publicly accessible forever at their resolve URL. **Don't write PII** to a public bucket. If you need durable but private storage (e.g. per-user history requiring an HF login), keep the bucket private and gate reads through your Space's own auth.
|