opencode-skills-collection 4.0.68 → 4.0.70
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/bundled-skills/.antigravity-install-manifest.json +304 -1
- package/bundled-skills/access-review/SKILL.md +394 -0
- package/bundled-skills/access-review/references/details.md +121 -0
- package/bundled-skills/agent-evals/SKILL.md +420 -0
- package/bundled-skills/agent-observability/SKILL.md +346 -0
- package/bundled-skills/agent-observability/references/details.md +786 -0
- package/bundled-skills/ai-agent-security/SKILL.md +393 -0
- package/bundled-skills/ai-agent-security/references/details.md +912 -0
- package/bundled-skills/ai-coding-agent-guardrails/SKILL.md +442 -0
- package/bundled-skills/ai-coding-agent-guardrails/references/details.md +753 -0
- package/bundled-skills/ai-inference-service-mesh/SKILL.md +449 -0
- package/bundled-skills/ai-pipeline-orchestration/SKILL.md +287 -0
- package/bundled-skills/ai-red-teaming/SKILL.md +409 -0
- package/bundled-skills/ai-security-hardening/SKILL.md +343 -0
- package/bundled-skills/ai-sre-incident-response/SKILL.md +336 -0
- package/bundled-skills/alerting-oncall/SKILL.md +458 -0
- package/bundled-skills/alerting-oncall/references/details.md +84 -0
- package/bundled-skills/api-integration-architect/SKILL.md +241 -0
- package/bundled-skills/apify-generate-output-schema/SKILL.md +438 -0
- package/bundled-skills/apify-integration-development/SKILL.md +168 -0
- package/bundled-skills/apify-integration-development/references/ai-framework-package.md +158 -0
- package/bundled-skills/apify-integration-development/references/ai-harness-plugin.md +192 -0
- package/bundled-skills/apify-integration-development/references/sdk-integration.md +236 -0
- package/bundled-skills/apify-integration-development/references/workflow-automation.md +163 -0
- package/bundled-skills/apk-redteam-pipeline/SKILL.md +446 -0
- package/bundled-skills/architecture-review/README.md +42 -0
- package/bundled-skills/architecture-review/SKILL.md +77 -0
- package/bundled-skills/architecture-review/examples.md +11 -0
- package/bundled-skills/architecture-review/reference/best-practices.md +7 -0
- package/bundled-skills/architecture-review/reference/capabilities.md +20 -0
- package/bundled-skills/architecture-review/reference/fallbacks.md +11 -0
- package/bundled-skills/architecture-review/reference/graph.md +15 -0
- package/bundled-skills/architecture-review/reference/mcp.md +14 -0
- package/bundled-skills/architecture-review/reference/workflow.md +15 -0
- package/bundled-skills/architecture-review/templates/architecture-review.md +21 -0
- package/bundled-skills/argocd-gitops/SKILL.md +469 -0
- package/bundled-skills/arm-templates/SKILL.md +438 -0
- package/bundled-skills/arm-templates/references/details.md +64 -0
- package/bundled-skills/asset-inventory/SKILL.md +412 -0
- package/bundled-skills/asset-inventory/references/details.md +127 -0
- package/bundled-skills/audit-logging/SKILL.md +476 -0
- package/bundled-skills/aws-cloudtrail/SKILL.md +486 -0
- package/bundled-skills/aws-cost-optimization/SKILL.md +331 -0
- package/bundled-skills/aws-ec2/SKILL.md +426 -0
- package/bundled-skills/aws-ecs-fargate/SKILL.md +388 -0
- package/bundled-skills/aws-iam/SKILL.md +463 -0
- package/bundled-skills/aws-lambda/SKILL.md +428 -0
- package/bundled-skills/aws-rds/SKILL.md +380 -0
- package/bundled-skills/aws-s3/SKILL.md +434 -0
- package/bundled-skills/aws-secrets-manager/SKILL.md +486 -0
- package/bundled-skills/aws-vpc/SKILL.md +436 -0
- package/bundled-skills/azure-ai-document-intelligence-ts/SKILL.md +1 -1
- package/bundled-skills/azure-aks/SKILL.md +423 -0
- package/bundled-skills/azure-devops/SKILL.md +457 -0
- package/bundled-skills/azure-functions-devsec/SKILL.md +436 -0
- package/bundled-skills/azure-keyvault/SKILL.md +455 -0
- package/bundled-skills/azure-keyvault/references/details.md +83 -0
- package/bundled-skills/azure-monitor-audit/SKILL.md +379 -0
- package/bundled-skills/azure-networking/SKILL.md +448 -0
- package/bundled-skills/azure-networking/references/details.md +135 -0
- package/bundled-skills/azure-sql/SKILL.md +413 -0
- package/bundled-skills/azure-sql/references/details.md +113 -0
- package/bundled-skills/azure-vms/SKILL.md +402 -0
- package/bundled-skills/azure-vms/references/details.md +134 -0
- package/bundled-skills/backup-recovery/SKILL.md +388 -0
- package/bundled-skills/bb-methodology/SKILL.md +451 -0
- package/bundled-skills/bb-methodology/references/details.md +120 -0
- package/bundled-skills/block-storage/SKILL.md +371 -0
- package/bundled-skills/blue-green-deploy/SKILL.md +453 -0
- package/bundled-skills/blue-green-deploy/references/details.md +90 -0
- package/bundled-skills/bug-bounty/SKILL.md +447 -0
- package/bundled-skills/bug-bounty/references/details.md +1316 -0
- package/bundled-skills/bugcrowd-reporting/SKILL.md +351 -0
- package/bundled-skills/business-continuity/SKILL.md +463 -0
- package/bundled-skills/career-ops/SKILL.md +186 -0
- package/bundled-skills/cdn-setup/SKILL.md +374 -0
- package/bundled-skills/change-management/SKILL.md +438 -0
- package/bundled-skills/change-management/references/details.md +105 -0
- package/bundled-skills/circleci/SKILL.md +475 -0
- package/bundled-skills/cis-benchmarks/SKILL.md +150 -0
- package/bundled-skills/cloudflare-pages/SKILL.md +318 -0
- package/bundled-skills/cloudflare-r2/SKILL.md +353 -0
- package/bundled-skills/cloudflare-workers/SKILL.md +415 -0
- package/bundled-skills/cloudflare-zero-trust/SKILL.md +361 -0
- package/bundled-skills/cloudformation/SKILL.md +461 -0
- package/bundled-skills/code-review-sensei/SKILL.md +177 -0
- package/bundled-skills/codebase-onboarding/README.md +42 -0
- package/bundled-skills/codebase-onboarding/SKILL.md +77 -0
- package/bundled-skills/codebase-onboarding/examples.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/best-practices.md +7 -0
- package/bundled-skills/codebase-onboarding/reference/capabilities.md +20 -0
- package/bundled-skills/codebase-onboarding/reference/fallbacks.md +11 -0
- package/bundled-skills/codebase-onboarding/reference/graph.md +15 -0
- package/bundled-skills/codebase-onboarding/reference/mcp.md +14 -0
- package/bundled-skills/codebase-onboarding/reference/workflow.md +15 -0
- package/bundled-skills/codebase-onboarding/templates/repository-onboarding.md +21 -0
- package/bundled-skills/connection-auth-rules/SKILL.md +199 -0
- package/bundled-skills/connection-auth-rules/fetch_schema.py +320 -0
- package/bundled-skills/constraint-driven-development/SKILL.md +335 -0
- package/bundled-skills/constraint-driven-development/references/floor-guard.md +99 -0
- package/bundled-skills/container-hardening/SKILL.md +126 -0
- package/bundled-skills/container-registries/SKILL.md +435 -0
- package/bundled-skills/container-scanning/SKILL.md +416 -0
- package/bundled-skills/convex-backend/SKILL.md +338 -0
- package/bundled-skills/dast-scanning/SKILL.md +437 -0
- package/bundled-skills/database-backups/SKILL.md +425 -0
- package/bundled-skills/datadog/SKILL.md +487 -0
- package/bundled-skills/dependency-analysis/README.md +42 -0
- package/bundled-skills/dependency-analysis/SKILL.md +76 -0
- package/bundled-skills/dependency-analysis/examples.md +11 -0
- package/bundled-skills/dependency-analysis/reference/best-practices.md +7 -0
- package/bundled-skills/dependency-analysis/reference/capabilities.md +20 -0
- package/bundled-skills/dependency-analysis/reference/fallbacks.md +11 -0
- package/bundled-skills/dependency-analysis/reference/graph.md +15 -0
- package/bundled-skills/dependency-analysis/reference/mcp.md +14 -0
- package/bundled-skills/dependency-analysis/reference/workflow.md +15 -0
- package/bundled-skills/dependency-analysis/templates/dependency-review.md +21 -0
- package/bundled-skills/dependency-scanning/SKILL.md +457 -0
- package/bundled-skills/devcontainers-nix/SKILL.md +416 -0
- package/bundled-skills/devops-pipeline-builder/SKILL.md +200 -0
- package/bundled-skills/disaster-recovery/SKILL.md +374 -0
- package/bundled-skills/disaster-recovery/references/details.md +219 -0
- package/bundled-skills/dns-management/SKILL.md +375 -0
- package/bundled-skills/docker-compose/SKILL.md +482 -0
- package/bundled-skills/docker-management/SKILL.md +426 -0
- package/bundled-skills/eas-app-stores/SKILL.md +197 -0
- package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
- package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
- package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
- package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
- package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
- package/bundled-skills/eas-hosting/SKILL.md +448 -0
- package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/SKILL.md +75 -0
- package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/references/metrics.md +98 -0
- package/bundled-skills/eas-observe/references/queries.md +403 -0
- package/bundled-skills/eas-observe/references/setup.md +476 -0
- package/bundled-skills/eas-observe/references/third-party.md +136 -0
- package/bundled-skills/eas-simulator/SKILL.md +251 -0
- package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
- package/bundled-skills/eas-simulator/references/controllers.md +135 -0
- package/bundled-skills/eas-simulator/references/run-your-app.md +240 -0
- package/bundled-skills/eas-simulator/references/troubleshooting.md +47 -0
- package/bundled-skills/eas-workflows/SKILL.md +119 -0
- package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
- package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
- package/bundled-skills/ebpf-observability/SKILL.md +436 -0
- package/bundled-skills/ebpf-observability/references/details.md +542 -0
- package/bundled-skills/elk-stack/SKILL.md +487 -0
- package/bundled-skills/enterprise-vpn-attack/SKILL.md +395 -0
- package/bundled-skills/evidence-hygiene/SKILL.md +404 -0
- package/bundled-skills/expo-animation/LICENSE +21 -0
- package/bundled-skills/expo-animation/RECIPES.md +385 -0
- package/bundled-skills/expo-animation/SKILL.md +295 -0
- package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/SKILL.md +178 -0
- package/bundled-skills/fact-check-x-unified/agents/openai.yaml +4 -0
- package/bundled-skills/fact-check-x-unified/references/acceptance-criteria.md +44 -0
- package/bundled-skills/fact-check-x-unified/references/contracts.md +39 -0
- package/bundled-skills/fact-check-x-unified/scripts/common.py +31 -0
- package/bundled-skills/fact-check-x-unified/scripts/fact_check_x.py +1832 -0
- package/bundled-skills/fact-check-x-unified/scripts/trusted_search_config.py +324 -0
- package/bundled-skills/fact-check-x-unified/tests/anchor_downgrade_test.py +90 -0
- package/bundled-skills/fact-check-x-unified/tests/multi_platform_test.py +369 -0
- package/bundled-skills/fact-check-x-unified/tests/smoke_test.py +740 -0
- package/bundled-skills/fact-check-x-unified/tests/stage_checkpoint_test.py +103 -0
- package/bundled-skills/fact-check-x-unified/tests/trusted_search_config_test.py +156 -0
- package/bundled-skills/feature-flags/SKILL.md +426 -0
- package/bundled-skills/feature-flags/references/details.md +86 -0
- package/bundled-skills/fedramp-compliance/SKILL.md +453 -0
- package/bundled-skills/firebase-app-platform/SKILL.md +381 -0
- package/bundled-skills/firewall-config/SKILL.md +479 -0
- package/bundled-skills/gcp-audit-logs/SKILL.md +452 -0
- package/bundled-skills/gcp-audit-logs/references/details.md +56 -0
- package/bundled-skills/gcp-cloud-functions/SKILL.md +284 -0
- package/bundled-skills/gcp-cloud-sql/SKILL.md +277 -0
- package/bundled-skills/gcp-compute/SKILL.md +319 -0
- package/bundled-skills/gcp-gke/SKILL.md +307 -0
- package/bundled-skills/gcp-networking/SKILL.md +293 -0
- package/bundled-skills/gcp-secret-manager/SKILL.md +421 -0
- package/bundled-skills/gcp-secret-manager/references/details.md +131 -0
- package/bundled-skills/gdpr-compliance/SKILL.md +451 -0
- package/bundled-skills/gdpr-compliance/references/details.md +145 -0
- package/bundled-skills/geo-audit/SKILL.md +368 -0
- package/bundled-skills/geo-brand-mentions/SKILL.md +68 -0
- package/bundled-skills/geo-brand-mentions/references/details.md +471 -0
- package/bundled-skills/geo-citability/SKILL.md +350 -0
- package/bundled-skills/geo-compare/SKILL.md +340 -0
- package/bundled-skills/geo-content/SKILL.md +383 -0
- package/bundled-skills/geo-crawlers/SKILL.md +408 -0
- package/bundled-skills/geo-llmstxt/SKILL.md +464 -0
- package/bundled-skills/geo-platform-optimizer/SKILL.md +314 -0
- package/bundled-skills/geo-proposal/SKILL.md +378 -0
- package/bundled-skills/geo-prospect/SKILL.md +225 -0
- package/bundled-skills/geo-report/SKILL.md +436 -0
- package/bundled-skills/geo-report-pdf/SKILL.md +157 -0
- package/bundled-skills/geo-schema/SKILL.md +408 -0
- package/bundled-skills/geo-technical/SKILL.md +78 -0
- package/bundled-skills/geo-technical/references/details.md +543 -0
- package/bundled-skills/git-workflow/SKILL.md +460 -0
- package/bundled-skills/github-actions/SKILL.md +368 -0
- package/bundled-skills/gitlab-ci/SKILL.md +340 -0
- package/bundled-skills/gpt-taste/SKILL.md +8 -1
- package/bundled-skills/gpu-kubernetes-operations/SKILL.md +468 -0
- package/bundled-skills/gpu-server-management/SKILL.md +236 -0
- package/bundled-skills/hashicorp-vault/SKILL.md +408 -0
- package/bundled-skills/helm-charts/SKILL.md +469 -0
- package/bundled-skills/hf-cli/SKILL.md +263 -0
- package/bundled-skills/hipaa-compliance/SKILL.md +451 -0
- package/bundled-skills/huggingface-community-evals/SKILL.md +228 -0
- package/bundled-skills/huggingface-community-evals/examples/.env.example +3 -0
- package/bundled-skills/huggingface-community-evals/examples/USAGE_EXAMPLES.md +101 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_eval_uv.py +104 -0
- package/bundled-skills/huggingface-community-evals/scripts/inspect_vllm_uv.py +306 -0
- package/bundled-skills/huggingface-community-evals/scripts/lighteval_vllm_uv.py +297 -0
- package/bundled-skills/huggingface-datasets/SKILL.md +130 -0
- package/bundled-skills/hunt-aspnet/SKILL.md +321 -0
- package/bundled-skills/hunt-ato/SKILL.md +184 -0
- package/bundled-skills/hunt-auth-bypass/SKILL.md +426 -0
- package/bundled-skills/hunt-auth-bypass/references/details.md +80 -0
- package/bundled-skills/hunt-brute-force/SKILL.md +341 -0
- package/bundled-skills/hunt-business-logic/SKILL.md +281 -0
- package/bundled-skills/hunt-cache-poison/SKILL.md +382 -0
- package/bundled-skills/hunt-captcha-bypass/SKILL.md +136 -0
- package/bundled-skills/hunt-cicd/SKILL.md +311 -0
- package/bundled-skills/hunt-clickjacking/SKILL.md +110 -0
- package/bundled-skills/hunt-cors/SKILL.md +335 -0
- package/bundled-skills/hunt-dom/SKILL.md +323 -0
- package/bundled-skills/hunt-exceptional-conditions/SKILL.md +111 -0
- package/bundled-skills/hunt-file-upload/SKILL.md +202 -0
- package/bundled-skills/hunt-fintech-graphql/SKILL.md +289 -0
- package/bundled-skills/hunt-forgot-password/SKILL.md +114 -0
- package/bundled-skills/hunt-grpc/SKILL.md +317 -0
- package/bundled-skills/hunt-host-header/SKILL.md +309 -0
- package/bundled-skills/hunt-html-injection/SKILL.md +106 -0
- package/bundled-skills/hunt-http-smuggling/SKILL.md +129 -0
- package/bundled-skills/hunt-http-smuggling/references/phase2h-smuggling-cachepoison.md +177 -0
- package/bundled-skills/hunt-idor/SKILL.md +434 -0
- package/bundled-skills/hunt-jwt-crypto/SKILL.md +221 -0
- package/bundled-skills/hunt-k8s/SKILL.md +337 -0
- package/bundled-skills/hunt-laravel/SKILL.md +255 -0
- package/bundled-skills/hunt-ldap/SKILL.md +351 -0
- package/bundled-skills/hunt-lfi/SKILL.md +311 -0
- package/bundled-skills/hunt-llm-ai/SKILL.md +289 -0
- package/bundled-skills/hunt-mfa-bypass/SKILL.md +177 -0
- package/bundled-skills/hunt-misc/SKILL.md +378 -0
- package/bundled-skills/hunt-nextjs/SKILL.md +299 -0
- package/bundled-skills/hunt-nodejs/SKILL.md +263 -0
- package/bundled-skills/hunt-nosqli/SKILL.md +210 -0
- package/bundled-skills/hunt-ntlm-info/SKILL.md +314 -0
- package/bundled-skills/hunt-oauth/SKILL.md +459 -0
- package/bundled-skills/hunt-open-redirect/SKILL.md +223 -0
- package/bundled-skills/hunt-race-condition/SKILL.md +381 -0
- package/bundled-skills/hunt-race-condition/references/details.md +159 -0
- package/bundled-skills/hunt-rag-vector/SKILL.md +212 -0
- package/bundled-skills/hunt-rce/SKILL.md +444 -0
- package/bundled-skills/hunt-rce/references/details.md +110 -0
- package/bundled-skills/hunt-saml/SKILL.md +156 -0
- package/bundled-skills/hunt-session/SKILL.md +342 -0
- package/bundled-skills/hunt-shadow-api/SKILL.md +198 -0
- package/bundled-skills/hunt-source-leak/SKILL.md +345 -0
- package/bundled-skills/hunt-spa-api/SKILL.md +163 -0
- package/bundled-skills/hunt-springboot/SKILL.md +285 -0
- package/bundled-skills/hunt-sqli/SKILL.md +466 -0
- package/bundled-skills/hunt-ssrf/SKILL.md +396 -0
- package/bundled-skills/hunt-ssrf/references/details.md +179 -0
- package/bundled-skills/hunt-ssti/SKILL.md +163 -0
- package/bundled-skills/hunt-subdomain/SKILL.md +379 -0
- package/bundled-skills/hunt-tls-network/SKILL.md +399 -0
- package/bundled-skills/hunt-xxe/SKILL.md +466 -0
- package/bundled-skills/i-have-adhd/SKILL.md +170 -0
- package/bundled-skills/identity-access-management/SKILL.md +382 -0
- package/bundled-skills/identity-access-management/references/details.md +524 -0
- package/bundled-skills/incident-management/SKILL.md +484 -0
- package/bundled-skills/incident-response/SKILL.md +448 -0
- package/bundled-skills/incident-response/references/details.md +113 -0
- package/bundled-skills/interview-me/SKILL.md +248 -0
- package/bundled-skills/iso27001-compliance/SKILL.md +460 -0
- package/bundled-skills/jenkins/SKILL.md +462 -0
- package/bundled-skills/jev-social/SKILL.md +182 -0
- package/bundled-skills/jev-use/SKILL.md +158 -0
- package/bundled-skills/kubernetes-hardening/SKILL.md +154 -0
- package/bundled-skills/kubernetes-ops/SKILL.md +449 -0
- package/bundled-skills/kubernetes-ops/references/details.md +108 -0
- package/bundled-skills/kustomize/SKILL.md +478 -0
- package/bundled-skills/linux-administration/SKILL.md +367 -0
- package/bundled-skills/linux-hardening/SKILL.md +154 -0
- package/bundled-skills/llm-app-security/SKILL.md +389 -0
- package/bundled-skills/llm-app-security/references/details.md +674 -0
- package/bundled-skills/llm-caching/SKILL.md +334 -0
- package/bundled-skills/llm-cost-optimization/SKILL.md +311 -0
- package/bundled-skills/llm-fine-tuning/SKILL.md +329 -0
- package/bundled-skills/llm-gateway/SKILL.md +282 -0
- package/bundled-skills/llm-inference-scaling/SKILL.md +286 -0
- package/bundled-skills/llmops-platform-engineering/SKILL.md +472 -0
- package/bundled-skills/load-balancing/SKILL.md +403 -0
- package/bundled-skills/loki-logging/SKILL.md +479 -0
- package/bundled-skills/longbridge-derivatives/SKILL.md +117 -0
- package/bundled-skills/longbridge-derivatives/references/option.md +36 -0
- package/bundled-skills/longbridge-derivatives/references/options-advanced.md +101 -0
- package/bundled-skills/longbridge-derivatives/references/options-pnl.md +74 -0
- package/bundled-skills/longbridge-derivatives/references/options-strategy.md +82 -0
- package/bundled-skills/longbridge-derivatives/references/options-volatility.md +70 -0
- package/bundled-skills/longbridge-derivatives/references/warrant.md +12 -0
- package/bundled-skills/longbridge-quant/SKILL.md +151 -0
- package/bundled-skills/longbridge-quant/references/correlation.md +51 -0
- package/bundled-skills/longbridge-quant/references/execution-model.md +68 -0
- package/bundled-skills/longbridge-quant/references/factor-research.md +95 -0
- package/bundled-skills/longbridge-quant/references/factor-screen.md +101 -0
- package/bundled-skills/longbridge-quant/references/hedging.md +136 -0
- package/bundled-skills/longbridge-quant/references/ml-strategy.md +77 -0
- package/bundled-skills/longbridge-quant/references/multifactor.md +68 -0
- package/bundled-skills/longbridge-quant/references/pairs-trading.md +61 -0
- package/bundled-skills/longbridge-quant/references/quant-cli.md +133 -0
- package/bundled-skills/longbridge-quant/references/quant-stats.md +150 -0
- package/bundled-skills/longbridge-quant/references/seasonality.md +50 -0
- package/bundled-skills/longbridge-quant/references/strategy-optimizer.md +68 -0
- package/bundled-skills/longbridge-quant/references/volatility-strategy.md +52 -0
- package/bundled-skills/longbridge-research/SKILL.md +187 -0
- package/bundled-skills/longbridge-research/references/company-profile.md +96 -0
- package/bundled-skills/longbridge-research/references/company-tearsheet.md +82 -0
- package/bundled-skills/longbridge-research/references/competitive-analysis.md +81 -0
- package/bundled-skills/longbridge-research/references/consensus.md +92 -0
- package/bundled-skills/longbridge-research/references/coverage-initiation.md +76 -0
- package/bundled-skills/longbridge-research/references/defi-yield.md +60 -0
- package/bundled-skills/longbridge-research/references/finance-calendar.md +165 -0
- package/bundled-skills/longbridge-research/references/financial-planning.md +77 -0
- package/bundled-skills/longbridge-research/references/forecast-eps.md +39 -0
- package/bundled-skills/longbridge-research/references/fund-holder.md +44 -0
- package/bundled-skills/longbridge-research/references/hkipo-analysis.md +101 -0
- package/bundled-skills/longbridge-research/references/industry-peers.md +46 -0
- package/bundled-skills/longbridge-research/references/industry-rank.md +62 -0
- package/bundled-skills/longbridge-research/references/insider-trades.md +48 -0
- package/bundled-skills/longbridge-research/references/institution-rating.md +62 -0
- package/bundled-skills/longbridge-research/references/investment-ideas.md +69 -0
- package/bundled-skills/longbridge-research/references/investment-proposal.md +95 -0
- package/bundled-skills/longbridge-research/references/investors.md +87 -0
- package/bundled-skills/longbridge-research/references/onchain.md +70 -0
- package/bundled-skills/longbridge-research/references/post-investment.md +76 -0
- package/bundled-skills/longbridge-research/references/shareholder.md +72 -0
- package/bundled-skills/longbridge-research/references/short-positions.md +50 -0
- package/bundled-skills/longbridge-research/references/short-trades.md +50 -0
- package/bundled-skills/longbridge-research/references/stock-research.md +61 -0
- package/bundled-skills/longbridge-research/references/thesis-tracker.md +64 -0
- package/bundled-skills/m365-entra-attack/SKILL.md +423 -0
- package/bundled-skills/mac-mini-llm-lab/SKILL.md +350 -0
- package/bundled-skills/makepad-2-0-animation/SKILL.md +318 -0
- package/bundled-skills/makepad-2-0-animation/references/animator-reference.md +433 -0
- package/bundled-skills/makepad-2-0-dsl/SKILL.md +492 -0
- package/bundled-skills/makepad-2-0-dsl/references/dsl-syntax-reference.md +511 -0
- package/bundled-skills/makepad-2-0-dsl/references/extended-guide.md +56 -0
- package/bundled-skills/makepad-2-0-dsl/references/property-system.md +757 -0
- package/bundled-skills/makepad-2-0-events/SKILL.md +497 -0
- package/bundled-skills/makepad-2-0-events/references/event-patterns.md +802 -0
- package/bundled-skills/makepad-2-0-events/references/extended-guide.md +590 -0
- package/bundled-skills/makepad-2-0-layout/SKILL.md +499 -0
- package/bundled-skills/makepad-2-0-layout/references/extended-guide.md +243 -0
- package/bundled-skills/makepad-2-0-layout/references/layout-patterns.md +881 -0
- package/bundled-skills/makepad-2-0-widgets/SKILL.md +261 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-advanced.md +648 -0
- package/bundled-skills/makepad-2-0-widgets/references/widget-catalog.md +547 -0
- package/bundled-skills/mcp-server-security/SKILL.md +356 -0
- package/bundled-skills/mcp-server-security/references/details.md +745 -0
- package/bundled-skills/mdm-device-management/SKILL.md +404 -0
- package/bundled-skills/mdm-device-management/references/details.md +410 -0
- package/bundled-skills/meeting-distiller-pro/SKILL.md +120 -0
- package/bundled-skills/meme-coin-audit/SKILL.md +402 -0
- package/bundled-skills/mid-engagement-ir-detection/SKILL.md +377 -0
- package/bundled-skills/model-registry-governance/SKILL.md +452 -0
- package/bundled-skills/model-serving-kubernetes/SKILL.md +339 -0
- package/bundled-skills/model-supply-chain-security/SKILL.md +427 -0
- package/bundled-skills/mongodb/SKILL.md +436 -0
- package/bundled-skills/monte-carlo-analyze-root-cause/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-asset-health/SKILL.md +12 -1
- package/bundled-skills/monte-carlo-context-detection/SKILL.md +170 -0
- package/bundled-skills/monte-carlo-context-detection/references/signal-definitions.md +46 -0
- package/bundled-skills/multi-tenant-llm-hosting/SKILL.md +435 -0
- package/bundled-skills/multi-tenant-llm-hosting/references/details.md +211 -0
- package/bundled-skills/mysql/SKILL.md +390 -0
- package/bundled-skills/new-relic/SKILL.md +472 -0
- package/bundled-skills/nfs-storage/SKILL.md +356 -0
- package/bundled-skills/object-storage/SKILL.md +378 -0
- package/bundled-skills/offensive-osint/SKILL.md +443 -0
- package/bundled-skills/okta-attack/SKILL.md +436 -0
- package/bundled-skills/ollama-stack/SKILL.md +379 -0
- package/bundled-skills/openclaw-deployment-hardening/SKILL.md +135 -0
- package/bundled-skills/openclaw-local-mac-mini/SKILL.md +426 -0
- package/bundled-skills/openclaw-local-mac-mini/references/details.md +221 -0
- package/bundled-skills/openclaw-security-hardening/SKILL.md +135 -0
- package/bundled-skills/openshift/SKILL.md +485 -0
- package/bundled-skills/opentelemetry/SKILL.md +438 -0
- package/bundled-skills/opentelemetry/references/details.md +78 -0
- package/bundled-skills/opentofu-migration/SKILL.md +349 -0
- package/bundled-skills/osint-methodology/SKILL.md +460 -0
- package/bundled-skills/osint-methodology/references/details.md +1350 -0
- package/bundled-skills/pci-dss-compliance/SKILL.md +446 -0
- package/bundled-skills/penetration-testing/SKILL.md +152 -0
- package/bundled-skills/performance-tuning/SKILL.md +381 -0
- package/bundled-skills/planetscale/SKILL.md +297 -0
- package/bundled-skills/platform-engineering/SKILL.md +348 -0
- package/bundled-skills/platform-engineering/references/details.md +944 -0
- package/bundled-skills/podman/SKILL.md +405 -0
- package/bundled-skills/policy-as-code/SKILL.md +434 -0
- package/bundled-skills/policy-as-code/references/details.md +204 -0
- package/bundled-skills/postgresql-devsec/SKILL.md +378 -0
- package/bundled-skills/prometheus-grafana/SKILL.md +469 -0
- package/bundled-skills/prompt-injection-defense/SKILL.md +483 -0
- package/bundled-skills/rag-infrastructure/SKILL.md +269 -0
- package/bundled-skills/rag-observability-evals/SKILL.md +444 -0
- package/bundled-skills/rag-observability-evals/references/details.md +92 -0
- package/bundled-skills/recon-scope-triage/SKILL.md +128 -0
- package/bundled-skills/redis/SKILL.md +421 -0
- package/bundled-skills/redteam-report-template/SKILL.md +370 -0
- package/bundled-skills/remotion-captions/SKILL.md +57 -0
- package/bundled-skills/remotion-captions/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-captions/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-captions/display-captions.md +190 -0
- package/bundled-skills/remotion-captions/import-srt-captions.md +73 -0
- package/bundled-skills/remotion-captions/transcribe-captions.md +70 -0
- package/bundled-skills/remotion-create/SKILL.md +106 -0
- package/bundled-skills/remotion-create/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-create/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-create/tailwind.md +11 -0
- package/bundled-skills/remotion-create/video-layout.md +9 -0
- package/bundled-skills/remotion-docs/SKILL.md +67 -0
- package/bundled-skills/remotion-docs/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-docs/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-interactivity/SKILL.md +270 -0
- package/bundled-skills/remotion-interactivity/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-interactivity/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/SKILL.md +48 -0
- package/bundled-skills/remotion-render/agents/openai.yaml +7 -0
- package/bundled-skills/remotion-render/assets/remotion-icon.svg +4 -0
- package/bundled-skills/remotion-render/transparent-videos.md +106 -0
- package/bundled-skills/report-writing/SKILL.md +426 -0
- package/bundled-skills/report-writing/references/details.md +187 -0
- package/bundled-skills/reverse-proxy/SKILL.md +420 -0
- package/bundled-skills/runbook-creation/SKILL.md +438 -0
- package/bundled-skills/runbook-creation/references/details.md +71 -0
- package/bundled-skills/saas-pricing-strategist/SKILL.md +169 -0
- package/bundled-skills/saas-security-posture/SKILL.md +415 -0
- package/bundled-skills/sast-scanning/SKILL.md +444 -0
- package/bundled-skills/sbom-supply-chain/SKILL.md +433 -0
- package/bundled-skills/score-eval/SKILL.md +35 -0
- package/bundled-skills/security-arsenal/SKILL.md +446 -0
- package/bundled-skills/security-arsenal/references/details.md +540 -0
- package/bundled-skills/security-automation/SKILL.md +146 -0
- package/bundled-skills/semantic-versioning/SKILL.md +434 -0
- package/bundled-skills/semantic-versioning/references/details.md +83 -0
- package/bundled-skills/service-mesh/SKILL.md +422 -0
- package/bundled-skills/soc2-compliance/SKILL.md +409 -0
- package/bundled-skills/sops-encryption/SKILL.md +124 -0
- package/bundled-skills/sre-dashboards/SKILL.md +143 -0
- package/bundled-skills/ssh-configuration/SKILL.md +324 -0
- package/bundled-skills/ssl-tls-management/SKILL.md +428 -0
- package/bundled-skills/ssl-tls-management/references/details.md +99 -0
- package/bundled-skills/startup-it-troubleshooting/SKILL.md +415 -0
- package/bundled-skills/supply-chain-attack-recon/SKILL.md +453 -0
- package/bundled-skills/supply-chain-attack-recon/references/details.md +258 -0
- package/bundled-skills/systemd-services/SKILL.md +379 -0
- package/bundled-skills/terraform-aws/SKILL.md +125 -0
- package/bundled-skills/terraform-azure/SKILL.md +415 -0
- package/bundled-skills/terraform-azure/references/details.md +231 -0
- package/bundled-skills/terraform-gcp/SKILL.md +369 -0
- package/bundled-skills/threat-modeling/SKILL.md +487 -0
- package/bundled-skills/user-management/SKILL.md +383 -0
- package/bundled-skills/using-agent-skills/SKILL.md +220 -0
- package/bundled-skills/vector-database-ops/SKILL.md +300 -0
- package/bundled-skills/vendor-management/SKILL.md +439 -0
- package/bundled-skills/vendor-management/references/details.md +109 -0
- package/bundled-skills/vercel-deployments/SKILL.md +296 -0
- package/bundled-skills/vllm-server/SKILL.md +236 -0
- package/bundled-skills/vmware-vcenter-attack/SKILL.md +412 -0
- package/bundled-skills/vpn-setup/SKILL.md +452 -0
- package/bundled-skills/vulnerability-scanning/SKILL.md +448 -0
- package/bundled-skills/waf-setup/SKILL.md +354 -0
- package/bundled-skills/waf-setup/references/details.md +211 -0
- package/bundled-skills/web2-recon/SKILL.md +440 -0
- package/bundled-skills/web2-recon/references/details.md +319 -0
- package/bundled-skills/web3-audit/SKILL.md +445 -0
- package/bundled-skills/web3-audit/references/details.md +224 -0
- package/bundled-skills/windows-hardening/SKILL.md +454 -0
- package/bundled-skills/windows-hardening/references/details.md +204 -0
- package/bundled-skills/windows-server/SKILL.md +318 -0
- package/bundled-skills/writing-guidelines/SKILL.md +60 -0
- package/bundled-skills/zero-trust/SKILL.md +461 -0
- package/package.json +1 -1
- package/skills_index.json +7874 -277
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-fine-tuning
|
|
3
|
+
description: Set up infrastructure for fine-tuning LLMs with QLoRA, LoRA, and full
|
|
4
|
+
fine-tuning using Hugging Face TRL, Axolotl, and distributed training with DeepSpeed
|
|
5
|
+
or FSDP.
|
|
6
|
+
category: devops
|
|
7
|
+
risk: critical
|
|
8
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
10
|
+
source_type: community
|
|
11
|
+
date_added: '2026-09-20'
|
|
12
|
+
license: MIT
|
|
13
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
14
|
+
compatibility: Requires the relevant OS/platform tooling and privileged access where
|
|
15
|
+
noted. Docs-only; helper scripts and templates not bundled.
|
|
16
|
+
metadata:
|
|
17
|
+
author: devops-skills
|
|
18
|
+
version: '1.0'
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
# LLM Fine-Tuning Infrastructure
|
|
22
|
+
|
|
23
|
+
Train and fine-tune open-source LLMs efficiently — from LoRA on a single GPU to distributed full fine-tuning across multi-node clusters.
|
|
24
|
+
|
|
25
|
+
## When to Use This Skill
|
|
26
|
+
|
|
27
|
+
Use this skill when:
|
|
28
|
+
- Fine-tuning an LLM on domain-specific data (legal, medical, code, support)
|
|
29
|
+
- Running QLoRA to fine-tune 70B models on consumer GPUs
|
|
30
|
+
- Setting up distributed training with DeepSpeed or FSDP
|
|
31
|
+
- Exporting fine-tuned adapters for production serving
|
|
32
|
+
- Implementing RLHF, DPO, or instruction tuning pipelines
|
|
33
|
+
|
|
34
|
+
## Prerequisites
|
|
35
|
+
|
|
36
|
+
- NVIDIA GPU(s) with 24GB+ VRAM (RTX 4090 / A100 / H100)
|
|
37
|
+
- CUDA 12.1+ and `nvidia-smi` working
|
|
38
|
+
- Python 3.10+ with `pip`
|
|
39
|
+
- Hugging Face account and `HF_TOKEN` for gated models
|
|
40
|
+
- 500GB+ disk for model weights and training data
|
|
41
|
+
|
|
42
|
+
## Quick Start: QLoRA Fine-Tuning
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
pip install transformers datasets trl peft bitsandbytes accelerate
|
|
46
|
+
|
|
47
|
+
python - <<'EOF'
|
|
48
|
+
from datasets import load_dataset
|
|
49
|
+
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
|
|
50
|
+
from peft import LoraConfig, get_peft_model
|
|
51
|
+
from trl import SFTTrainer, SFTConfig
|
|
52
|
+
import torch
|
|
53
|
+
|
|
54
|
+
model_id = "meta-llama/Llama-3.1-8B-Instruct"
|
|
55
|
+
|
|
56
|
+
# 4-bit quantization (QLoRA)
|
|
57
|
+
bnb_config = BitsAndBytesConfig(
|
|
58
|
+
load_in_4bit=True,
|
|
59
|
+
bnb_4bit_quant_type="nf4",
|
|
60
|
+
bnb_4bit_compute_dtype=torch.bfloat16,
|
|
61
|
+
bnb_4bit_use_double_quant=True,
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
model = AutoModelForCausalLM.from_pretrained(
|
|
65
|
+
model_id, quantization_config=bnb_config, device_map="auto"
|
|
66
|
+
)
|
|
67
|
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
|
68
|
+
|
|
69
|
+
# LoRA configuration
|
|
70
|
+
peft_config = LoraConfig(
|
|
71
|
+
r=16, # rank
|
|
72
|
+
lora_alpha=32,
|
|
73
|
+
target_modules=["q_proj", "k_proj", "v_proj", "o_proj",
|
|
74
|
+
"gate_proj", "up_proj", "down_proj"],
|
|
75
|
+
lora_dropout=0.05,
|
|
76
|
+
bias="none",
|
|
77
|
+
task_type="CAUSAL_LM",
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
dataset = load_dataset("your-org/your-dataset", split="train")
|
|
81
|
+
|
|
82
|
+
trainer = SFTTrainer(
|
|
83
|
+
model=model,
|
|
84
|
+
args=SFTConfig(
|
|
85
|
+
output_dir="./output",
|
|
86
|
+
num_train_epochs=3,
|
|
87
|
+
per_device_train_batch_size=2,
|
|
88
|
+
gradient_accumulation_steps=8,
|
|
89
|
+
learning_rate=2e-4,
|
|
90
|
+
bf16=True,
|
|
91
|
+
logging_steps=10,
|
|
92
|
+
save_strategy="epoch",
|
|
93
|
+
report_to="wandb",
|
|
94
|
+
),
|
|
95
|
+
train_dataset=dataset,
|
|
96
|
+
peft_config=peft_config,
|
|
97
|
+
processing_class=tokenizer,
|
|
98
|
+
)
|
|
99
|
+
trainer.train()
|
|
100
|
+
trainer.save_model("./fine-tuned-model")
|
|
101
|
+
EOF
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Axolotl (Production Fine-Tuning Framework)
|
|
105
|
+
|
|
106
|
+
```yaml
|
|
107
|
+
# config.yaml — Axolotl QLoRA config for Llama 3.1
|
|
108
|
+
base_model: meta-llama/Llama-3.1-8B-Instruct
|
|
109
|
+
model_type: LlamaForCausalLM
|
|
110
|
+
tokenizer_type: PreTrainedTokenizerFast
|
|
111
|
+
|
|
112
|
+
load_in_4bit: true
|
|
113
|
+
adapter: qlora
|
|
114
|
+
lora_r: 32
|
|
115
|
+
lora_alpha: 64
|
|
116
|
+
lora_dropout: 0.05
|
|
117
|
+
lora_target_modules:
|
|
118
|
+
- q_proj
|
|
119
|
+
- k_proj
|
|
120
|
+
- v_proj
|
|
121
|
+
- o_proj
|
|
122
|
+
- gate_proj
|
|
123
|
+
- up_proj
|
|
124
|
+
- down_proj
|
|
125
|
+
|
|
126
|
+
datasets:
|
|
127
|
+
- path: your-org/your-dataset
|
|
128
|
+
type: alpaca # or sharegpt, chat_template, etc.
|
|
129
|
+
|
|
130
|
+
dataset_prepared_path: ./prepared-data
|
|
131
|
+
val_set_size: 0.05
|
|
132
|
+
output_dir: ./output
|
|
133
|
+
|
|
134
|
+
sequence_len: 4096
|
|
135
|
+
sample_packing: true # pack multiple short samples for efficiency
|
|
136
|
+
|
|
137
|
+
micro_batch_size: 2
|
|
138
|
+
gradient_accumulation_steps: 8
|
|
139
|
+
num_epochs: 3
|
|
140
|
+
learning_rate: 2e-4
|
|
141
|
+
optimizer: adamw_bnb_8bit
|
|
142
|
+
lr_scheduler: cosine
|
|
143
|
+
warmup_ratio: 0.05
|
|
144
|
+
|
|
145
|
+
bf16: true
|
|
146
|
+
flash_attention: true
|
|
147
|
+
|
|
148
|
+
logging_steps: 10
|
|
149
|
+
eval_steps: 100
|
|
150
|
+
save_steps: 200
|
|
151
|
+
wandb_project: my-fine-tune
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Run with Axolotl
|
|
156
|
+
pip install axolotl[flash-attn,deepspeed]
|
|
157
|
+
accelerate launch -m axolotl.cli.train config.yaml
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Distributed Training with DeepSpeed
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
// deepspeed_zero3.json — ZeRO Stage 3 (split optimizer + gradients + params)
|
|
164
|
+
{
|
|
165
|
+
"zero_optimization": {
|
|
166
|
+
"stage": 3,
|
|
167
|
+
"offload_optimizer": {"device": "cpu", "pin_memory": true},
|
|
168
|
+
"offload_param": {"device": "cpu", "pin_memory": true},
|
|
169
|
+
"overlap_comm": true,
|
|
170
|
+
"contiguous_gradients": true,
|
|
171
|
+
"sub_group_size": 1e9,
|
|
172
|
+
"reduce_bucket_size": "auto",
|
|
173
|
+
"stage3_prefetch_bucket_size": "auto",
|
|
174
|
+
"stage3_param_persistence_threshold": "auto",
|
|
175
|
+
"stage3_max_live_parameters": 1e9,
|
|
176
|
+
"stage3_max_reuse_distance": 1e9,
|
|
177
|
+
"gather_16bit_weights_on_model_save": true
|
|
178
|
+
},
|
|
179
|
+
"bf16": {"enabled": true},
|
|
180
|
+
"gradient_clipping": 1.0,
|
|
181
|
+
"train_batch_size": "auto",
|
|
182
|
+
"train_micro_batch_size_per_gpu": "auto"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
# Launch 4-GPU DeepSpeed training
|
|
188
|
+
deepspeed --num_gpus=4 train.py \
|
|
189
|
+
--deepspeed deepspeed_zero3.json \
|
|
190
|
+
--model_name meta-llama/Llama-3.1-70B-Instruct \
|
|
191
|
+
--output_dir ./output
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## DPO / RLHF Alignment
|
|
195
|
+
|
|
196
|
+
```python
|
|
197
|
+
from trl import DPOTrainer, DPOConfig
|
|
198
|
+
from datasets import load_dataset
|
|
199
|
+
|
|
200
|
+
# Dataset format: {"prompt": ..., "chosen": ..., "rejected": ...}
|
|
201
|
+
dataset = load_dataset("your-org/preference-data")
|
|
202
|
+
|
|
203
|
+
trainer = DPOTrainer(
|
|
204
|
+
model=model,
|
|
205
|
+
ref_model=None, # None = implicit reference with peft
|
|
206
|
+
args=DPOConfig(
|
|
207
|
+
output_dir="./dpo-output",
|
|
208
|
+
beta=0.1, # KL divergence weight
|
|
209
|
+
num_train_epochs=1,
|
|
210
|
+
per_device_train_batch_size=1,
|
|
211
|
+
gradient_accumulation_steps=16,
|
|
212
|
+
learning_rate=5e-7,
|
|
213
|
+
bf16=True,
|
|
214
|
+
),
|
|
215
|
+
train_dataset=dataset["train"],
|
|
216
|
+
peft_config=peft_config,
|
|
217
|
+
processing_class=tokenizer,
|
|
218
|
+
)
|
|
219
|
+
trainer.train()
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
## Merging LoRA Adapters for Deployment
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
from peft import PeftModel
|
|
226
|
+
from transformers import AutoModelForCausalLM
|
|
227
|
+
|
|
228
|
+
# Load base model in full precision
|
|
229
|
+
base_model = AutoModelForCausalLM.from_pretrained(
|
|
230
|
+
"meta-llama/Llama-3.1-8B-Instruct",
|
|
231
|
+
torch_dtype=torch.bfloat16,
|
|
232
|
+
device_map="cpu",
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
# Load and merge LoRA adapter
|
|
236
|
+
model = PeftModel.from_pretrained(base_model, "./fine-tuned-model")
|
|
237
|
+
merged_model = model.merge_and_unload()
|
|
238
|
+
|
|
239
|
+
# Save merged model (ready for vLLM serving)
|
|
240
|
+
merged_model.save_pretrained("./merged-model", safe_serialization=True)
|
|
241
|
+
tokenizer.save_pretrained("./merged-model")
|
|
242
|
+
|
|
243
|
+
# Push to Hugging Face Hub
|
|
244
|
+
merged_model.push_to_hub("your-org/your-fine-tuned-model")
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
## Kubernetes Training Job
|
|
248
|
+
|
|
249
|
+
```yaml
|
|
250
|
+
apiVersion: batch/v1
|
|
251
|
+
kind: Job
|
|
252
|
+
metadata:
|
|
253
|
+
name: llm-fine-tune
|
|
254
|
+
spec:
|
|
255
|
+
template:
|
|
256
|
+
spec:
|
|
257
|
+
restartPolicy: OnFailure
|
|
258
|
+
nodeSelector:
|
|
259
|
+
nvidia.com/gpu.product: A100-SXM4-80GB
|
|
260
|
+
containers:
|
|
261
|
+
- name: trainer
|
|
262
|
+
image: nvcr.io/nvidia/pytorch:24.05-py3
|
|
263
|
+
command: ["accelerate", "launch", "-m", "axolotl.cli.train", "/config/config.yaml"]
|
|
264
|
+
resources:
|
|
265
|
+
limits:
|
|
266
|
+
nvidia.com/gpu: "4"
|
|
267
|
+
memory: "320Gi"
|
|
268
|
+
requests:
|
|
269
|
+
nvidia.com/gpu: "4"
|
|
270
|
+
volumeMounts:
|
|
271
|
+
- name: config
|
|
272
|
+
mountPath: /config
|
|
273
|
+
- name: model-cache
|
|
274
|
+
mountPath: /root/.cache/huggingface
|
|
275
|
+
- name: output
|
|
276
|
+
mountPath: /output
|
|
277
|
+
env:
|
|
278
|
+
- name: HUGGING_FACE_HUB_TOKEN
|
|
279
|
+
valueFrom:
|
|
280
|
+
secretKeyRef:
|
|
281
|
+
name: hf-token
|
|
282
|
+
key: token
|
|
283
|
+
- name: WANDB_API_KEY
|
|
284
|
+
valueFrom:
|
|
285
|
+
secretKeyRef:
|
|
286
|
+
name: wandb-token
|
|
287
|
+
key: key
|
|
288
|
+
volumes:
|
|
289
|
+
- name: config
|
|
290
|
+
configMap:
|
|
291
|
+
name: axolotl-config
|
|
292
|
+
- name: model-cache
|
|
293
|
+
persistentVolumeClaim:
|
|
294
|
+
claimName: model-cache-pvc
|
|
295
|
+
- name: output
|
|
296
|
+
persistentVolumeClaim:
|
|
297
|
+
claimName: training-output-pvc
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
## Common Issues
|
|
301
|
+
|
|
302
|
+
| Issue | Cause | Fix |
|
|
303
|
+
|-------|-------|-----|
|
|
304
|
+
| `CUDA out of memory` | Batch too large | Reduce `micro_batch_size`; increase `gradient_accumulation_steps` |
|
|
305
|
+
| Training loss NaN | Learning rate too high | Lower LR to `1e-4` or `5e-5`; add warmup |
|
|
306
|
+
| Slow training | No Flash Attention | Install `flash-attn`; enable `flash_attention: true` |
|
|
307
|
+
| Poor fine-tune quality | Bad data formatting | Validate dataset format; check `sample_packing` compatibility |
|
|
308
|
+
| Adapter merge errors | Mixed quantization | Merge in bf16 on CPU, not in 4-bit |
|
|
309
|
+
|
|
310
|
+
## Best Practices
|
|
311
|
+
|
|
312
|
+
- Use Flash Attention 2 — it's 2–4× faster and uses less memory.
|
|
313
|
+
- Monitor training loss/eval loss via W&B or MLflow; overfit = more dropout or less data.
|
|
314
|
+
- Validate with a held-out eval set (5–10%); MMLU or custom evals for quality gates.
|
|
315
|
+
- Start with LoRA r=16 before increasing — higher rank = more parameters, diminishing returns.
|
|
316
|
+
- Use `sample_packing` in Axolotl to maximize GPU utilization on short sequences.
|
|
317
|
+
|
|
318
|
+
## Related Skills
|
|
319
|
+
|
|
320
|
+
- vllm-server (`vllm-server`) - Serve fine-tuned models
|
|
321
|
+
- gpu-server-management (`gpu-server-management`) - GPU setup
|
|
322
|
+
- llm-inference-scaling (`llm-inference-scaling`) - Deploy at scale
|
|
323
|
+
- ai-pipeline-orchestration (`ai-pipeline-orchestration`) - Training pipelines
|
|
324
|
+
|
|
325
|
+
## Limitations
|
|
326
|
+
|
|
327
|
+
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
|
|
328
|
+
- Docs-only import: upstream scripts and templates not bundled.
|
|
329
|
+
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: llm-gateway
|
|
3
|
+
description: Deploy an API gateway for LLM traffic with load balancing, rate limiting,
|
|
4
|
+
key management, semantic caching, fallback routing, and cost tracking.
|
|
5
|
+
category: devops
|
|
6
|
+
risk: critical
|
|
7
|
+
source: https://github.com/BagelHole/DevOps-Security-Agent-Skills
|
|
8
|
+
source_repo: BagelHole/DevOps-Security-Agent-Skills
|
|
9
|
+
source_type: community
|
|
10
|
+
date_added: '2026-09-20'
|
|
11
|
+
license: MIT
|
|
12
|
+
license_source: https://github.com/BagelHole/DevOps-Security-Agent-Skills/blob/main/LICENSE
|
|
13
|
+
compatibility: Requires the relevant OS/platform tooling and privileged access where
|
|
14
|
+
noted. Docs-only; helper scripts and templates not bundled.
|
|
15
|
+
metadata:
|
|
16
|
+
author: devops-skills
|
|
17
|
+
version: '1.0'
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
# LLM Gateway
|
|
21
|
+
|
|
22
|
+
A unified API gateway that routes LLM requests across providers and self-hosted models — with rate limiting, cost tracking, caching, and failover.
|
|
23
|
+
|
|
24
|
+
## When to Use This Skill
|
|
25
|
+
|
|
26
|
+
Use this skill when:
|
|
27
|
+
- Running multiple LLM backends (OpenAI, Anthropic, vLLM, Ollama) behind a single endpoint
|
|
28
|
+
- Enforcing per-team or per-user rate limits and spend budgets
|
|
29
|
+
- Implementing automatic fallback when a provider is down
|
|
30
|
+
- Adding semantic caching to reduce API costs by 20–50%
|
|
31
|
+
- Centralizing API key management instead of distributing keys to every app
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
- Docker and Docker Compose
|
|
36
|
+
- A PostgreSQL or SQLite database (for LiteLLM state)
|
|
37
|
+
- LLM API keys (OpenAI, Anthropic, etc.) or self-hosted vLLM endpoints
|
|
38
|
+
- Optional: Redis for caching and rate limiting
|
|
39
|
+
|
|
40
|
+
## LiteLLM Proxy — Quick Start
|
|
41
|
+
|
|
42
|
+
LiteLLM is the de facto open-source LLM gateway with OpenAI-compatible API.
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Run with Docker
|
|
46
|
+
docker run -d \
|
|
47
|
+
--name litellm-proxy \
|
|
48
|
+
-p 4000:4000 \
|
|
49
|
+
-e OPENAI_API_KEY=$OPENAI_API_KEY \
|
|
50
|
+
-e ANTHROPIC_API_KEY=$ANTHROPIC_API_KEY \
|
|
51
|
+
-v $(pwd)/litellm-config.yaml:/app/config.yaml \
|
|
52
|
+
ghcr.io/berriai/litellm:main-latest \
|
|
53
|
+
--config /app/config.yaml \
|
|
54
|
+
--detailed_debug
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
## LiteLLM Configuration
|
|
58
|
+
|
|
59
|
+
```yaml
|
|
60
|
+
# litellm-config.yaml
|
|
61
|
+
model_list:
|
|
62
|
+
# OpenAI models
|
|
63
|
+
- model_name: gpt-4o
|
|
64
|
+
litellm_params:
|
|
65
|
+
model: openai/gpt-4o
|
|
66
|
+
api_key: os.environ/OPENAI_API_KEY
|
|
67
|
+
rpm: 10000
|
|
68
|
+
tpm: 2000000
|
|
69
|
+
|
|
70
|
+
- model_name: gpt-4o-mini
|
|
71
|
+
litellm_params:
|
|
72
|
+
model: openai/gpt-4o-mini
|
|
73
|
+
api_key: os.environ/OPENAI_API_KEY
|
|
74
|
+
|
|
75
|
+
# Anthropic
|
|
76
|
+
- model_name: claude-sonnet-4-6
|
|
77
|
+
litellm_params:
|
|
78
|
+
model: anthropic/claude-sonnet-4-6
|
|
79
|
+
api_key: os.environ/ANTHROPIC_API_KEY
|
|
80
|
+
|
|
81
|
+
# Self-hosted vLLM instances (load balanced)
|
|
82
|
+
- model_name: llama-3.1-8b
|
|
83
|
+
litellm_params:
|
|
84
|
+
model: openai/meta-llama/Llama-3.1-8B-Instruct
|
|
85
|
+
api_base: http://vllm-1:8000/v1
|
|
86
|
+
api_key: fake # vLLM key
|
|
87
|
+
- model_name: llama-3.1-8b
|
|
88
|
+
litellm_params:
|
|
89
|
+
model: openai/meta-llama/Llama-3.1-8B-Instruct
|
|
90
|
+
api_base: http://vllm-2:8000/v1 # second replica — auto load balanced
|
|
91
|
+
api_key: fake
|
|
92
|
+
|
|
93
|
+
# Fallback: cheap model if primary fails
|
|
94
|
+
- model_name: gpt-4o
|
|
95
|
+
litellm_params:
|
|
96
|
+
model: openai/gpt-4o-mini # fallback to cheaper model
|
|
97
|
+
api_key: os.environ/OPENAI_API_KEY
|
|
98
|
+
|
|
99
|
+
router_settings:
|
|
100
|
+
routing_strategy: least-busy # or: latency-based, simple-shuffle
|
|
101
|
+
num_retries: 3
|
|
102
|
+
retry_after: 5
|
|
103
|
+
allowed_fails: 2
|
|
104
|
+
cooldown_time: 60
|
|
105
|
+
|
|
106
|
+
# Fallback configuration
|
|
107
|
+
fallbacks:
|
|
108
|
+
- gpt-4o: [claude-sonnet-4-6]
|
|
109
|
+
- claude-sonnet-4-6: [gpt-4o]
|
|
110
|
+
|
|
111
|
+
litellm_settings:
|
|
112
|
+
# Semantic caching
|
|
113
|
+
cache: true
|
|
114
|
+
cache_params:
|
|
115
|
+
type: redis
|
|
116
|
+
host: redis
|
|
117
|
+
port: 6379
|
|
118
|
+
similarity_threshold: 0.90 # cache if >90% semantic similarity
|
|
119
|
+
|
|
120
|
+
# Logging
|
|
121
|
+
success_callback: ["langfuse"]
|
|
122
|
+
failure_callback: ["langfuse"]
|
|
123
|
+
langfuse_public_key: os.environ/LANGFUSE_PUBLIC_KEY
|
|
124
|
+
langfuse_secret_key: os.environ/LANGFUSE_SECRET_KEY
|
|
125
|
+
|
|
126
|
+
general_settings:
|
|
127
|
+
master_key: os.environ/LITELLM_MASTER_KEY
|
|
128
|
+
database_url: postgresql://litellm:password@postgres:5432/litellm
|
|
129
|
+
store_model_in_db: true
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Docker Compose: Full Gateway Stack
|
|
133
|
+
|
|
134
|
+
```yaml
|
|
135
|
+
services:
|
|
136
|
+
litellm:
|
|
137
|
+
image: ghcr.io/berriai/litellm:main-latest
|
|
138
|
+
command: ["--config", "/app/config.yaml", "--port", "4000"]
|
|
139
|
+
volumes:
|
|
140
|
+
- ./litellm-config.yaml:/app/config.yaml
|
|
141
|
+
ports:
|
|
142
|
+
- "4000:4000"
|
|
143
|
+
environment:
|
|
144
|
+
- OPENAI_API_KEY=${OPENAI_API_KEY}
|
|
145
|
+
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
|
|
146
|
+
- LITELLM_MASTER_KEY=${LITELLM_MASTER_KEY}
|
|
147
|
+
- DATABASE_URL=postgresql://litellm:password@postgres:5432/litellm
|
|
148
|
+
depends_on:
|
|
149
|
+
postgres:
|
|
150
|
+
condition: service_healthy
|
|
151
|
+
redis:
|
|
152
|
+
condition: service_started
|
|
153
|
+
restart: unless-stopped
|
|
154
|
+
|
|
155
|
+
postgres:
|
|
156
|
+
image: postgres:16-alpine
|
|
157
|
+
environment:
|
|
158
|
+
POSTGRES_DB: litellm
|
|
159
|
+
POSTGRES_USER: litellm
|
|
160
|
+
POSTGRES_PASSWORD: password
|
|
161
|
+
volumes:
|
|
162
|
+
- postgres-data:/var/lib/postgresql/data
|
|
163
|
+
healthcheck:
|
|
164
|
+
test: ["CMD-SHELL", "pg_isready -U litellm"]
|
|
165
|
+
interval: 5s
|
|
166
|
+
retries: 5
|
|
167
|
+
restart: unless-stopped
|
|
168
|
+
|
|
169
|
+
redis:
|
|
170
|
+
image: redis:7-alpine
|
|
171
|
+
command: redis-server --maxmemory 2gb --maxmemory-policy allkeys-lru
|
|
172
|
+
volumes:
|
|
173
|
+
- redis-data:/data
|
|
174
|
+
restart: unless-stopped
|
|
175
|
+
|
|
176
|
+
volumes:
|
|
177
|
+
postgres-data:
|
|
178
|
+
redis-data:
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Virtual Keys & Rate Limiting
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Create a virtual API key for a team (via LiteLLM API)
|
|
185
|
+
curl -X POST http://localhost:4000/key/generate \
|
|
186
|
+
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
|
|
187
|
+
-H "Content-Type: application/json" \
|
|
188
|
+
-d '{
|
|
189
|
+
"team_id": "team-backend",
|
|
190
|
+
"key_alias": "backend-team-key",
|
|
191
|
+
"models": ["gpt-4o-mini", "llama-3.1-8b"],
|
|
192
|
+
"max_budget": 100, # USD limit
|
|
193
|
+
"budget_duration": "monthly",
|
|
194
|
+
"rpm_limit": 100, # requests per minute
|
|
195
|
+
"tpm_limit": 500000 # tokens per minute
|
|
196
|
+
}'
|
|
197
|
+
|
|
198
|
+
# View spend
|
|
199
|
+
curl http://localhost:4000/spend/keys \
|
|
200
|
+
-H "Authorization: Bearer $LITELLM_MASTER_KEY"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Nginx Load Balancer (Alternative/Complement)
|
|
204
|
+
|
|
205
|
+
```nginx
|
|
206
|
+
# nginx.conf — round-robin across vLLM replicas
|
|
207
|
+
upstream vllm_backends {
|
|
208
|
+
least_conn;
|
|
209
|
+
server vllm-1:8000 max_fails=3 fail_timeout=30s;
|
|
210
|
+
server vllm-2:8000 max_fails=3 fail_timeout=30s;
|
|
211
|
+
server vllm-3:8000 max_fails=3 fail_timeout=30s;
|
|
212
|
+
keepalive 32;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
server {
|
|
216
|
+
listen 80;
|
|
217
|
+
server_name llm-api.internal;
|
|
218
|
+
|
|
219
|
+
# Rate limiting
|
|
220
|
+
limit_req_zone $http_authorization zone=per_key:10m rate=100r/m;
|
|
221
|
+
limit_req zone=per_key burst=20 nodelay;
|
|
222
|
+
|
|
223
|
+
location /v1/ {
|
|
224
|
+
proxy_pass http://vllm_backends;
|
|
225
|
+
proxy_http_version 1.1;
|
|
226
|
+
proxy_set_header Connection "";
|
|
227
|
+
proxy_set_header Host $host;
|
|
228
|
+
proxy_read_timeout 300s; # long timeout for streaming
|
|
229
|
+
proxy_buffering off; # required for SSE streaming
|
|
230
|
+
proxy_cache_bypass 1;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
## Monitoring Gateway Health
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Check LiteLLM health
|
|
239
|
+
curl http://localhost:4000/health
|
|
240
|
+
|
|
241
|
+
# Model-level health
|
|
242
|
+
curl http://localhost:4000/health/liveliness
|
|
243
|
+
|
|
244
|
+
# Spend by model
|
|
245
|
+
curl http://localhost:4000/spend/models \
|
|
246
|
+
-H "Authorization: Bearer $LITELLM_MASTER_KEY"
|
|
247
|
+
|
|
248
|
+
# Active virtual keys
|
|
249
|
+
curl http://localhost:4000/key/list \
|
|
250
|
+
-H "Authorization: Bearer $LITELLM_MASTER_KEY"
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Common Issues
|
|
254
|
+
|
|
255
|
+
| Issue | Cause | Fix |
|
|
256
|
+
|-------|-------|-----|
|
|
257
|
+
| `ConnectionRefusedError` to backend | Backend not reachable | Check `api_base` URL; verify backend is healthy |
|
|
258
|
+
| Rate limit errors (429) | Budget/RPM exceeded | Increase limits or rotate to fallback model |
|
|
259
|
+
| Slow streaming responses | `proxy_buffering` enabled | Set `proxy_buffering off` in Nginx |
|
|
260
|
+
| Cache miss rate high | Threshold too strict | Lower `similarity_threshold` to `0.85` |
|
|
261
|
+
| Postgres connection errors | DB not ready | Add `depends_on` with `condition: service_healthy` |
|
|
262
|
+
|
|
263
|
+
## Best Practices
|
|
264
|
+
|
|
265
|
+
- Use virtual keys per team/app — never expose raw provider API keys.
|
|
266
|
+
- Enable `cache: true` with Redis for repeated or similar queries; can cut costs 30–50%.
|
|
267
|
+
- Set `num_retries: 3` with fallbacks to handle provider outages gracefully.
|
|
268
|
+
- Log all requests to Langfuse or OpenTelemetry for cost attribution and debugging.
|
|
269
|
+
- Use `least-busy` routing strategy for self-hosted models to avoid GPU saturation.
|
|
270
|
+
|
|
271
|
+
## Related Skills
|
|
272
|
+
|
|
273
|
+
- vllm-server (`vllm-server`) - Backend inference server
|
|
274
|
+
- llm-inference-scaling (`llm-inference-scaling`) - Auto-scaling backends
|
|
275
|
+
- llm-caching (`llm-caching`) - Semantic cache patterns
|
|
276
|
+
- llm-cost-optimization (`llm-cost-optimization`) - Cost management
|
|
277
|
+
|
|
278
|
+
## Limitations
|
|
279
|
+
|
|
280
|
+
- Infrastructure commands can disrupt services: confirm target host/scope and have backups/snapshots before mutating state.
|
|
281
|
+
- Docs-only import: upstream scripts and templates not bundled.
|
|
282
|
+
|