@caddis/cli 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +29 -16
- package/bundles/antigravity-plugin-extras/plugin.json +5 -0
- package/bundles/antigravity-plugin-extras/skills/_registry.md +154 -0
- package/bundles/antigravity-plugin-extras/skills/agent-md-refactor/SKILL.md +356 -0
- package/bundles/antigravity-plugin-extras/skills/agent-orchestration/SKILL.md +517 -0
- package/bundles/antigravity-plugin-extras/skills/algorithmic-art/SKILL.md +293 -0
- package/bundles/antigravity-plugin-extras/skills/anchor-review/SKILL.md +135 -0
- package/bundles/antigravity-plugin-extras/skills/api-client-patterns/SKILL.md +367 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-design/SKILL.md +244 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-diagram/SKILL.md +156 -0
- package/bundles/antigravity-plugin-extras/skills/architecture-document/SKILL.md +321 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/SKILL.md +74 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/init-artifact.sh +322 -0
- package/bundles/antigravity-plugin-extras/skills/artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/bundles/antigravity-plugin-extras/skills/ascii-art/SKILL.md +144 -0
- package/bundles/antigravity-plugin-extras/skills/asking-questions/SKILL.md +81 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/SKILL.md +118 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/cross-service/credential-management.md +450 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/browser/README.md +363 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/code-interpreter/README.md +232 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/README.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deploy-template.sh +117 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/deployment-strategies.md +416 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/troubleshooting-guide.md +384 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/gateway/validate-deployment.sh +186 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/identity/README.md +186 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/memory/README.md +253 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/observability/README.md +517 -0
- package/bundles/antigravity-plugin-extras/skills/aws-agentic-ai/services/runtime/README.md +215 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/SKILL.md +279 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/references/cdk-patterns.md +431 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cdk-development/scripts/validate-stack.sh +240 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/SKILL.md +318 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/cloudwatch-alarms.md +567 -0
- package/bundles/antigravity-plugin-extras/skills/aws-cost-operations/references/operations-patterns.md +394 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/SKILL.md +758 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/deployment-best-practices.md +830 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/eda-patterns.md +1002 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/observability-best-practices.md +770 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/performance-optimization.md +671 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/security-best-practices.md +625 -0
- package/bundles/antigravity-plugin-extras/skills/aws-serverless-eda/references/serverless-patterns.md +838 -0
- package/bundles/antigravity-plugin-extras/skills/backend-to-frontend-handoff/SKILL.md +139 -0
- package/bundles/antigravity-plugin-extras/skills/banner-design/SKILL.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/brand-design/SKILL.md +298 -0
- package/bundles/antigravity-plugin-extras/skills/brand-guidelines/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/brand-guidelines/SKILL.md +118 -0
- package/bundles/antigravity-plugin-extras/skills/brand-voice/SKILL.md +93 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/SKILL.md +392 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/agent-patterns.md +461 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/examples.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/state-patterns.md +360 -0
- package/bundles/antigravity-plugin-extras/skills/building-ai-agent-on-cloudflare/references/troubleshooting.md +362 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/SKILL.md +266 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/examples.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/oauth-setup.md +338 -0
- package/bundles/antigravity-plugin-extras/skills/building-mcp-server-on-cloudflare/references/troubleshooting.md +317 -0
- package/bundles/antigravity-plugin-extras/skills/caching-patterns/SKILL.md +385 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/SKILL.md +91 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/ArsenalSC-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BigShoulders-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Boldonse-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/BricolageGrotesque-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/CrimsonPro-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/DMMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-OFL.txt +94 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/EricaOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/GeistMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Gloock-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/IBMPlexSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/InstrumentSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Italiana-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/JetBrainsMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Light.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Jura-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/LibreBaskerville-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Lora-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NationalPark-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/NothingYouCouldDo-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Outfit-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PixelifySans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/PoiretOne-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/RedHatMono-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Silkscreen-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/SmoochSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Medium.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/Tektur-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Bold.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-BoldItalic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Italic.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/WorkSans-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-OFL.txt +93 -0
- package/bundles/antigravity-plugin-extras/skills/canvas-design/canvas-fonts/YoungSerif-Regular.ttf +0 -0
- package/bundles/antigravity-plugin-extras/skills/changelog-generator/SKILL.md +105 -0
- package/bundles/antigravity-plugin-extras/skills/code-explainer/SKILL.md +91 -0
- package/bundles/antigravity-plugin-extras/skills/competitive-ads-extractor/SKILL.md +294 -0
- package/bundles/antigravity-plugin-extras/skills/component-testing/SKILL.md +310 -0
- package/bundles/antigravity-plugin-extras/skills/content-research-writer/SKILL.md +539 -0
- package/bundles/antigravity-plugin-extras/skills/cross-review/SKILL.md +51 -0
- package/bundles/antigravity-plugin-extras/skills/data-analysis/SKILL.md +111 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/README.md +248 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/SKILL.md +203 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/adapter.py.template +44 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/api-router.py.template +43 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/contract-test.py.template +384 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/display-dto.py.template +39 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-service.ts.template +46 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/frontend-types.ts.template +38 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/ingestion-model.py.template +42 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/mapping-doc.md.template +46 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/normalizer.py.template +48 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_requirements.md +36 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/extract_ui_demand.md +35 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/prompts/reconcile_mapping.md +66 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/assets/query-catalog.md.template +62 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/consumer-driven-contracts.md +131 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/drift-check-catalog.md +305 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/references/layer-responsibilities.md +333 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_connections.py +170 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/discover_sources.py +161 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/drift_check.py +171 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/extract_schema.py +1363 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_gap_report.py +81 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/generate_mapping_doc.py +294 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/ts_dto_compare.py +214 -0
- package/bundles/antigravity-plugin-extras/skills/data-contract-pipeline/scripts/validate_lineage.py +51 -0
- package/bundles/antigravity-plugin-extras/skills/data-loader/SKILL.md +753 -0
- package/bundles/antigravity-plugin-extras/skills/data-validation/SKILL.md +220 -0
- package/bundles/antigravity-plugin-extras/skills/db-testing/SKILL.md +117 -0
- package/bundles/antigravity-plugin-extras/skills/deploy-local/SKILL.md +259 -0
- package/bundles/antigravity-plugin-extras/skills/design-md/SKILL.md +167 -0
- package/bundles/antigravity-plugin-extras/skills/design-system-tokens/SKILL.md +240 -0
- package/bundles/antigravity-plugin-extras/skills/design-system-tokens/references/DESIGN-SYSTEM-TEMPLATE.md +577 -0
- package/bundles/antigravity-plugin-extras/skills/developer-growth-analysis/SKILL.md +323 -0
- package/bundles/antigravity-plugin-extras/skills/doc-coauthoring/SKILL.md +378 -0
- package/bundles/antigravity-plugin-extras/skills/documentation-analyzer/SKILL.md +78 -0
- package/bundles/antigravity-plugin-extras/skills/domain-name-brainstormer/SKILL.md +213 -0
- package/bundles/antigravity-plugin-extras/skills/enterprise-dashboard-aesthetic-system/SKILL.md +120 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/SKILL.md +193 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/element-types.md +497 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/excalidraw-schema.md +356 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/references/reliable-diagrams.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/README.md +60 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-arrow.py +354 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/add-icon-to-diagram.py +412 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/scripts/split-excalidraw-library.py +183 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/business-flow-swimlane-template.excalidraw +334 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/class-diagram-template.excalidraw +558 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/data-flow-diagram-template.excalidraw +279 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/er-diagram-template.excalidraw +662 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/flowchart-template.excalidraw +179 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/mindmap-template.excalidraw +244 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/relationship-template.excalidraw +145 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/reliable-flowchart.excalidraw +1 -0
- package/bundles/antigravity-plugin-extras/skills/excalidraw/templates/sequence-diagram-template.excalidraw +509 -0
- package/bundles/antigravity-plugin-extras/skills/file-organizer/SKILL.md +434 -0
- package/bundles/antigravity-plugin-extras/skills/game-changing-features/README.md +221 -0
- package/bundles/antigravity-plugin-extras/skills/game-changing-features/SKILL.md +265 -0
- package/bundles/antigravity-plugin-extras/skills/github-issues/SKILL.md +359 -0
- package/bundles/antigravity-plugin-extras/skills/github-issues/references/templates.md +90 -0
- package/bundles/antigravity-plugin-extras/skills/golden-nuggets/SKILL.md +192 -0
- package/bundles/antigravity-plugin-extras/skills/humanizer/SKILL.md +194 -0
- package/bundles/antigravity-plugin-extras/skills/image-enhancer/SKILL.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/intent-writer/SKILL.md +201 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/SKILL.md +124 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/3p-updates.md +47 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/company-newsletter.md +65 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/faq-answers.md +30 -0
- package/bundles/antigravity-plugin-extras/skills/internal-comms/examples/general-comms.md +16 -0
- package/bundles/antigravity-plugin-extras/skills/invoice-organizer/SKILL.md +447 -0
- package/bundles/antigravity-plugin-extras/skills/jira-issues/SKILL.md +182 -0
- package/bundles/antigravity-plugin-extras/skills/job-application/SKILL.md +188 -0
- package/bundles/antigravity-plugin-extras/skills/lead-research-assistant/SKILL.md +200 -0
- package/bundles/antigravity-plugin-extras/skills/llm-application-dev/SKILL.md +217 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/SKILL.md +100 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/evaluation.md +602 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/mcp_best_practices.md +915 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/node_mcp_server.md +916 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/references/python_mcp_server.md +752 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/connections.py +151 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/evaluation.py +373 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/bundles/antigravity-plugin-extras/skills/mcp-builder/scripts/requirements.txt +2 -0
- package/bundles/antigravity-plugin-extras/skills/meeting-insights-analyzer/SKILL.md +328 -0
- package/bundles/antigravity-plugin-extras/skills/monorepo/SKILL.md +267 -0
- package/bundles/antigravity-plugin-extras/skills/naming-analyzer/SKILL.md +376 -0
- package/bundles/antigravity-plugin-extras/skills/nextjs-app-router/SKILL.md +271 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/AUTHENTICATION.md +154 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/SKILL.md +270 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/api_reference.md +309 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/troubleshooting.md +376 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/references/usage_patterns.md +338 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/__init__.py +81 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/ask_question.py +256 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/auth_manager.py +358 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_session.py +255 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/browser_utils.py +107 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/cleanup_manager.py +302 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/config.py +44 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/notebook_manager.py +410 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/run.py +102 -0
- package/bundles/antigravity-plugin-extras/skills/notebooklm/scripts/setup_environment.py +204 -0
- package/bundles/antigravity-plugin-extras/skills/observability/SKILL.md +371 -0
- package/bundles/antigravity-plugin-extras/skills/onboard-project/SKILL.md +192 -0
- package/bundles/antigravity-plugin-extras/skills/performance-testing/SKILL.md +226 -0
- package/bundles/antigravity-plugin-extras/skills/pipeline-state/SKILL.md +208 -0
- package/bundles/antigravity-plugin-extras/skills/plantuml/SKILL.md +228 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/SKILL.md +142 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/linear.app.md +196 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/stripe.md +214 -0
- package/bundles/antigravity-plugin-extras/skills/popular-web-designs/templates/vercel.md +218 -0
- package/bundles/antigravity-plugin-extras/skills/prd-to-code/SKILL.md +127 -0
- package/bundles/antigravity-plugin-extras/skills/raffle-winner-picker/SKILL.md +159 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/README.md +320 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/SKILL.md +53 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/alternatives.md +258 -0
- package/bundles/antigravity-plugin-extras/skills/react-useeffect/anti-patterns.md +290 -0
- package/bundles/antigravity-plugin-extras/skills/receiving-code-review/SKILL.md +213 -0
- package/bundles/antigravity-plugin-extras/skills/relay/SKILL.md +246 -0
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/SKILL.md +105 -0
- package/bundles/antigravity-plugin-extras/skills/requesting-code-review/code-reviewer.md +146 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/SKILL.md +350 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/pwa-checklist.md +226 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/touch-and-interaction.md +265 -0
- package/bundles/antigravity-plugin-extras/skills/responsive-mobile-native/references/transformation-catalogue.md +326 -0
- package/bundles/antigravity-plugin-extras/skills/schema-migration/SKILL.md +275 -0
- package/bundles/antigravity-plugin-extras/skills/setup-project-ai/SKILL.md +120 -0
- package/bundles/antigravity-plugin-extras/skills/shadcn-radix/SKILL.md +330 -0
- package/bundles/antigravity-plugin-extras/skills/sketch/SKILL.md +104 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/SKILL.md +646 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/color_palettes.py +302 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/easing.py +230 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/frame_composer.py +469 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/gif_builder.py +246 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/typography.py +357 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/validators.py +264 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/core/visual_effects.py +494 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/requirements.txt +4 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/bounce.py +106 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/explode.py +331 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/fade.py +329 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/flip.py +291 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/kaleidoscope.py +211 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/morph.py +329 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/move.py +293 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/pulse.py +268 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/shake.py +127 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/slide.py +291 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/spin.py +269 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/wiggle.py +300 -0
- package/bundles/antigravity-plugin-extras/skills/slack-gif-creator/templates/zoom.py +312 -0
- package/bundles/antigravity-plugin-extras/skills/slides/SKILL.md +38 -0
- package/bundles/antigravity-plugin-extras/skills/state-tracking/SKILL.md +131 -0
- package/bundles/antigravity-plugin-extras/skills/streamlit-dev/SKILL.md +268 -0
- package/bundles/antigravity-plugin-extras/skills/svg-create/SKILL.md +251 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/SKILL.md +59 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/theme-showcase.pdf +0 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/arctic-frost.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/botanical-garden.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/desert-rose.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/forest-canopy.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/golden-hour.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/midnight-galaxy.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/modern-minimalist.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/ocean-depths.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/sunset-boulevard.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/theme-factory/themes/tech-innovation.md +19 -0
- package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/LICENSE.txt +202 -0
- package/bundles/antigravity-plugin-extras/skills/ui-styling-patterns/SKILL.md +320 -0
- package/bundles/antigravity-plugin-extras/skills/ui-testing/SKILL.md +660 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/SKILL.md +660 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/_sync_all.py +414 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/app-interface.csv +31 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/charts.csv +26 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/colors.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/design.csv +1776 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/draft.csv +1779 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/google-fonts.csv +1924 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/icons.csv +106 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/landing.csv +35 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/products.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/react-performance.csv +45 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/styles.csv +85 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/typography.csv +74 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ui-reasoning.csv +162 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/data/ux-guidelines.csv +100 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/core.py +247 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/design_system.py +1067 -0
- package/bundles/antigravity-plugin-extras/skills/ui-ux-intelligence/scripts/search.py +114 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/SKILL.md +140 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/commands.md +252 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/graph-schema.md +116 -0
- package/bundles/antigravity-plugin-extras/skills/understand-anything/references/pipeline.md +331 -0
- package/bundles/antigravity-plugin-extras/skills/update-readme/SKILL.md +74 -0
- package/bundles/antigravity-plugin-extras/skills/verification-loop/SKILL.md +209 -0
- package/bundles/antigravity-plugin-extras/skills/video-downloader/SKILL.md +107 -0
- package/bundles/antigravity-plugin-extras/skills/webapp-development/SKILL.md +288 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/SKILL.md +339 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/agents/agent-interface.md +175 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/html.md +384 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/nlp-keywords.md +127 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/palettes.md +149 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/python.md +249 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/react.md +427 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/shapes.md +135 -0
- package/bundles/antigravity-plugin-extras/skills/word-cloud/references/stopwords.md +115 -0
- package/bundles/antigravity-plugin-extras/skills/youtube-transcript/SKILL.md +416 -0
- package/bundles/manifest.json +2 -1
- package/dist/cli.js +166 -37
- package/package.json +1 -1
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Environment Setup for NotebookLM Skill
|
|
4
|
+
Manages virtual environment and dependencies automatically
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
import os
|
|
8
|
+
import sys
|
|
9
|
+
import subprocess
|
|
10
|
+
import venv
|
|
11
|
+
from pathlib import Path
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SkillEnvironment:
|
|
15
|
+
"""Manages skill-specific virtual environment"""
|
|
16
|
+
|
|
17
|
+
def __init__(self):
|
|
18
|
+
# Skill directory paths
|
|
19
|
+
self.skill_dir = Path(__file__).parent.parent
|
|
20
|
+
self.venv_dir = self.skill_dir / ".venv"
|
|
21
|
+
self.requirements_file = self.skill_dir / "requirements.txt"
|
|
22
|
+
|
|
23
|
+
# Python executable in venv
|
|
24
|
+
if os.name == 'nt': # Windows
|
|
25
|
+
self.venv_python = self.venv_dir / "Scripts" / "python.exe"
|
|
26
|
+
self.venv_pip = self.venv_dir / "Scripts" / "pip.exe"
|
|
27
|
+
else: # Unix/Linux/Mac
|
|
28
|
+
self.venv_python = self.venv_dir / "bin" / "python"
|
|
29
|
+
self.venv_pip = self.venv_dir / "bin" / "pip"
|
|
30
|
+
|
|
31
|
+
def ensure_venv(self) -> bool:
|
|
32
|
+
"""Ensure virtual environment exists and is set up"""
|
|
33
|
+
|
|
34
|
+
# Check if we're already in the correct venv
|
|
35
|
+
if self.is_in_skill_venv():
|
|
36
|
+
print("✅ Already running in skill virtual environment")
|
|
37
|
+
return True
|
|
38
|
+
|
|
39
|
+
# Create venv if it doesn't exist
|
|
40
|
+
if not self.venv_dir.exists():
|
|
41
|
+
print(f"🔧 Creating virtual environment in {self.venv_dir.name}/")
|
|
42
|
+
try:
|
|
43
|
+
venv.create(self.venv_dir, with_pip=True)
|
|
44
|
+
print("✅ Virtual environment created")
|
|
45
|
+
except Exception as e:
|
|
46
|
+
print(f"❌ Failed to create venv: {e}")
|
|
47
|
+
return False
|
|
48
|
+
|
|
49
|
+
# Install/update dependencies
|
|
50
|
+
if self.requirements_file.exists():
|
|
51
|
+
print("📦 Installing dependencies...")
|
|
52
|
+
try:
|
|
53
|
+
# Upgrade pip first
|
|
54
|
+
subprocess.run(
|
|
55
|
+
[str(self.venv_pip), "install", "--upgrade", "pip"],
|
|
56
|
+
check=True,
|
|
57
|
+
capture_output=True,
|
|
58
|
+
text=True
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# Install requirements
|
|
62
|
+
result = subprocess.run(
|
|
63
|
+
[str(self.venv_pip), "install", "-r", str(self.requirements_file)],
|
|
64
|
+
check=True,
|
|
65
|
+
capture_output=True,
|
|
66
|
+
text=True
|
|
67
|
+
)
|
|
68
|
+
print("✅ Dependencies installed")
|
|
69
|
+
|
|
70
|
+
# Install Chrome for Patchright (not Chromium!)
|
|
71
|
+
# Using real Chrome ensures cross-platform reliability and consistent browser fingerprinting
|
|
72
|
+
# See: https://github.com/Kaliiiiiiiiii-Vinyzu/patchright-python#anti-detection
|
|
73
|
+
print("🌐 Installing Google Chrome for Patchright...")
|
|
74
|
+
try:
|
|
75
|
+
subprocess.run(
|
|
76
|
+
[str(self.venv_python), "-m", "patchright", "install", "chrome"],
|
|
77
|
+
check=True,
|
|
78
|
+
capture_output=True,
|
|
79
|
+
text=True
|
|
80
|
+
)
|
|
81
|
+
print("✅ Chrome installed")
|
|
82
|
+
except subprocess.CalledProcessError as e:
|
|
83
|
+
print(f"⚠️ Warning: Failed to install Chrome: {e}")
|
|
84
|
+
print(" You may need to run manually: python -m patchright install chrome")
|
|
85
|
+
print(" Chrome is required (not Chromium) for reliability!")
|
|
86
|
+
|
|
87
|
+
return True
|
|
88
|
+
except subprocess.CalledProcessError as e:
|
|
89
|
+
print(f"❌ Failed to install dependencies: {e}")
|
|
90
|
+
print(f" Output: {e.output if hasattr(e, 'output') else 'No output'}")
|
|
91
|
+
return False
|
|
92
|
+
else:
|
|
93
|
+
print("⚠️ No requirements.txt found, skipping dependency installation")
|
|
94
|
+
return True
|
|
95
|
+
|
|
96
|
+
def is_in_skill_venv(self) -> bool:
|
|
97
|
+
"""Check if we're already running in the skill's venv"""
|
|
98
|
+
if hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
|
|
99
|
+
# We're in a venv, check if it's ours
|
|
100
|
+
venv_path = Path(sys.prefix)
|
|
101
|
+
return venv_path == self.venv_dir
|
|
102
|
+
return False
|
|
103
|
+
|
|
104
|
+
def get_python_executable(self) -> str:
|
|
105
|
+
"""Get the correct Python executable to use"""
|
|
106
|
+
if self.venv_python.exists():
|
|
107
|
+
return str(self.venv_python)
|
|
108
|
+
return sys.executable
|
|
109
|
+
|
|
110
|
+
def run_script(self, script_name: str, args: list = None) -> int:
|
|
111
|
+
"""Run a script with the virtual environment"""
|
|
112
|
+
script_path = self.skill_dir / "scripts" / script_name
|
|
113
|
+
|
|
114
|
+
if not script_path.exists():
|
|
115
|
+
print(f"❌ Script not found: {script_path}")
|
|
116
|
+
return 1
|
|
117
|
+
|
|
118
|
+
# Ensure venv is set up
|
|
119
|
+
if not self.ensure_venv():
|
|
120
|
+
print("❌ Failed to set up environment")
|
|
121
|
+
return 1
|
|
122
|
+
|
|
123
|
+
# Build command
|
|
124
|
+
cmd = [str(self.venv_python), str(script_path)]
|
|
125
|
+
if args:
|
|
126
|
+
cmd.extend(args)
|
|
127
|
+
|
|
128
|
+
print(f"🚀 Running: {script_name} with venv Python")
|
|
129
|
+
|
|
130
|
+
try:
|
|
131
|
+
# Run the script with venv Python
|
|
132
|
+
result = subprocess.run(cmd)
|
|
133
|
+
return result.returncode
|
|
134
|
+
except Exception as e:
|
|
135
|
+
print(f"❌ Failed to run script: {e}")
|
|
136
|
+
return 1
|
|
137
|
+
|
|
138
|
+
def activate_instructions(self) -> str:
|
|
139
|
+
"""Get instructions for manual activation"""
|
|
140
|
+
if os.name == 'nt':
|
|
141
|
+
activate = self.venv_dir / "Scripts" / "activate.bat"
|
|
142
|
+
return f"Run: {activate}"
|
|
143
|
+
else:
|
|
144
|
+
activate = self.venv_dir / "bin" / "activate"
|
|
145
|
+
return f"Run: source {activate}"
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
def main():
|
|
149
|
+
"""Main entry point for environment setup"""
|
|
150
|
+
import argparse
|
|
151
|
+
|
|
152
|
+
parser = argparse.ArgumentParser(
|
|
153
|
+
description='Setup NotebookLM skill environment'
|
|
154
|
+
)
|
|
155
|
+
|
|
156
|
+
parser.add_argument(
|
|
157
|
+
'--check',
|
|
158
|
+
action='store_true',
|
|
159
|
+
help='Check if environment is set up'
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
parser.add_argument(
|
|
163
|
+
'--run',
|
|
164
|
+
help='Run a script with the venv (e.g., --run ask_question.py)'
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
parser.add_argument(
|
|
168
|
+
'args',
|
|
169
|
+
nargs='*',
|
|
170
|
+
help='Arguments to pass to the script'
|
|
171
|
+
)
|
|
172
|
+
|
|
173
|
+
args = parser.parse_args()
|
|
174
|
+
|
|
175
|
+
env = SkillEnvironment()
|
|
176
|
+
|
|
177
|
+
if args.check:
|
|
178
|
+
if env.venv_dir.exists():
|
|
179
|
+
print(f"✅ Virtual environment exists: {env.venv_dir}")
|
|
180
|
+
print(f" Python: {env.get_python_executable()}")
|
|
181
|
+
print(f" To activate manually: {env.activate_instructions()}")
|
|
182
|
+
else:
|
|
183
|
+
print(f"❌ No virtual environment found")
|
|
184
|
+
print(f" Run setup_environment.py to create it")
|
|
185
|
+
return
|
|
186
|
+
|
|
187
|
+
if args.run:
|
|
188
|
+
# Run a script with venv
|
|
189
|
+
return env.run_script(args.run, args.args)
|
|
190
|
+
|
|
191
|
+
# Default: ensure environment is set up
|
|
192
|
+
if env.ensure_venv():
|
|
193
|
+
print("\n✅ Environment ready!")
|
|
194
|
+
print(f" Virtual env: {env.venv_dir}")
|
|
195
|
+
print(f" Python: {env.get_python_executable()}")
|
|
196
|
+
print(f"\nTo activate manually: {env.activate_instructions()}")
|
|
197
|
+
print(f"Or run scripts directly: python setup_environment.py --run script_name.py")
|
|
198
|
+
else:
|
|
199
|
+
print("\n❌ Environment setup failed")
|
|
200
|
+
return 1
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
if __name__ == "__main__":
|
|
204
|
+
sys.exit(main() or 0)
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: observability
|
|
3
|
+
description: Structured logging, OpenTelemetry distributed tracing, metrics (RED method), health checks, and error tracking with Sentry. Use for structured logs, correlation IDs, PII redaction, OpenTelemetry setup, distributed tracing, metrics counters/histograms/gauges, SLO-based alerting, liveness/readiness probes, or Sentry integration. Dual Python/TypeScript examples throughout.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Observability Skill
|
|
7
|
+
|
|
8
|
+
Everything needed to understand what your system is doing in production: structured logging, distributed tracing, metrics, and error tracking.
|
|
9
|
+
|
|
10
|
+
## 1. Structured Logging
|
|
11
|
+
|
|
12
|
+
### Core Principles
|
|
13
|
+
- Emit JSON that machines can parse, not prose that humans must parse
|
|
14
|
+
- Every log line: `timestamp`, `level`, `message`, `correlation_id`, `service`
|
|
15
|
+
- Never log PII — redact before logging
|
|
16
|
+
- Use log levels semantically (DEBUG/INFO/WARNING/ERROR — no `print()`)
|
|
17
|
+
|
|
18
|
+
### Python — `structlog` or `loguru`
|
|
19
|
+
```python
|
|
20
|
+
# structlog (recommended for services)
|
|
21
|
+
import structlog
|
|
22
|
+
import uuid
|
|
23
|
+
|
|
24
|
+
logger = structlog.get_logger()
|
|
25
|
+
|
|
26
|
+
# Configure at app startup
|
|
27
|
+
structlog.configure(
|
|
28
|
+
processors=[
|
|
29
|
+
structlog.contextvars.merge_contextvars,
|
|
30
|
+
structlog.processors.add_log_level,
|
|
31
|
+
structlog.processors.TimeStamper(fmt="iso"),
|
|
32
|
+
structlog.processors.JSONRenderer(),
|
|
33
|
+
]
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# Bind context for a request/task
|
|
37
|
+
structlog.contextvars.bind_contextvars(
|
|
38
|
+
correlation_id=str(uuid.uuid4()),
|
|
39
|
+
user_id=user.id, # Safe — internal ID, not PII
|
|
40
|
+
service="user-service",
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
logger.info("user.login", method="oauth2", provider="google")
|
|
44
|
+
logger.warning("rate.limit.approaching", remaining=5, limit=100)
|
|
45
|
+
logger.error("db.query.failed", query="users.find", error=str(e))
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
# loguru (recommended for simpler scripts/notebooks)
|
|
50
|
+
from loguru import logger
|
|
51
|
+
import sys
|
|
52
|
+
|
|
53
|
+
logger.remove() # Remove default stderr handler
|
|
54
|
+
logger.add(
|
|
55
|
+
sys.stderr,
|
|
56
|
+
format="{time:ISO8601} {level} {message}",
|
|
57
|
+
serialize=True, # JSON output
|
|
58
|
+
level="INFO",
|
|
59
|
+
)
|
|
60
|
+
logger.add("logs/app.log", rotation="100 MB", retention="7 days", serialize=True)
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### TypeScript — `pino`
|
|
64
|
+
```ts
|
|
65
|
+
import pino from 'pino'
|
|
66
|
+
|
|
67
|
+
export const logger = pino({
|
|
68
|
+
level: process.env.LOG_LEVEL ?? 'info',
|
|
69
|
+
transport: process.env.NODE_ENV === 'development'
|
|
70
|
+
? { target: 'pino-pretty', options: { colorize: true } }
|
|
71
|
+
: undefined,
|
|
72
|
+
base: { service: 'web-api', env: process.env.NODE_ENV },
|
|
73
|
+
})
|
|
74
|
+
|
|
75
|
+
// Child logger with bound context
|
|
76
|
+
export function requestLogger(correlationId: string) {
|
|
77
|
+
return logger.child({ correlationId })
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### PII Redaction
|
|
82
|
+
```python
|
|
83
|
+
# Python — never log these fields
|
|
84
|
+
REDACT_KEYS = {'password', 'token', 'secret', 'credit_card', 'ssn', 'dob', 'email', 'phone'}
|
|
85
|
+
|
|
86
|
+
def safe_log(data: dict) -> dict:
|
|
87
|
+
return {k: '***' if k in REDACT_KEYS else v for k, v in data.items()}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
// pino built-in redaction
|
|
92
|
+
const logger = pino({ redact: ['password', 'authorization', 'cookie', '*.token', '*.secret'] })
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## 2. Correlation IDs
|
|
96
|
+
|
|
97
|
+
Every entry point generates a `correlation_id` and attaches it to all downstream calls.
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
# FastAPI middleware
|
|
101
|
+
import uuid
|
|
102
|
+
from fastapi import Request
|
|
103
|
+
import structlog
|
|
104
|
+
|
|
105
|
+
async def correlation_id_middleware(request: Request, call_next):
|
|
106
|
+
correlation_id = request.headers.get("X-Correlation-ID", str(uuid.uuid4()))
|
|
107
|
+
structlog.contextvars.clear_contextvars()
|
|
108
|
+
structlog.contextvars.bind_contextvars(correlation_id=correlation_id)
|
|
109
|
+
response = await call_next(request)
|
|
110
|
+
response.headers["X-Correlation-ID"] = correlation_id
|
|
111
|
+
return response
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
```ts
|
|
115
|
+
// Next.js middleware
|
|
116
|
+
import { NextResponse } from 'next/server'
|
|
117
|
+
import { randomUUID } from 'node:crypto'
|
|
118
|
+
|
|
119
|
+
export function middleware(request: Request) {
|
|
120
|
+
const correlationId = request.headers.get('x-correlation-id') ?? randomUUID()
|
|
121
|
+
const response = NextResponse.next()
|
|
122
|
+
response.headers.set('x-correlation-id', correlationId)
|
|
123
|
+
return response
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## 3. OpenTelemetry — Distributed Tracing
|
|
128
|
+
|
|
129
|
+
### Python Setup
|
|
130
|
+
```python
|
|
131
|
+
# pip install opentelemetry-sdk opentelemetry-exporter-otlp opentelemetry-instrumentation-fastapi
|
|
132
|
+
|
|
133
|
+
from opentelemetry import trace
|
|
134
|
+
from opentelemetry.sdk.trace import TracerProvider
|
|
135
|
+
from opentelemetry.sdk.trace.export import BatchSpanProcessor
|
|
136
|
+
from opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter
|
|
137
|
+
from opentelemetry.instrumentation.fastapi import FastAPIInstrumentor
|
|
138
|
+
|
|
139
|
+
# Configure tracer
|
|
140
|
+
provider = TracerProvider()
|
|
141
|
+
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter(endpoint="http://otel-collector:4317")))
|
|
142
|
+
trace.set_tracer_provider(provider)
|
|
143
|
+
|
|
144
|
+
# Auto-instrument FastAPI
|
|
145
|
+
FastAPIInstrumentor.instrument_app(app)
|
|
146
|
+
|
|
147
|
+
# Manual span creation
|
|
148
|
+
tracer = trace.get_tracer(__name__)
|
|
149
|
+
|
|
150
|
+
async def process_order(order_id: str):
|
|
151
|
+
with tracer.start_as_current_span("process_order") as span:
|
|
152
|
+
span.set_attribute("order.id", order_id)
|
|
153
|
+
span.set_attribute("order.source", "api")
|
|
154
|
+
|
|
155
|
+
try:
|
|
156
|
+
result = await db.fetch_order(order_id)
|
|
157
|
+
span.set_attribute("order.status", result.status)
|
|
158
|
+
return result
|
|
159
|
+
except Exception as e:
|
|
160
|
+
span.record_exception(e)
|
|
161
|
+
span.set_status(trace.StatusCode.ERROR, str(e))
|
|
162
|
+
raise
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### TypeScript Setup
|
|
166
|
+
```ts
|
|
167
|
+
// npm install @opentelemetry/sdk-node @opentelemetry/auto-instrumentations-node @opentelemetry/exporter-trace-otlp-http
|
|
168
|
+
|
|
169
|
+
// instrumentation.ts (Next.js) or tracing.ts (Node)
|
|
170
|
+
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
171
|
+
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'
|
|
172
|
+
import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node'
|
|
173
|
+
|
|
174
|
+
const sdk = new NodeSDK({
|
|
175
|
+
serviceName: process.env.OTEL_SERVICE_NAME ?? 'my-service',
|
|
176
|
+
traceExporter: new OTLPTraceExporter({ url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT }),
|
|
177
|
+
instrumentations: [getNodeAutoInstrumentations()],
|
|
178
|
+
})
|
|
179
|
+
sdk.start()
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Span Naming Convention
|
|
183
|
+
- Format: `{noun}.{verb}` — e.g., `order.process`, `user.authenticate`, `db.query`
|
|
184
|
+
- Include resource IDs as span attributes, not in the span name
|
|
185
|
+
- Group spans by service domain: `payment.*`, `inventory.*`
|
|
186
|
+
|
|
187
|
+
## 4. Metrics — RED Method
|
|
188
|
+
|
|
189
|
+
**Rate, Error rate, Duration** — the minimal viable signal for every service endpoint.
|
|
190
|
+
|
|
191
|
+
```python
|
|
192
|
+
# Python — prometheus_client (or OpenTelemetry Metrics)
|
|
193
|
+
from prometheus_client import Counter, Histogram, Gauge, start_http_server
|
|
194
|
+
|
|
195
|
+
REQUEST_COUNT = Counter(
|
|
196
|
+
'http_requests_total',
|
|
197
|
+
'Total HTTP requests',
|
|
198
|
+
['method', 'endpoint', 'status_code'],
|
|
199
|
+
)
|
|
200
|
+
REQUEST_DURATION = Histogram(
|
|
201
|
+
'http_request_duration_seconds',
|
|
202
|
+
'HTTP request duration',
|
|
203
|
+
['method', 'endpoint'],
|
|
204
|
+
buckets=[0.005, 0.01, 0.05, 0.1, 0.5, 1, 2.5, 5],
|
|
205
|
+
)
|
|
206
|
+
ACTIVE_CONNECTIONS = Gauge('active_connections', 'Active connections')
|
|
207
|
+
|
|
208
|
+
# FastAPI middleware
|
|
209
|
+
@app.middleware("http")
|
|
210
|
+
async def metrics_middleware(request: Request, call_next):
|
|
211
|
+
import time
|
|
212
|
+
start = time.perf_counter()
|
|
213
|
+
response = await call_next(request)
|
|
214
|
+
duration = time.perf_counter() - start
|
|
215
|
+
|
|
216
|
+
REQUEST_COUNT.labels(
|
|
217
|
+
method=request.method,
|
|
218
|
+
endpoint=request.url.path,
|
|
219
|
+
status_code=response.status_code,
|
|
220
|
+
).inc()
|
|
221
|
+
REQUEST_DURATION.labels(
|
|
222
|
+
method=request.method,
|
|
223
|
+
endpoint=request.url.path,
|
|
224
|
+
).observe(duration)
|
|
225
|
+
return response
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Metric Types
|
|
229
|
+
| Type | Use For | Examples |
|
|
230
|
+
|---|---|---|
|
|
231
|
+
| **Counter** | Things that only go up | Requests served, errors, events processed |
|
|
232
|
+
| **Histogram** | Distribution of values | Request duration, payload size, DB query time |
|
|
233
|
+
| **Gauge** | Values that go up and down | Active connections, queue depth, memory usage |
|
|
234
|
+
|
|
235
|
+
## 5. Health Checks — Liveness vs Readiness
|
|
236
|
+
|
|
237
|
+
```python
|
|
238
|
+
# FastAPI health endpoints
|
|
239
|
+
from fastapi import FastAPI, status
|
|
240
|
+
from fastapi.responses import JSONResponse
|
|
241
|
+
|
|
242
|
+
@app.get("/health/live")
|
|
243
|
+
async def liveness():
|
|
244
|
+
"""I am alive and not in a broken state. Restart me if this fails."""
|
|
245
|
+
return {"status": "ok"}
|
|
246
|
+
|
|
247
|
+
@app.get("/health/ready")
|
|
248
|
+
async def readiness():
|
|
249
|
+
"""I am ready to serve traffic. Remove from load balancer if this fails."""
|
|
250
|
+
checks = {}
|
|
251
|
+
|
|
252
|
+
# Check DB connection
|
|
253
|
+
try:
|
|
254
|
+
await db.execute("SELECT 1")
|
|
255
|
+
checks["database"] = "ok"
|
|
256
|
+
except Exception as e:
|
|
257
|
+
checks["database"] = f"error: {e}"
|
|
258
|
+
|
|
259
|
+
# Check cache
|
|
260
|
+
try:
|
|
261
|
+
await redis.ping()
|
|
262
|
+
checks["cache"] = "ok"
|
|
263
|
+
except Exception as e:
|
|
264
|
+
checks["cache"] = f"error: {e}"
|
|
265
|
+
|
|
266
|
+
all_ok = all(v == "ok" for v in checks.values())
|
|
267
|
+
return JSONResponse(
|
|
268
|
+
status_code=status.HTTP_200_OK if all_ok else status.HTTP_503_SERVICE_UNAVAILABLE,
|
|
269
|
+
content={"status": "ready" if all_ok else "degraded", "checks": checks},
|
|
270
|
+
)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
| Probe | When Fails | Action |
|
|
274
|
+
|---|---|---|
|
|
275
|
+
| **Liveness** | App is deadlocked or crashed | Kubernetes/platform restarts the pod |
|
|
276
|
+
| **Readiness** | App can't handle traffic (DB down, warming up) | Remove from load balancer pool, don't restart |
|
|
277
|
+
|
|
278
|
+
## 6. Error Tracking — Sentry
|
|
279
|
+
|
|
280
|
+
```python
|
|
281
|
+
# Python FastAPI
|
|
282
|
+
import sentry_sdk
|
|
283
|
+
from sentry_sdk.integrations.fastapi import FastApiIntegration
|
|
284
|
+
from sentry_sdk.integrations.sqlalchemy import SqlalchemyIntegration
|
|
285
|
+
|
|
286
|
+
sentry_sdk.init(
|
|
287
|
+
dsn=settings.SENTRY_DSN,
|
|
288
|
+
environment=settings.APP_ENV,
|
|
289
|
+
traces_sample_rate=0.1, # 10% of transactions traced
|
|
290
|
+
profiles_sample_rate=0.1,
|
|
291
|
+
integrations=[FastApiIntegration(), SqlalchemyIntegration()],
|
|
292
|
+
before_send=scrub_sensitive_data, # Always scrub PII
|
|
293
|
+
)
|
|
294
|
+
|
|
295
|
+
def scrub_sensitive_data(event, hint):
|
|
296
|
+
"""Remove PII from Sentry events before sending."""
|
|
297
|
+
if 'request' in event:
|
|
298
|
+
event['request'].pop('cookies', None)
|
|
299
|
+
if 'headers' in event['request']:
|
|
300
|
+
event['request']['headers'].pop('Authorization', None)
|
|
301
|
+
return event
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
// TypeScript Next.js — sentry.server.config.ts / sentry.client.config.ts
|
|
306
|
+
import * as Sentry from '@sentry/nextjs'
|
|
307
|
+
|
|
308
|
+
Sentry.init({
|
|
309
|
+
dsn: process.env.NEXT_PUBLIC_SENTRY_DSN,
|
|
310
|
+
environment: process.env.NODE_ENV,
|
|
311
|
+
tracesSampleRate: 0.1,
|
|
312
|
+
beforeSend(event) {
|
|
313
|
+
// Strip auth tokens from breadcrumbs
|
|
314
|
+
event.breadcrumbs?.values?.forEach(b => {
|
|
315
|
+
if (b.data?.['Authorization']) delete b.data['Authorization']
|
|
316
|
+
})
|
|
317
|
+
return event
|
|
318
|
+
},
|
|
319
|
+
})
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
### Sentry Grouping — Good Fingerprinting
|
|
323
|
+
```python
|
|
324
|
+
with sentry_sdk.push_scope() as scope:
|
|
325
|
+
scope.set_tag("order_id", order_id)
|
|
326
|
+
scope.set_context("order", {"status": order.status, "items": len(order.items)})
|
|
327
|
+
scope.fingerprint = ["order-processing-failure", order.error_type]
|
|
328
|
+
sentry_sdk.capture_exception(e)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
## 7. SLO-Based Alerting
|
|
332
|
+
|
|
333
|
+
```yaml
|
|
334
|
+
# Example Prometheus alerting rule
|
|
335
|
+
groups:
|
|
336
|
+
- name: slo
|
|
337
|
+
rules:
|
|
338
|
+
- alert: HighErrorRate
|
|
339
|
+
expr: |
|
|
340
|
+
sum(rate(http_requests_total{status_code=~"5.."}[5m]))
|
|
341
|
+
/
|
|
342
|
+
sum(rate(http_requests_total[5m])) > 0.01
|
|
343
|
+
for: 5m
|
|
344
|
+
labels: { severity: warning }
|
|
345
|
+
annotations:
|
|
346
|
+
summary: "Error rate above 1% SLO for 5 minutes"
|
|
347
|
+
|
|
348
|
+
- alert: SlowResponseTime
|
|
349
|
+
expr: |
|
|
350
|
+
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m])) > 1.0
|
|
351
|
+
for: 10m
|
|
352
|
+
labels: { severity: warning }
|
|
353
|
+
annotations:
|
|
354
|
+
summary: "P95 response time above 1s SLO"
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
**Burn Rate**: Alert when error budget burns faster than expected, not just when a threshold is crossed momentarily. `for: 5m` prevents alert storms.
|
|
358
|
+
|
|
359
|
+
## 8. Checklist
|
|
360
|
+
|
|
361
|
+
- [ ] Structured JSON logs (not `print()`)
|
|
362
|
+
- [ ] Correlation IDs propagated as request header + bound to logger context
|
|
363
|
+
- [ ] PII fields redacted before logging (`password`, `token`, email, phone)
|
|
364
|
+
- [ ] OpenTelemetry SDK initialized before app starts
|
|
365
|
+
- [ ] Custom spans wrap business operations (not just framework auto-instrumentation)
|
|
366
|
+
- [ ] Span naming uses `{noun}.{verb}` convention
|
|
367
|
+
- [ ] RED metrics (rate, error rate, duration) instrumented for all HTTP endpoints
|
|
368
|
+
- [ ] `/health/live` and `/health/ready` endpoints implemented with different semantics
|
|
369
|
+
- [ ] Sentry DSN loaded from environment, not hardcoded
|
|
370
|
+
- [ ] Sentry `before_send` scrubs PII before sending
|
|
371
|
+
- [ ] Alerts fire on SLO burn rate, not just raw thresholds
|