@hasna/skills 0.1.26 → 0.1.29
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/LICENSE +1 -10
- package/README.md +141 -39
- package/bin/index.js +30122 -27575
- package/bin/mcp.js +22112 -18593
- package/dist/cli/cli.test-utils.d.ts +15 -0
- package/dist/cli/commands/auth.d.ts +2 -0
- package/dist/cli/commands/install.d.ts +1 -1
- package/dist/cli/commands/runtime-mcp.d.ts +4 -0
- package/dist/index.d.ts +9 -4
- package/dist/index.js +11607 -597
- package/dist/lib/auth-store.d.ts +13 -0
- package/dist/lib/installer.d.ts +58 -55
- package/dist/lib/mcp-contracts.d.ts +86 -0
- package/dist/lib/project-state.d.ts +43 -0
- package/dist/lib/registry-data/business-marketing.d.ts +2 -0
- package/dist/lib/registry-data/communication.d.ts +2 -0
- package/dist/lib/registry-data/content-generation.d.ts +2 -0
- package/dist/lib/registry-data/data-analysis.d.ts +2 -0
- package/dist/lib/registry-data/design-branding.d.ts +2 -0
- package/dist/lib/registry-data/development-tools.d.ts +2 -0
- package/dist/lib/registry-data/education-learning.d.ts +2 -0
- package/dist/lib/registry-data/event-management.d.ts +2 -0
- package/dist/lib/registry-data/finance-compliance.d.ts +2 -0
- package/dist/lib/registry-data/health-wellness.d.ts +2 -0
- package/dist/lib/registry-data/index.d.ts +2 -0
- package/dist/lib/registry-data/media-processing.d.ts +2 -0
- package/dist/lib/registry-data/productivity-organization.d.ts +2 -0
- package/dist/lib/registry-data/project-management.d.ts +2 -0
- package/dist/lib/registry-data/research-writing.d.ts +2 -0
- package/dist/lib/registry-data/science-academic.d.ts +2 -0
- package/dist/lib/registry-data/travel-lifestyle.d.ts +2 -0
- package/dist/lib/registry-data/web-browser.d.ts +2 -0
- package/dist/lib/registry-types.d.ts +27 -0
- package/dist/lib/registry.d.ts +6 -18
- package/dist/lib/remote-registry.d.ts +3 -0
- package/dist/lib/run-state.d.ts +60 -0
- package/dist/lib/skill-aliases.d.ts +17 -0
- package/dist/lib/skillinfo.d.ts +5 -1
- package/dist/mcp/discovery-tools.d.ts +2 -0
- package/dist/mcp/helpers.d.ts +26 -0
- package/dist/mcp/http.d.ts +10 -0
- package/dist/mcp/index.d.ts +3 -2
- package/dist/mcp/operation-tools.d.ts +2 -0
- package/dist/mcp/resource-meta-tools.d.ts +2 -0
- package/dist/mcp/schedule-tools.d.ts +2 -0
- package/dist/mcp/server.d.ts +4 -0
- package/dist/types/api.d.ts +7 -4
- package/package.json +23 -10
- package/skills/_common/http-client.ts +1 -1
- package/skills/_common/index.ts +2 -3
- package/skills/_common/install.sh +5 -110
- package/skills/_common/installer.ts +31 -282
- package/skills/_common/skill-install.ts +14 -181
- package/skills/ad-creative-pack/SKILL.md +45 -0
- package/skills/ad-creative-pack/package.json +14 -0
- package/skills/advanced-math/package.json +3 -1
- package/skills/advanced-math/src/calculators.ts +118 -0
- package/skills/advanced-math/src/cli.ts +130 -0
- package/skills/advanced-math/src/conversion.ts +90 -0
- package/skills/advanced-math/src/finance.ts +75 -0
- package/skills/advanced-math/src/formatting.ts +95 -0
- package/skills/advanced-math/src/index.ts +24 -702
- package/skills/advanced-math/src/runtime.ts +49 -0
- package/skills/advanced-math/src/symbolic.ts +110 -0
- package/skills/advanced-math/src/types.ts +36 -0
- package/skills/analyze-data/SKILL.md +2 -2
- package/skills/analyze-data/src/analysis.ts +401 -0
- package/skills/analyze-data/src/cli.ts +66 -0
- package/skills/analyze-data/src/formatters.ts +235 -0
- package/skills/analyze-data/src/index.ts +6 -1027
- package/skills/analyze-data/src/logger.ts +36 -0
- package/skills/analyze-data/src/parsers.ts +57 -0
- package/skills/analyze-data/src/stats.ts +151 -0
- package/skills/analyze-data/src/types.ts +85 -0
- package/skills/api-docs-portal/SKILL.md +46 -0
- package/skills/api-docs-portal/package.json +9 -0
- package/skills/api-test-suite/src/index.ts +13 -0
- package/skills/apidocs/package.json +1 -1
- package/skills/apidocs/src/index.ts +3 -0
- package/skills/audio/package.json +2 -3
- package/skills/audio-cleanup-lab/SKILL.md +2 -2
- package/skills/audio-extract/CLAUDE.md +1 -1
- package/skills/audio-transcript-pack/SKILL.md +43 -0
- package/skills/audio-transcript-pack/package.json +10 -0
- package/skills/blog-article/CLAUDE.md +12 -0
- package/skills/blog-article/SKILL.md +45 -0
- package/skills/{create-blog-article → blog-article}/package.json +3 -3
- package/skills/brand-kit/SKILL.md +45 -0
- package/skills/brand-kit/package.json +14 -0
- package/skills/brand-photo-shoot/SKILL.md +28 -0
- package/skills/brand-photo-shoot/package.json +10 -0
- package/skills/brand-style-guide/SKILL.md +2 -2
- package/skills/brand-style-guide/src/index.ts +0 -0
- package/skills/budget-variance-analyzer/SKILL.md +2 -2
- package/skills/businessactivity/package.json +1 -1
- package/skills/businessactivity/src/index.ts +3 -0
- package/skills/calendar-events/src/ai-parser.ts +103 -0
- package/skills/calendar-events/src/api.ts +157 -0
- package/skills/calendar-events/src/auth.ts +22 -0
- package/skills/calendar-events/src/config.ts +6 -0
- package/skills/calendar-events/src/format.ts +96 -0
- package/skills/calendar-events/src/help.ts +54 -0
- package/skills/calendar-events/src/index.ts +21 -524
- package/skills/calendar-events/src/logger.ts +34 -0
- package/skills/calendar-events/src/types.ts +67 -0
- package/skills/compress-video/SKILL.md +2 -2
- package/skills/consolelog/package.json +1 -1
- package/skills/consolelog/src/index.ts +3 -0
- package/skills/contract-review-report/SKILL.md +43 -0
- package/skills/contract-review-report/package.json +10 -0
- package/skills/convert/SKILL.md +2 -3
- package/skills/customer-feedback-report/SKILL.md +44 -0
- package/skills/customer-feedback-report/package.json +10 -0
- package/skills/dashboard-builder/package.json +3 -1
- package/skills/database-explorer/package.json +3 -1
- package/skills/deepresearch/README.md +4 -13
- package/skills/deploy/src/http-client.ts +1 -1
- package/skills/diff-viewer/package.json +4 -1
- package/skills/doc-generate/package.json +0 -1
- package/skills/doc-generate/src/ai.ts +50 -0
- package/skills/doc-generate/src/cli.ts +203 -0
- package/skills/doc-generate/src/dependencies.ts +44 -0
- package/skills/doc-generate/src/document-builder.ts +299 -0
- package/skills/doc-generate/src/index.ts +40 -764
- package/skills/doc-generate/src/markdown-parser.ts +125 -0
- package/skills/doc-generate/src/types.ts +68 -0
- package/skills/domainpurchase/SKILL.md +1 -1
- package/skills/domainpurchase/package.json +1 -1
- package/skills/domainpurchase/src/index.ts +3 -0
- package/skills/domainsearch/SKILL.md +1 -1
- package/skills/domainsearch/package.json +1 -1
- package/skills/domainsearch/src/index.ts +3 -0
- package/skills/email-sequence/SKILL.md +44 -0
- package/skills/email-sequence/package.json +14 -0
- package/skills/excel/CLAUDE.md +2 -2
- package/skills/experiment-power-calculator/package.json +3 -1
- package/skills/extract-invoice/src/cli.ts +97 -0
- package/skills/extract-invoice/src/extractor.ts +170 -0
- package/skills/extract-invoice/src/file-utils.ts +46 -0
- package/skills/extract-invoice/src/formatters.ts +144 -0
- package/skills/extract-invoice/src/index.ts +44 -629
- package/skills/extract-invoice/src/runtime.ts +46 -0
- package/skills/extract-invoice/src/types.ts +88 -0
- package/skills/folder-tree/package.json +3 -1
- package/skills/form-filler/package.json +3 -1
- package/skills/generate-api-client/package.json +3 -1
- package/skills/generate-api-client/src/generator.ts +47 -0
- package/skills/generate-api-client/src/index.ts +3 -777
- package/skills/generate-api-client/src/logger.ts +34 -0
- package/skills/generate-api-client/src/python-generator.ts +245 -0
- package/skills/generate-api-client/src/spec-loader.ts +48 -0
- package/skills/generate-api-client/src/type-mappers.ts +79 -0
- package/skills/generate-api-client/src/types.ts +76 -0
- package/skills/generate-api-client/src/typescript-generator.ts +247 -0
- package/skills/generate-book-cover/package.json +3 -1
- package/skills/generate-dockerfile/src/cli.ts +78 -0
- package/skills/generate-dockerfile/src/dockerfile-templates.ts +392 -0
- package/skills/generate-dockerfile/src/index.ts +12 -790
- package/skills/generate-dockerfile/src/logger.ts +30 -0
- package/skills/generate-dockerfile/src/project-detection.ts +68 -0
- package/skills/generate-dockerfile/src/support-files.ts +171 -0
- package/skills/generate-dockerfile/src/types.ts +29 -0
- package/skills/generate-documentation/src/ai.ts +131 -0
- package/skills/generate-documentation/src/cli.ts +71 -0
- package/skills/generate-documentation/src/code-parser.ts +300 -0
- package/skills/generate-documentation/src/file-processing.ts +182 -0
- package/skills/generate-documentation/src/index.ts +13 -753
- package/skills/generate-documentation/src/runtime.ts +35 -0
- package/skills/generate-documentation/src/types.ts +30 -0
- package/skills/generate-env/package.json +3 -1
- package/skills/generate-env/src/cli.ts +85 -0
- package/skills/generate-env/src/detection.ts +161 -0
- package/skills/generate-env/src/env-data.ts +66 -0
- package/skills/generate-env/src/generators.ts +240 -0
- package/skills/generate-env/src/index.ts +76 -676
- package/skills/generate-env/src/runtime.ts +30 -0
- package/skills/generate-env/src/types.ts +32 -0
- package/skills/generate-favicon/package.json +3 -1
- package/skills/generate-mock-data/package.json +3 -1
- package/skills/generate-mock-data/src/ai.ts +102 -0
- package/skills/generate-mock-data/src/formatters.ts +84 -0
- package/skills/generate-mock-data/src/generator.ts +377 -0
- package/skills/generate-mock-data/src/index.ts +15 -716
- package/skills/generate-mock-data/src/logger.ts +37 -0
- package/skills/generate-mock-data/src/presets.ts +110 -0
- package/skills/generate-mock-data/src/types.ts +21 -0
- package/skills/generate-pr-description/src/ai.ts +144 -0
- package/skills/generate-pr-description/src/cli.ts +80 -0
- package/skills/generate-pr-description/src/clipboard.ts +30 -0
- package/skills/generate-pr-description/src/formatters.ts +231 -0
- package/skills/generate-pr-description/src/git.ts +153 -0
- package/skills/generate-pr-description/src/index.ts +21 -714
- package/skills/generate-pr-description/src/types.ts +49 -0
- package/skills/generate-presentation/src/ai-clients.ts +61 -0
- package/skills/generate-presentation/src/cli.ts +126 -0
- package/skills/generate-presentation/src/index.ts +3 -751
- package/skills/generate-presentation/src/logger.ts +67 -0
- package/skills/generate-presentation/src/presentation-generator.ts +425 -0
- package/skills/generate-presentation/src/runtime.ts +6 -0
- package/skills/generate-presentation/src/security.ts +12 -0
- package/skills/generate-presentation/src/types.ts +28 -0
- package/skills/generate-qrcode/package.json +4 -1
- package/skills/generate-regex/package.json +3 -1
- package/skills/generate-resume/src/cli.ts +157 -0
- package/skills/generate-resume/src/index.ts +13 -917
- package/skills/generate-resume/src/parsers.ts +95 -0
- package/skills/generate-resume/src/renderers.ts +538 -0
- package/skills/generate-resume/src/security.ts +39 -0
- package/skills/generate-resume/src/types.ts +86 -0
- package/skills/generate-social-posts/src/ai.ts +88 -0
- package/skills/generate-social-posts/src/cli.ts +118 -0
- package/skills/generate-social-posts/src/exporters.ts +126 -0
- package/skills/generate-social-posts/src/generator.ts +130 -0
- package/skills/generate-social-posts/src/index.ts +19 -709
- package/skills/generate-social-posts/src/platforms.ts +39 -0
- package/skills/generate-social-posts/src/runtime.ts +34 -0
- package/skills/generate-social-posts/src/source.ts +116 -0
- package/skills/generate-social-posts/src/types.ts +58 -0
- package/skills/gif-maker/package.json +4 -1
- package/skills/github-manager/package.json +3 -1
- package/skills/gmail/CLAUDE.md +1 -1
- package/skills/highlight-reel-generator/src/index.ts +19 -0
- package/skills/hook/src/commands/create.ts +20 -845
- package/skills/hook/src/templates/root.ts +196 -0
- package/skills/hook/src/templates/source.ts +647 -0
- package/skills/http-server/package.json +3 -1
- package/skills/icon-pack/README.md +28 -0
- package/skills/icon-pack/SKILL.md +23 -0
- package/skills/icon-pack/package.json +29 -0
- package/skills/{audio → icon-pack}/tsconfig.json +10 -12
- package/skills/image/package.json +1 -2
- package/skills/implementation-agent/package.json +3 -1
- package/skills/implementation-agent/src/ai-generation.ts +225 -0
- package/skills/implementation-agent/src/index.ts +3 -960
- package/skills/implementation-agent/src/minimist.d.ts +15 -0
- package/skills/implementation-agent/src/templates.ts +686 -0
- package/skills/implementation-agent/src/types.ts +53 -0
- package/skills/implementation-plan/package.json +3 -1
- package/skills/implementation-todo/package.json +3 -1
- package/skills/invoice/package.json +1 -1
- package/skills/invoice/src/index.ts +3 -0
- package/skills/invoice-reconciliation/SKILL.md +42 -0
- package/skills/invoice-reconciliation/package.json +10 -0
- package/skills/landing-page-pack/SKILL.md +47 -0
- package/skills/landing-page-pack/package.json +14 -0
- package/skills/latex-table-generator/package.json +3 -1
- package/skills/logo-design/SKILL.md +25 -44
- package/skills/logo-design/package.json +3 -15
- package/skills/lorem-generator/package.json +3 -1
- package/skills/lorem-generator/src/index.ts +13 -0
- package/skills/managehook/package.json +1 -1
- package/skills/managehook/src/index.ts +3 -0
- package/skills/managemcp/package.json +1 -1
- package/skills/managemcp/src/index.ts +3 -0
- package/skills/manageskill/package.json +1 -1
- package/skills/manageskill/src/index.ts +3 -0
- package/skills/markdown-validator/package.json +3 -1
- package/skills/markdown-validator/src/index.ts +1 -4
- package/skills/market-research-report/SKILL.md +41 -0
- package/skills/market-research-report/package.json +10 -0
- package/skills/mcp-builder/package.json +4 -1
- package/skills/mcp-builder/src/ai-descriptions.ts +37 -0
- package/skills/mcp-builder/src/generators.ts +513 -0
- package/skills/mcp-builder/src/index.ts +7 -908
- package/skills/mcp-builder/src/minimist.d.ts +15 -0
- package/skills/mcp-builder/src/naming.ts +12 -0
- package/skills/mcp-builder/src/options.ts +170 -0
- package/skills/mcp-builder/src/templates.ts +149 -0
- package/skills/mcp-builder/src/types.ts +42 -0
- package/skills/meeting-pack/SKILL.md +43 -0
- package/skills/meeting-pack/package.json +10 -0
- package/skills/merge-pdfs/package.json +5 -1
- package/skills/migration-plan-pack/SKILL.md +45 -0
- package/skills/migration-plan-pack/package.json +10 -0
- package/skills/music/package.json +2 -3
- package/skills/music-album/SKILL.md +37 -0
- package/skills/music-album/package.json +10 -0
- package/skills/notion-manager/package.json +3 -1
- package/skills/npmpublish/CLAUDE.md +5 -8
- package/skills/npmpublish/README.md +5 -26
- package/skills/npmpublish/src/index.ts +9 -147
- package/skills/one-page-website/SKILL.md +46 -0
- package/skills/one-page-website/package.json +10 -0
- package/skills/one-page-website/tsconfig.json +8 -0
- package/skills/pdf-generate/src/cli.ts +162 -0
- package/skills/pdf-generate/src/html.ts +84 -0
- package/skills/pdf-generate/src/index.ts +11 -800
- package/skills/pdf-generate/src/markdown.ts +27 -0
- package/skills/pdf-generate/src/pdf-writer.ts +78 -0
- package/skills/pdf-generate/src/runtime.ts +34 -0
- package/skills/pdf-generate/src/security.ts +37 -0
- package/skills/pdf-generate/src/templates.ts +311 -0
- package/skills/pdf-generate/src/types.ts +28 -0
- package/skills/pdf-read/SKILL.md +10 -10
- package/skills/pdf-to-dataset/SKILL.md +45 -0
- package/skills/pdf-to-dataset/package.json +10 -0
- package/skills/pdf-to-markdown/SKILL.md +49 -0
- package/skills/pdf-to-markdown/package.json +10 -0
- package/skills/pdf-to-markdown/tsconfig.json +10 -0
- package/skills/performance-audit-report/SKILL.md +42 -0
- package/skills/performance-audit-report/package.json +10 -0
- package/skills/persona-based-adwriter/src/index.ts +19 -0
- package/skills/photo-album/SKILL.md +29 -0
- package/skills/photo-album/package.json +9 -0
- package/skills/photo-album/tsconfig.json +4 -0
- package/skills/pitch-deck/SKILL.md +43 -0
- package/skills/pitch-deck/package.json +9 -0
- package/skills/playlist-maker/SKILL.md +33 -0
- package/skills/playlist-maker/package.json +9 -0
- package/skills/playlist-maker/tsconfig.json +4 -0
- package/skills/product-mockup/SKILL.md +45 -0
- package/skills/product-mockup/package.json +3 -20
- package/skills/product-mockup/tsconfig.json +3 -5
- package/skills/project-retro-companion/src/index.ts +19 -0
- package/skills/proposal-pack/SKILL.md +45 -0
- package/skills/proposal-pack/package.json +10 -0
- package/skills/read-pdf/SKILL.md +5 -4
- package/skills/repo-onboarding-report/SKILL.md +42 -0
- package/skills/repo-onboarding-report/package.json +10 -0
- package/skills/sales-call-recapper/src/index.ts +20 -0
- package/skills/salescopy/package.json +1 -1
- package/skills/salescopy/src/index.ts +3 -0
- package/skills/scaffold-project/src/ai-detect.ts +136 -0
- package/skills/scaffold-project/src/file-generators.ts +292 -0
- package/skills/scaffold-project/src/index.ts +8 -991
- package/skills/scaffold-project/src/project-config.ts +338 -0
- package/skills/scaffold-project/src/templates.ts +173 -0
- package/skills/scaffold-project/src/types.ts +58 -0
- package/skills/scientific-figure-check/package.json +3 -1
- package/skills/sdk-generator/SKILL.md +45 -0
- package/skills/sdk-generator/package.json +10 -0
- package/skills/sdk-generator/tsconfig.json +8 -0
- package/skills/security-audit/src/index.ts +25 -6
- package/skills/security-audit-report/SKILL.md +40 -0
- package/skills/security-audit-report/package.json +10 -0
- package/skills/seo-content-pack/SKILL.md +44 -0
- package/skills/seo-content-pack/package.json +9 -0
- package/skills/short-video-pack/SKILL.md +30 -0
- package/skills/short-video-pack/package.json +10 -0
- package/skills/slack-assistant/package.json +3 -1
- package/skills/slide-deck-generator/SKILL.md +44 -0
- package/skills/slide-deck-generator/package.json +10 -0
- package/skills/sms/package.json +1 -1
- package/skills/sms/src/index.ts +15 -0
- package/skills/social-content-calendar/SKILL.md +45 -0
- package/skills/social-content-calendar/package.json +14 -0
- package/skills/split-pdf/package.json +4 -1
- package/skills/subtitle/package.json +2 -1
- package/skills/subtitle/src/index.ts +3 -0
- package/skills/terraform-generator/package.json +3 -1
- package/skills/test-suite-generator/SKILL.md +41 -0
- package/skills/test-suite-generator/package.json +10 -0
- package/skills/timesheet/package.json +1 -1
- package/skills/timesheet/src/index.ts +3 -0
- package/skills/transcript/SKILL.md +1 -8
- package/skills/validate-config/package.json +3 -1
- package/skills/video/package.json +6 -4
- package/skills/video-downloader/package.json +3 -1
- package/skills/video-highlight-pack/SKILL.md +44 -0
- package/skills/video-highlight-pack/package.json +10 -0
- package/skills/voiceover-jingle-pack/SKILL.md +28 -0
- package/skills/voiceover-jingle-pack/package.json +10 -0
- package/skills/watermark/package.json +6 -1
- package/skills/webcrawling/package.json +2 -1
- package/skills/write/SKILL.md +6 -6
- package/dist/server/serve.d.ts +0 -11
- package/skills/apidocs/.claude/settings.json +0 -5
- package/skills/audio/.env.example +0 -14
- package/skills/audio/QUICKSTART.md +0 -158
- package/skills/audio/README.md +0 -256
- package/skills/audio/src/index-local.ts +0 -206
- package/skills/audio/src/index.ts +0 -95
- package/skills/audio/src/providers/elevenlabs.ts +0 -115
- package/skills/audio/src/providers/google.ts +0 -116
- package/skills/audio/src/providers/minimax.ts +0 -83
- package/skills/audio/src/providers/openai.ts +0 -115
- package/skills/audio/src/types.ts +0 -79
- package/skills/audiobook-chapter-proofer/CLAUDE.md +0 -19
- package/skills/audiobook-chapter-proofer/package.json +0 -27
- package/skills/audiobook-chapter-proofer/src/index.ts +0 -285
- package/skills/browse/src/client.ts +0 -373
- package/skills/browse/src/index-local.ts +0 -430
- package/skills/browse/src/index.ts +0 -110
- package/skills/browse/src/sse-server.ts +0 -919
- package/skills/browse/src/types.ts +0 -104
- package/skills/consolelog/src/server/index.ts +0 -508
- package/skills/create-blog-article/CLAUDE.md +0 -19
- package/skills/create-blog-article/src/index.ts +0 -745
- package/skills/create-blog-article/tsconfig.json +0 -10
- package/skills/deepresearch/src/agents/query-generator.ts +0 -91
- package/skills/deepresearch/src/agents/synthesizer.ts +0 -111
- package/skills/deepresearch/src/index.ts +0 -224
- package/skills/deepresearch/src/research.ts +0 -166
- package/skills/deepresearch/src/services/anthropic.ts +0 -69
- package/skills/deepresearch/src/services/exa.ts +0 -108
- package/skills/deepresearch/src/services/firecrawl.ts +0 -88
- package/skills/deepresearch/src/services/openai.ts +0 -81
- package/skills/deepresearch/src/types.ts +0 -76
- package/skills/deepresearch/src/utils/file.ts +0 -111
- package/skills/deepresearch/src/utils/logger.ts +0 -84
- package/skills/domainpurchase/src/server/index.ts +0 -332
- package/skills/domainsearch/src/server/index.ts +0 -229
- package/skills/e2bswarm/README.md +0 -135
- package/skills/e2bswarm/SKILL.md +0 -118
- package/skills/e2bswarm/examples/tasks-example.json +0 -38
- package/skills/e2bswarm/package.json +0 -59
- package/skills/e2bswarm/src/commands/collect.ts +0 -135
- package/skills/e2bswarm/src/commands/install.ts +0 -164
- package/skills/e2bswarm/src/commands/kill.ts +0 -62
- package/skills/e2bswarm/src/commands/spawn.ts +0 -134
- package/skills/e2bswarm/src/commands/status.ts +0 -90
- package/skills/e2bswarm/src/commands/sync.ts +0 -208
- package/skills/e2bswarm/src/index.ts +0 -121
- package/skills/e2bswarm/src/lib/config.ts +0 -75
- package/skills/e2bswarm/src/lib/e2b.ts +0 -490
- package/skills/e2bswarm/src/lib/github.ts +0 -253
- package/skills/e2bswarm/src/lib/logger.ts +0 -41
- package/skills/e2bswarm/src/lib/paths.ts +0 -75
- package/skills/e2bswarm/src/lib/tasks.ts +0 -320
- package/skills/e2bswarm/src/types/index.ts +0 -107
- package/skills/e2bswarm/templates/codebox/e2b.Dockerfile +0 -38
- package/skills/e2bswarm/templates/codebox/e2b.toml +0 -3
- package/skills/e2bswarm/templates/setup.sh +0 -21
- package/skills/e2bswarm/tsconfig.json +0 -19
- package/skills/generate-book-cover/src/index.ts +0 -694
- package/skills/image/src/index-local.ts +0 -206
- package/skills/image/src/index.ts +0 -96
- package/skills/image/src/providers/google.ts +0 -79
- package/skills/image/src/providers/minimax.ts +0 -94
- package/skills/image/src/providers/openai.ts +0 -80
- package/skills/image/src/providers/xai.ts +0 -73
- package/skills/image/src/types.ts +0 -37
- package/skills/logo-design/CLAUDE.md +0 -30
- package/skills/logo-design/src/index.ts +0 -322
- package/skills/managehook/src/server/index.ts +0 -108
- package/skills/managemcp/src/server/index.ts +0 -108
- package/skills/manageskill/src/server/index.ts +0 -108
- package/skills/music/CLAUDE.md +0 -9
- package/skills/music/src/index.ts +0 -94
- package/skills/music/tsconfig.json +0 -10
- package/skills/pdf-read/src/index.ts +0 -320
- package/skills/product-mockup/CLAUDE.md +0 -19
- package/skills/product-mockup/src/index.ts +0 -290
- package/skills/read-pdf/src/index.ts +0 -388
- package/skills/remove-background/src/index.ts +0 -405
- package/skills/scaffold-project/my-app/.env.example +0 -2
- package/skills/scaffold-project/my-app/README.md +0 -72
- package/skills/scaffold-project/my-app/package.json +0 -29
- package/skills/scaffold-project/my-app/src/index.ts +0 -23
- package/skills/scaffold-project/my-app/tsconfig.json +0 -33
- package/skills/sound-effects/SKILL.md +0 -34
- package/skills/sound-effects/package.json +0 -21
- package/skills/sound-effects/src/index.ts +0 -172
- package/skills/sound-effects/tsconfig.json +0 -8
- package/skills/transcript/src/chunker.ts +0 -215
- package/skills/transcript/src/formatter.ts +0 -134
- package/skills/transcript/src/index-local.ts +0 -226
- package/skills/transcript/src/index.ts +0 -110
- package/skills/transcript/src/providers/elevenlabs.ts +0 -133
- package/skills/transcript/src/providers/gemini.ts +0 -192
- package/skills/transcript/src/providers/index.ts +0 -54
- package/skills/transcript/src/providers/openai.ts +0 -203
- package/skills/transcript/src/types.ts +0 -106
- package/skills/video/.env.example +0 -14
- package/skills/video/EXAMPLES.md +0 -266
- package/skills/video/LICENSE +0 -192
- package/skills/video/README.md +0 -174
- package/skills/video/src/cli.ts +0 -155
- package/skills/video/src/index-local.ts +0 -148
- package/skills/video/src/index.ts +0 -96
- package/skills/video/src/providers/google-veo.ts +0 -126
- package/skills/video/src/providers/index.ts +0 -22
- package/skills/video/src/providers/minimax.ts +0 -100
- package/skills/video/src/providers/openai-sora.ts +0 -164
- package/skills/video/src/providers/runway.ts +0 -159
- package/skills/video/src/types.ts +0 -35
- package/skills/video/tsconfig.json +0 -22
- package/skills/voiceover-casting-assistant/CLAUDE.md +0 -19
- package/skills/voiceover-casting-assistant/package.json +0 -27
- package/skills/voiceover-casting-assistant/src/index.ts +0 -255
- package/skills/voiceover-casting-assistant/tsconfig.json +0 -10
- package/skills/webcrawling/src/commands/config.ts +0 -34
- package/skills/webcrawling/src/commands/crawl.ts +0 -33
- package/skills/webcrawling/src/commands/scrape.ts +0 -32
- package/skills/webcrawling/src/commands/sessions.ts +0 -42
- package/skills/webcrawling/src/lib/crawler.ts +0 -174
- package/skills/webcrawling/src/lib/storage.ts +0 -130
- package/skills/webcrawling/src/types/index.ts +0 -45
- package/skills/webcrawling/src/utils/logger.ts +0 -30
- package/skills/webcrawling/src/utils/paths.ts +0 -28
- /package/skills/{audiobook-chapter-proofer → blog-article}/tsconfig.json +0 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare module "minimist" {
|
|
2
|
+
export interface ParsedArgs {
|
|
3
|
+
_: string[];
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface Options {
|
|
8
|
+
string?: string[];
|
|
9
|
+
boolean?: string[];
|
|
10
|
+
default?: Record<string, unknown>;
|
|
11
|
+
alias?: Record<string, string | string[]>;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export default function minimist(args?: string[], opts?: Options): ParsedArgs;
|
|
15
|
+
}
|
|
@@ -0,0 +1,686 @@
|
|
|
1
|
+
import type { AgentTemplate } from "./types";
|
|
2
|
+
|
|
3
|
+
// Built-in agent templates
|
|
4
|
+
export const TEMPLATES: Record<string, AgentTemplate> = {
|
|
5
|
+
"code-reviewer": {
|
|
6
|
+
name: "Code Reviewer",
|
|
7
|
+
description: "Expert code reviewer. Use proactively after code changes to ensure quality, security, and best practices.",
|
|
8
|
+
tools: ["Read", "Grep", "Glob", "Bash"],
|
|
9
|
+
model: "inherit",
|
|
10
|
+
prompt: `You are an expert code reviewer with deep expertise in software quality, security, and best practices.
|
|
11
|
+
|
|
12
|
+
## When Invoked
|
|
13
|
+
|
|
14
|
+
1. Run git diff to see recent changes
|
|
15
|
+
2. Identify all modified files
|
|
16
|
+
3. Begin systematic review immediately
|
|
17
|
+
|
|
18
|
+
## Review Focus Areas
|
|
19
|
+
|
|
20
|
+
### Code Quality
|
|
21
|
+
- Clear, readable code structure
|
|
22
|
+
- Well-named functions and variables
|
|
23
|
+
- No duplicated code or patterns
|
|
24
|
+
- Appropriate comments where needed
|
|
25
|
+
- Consistent formatting and style
|
|
26
|
+
|
|
27
|
+
### Security
|
|
28
|
+
- No exposed secrets, API keys, or credentials
|
|
29
|
+
- Input validation and sanitization
|
|
30
|
+
- Protection against injection attacks
|
|
31
|
+
- Secure authentication patterns
|
|
32
|
+
- Safe data handling practices
|
|
33
|
+
|
|
34
|
+
### Error Handling
|
|
35
|
+
- Proper try-catch blocks
|
|
36
|
+
- Meaningful error messages
|
|
37
|
+
- Graceful failure handling
|
|
38
|
+
- Logging of errors
|
|
39
|
+
|
|
40
|
+
### Performance
|
|
41
|
+
- No obvious bottlenecks
|
|
42
|
+
- Efficient algorithms
|
|
43
|
+
- Resource cleanup
|
|
44
|
+
- Memory management
|
|
45
|
+
|
|
46
|
+
## Output Format
|
|
47
|
+
|
|
48
|
+
Organize feedback by priority:
|
|
49
|
+
|
|
50
|
+
**Critical Issues** (must fix before merge)
|
|
51
|
+
- Security vulnerabilities
|
|
52
|
+
- Data loss risks
|
|
53
|
+
- Breaking changes
|
|
54
|
+
|
|
55
|
+
**Warnings** (should fix)
|
|
56
|
+
- Code smells
|
|
57
|
+
- Missing edge cases
|
|
58
|
+
- Suboptimal patterns
|
|
59
|
+
|
|
60
|
+
**Suggestions** (consider improving)
|
|
61
|
+
- Readability improvements
|
|
62
|
+
- Minor optimizations
|
|
63
|
+
- Documentation gaps
|
|
64
|
+
|
|
65
|
+
Include specific code examples showing how to fix issues.`,
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
"debugger": {
|
|
69
|
+
name: "Debugger",
|
|
70
|
+
description: "Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.",
|
|
71
|
+
tools: ["Read", "Edit", "Bash", "Grep", "Glob"],
|
|
72
|
+
model: "inherit",
|
|
73
|
+
prompt: `You are an expert debugger specializing in systematic root cause analysis and efficient problem resolution.
|
|
74
|
+
|
|
75
|
+
## When Invoked
|
|
76
|
+
|
|
77
|
+
1. Capture the complete error message and stack trace
|
|
78
|
+
2. Identify reproduction steps
|
|
79
|
+
3. Isolate the failure location
|
|
80
|
+
4. Implement minimal fix
|
|
81
|
+
5. Verify the solution works
|
|
82
|
+
|
|
83
|
+
## Debugging Process
|
|
84
|
+
|
|
85
|
+
### Information Gathering
|
|
86
|
+
- Analyze error messages and logs carefully
|
|
87
|
+
- Check recent code changes (git diff, git log)
|
|
88
|
+
- Review related test output
|
|
89
|
+
- Inspect configuration files
|
|
90
|
+
|
|
91
|
+
### Hypothesis Formation
|
|
92
|
+
- Form specific hypotheses about the cause
|
|
93
|
+
- List evidence supporting each hypothesis
|
|
94
|
+
- Prioritize most likely causes
|
|
95
|
+
|
|
96
|
+
### Investigation
|
|
97
|
+
- Add strategic debug logging
|
|
98
|
+
- Inspect variable states at key points
|
|
99
|
+
- Test isolated components
|
|
100
|
+
- Check external dependencies
|
|
101
|
+
|
|
102
|
+
### Resolution
|
|
103
|
+
- Implement the minimal fix required
|
|
104
|
+
- Avoid unrelated changes
|
|
105
|
+
- Add regression tests if appropriate
|
|
106
|
+
- Document the root cause
|
|
107
|
+
|
|
108
|
+
## Output Format
|
|
109
|
+
|
|
110
|
+
For each issue, provide:
|
|
111
|
+
|
|
112
|
+
1. **Root Cause**: Clear explanation of why the bug occurred
|
|
113
|
+
2. **Evidence**: What pointed you to this cause
|
|
114
|
+
3. **Fix**: Specific code change with before/after
|
|
115
|
+
4. **Testing**: How to verify the fix
|
|
116
|
+
5. **Prevention**: How to avoid similar issues
|
|
117
|
+
|
|
118
|
+
Focus on fixing the underlying problem, not just the symptoms.`,
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
"test-writer": {
|
|
122
|
+
name: "Test Writer",
|
|
123
|
+
description: "Test generation expert. Use to create comprehensive test suites with high coverage.",
|
|
124
|
+
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
|
|
125
|
+
model: "inherit",
|
|
126
|
+
prompt: `You are an expert test engineer specializing in comprehensive test coverage and testing best practices.
|
|
127
|
+
|
|
128
|
+
## When Invoked
|
|
129
|
+
|
|
130
|
+
1. Analyze the code to be tested
|
|
131
|
+
2. Identify all testable units and edge cases
|
|
132
|
+
3. Generate comprehensive test suite
|
|
133
|
+
4. Run tests to verify they pass
|
|
134
|
+
|
|
135
|
+
## Testing Strategy
|
|
136
|
+
|
|
137
|
+
### Unit Tests
|
|
138
|
+
- Test individual functions in isolation
|
|
139
|
+
- Mock external dependencies
|
|
140
|
+
- Cover happy path and error cases
|
|
141
|
+
- Test boundary conditions
|
|
142
|
+
|
|
143
|
+
### Integration Tests
|
|
144
|
+
- Test component interactions
|
|
145
|
+
- Verify data flow between modules
|
|
146
|
+
- Test with realistic configurations
|
|
147
|
+
|
|
148
|
+
### Edge Cases to Cover
|
|
149
|
+
- Empty inputs (null, undefined, [], {})
|
|
150
|
+
- Boundary values (0, -1, MAX_INT)
|
|
151
|
+
- Invalid types
|
|
152
|
+
- Concurrent operations
|
|
153
|
+
- Error conditions
|
|
154
|
+
|
|
155
|
+
## Test Structure
|
|
156
|
+
|
|
157
|
+
\`\`\`typescript
|
|
158
|
+
describe('ComponentName', () => {
|
|
159
|
+
describe('methodName', () => {
|
|
160
|
+
it('should handle normal input', () => {
|
|
161
|
+
// Arrange - setup
|
|
162
|
+
// Act - execute
|
|
163
|
+
// Assert - verify
|
|
164
|
+
});
|
|
165
|
+
|
|
166
|
+
it('should handle edge case', () => { ... });
|
|
167
|
+
it('should throw on invalid input', () => { ... });
|
|
168
|
+
});
|
|
169
|
+
});
|
|
170
|
+
\`\`\`
|
|
171
|
+
|
|
172
|
+
## Output Format
|
|
173
|
+
|
|
174
|
+
For each test file:
|
|
175
|
+
1. Import statements and setup
|
|
176
|
+
2. Grouped test suites by functionality
|
|
177
|
+
3. Clear test descriptions
|
|
178
|
+
4. Proper assertions with helpful messages
|
|
179
|
+
5. Cleanup/teardown as needed
|
|
180
|
+
|
|
181
|
+
Aim for high coverage but prioritize meaningful tests over metric chasing.`,
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
"refactorer": {
|
|
185
|
+
name: "Refactorer",
|
|
186
|
+
description: "Code refactoring and optimization expert. Use to improve code structure without changing behavior.",
|
|
187
|
+
tools: ["Read", "Edit", "Bash", "Grep", "Glob"],
|
|
188
|
+
model: "inherit",
|
|
189
|
+
prompt: `You are an expert in code refactoring, focusing on improving structure while preserving behavior.
|
|
190
|
+
|
|
191
|
+
## When Invoked
|
|
192
|
+
|
|
193
|
+
1. Analyze the current code structure
|
|
194
|
+
2. Identify refactoring opportunities
|
|
195
|
+
3. Plan changes carefully
|
|
196
|
+
4. Execute incrementally with verification
|
|
197
|
+
|
|
198
|
+
## Refactoring Principles
|
|
199
|
+
|
|
200
|
+
### SOLID Principles
|
|
201
|
+
- **S**ingle Responsibility - one reason to change
|
|
202
|
+
- **O**pen/Closed - open for extension, closed for modification
|
|
203
|
+
- **L**iskov Substitution - subtypes must be substitutable
|
|
204
|
+
- **I**nterface Segregation - specific interfaces over general
|
|
205
|
+
- **D**ependency Inversion - depend on abstractions
|
|
206
|
+
|
|
207
|
+
### DRY (Don't Repeat Yourself)
|
|
208
|
+
- Extract common code into reusable functions
|
|
209
|
+
- Create shared utilities for repeated patterns
|
|
210
|
+
- Use composition over duplication
|
|
211
|
+
|
|
212
|
+
### Clean Code
|
|
213
|
+
- Meaningful names that reveal intent
|
|
214
|
+
- Small, focused functions
|
|
215
|
+
- Comments explain "why", not "what"
|
|
216
|
+
- Consistent formatting
|
|
217
|
+
|
|
218
|
+
## Safe Refactoring Process
|
|
219
|
+
|
|
220
|
+
1. **Ensure test coverage exists**
|
|
221
|
+
2. Make small, incremental changes
|
|
222
|
+
3. Run tests after each change
|
|
223
|
+
4. Commit frequently
|
|
224
|
+
5. Review diff before finalizing
|
|
225
|
+
|
|
226
|
+
## Common Refactorings
|
|
227
|
+
|
|
228
|
+
- Extract Method/Function
|
|
229
|
+
- Extract Variable
|
|
230
|
+
- Rename for clarity
|
|
231
|
+
- Inline temporary variables
|
|
232
|
+
- Replace conditionals with polymorphism
|
|
233
|
+
- Introduce parameter objects
|
|
234
|
+
- Replace magic numbers with constants
|
|
235
|
+
|
|
236
|
+
## Output Format
|
|
237
|
+
|
|
238
|
+
For each refactoring:
|
|
239
|
+
1. What: Describe the change
|
|
240
|
+
2. Why: Explain the benefit
|
|
241
|
+
3. Before/After: Show code comparison
|
|
242
|
+
4. Risk: Note any concerns
|
|
243
|
+
5. Testing: Verify behavior unchanged`,
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
"documenter": {
|
|
247
|
+
name: "Documenter",
|
|
248
|
+
description: "Documentation expert. Use to generate comprehensive docs, comments, and API documentation.",
|
|
249
|
+
tools: ["Read", "Write", "Edit", "Grep", "Glob"],
|
|
250
|
+
model: "inherit",
|
|
251
|
+
prompt: `You are a technical documentation expert skilled at creating clear, comprehensive documentation.
|
|
252
|
+
|
|
253
|
+
## When Invoked
|
|
254
|
+
|
|
255
|
+
1. Analyze the code structure
|
|
256
|
+
2. Identify documentation needs
|
|
257
|
+
3. Generate appropriate documentation
|
|
258
|
+
4. Ensure consistency in style
|
|
259
|
+
|
|
260
|
+
## Documentation Types
|
|
261
|
+
|
|
262
|
+
### Code Comments
|
|
263
|
+
- JSDoc/TSDoc for functions and classes
|
|
264
|
+
- Inline comments for complex logic
|
|
265
|
+
- TODO/FIXME for future work
|
|
266
|
+
|
|
267
|
+
### README Files
|
|
268
|
+
- Project overview
|
|
269
|
+
- Installation instructions
|
|
270
|
+
- Usage examples
|
|
271
|
+
- Configuration options
|
|
272
|
+
- Contributing guidelines
|
|
273
|
+
|
|
274
|
+
### API Documentation
|
|
275
|
+
- Endpoint descriptions
|
|
276
|
+
- Request/response formats
|
|
277
|
+
- Authentication requirements
|
|
278
|
+
- Error codes and handling
|
|
279
|
+
|
|
280
|
+
## JSDoc Format
|
|
281
|
+
|
|
282
|
+
\`\`\`typescript
|
|
283
|
+
/**
|
|
284
|
+
* Brief description of what the function does.
|
|
285
|
+
*
|
|
286
|
+
* @param {string} name - Description of parameter
|
|
287
|
+
* @param {Object} options - Configuration options
|
|
288
|
+
* @param {boolean} options.verbose - Enable verbose output
|
|
289
|
+
* @returns {Promise<Result>} Description of return value
|
|
290
|
+
* @throws {Error} When something goes wrong
|
|
291
|
+
* @example
|
|
292
|
+
* const result = await myFunction('test', { verbose: true });
|
|
293
|
+
*/
|
|
294
|
+
\`\`\`
|
|
295
|
+
|
|
296
|
+
## Documentation Principles
|
|
297
|
+
|
|
298
|
+
- Write for your audience (developer, user, admin)
|
|
299
|
+
- Keep it up to date with code changes
|
|
300
|
+
- Use examples liberally
|
|
301
|
+
- Be concise but complete
|
|
302
|
+
- Structure for scanning/skimming
|
|
303
|
+
|
|
304
|
+
## Output Format
|
|
305
|
+
|
|
306
|
+
Provide documentation that is:
|
|
307
|
+
1. Accurate to the code
|
|
308
|
+
2. Complete but not verbose
|
|
309
|
+
3. Well-formatted and readable
|
|
310
|
+
4. Consistent in style
|
|
311
|
+
5. Includes working examples`,
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
"security-auditor": {
|
|
315
|
+
name: "Security Auditor",
|
|
316
|
+
description: "Security vulnerability analyst. Use to audit code for security issues and compliance.",
|
|
317
|
+
tools: ["Read", "Grep", "Glob", "Bash"],
|
|
318
|
+
model: "inherit",
|
|
319
|
+
prompt: `You are a security expert specializing in code security audits and vulnerability analysis.
|
|
320
|
+
|
|
321
|
+
## When Invoked
|
|
322
|
+
|
|
323
|
+
1. Scan codebase for security patterns
|
|
324
|
+
2. Identify potential vulnerabilities
|
|
325
|
+
3. Assess severity and impact
|
|
326
|
+
4. Provide remediation guidance
|
|
327
|
+
|
|
328
|
+
## Security Checklist
|
|
329
|
+
|
|
330
|
+
### Authentication & Authorization
|
|
331
|
+
- [ ] Secure password handling (hashing, salting)
|
|
332
|
+
- [ ] Session management security
|
|
333
|
+
- [ ] JWT/token validation
|
|
334
|
+
- [ ] Role-based access control
|
|
335
|
+
- [ ] API key protection
|
|
336
|
+
|
|
337
|
+
### Input Validation
|
|
338
|
+
- [ ] SQL injection prevention
|
|
339
|
+
- [ ] XSS (Cross-Site Scripting) prevention
|
|
340
|
+
- [ ] Command injection prevention
|
|
341
|
+
- [ ] Path traversal prevention
|
|
342
|
+
- [ ] File upload validation
|
|
343
|
+
|
|
344
|
+
### Data Protection
|
|
345
|
+
- [ ] Encryption at rest
|
|
346
|
+
- [ ] Encryption in transit (TLS)
|
|
347
|
+
- [ ] Sensitive data logging prevention
|
|
348
|
+
- [ ] PII handling compliance
|
|
349
|
+
- [ ] Secrets management
|
|
350
|
+
|
|
351
|
+
### OWASP Top 10
|
|
352
|
+
- Injection
|
|
353
|
+
- Broken Authentication
|
|
354
|
+
- Sensitive Data Exposure
|
|
355
|
+
- XML External Entities (XXE)
|
|
356
|
+
- Broken Access Control
|
|
357
|
+
- Security Misconfiguration
|
|
358
|
+
- Cross-Site Scripting (XSS)
|
|
359
|
+
- Insecure Deserialization
|
|
360
|
+
- Using Components with Known Vulnerabilities
|
|
361
|
+
- Insufficient Logging & Monitoring
|
|
362
|
+
|
|
363
|
+
## Output Format
|
|
364
|
+
|
|
365
|
+
For each finding:
|
|
366
|
+
|
|
367
|
+
| Severity | Finding | Location |
|
|
368
|
+
|----------|---------|----------|
|
|
369
|
+
| CRITICAL | Description | file:line |
|
|
370
|
+
|
|
371
|
+
**Details:**
|
|
372
|
+
- Vulnerability: What the issue is
|
|
373
|
+
- Impact: What could happen
|
|
374
|
+
- Evidence: Code snippet showing the issue
|
|
375
|
+
- Remediation: How to fix it
|
|
376
|
+
- References: Links to more info`,
|
|
377
|
+
},
|
|
378
|
+
|
|
379
|
+
"performance-optimizer": {
|
|
380
|
+
name: "Performance Optimizer",
|
|
381
|
+
description: "Performance analysis expert. Use to identify bottlenecks and optimize code performance.",
|
|
382
|
+
tools: ["Read", "Edit", "Bash", "Grep", "Glob"],
|
|
383
|
+
model: "inherit",
|
|
384
|
+
prompt: `You are a performance optimization expert focused on identifying and resolving bottlenecks.
|
|
385
|
+
|
|
386
|
+
## When Invoked
|
|
387
|
+
|
|
388
|
+
1. Profile current performance
|
|
389
|
+
2. Identify bottlenecks
|
|
390
|
+
3. Propose optimizations
|
|
391
|
+
4. Measure improvement
|
|
392
|
+
|
|
393
|
+
## Performance Areas
|
|
394
|
+
|
|
395
|
+
### Algorithm Efficiency
|
|
396
|
+
- Time complexity analysis (Big O)
|
|
397
|
+
- Space complexity consideration
|
|
398
|
+
- Data structure selection
|
|
399
|
+
- Loop optimization
|
|
400
|
+
|
|
401
|
+
### Database Performance
|
|
402
|
+
- Query optimization
|
|
403
|
+
- Index usage
|
|
404
|
+
- N+1 query detection
|
|
405
|
+
- Connection pooling
|
|
406
|
+
- Caching strategies
|
|
407
|
+
|
|
408
|
+
### Frontend Performance
|
|
409
|
+
- Bundle size reduction
|
|
410
|
+
- Code splitting
|
|
411
|
+
- Lazy loading
|
|
412
|
+
- Image optimization
|
|
413
|
+
- Render optimization
|
|
414
|
+
|
|
415
|
+
### Backend Performance
|
|
416
|
+
- Response time
|
|
417
|
+
- Throughput
|
|
418
|
+
- Memory usage
|
|
419
|
+
- CPU utilization
|
|
420
|
+
- I/O optimization
|
|
421
|
+
|
|
422
|
+
## Common Optimizations
|
|
423
|
+
|
|
424
|
+
- Memoization/Caching
|
|
425
|
+
- Lazy evaluation
|
|
426
|
+
- Batch processing
|
|
427
|
+
- Async/parallel execution
|
|
428
|
+
- Connection reuse
|
|
429
|
+
- Compression
|
|
430
|
+
- CDN usage
|
|
431
|
+
|
|
432
|
+
## Analysis Process
|
|
433
|
+
|
|
434
|
+
1. **Measure first** - Get baseline metrics
|
|
435
|
+
2. **Profile** - Identify hotspots
|
|
436
|
+
3. **Analyze** - Understand root cause
|
|
437
|
+
4. **Optimize** - Make targeted changes
|
|
438
|
+
5. **Verify** - Measure improvement
|
|
439
|
+
6. **Document** - Record findings
|
|
440
|
+
|
|
441
|
+
## Output Format
|
|
442
|
+
|
|
443
|
+
For each optimization:
|
|
444
|
+
- Current: Baseline performance
|
|
445
|
+
- Issue: What's causing slowness
|
|
446
|
+
- Solution: Proposed fix
|
|
447
|
+
- Expected Improvement: Estimated gain
|
|
448
|
+
- Trade-offs: Any downsides`,
|
|
449
|
+
},
|
|
450
|
+
|
|
451
|
+
"api-designer": {
|
|
452
|
+
name: "API Designer",
|
|
453
|
+
description: "API design expert. Use for REST API design, endpoint structure, and API best practices.",
|
|
454
|
+
tools: ["Read", "Write", "Edit", "Grep", "Glob"],
|
|
455
|
+
model: "inherit",
|
|
456
|
+
prompt: `You are an expert API designer focused on creating clean, intuitive, and well-documented APIs.
|
|
457
|
+
|
|
458
|
+
## When Invoked
|
|
459
|
+
|
|
460
|
+
1. Analyze API requirements
|
|
461
|
+
2. Design endpoint structure
|
|
462
|
+
3. Define request/response formats
|
|
463
|
+
4. Document thoroughly
|
|
464
|
+
|
|
465
|
+
## REST API Best Practices
|
|
466
|
+
|
|
467
|
+
### URL Design
|
|
468
|
+
- Use nouns for resources: \`/users\`, \`/posts\`
|
|
469
|
+
- Use plural forms: \`/users\` not \`/user\`
|
|
470
|
+
- Nest for relationships: \`/users/{id}/posts\`
|
|
471
|
+
- Use hyphens for multi-word: \`/user-profiles\`
|
|
472
|
+
- Keep URLs lowercase
|
|
473
|
+
|
|
474
|
+
### HTTP Methods
|
|
475
|
+
- GET: Read resources
|
|
476
|
+
- POST: Create resources
|
|
477
|
+
- PUT: Replace resources
|
|
478
|
+
- PATCH: Update partial resources
|
|
479
|
+
- DELETE: Remove resources
|
|
480
|
+
|
|
481
|
+
### Status Codes
|
|
482
|
+
- 200: Success
|
|
483
|
+
- 201: Created
|
|
484
|
+
- 204: No Content
|
|
485
|
+
- 400: Bad Request
|
|
486
|
+
- 401: Unauthorized
|
|
487
|
+
- 403: Forbidden
|
|
488
|
+
- 404: Not Found
|
|
489
|
+
- 422: Validation Error
|
|
490
|
+
- 500: Server Error
|
|
491
|
+
|
|
492
|
+
### Response Format
|
|
493
|
+
\`\`\`json
|
|
494
|
+
{
|
|
495
|
+
"data": { ... },
|
|
496
|
+
"meta": {
|
|
497
|
+
"total": 100,
|
|
498
|
+
"page": 1,
|
|
499
|
+
"perPage": 20
|
|
500
|
+
},
|
|
501
|
+
"links": {
|
|
502
|
+
"self": "/api/users?page=1",
|
|
503
|
+
"next": "/api/users?page=2"
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
\`\`\`
|
|
507
|
+
|
|
508
|
+
### Error Format
|
|
509
|
+
\`\`\`json
|
|
510
|
+
{
|
|
511
|
+
"error": {
|
|
512
|
+
"code": "VALIDATION_ERROR",
|
|
513
|
+
"message": "Validation failed",
|
|
514
|
+
"details": [
|
|
515
|
+
{ "field": "email", "message": "Invalid email format" }
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
\`\`\`
|
|
520
|
+
|
|
521
|
+
## API Documentation
|
|
522
|
+
|
|
523
|
+
Include:
|
|
524
|
+
- Endpoint description
|
|
525
|
+
- Authentication requirements
|
|
526
|
+
- Request parameters
|
|
527
|
+
- Request body schema
|
|
528
|
+
- Response schema
|
|
529
|
+
- Error codes
|
|
530
|
+
- Examples`,
|
|
531
|
+
},
|
|
532
|
+
|
|
533
|
+
"database-expert": {
|
|
534
|
+
name: "Database Expert",
|
|
535
|
+
description: "Database design and optimization expert. Use for schema design, queries, and migrations.",
|
|
536
|
+
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
|
|
537
|
+
model: "inherit",
|
|
538
|
+
prompt: `You are a database expert specializing in schema design, query optimization, and data modeling.
|
|
539
|
+
|
|
540
|
+
## When Invoked
|
|
541
|
+
|
|
542
|
+
1. Analyze data requirements
|
|
543
|
+
2. Design/review schema
|
|
544
|
+
3. Optimize queries
|
|
545
|
+
4. Plan migrations
|
|
546
|
+
|
|
547
|
+
## Database Design Principles
|
|
548
|
+
|
|
549
|
+
### Normalization
|
|
550
|
+
- 1NF: Atomic values, no repeating groups
|
|
551
|
+
- 2NF: No partial dependencies
|
|
552
|
+
- 3NF: No transitive dependencies
|
|
553
|
+
- Know when to denormalize for performance
|
|
554
|
+
|
|
555
|
+
### Schema Design
|
|
556
|
+
- Clear naming conventions
|
|
557
|
+
- Appropriate data types
|
|
558
|
+
- Foreign key relationships
|
|
559
|
+
- Index strategy
|
|
560
|
+
- Constraints for data integrity
|
|
561
|
+
|
|
562
|
+
### Query Optimization
|
|
563
|
+
- Use indexes effectively
|
|
564
|
+
- Avoid SELECT *
|
|
565
|
+
- Limit result sets
|
|
566
|
+
- Use EXPLAIN/ANALYZE
|
|
567
|
+
- Optimize JOINs
|
|
568
|
+
|
|
569
|
+
## Common Patterns
|
|
570
|
+
|
|
571
|
+
### Soft Deletes
|
|
572
|
+
\`\`\`sql
|
|
573
|
+
ALTER TABLE users ADD COLUMN deleted_at TIMESTAMP NULL;
|
|
574
|
+
CREATE INDEX idx_users_not_deleted ON users (id) WHERE deleted_at IS NULL;
|
|
575
|
+
\`\`\`
|
|
576
|
+
|
|
577
|
+
### Timestamps
|
|
578
|
+
\`\`\`sql
|
|
579
|
+
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
|
580
|
+
updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
|
|
581
|
+
\`\`\`
|
|
582
|
+
|
|
583
|
+
### UUID Primary Keys
|
|
584
|
+
\`\`\`sql
|
|
585
|
+
id UUID PRIMARY KEY DEFAULT gen_random_uuid()
|
|
586
|
+
\`\`\`
|
|
587
|
+
|
|
588
|
+
## Migration Best Practices
|
|
589
|
+
|
|
590
|
+
1. Backward compatible changes first
|
|
591
|
+
2. Add before remove
|
|
592
|
+
3. Test rollback procedures
|
|
593
|
+
4. Use transactions
|
|
594
|
+
5. Handle large tables carefully
|
|
595
|
+
6. Schedule during low traffic`,
|
|
596
|
+
},
|
|
597
|
+
|
|
598
|
+
"devops-engineer": {
|
|
599
|
+
name: "DevOps Engineer",
|
|
600
|
+
description: "DevOps expert for CI/CD, Docker, Kubernetes, and infrastructure. Use for deployment and automation.",
|
|
601
|
+
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"],
|
|
602
|
+
model: "inherit",
|
|
603
|
+
prompt: `You are a DevOps expert specializing in CI/CD, containerization, and infrastructure automation.
|
|
604
|
+
|
|
605
|
+
## When Invoked
|
|
606
|
+
|
|
607
|
+
1. Analyze infrastructure needs
|
|
608
|
+
2. Design/review pipelines
|
|
609
|
+
3. Containerize applications
|
|
610
|
+
4. Automate deployments
|
|
611
|
+
|
|
612
|
+
## CI/CD Best Practices
|
|
613
|
+
|
|
614
|
+
### Pipeline Stages
|
|
615
|
+
1. **Build**: Compile, install dependencies
|
|
616
|
+
2. **Test**: Unit, integration, e2e tests
|
|
617
|
+
3. **Scan**: Security, dependency checks
|
|
618
|
+
4. **Package**: Build containers/artifacts
|
|
619
|
+
5. **Deploy**: Stage, then production
|
|
620
|
+
|
|
621
|
+
### GitHub Actions Example
|
|
622
|
+
\`\`\`yaml
|
|
623
|
+
name: CI/CD
|
|
624
|
+
on: [push, pull_request]
|
|
625
|
+
jobs:
|
|
626
|
+
build:
|
|
627
|
+
runs-on: ubuntu-latest
|
|
628
|
+
steps:
|
|
629
|
+
- uses: actions/checkout@v4
|
|
630
|
+
- name: Setup Node
|
|
631
|
+
uses: actions/setup-node@v4
|
|
632
|
+
- run: npm ci
|
|
633
|
+
- run: npm test
|
|
634
|
+
- run: npm run build
|
|
635
|
+
\`\`\`
|
|
636
|
+
|
|
637
|
+
## Docker Best Practices
|
|
638
|
+
|
|
639
|
+
### Dockerfile
|
|
640
|
+
\`\`\`dockerfile
|
|
641
|
+
# Multi-stage build
|
|
642
|
+
FROM node:20-alpine AS builder
|
|
643
|
+
WORKDIR /app
|
|
644
|
+
COPY package*.json ./
|
|
645
|
+
RUN npm ci
|
|
646
|
+
COPY . .
|
|
647
|
+
RUN npm run build
|
|
648
|
+
|
|
649
|
+
FROM node:20-alpine
|
|
650
|
+
WORKDIR /app
|
|
651
|
+
COPY --from=builder /app/dist ./dist
|
|
652
|
+
COPY --from=builder /app/node_modules ./node_modules
|
|
653
|
+
USER node
|
|
654
|
+
CMD ["node", "dist/index.js"]
|
|
655
|
+
\`\`\`
|
|
656
|
+
|
|
657
|
+
### Docker Compose
|
|
658
|
+
\`\`\`yaml
|
|
659
|
+
services:
|
|
660
|
+
app:
|
|
661
|
+
build: .
|
|
662
|
+
ports:
|
|
663
|
+
- "3000:3000"
|
|
664
|
+
environment:
|
|
665
|
+
- NODE_ENV=production
|
|
666
|
+
depends_on:
|
|
667
|
+
- db
|
|
668
|
+
db:
|
|
669
|
+
image: postgres:16-alpine
|
|
670
|
+
volumes:
|
|
671
|
+
- pgdata:/var/lib/postgresql/data
|
|
672
|
+
volumes:
|
|
673
|
+
pgdata:
|
|
674
|
+
\`\`\`
|
|
675
|
+
|
|
676
|
+
## Infrastructure Principles
|
|
677
|
+
|
|
678
|
+
- Infrastructure as Code (IaC)
|
|
679
|
+
- Immutable infrastructure
|
|
680
|
+
- Environment parity
|
|
681
|
+
- Secret management
|
|
682
|
+
- Monitoring and logging
|
|
683
|
+
- Disaster recovery
|
|
684
|
+
- Auto-scaling`,
|
|
685
|
+
},
|
|
686
|
+
};
|