@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,37 @@
|
|
|
1
|
+
import { appendFileSync, existsSync, mkdirSync } from "fs";
|
|
2
|
+
import { randomUUID } from "crypto";
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
|
|
5
|
+
export const SKILL_NAME = "generate-mock-data";
|
|
6
|
+
export const SESSION_ID = randomUUID().slice(0, 8);
|
|
7
|
+
|
|
8
|
+
// Use SKILLS_OUTPUT_DIR from CLI if available, otherwise fall back to cwd
|
|
9
|
+
export const SKILLS_OUTPUT_DIR = process.env.SKILLS_OUTPUT_DIR || join(process.cwd(), ".skills");
|
|
10
|
+
export const EXPORTS_DIR = join(SKILLS_OUTPUT_DIR, "exports", SKILL_NAME);
|
|
11
|
+
export const LOGS_DIR = join(SKILLS_OUTPUT_DIR, "logs", SKILL_NAME);
|
|
12
|
+
|
|
13
|
+
// Session timestamp for log filename
|
|
14
|
+
export const SESSION_TIMESTAMP = new Date().toISOString().replace(/[:.]/g, "_").replace(/-/g, "_").slice(0, 19).toLowerCase();
|
|
15
|
+
|
|
16
|
+
// Ensure directories exist
|
|
17
|
+
export function ensureDir(dir: string) {
|
|
18
|
+
if (!existsSync(dir)) {
|
|
19
|
+
mkdirSync(dir, { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Logger
|
|
24
|
+
export function log(message: string, level: "info" | "error" | "success" = "info") {
|
|
25
|
+
const timestamp = new Date().toISOString();
|
|
26
|
+
const logFile = join(LOGS_DIR, `log_${SESSION_TIMESTAMP}_${SESSION_ID}.log`);
|
|
27
|
+
|
|
28
|
+
ensureDir(LOGS_DIR);
|
|
29
|
+
|
|
30
|
+
const logEntry = `[${timestamp}] [${level.toUpperCase()}] ${message}\n`;
|
|
31
|
+
appendFileSync(logFile, logEntry);
|
|
32
|
+
|
|
33
|
+
const prefix = level === "error" ? "❌" : level === "success" ? "✅" : "ℹ️";
|
|
34
|
+
console.log(`${prefix} ${message}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Preset schemas
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Preset, SchemaField } from "./types";
|
|
2
|
+
|
|
3
|
+
export const PRESET_SCHEMAS: Record<Preset, SchemaField> = {
|
|
4
|
+
users: {
|
|
5
|
+
id: "uuid",
|
|
6
|
+
firstName: "firstName",
|
|
7
|
+
lastName: "lastName",
|
|
8
|
+
email: "email",
|
|
9
|
+
phone: "phone",
|
|
10
|
+
dateOfBirth: "date",
|
|
11
|
+
username: "username",
|
|
12
|
+
avatarUrl: "avatarUrl",
|
|
13
|
+
address: "address",
|
|
14
|
+
city: "city",
|
|
15
|
+
state: "state",
|
|
16
|
+
zipCode: "zipCode",
|
|
17
|
+
country: "country",
|
|
18
|
+
},
|
|
19
|
+
products: {
|
|
20
|
+
id: "uuid",
|
|
21
|
+
name: "productName",
|
|
22
|
+
description: "paragraph",
|
|
23
|
+
price: "price",
|
|
24
|
+
category: "category",
|
|
25
|
+
sku: "sku",
|
|
26
|
+
stock: "number",
|
|
27
|
+
brand: "company",
|
|
28
|
+
imageUrl: "imageUrl",
|
|
29
|
+
rating: "rating",
|
|
30
|
+
},
|
|
31
|
+
orders: {
|
|
32
|
+
orderId: "uuid",
|
|
33
|
+
customerId: "uuid",
|
|
34
|
+
customerName: "name",
|
|
35
|
+
customerEmail: "email",
|
|
36
|
+
orderDate: "date",
|
|
37
|
+
items: "orderItems",
|
|
38
|
+
subtotal: "price",
|
|
39
|
+
tax: "price",
|
|
40
|
+
shipping: "price",
|
|
41
|
+
total: "price",
|
|
42
|
+
status: "orderStatus",
|
|
43
|
+
trackingNumber: "trackingNumber",
|
|
44
|
+
},
|
|
45
|
+
companies: {
|
|
46
|
+
id: "uuid",
|
|
47
|
+
name: "company",
|
|
48
|
+
industry: "industry",
|
|
49
|
+
employees: "number",
|
|
50
|
+
foundedYear: "year",
|
|
51
|
+
revenue: "price",
|
|
52
|
+
website: "url",
|
|
53
|
+
description: "paragraph",
|
|
54
|
+
logoUrl: "imageUrl",
|
|
55
|
+
address: "address",
|
|
56
|
+
city: "city",
|
|
57
|
+
country: "country",
|
|
58
|
+
},
|
|
59
|
+
articles: {
|
|
60
|
+
id: "uuid",
|
|
61
|
+
title: "title",
|
|
62
|
+
author: "name",
|
|
63
|
+
content: "paragraph",
|
|
64
|
+
excerpt: "sentence",
|
|
65
|
+
publishedDate: "date",
|
|
66
|
+
tags: "tags",
|
|
67
|
+
category: "category",
|
|
68
|
+
readingTime: "number",
|
|
69
|
+
viewCount: "number",
|
|
70
|
+
imageUrl: "imageUrl",
|
|
71
|
+
},
|
|
72
|
+
reviews: {
|
|
73
|
+
id: "uuid",
|
|
74
|
+
reviewerName: "name",
|
|
75
|
+
rating: "rating",
|
|
76
|
+
title: "sentence",
|
|
77
|
+
text: "paragraph",
|
|
78
|
+
date: "date",
|
|
79
|
+
verifiedPurchase: "boolean",
|
|
80
|
+
helpfulCount: "number",
|
|
81
|
+
productId: "uuid",
|
|
82
|
+
},
|
|
83
|
+
events: {
|
|
84
|
+
id: "uuid",
|
|
85
|
+
name: "title",
|
|
86
|
+
description: "paragraph",
|
|
87
|
+
startDate: "date",
|
|
88
|
+
endDate: "date",
|
|
89
|
+
location: "address",
|
|
90
|
+
organizer: "name",
|
|
91
|
+
category: "category",
|
|
92
|
+
attendees: "number",
|
|
93
|
+
ticketPrice: "price",
|
|
94
|
+
status: "eventStatus",
|
|
95
|
+
},
|
|
96
|
+
transactions: {
|
|
97
|
+
transactionId: "uuid",
|
|
98
|
+
amount: "price",
|
|
99
|
+
currency: "currency",
|
|
100
|
+
type: "transactionType",
|
|
101
|
+
date: "date",
|
|
102
|
+
description: "sentence",
|
|
103
|
+
fromAccount: "accountNumber",
|
|
104
|
+
toAccount: "accountNumber",
|
|
105
|
+
status: "transactionStatus",
|
|
106
|
+
balance: "price",
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// Seeded random number generator
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type Preset = "users" | "products" | "orders" | "companies" | "articles" | "reviews" | "events" | "transactions";
|
|
2
|
+
export type OutputFormat = "json" | "csv" | "sql" | "typescript";
|
|
3
|
+
export type Locale = "en-US" | "de-DE" | "ja-JP" | "fr-FR" | "es-ES" | "pt-BR" | "it-IT" | "nl-NL" | "sv-SE" | "pl-PL";
|
|
4
|
+
|
|
5
|
+
export interface GenerateOptions {
|
|
6
|
+
preset?: Preset;
|
|
7
|
+
count: number;
|
|
8
|
+
schema?: string;
|
|
9
|
+
format: OutputFormat;
|
|
10
|
+
locale: Locale;
|
|
11
|
+
seed?: string;
|
|
12
|
+
realistic: boolean;
|
|
13
|
+
output?: string;
|
|
14
|
+
table: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SchemaField {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Constants
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { CommitInfo, GitDiffResult, Options, PRDescription } from "./types";
|
|
2
|
+
|
|
3
|
+
export async function analyzeWithAI(
|
|
4
|
+
diff: string,
|
|
5
|
+
commits: CommitInfo[],
|
|
6
|
+
files: GitDiffResult['files'],
|
|
7
|
+
options: Options
|
|
8
|
+
): Promise<PRDescription> {
|
|
9
|
+
const apiKey = process.env.ANTHROPIC_API_KEY;
|
|
10
|
+
|
|
11
|
+
if (!apiKey) {
|
|
12
|
+
if (options.verbose) {
|
|
13
|
+
console.log('⚠️ ANTHROPIC_API_KEY not set, using basic template');
|
|
14
|
+
}
|
|
15
|
+
return generateBasicDescription(diff, commits, files);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
try {
|
|
19
|
+
const prompt = buildAnalysisPrompt(diff, commits, files);
|
|
20
|
+
|
|
21
|
+
const response = await fetch('https://api.anthropic.com/v1/messages', {
|
|
22
|
+
method: 'POST',
|
|
23
|
+
headers: {
|
|
24
|
+
'Content-Type': 'application/json',
|
|
25
|
+
'x-api-key': apiKey,
|
|
26
|
+
'anthropic-version': '2023-06-01',
|
|
27
|
+
},
|
|
28
|
+
body: JSON.stringify({
|
|
29
|
+
model: options.model,
|
|
30
|
+
max_tokens: 4096,
|
|
31
|
+
messages: [
|
|
32
|
+
{
|
|
33
|
+
role: 'user',
|
|
34
|
+
content: prompt,
|
|
35
|
+
},
|
|
36
|
+
],
|
|
37
|
+
}),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
if (!response.ok) {
|
|
41
|
+
throw new Error(`API request failed: ${response.statusText}`);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const data = await response.json();
|
|
45
|
+
const content = data.content[0].text;
|
|
46
|
+
|
|
47
|
+
return parseAIResponse(content, files);
|
|
48
|
+
} catch (error) {
|
|
49
|
+
if (options.verbose) {
|
|
50
|
+
console.error('AI analysis failed:', error);
|
|
51
|
+
console.log('Falling back to basic template');
|
|
52
|
+
}
|
|
53
|
+
return generateBasicDescription(diff, commits, files);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function buildAnalysisPrompt(
|
|
58
|
+
diff: string,
|
|
59
|
+
commits: CommitInfo[],
|
|
60
|
+
files: GitDiffResult['files']
|
|
61
|
+
): string {
|
|
62
|
+
// Truncate diff if too large
|
|
63
|
+
const maxDiffLength = 50000;
|
|
64
|
+
const truncatedDiff = diff.length > maxDiffLength
|
|
65
|
+
? diff.substring(0, maxDiffLength) + '\n\n[... diff truncated ...]'
|
|
66
|
+
: diff;
|
|
67
|
+
|
|
68
|
+
const commitMessages = commits.map(c => `- ${c.message} (${c.hash})`).join('\n');
|
|
69
|
+
|
|
70
|
+
return `Analyze the following git changes and generate a comprehensive pull request description.
|
|
71
|
+
|
|
72
|
+
FILES CHANGED:
|
|
73
|
+
Added: ${files.added.join(', ') || 'none'}
|
|
74
|
+
Modified: ${files.modified.join(', ') || 'none'}
|
|
75
|
+
Deleted: ${files.deleted.join(', ') || 'none'}
|
|
76
|
+
|
|
77
|
+
COMMIT HISTORY:
|
|
78
|
+
${commitMessages || 'No commits'}
|
|
79
|
+
|
|
80
|
+
GIT DIFF:
|
|
81
|
+
${truncatedDiff}
|
|
82
|
+
|
|
83
|
+
Please provide a PR description in the following JSON format:
|
|
84
|
+
{
|
|
85
|
+
"summary": "Brief 1-2 sentence overview of what this PR does",
|
|
86
|
+
"changes": ["List of key changes made (3-7 items)"],
|
|
87
|
+
"whyChanged": "Detailed explanation of why these changes were needed and the approach taken",
|
|
88
|
+
"breakingChanges": ["List any breaking changes, or empty array if none"],
|
|
89
|
+
"testPlan": ["Suggested testing steps"],
|
|
90
|
+
"additionalNotes": ["Any other relevant notes"]
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
Focus on:
|
|
94
|
+
1. What problem is being solved
|
|
95
|
+
2. Key technical changes
|
|
96
|
+
3. Any breaking changes or migration notes
|
|
97
|
+
4. Testing recommendations
|
|
98
|
+
|
|
99
|
+
Return only the JSON, no additional text.`;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
function parseAIResponse(content: string, files: GitDiffResult['files']): PRDescription {
|
|
103
|
+
try {
|
|
104
|
+
// Extract JSON from markdown code blocks if present
|
|
105
|
+
const jsonMatch = content.match(/\`\`\`(?:json)?\s*(\{[\s\S]*\})\s*\`\`\`/);
|
|
106
|
+
const jsonStr = jsonMatch ? jsonMatch[1] : content;
|
|
107
|
+
|
|
108
|
+
const parsed = JSON.parse(jsonStr);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
summary: parsed.summary || 'Changes made to the codebase',
|
|
112
|
+
changes: parsed.changes || [],
|
|
113
|
+
whatChanged: files,
|
|
114
|
+
whyChanged: parsed.whyChanged || 'No detailed explanation provided',
|
|
115
|
+
breakingChanges: parsed.breakingChanges || [],
|
|
116
|
+
testPlan: parsed.testPlan || [],
|
|
117
|
+
additionalNotes: parsed.additionalNotes || [],
|
|
118
|
+
};
|
|
119
|
+
} catch (error) {
|
|
120
|
+
throw new Error(`Failed to parse AI response: ${error}`);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function generateBasicDescription(
|
|
125
|
+
diff: string,
|
|
126
|
+
commits: CommitInfo[],
|
|
127
|
+
files: GitDiffResult['files']
|
|
128
|
+
): PRDescription {
|
|
129
|
+
const summary = commits.length > 0
|
|
130
|
+
? commits[0].message
|
|
131
|
+
: 'Changes to the codebase';
|
|
132
|
+
|
|
133
|
+
const changes = commits.map(c => c.message);
|
|
134
|
+
|
|
135
|
+
return {
|
|
136
|
+
summary,
|
|
137
|
+
changes: changes.length > 0 ? changes : ['Various code changes'],
|
|
138
|
+
whatChanged: files,
|
|
139
|
+
whyChanged: 'Please add context about why these changes were made.',
|
|
140
|
+
breakingChanges: [],
|
|
141
|
+
testPlan: ['Run existing test suite', 'Manual testing as needed'],
|
|
142
|
+
additionalNotes: [],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import type { Options } from "./types";
|
|
2
|
+
|
|
3
|
+
export function parseArguments(): Options {
|
|
4
|
+
const args = process.argv.slice(2);
|
|
5
|
+
if (args.includes("--help") || args.includes("-h")) {
|
|
6
|
+
console.log(`generate-pr-description
|
|
7
|
+
|
|
8
|
+
Usage:
|
|
9
|
+
generate-pr-description [options]
|
|
10
|
+
|
|
11
|
+
Options:
|
|
12
|
+
--base <branch> Base branch, default main
|
|
13
|
+
--head <branch> Head branch
|
|
14
|
+
--format <format> github, gitlab, bitbucket, or plain
|
|
15
|
+
--output <path> Output file
|
|
16
|
+
--include-files Include changed file list
|
|
17
|
+
--staged Use staged changes
|
|
18
|
+
--unstaged Use unstaged changes
|
|
19
|
+
--no-ai Generate a basic non-AI template
|
|
20
|
+
--copy Copy output to clipboard`);
|
|
21
|
+
process.exit(0);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const options: Options = {
|
|
25
|
+
base: 'main',
|
|
26
|
+
format: 'github',
|
|
27
|
+
includeFiles: false,
|
|
28
|
+
staged: false,
|
|
29
|
+
unstaged: false,
|
|
30
|
+
noAi: false,
|
|
31
|
+
model: 'claude-3-5-sonnet-20241022',
|
|
32
|
+
copy: false,
|
|
33
|
+
verbose: false,
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
for (let i = 0; i < args.length; i++) {
|
|
37
|
+
const arg = args[i];
|
|
38
|
+
|
|
39
|
+
switch (arg) {
|
|
40
|
+
case '--base':
|
|
41
|
+
options.base = args[++i];
|
|
42
|
+
break;
|
|
43
|
+
case '--head':
|
|
44
|
+
options.head = args[++i];
|
|
45
|
+
break;
|
|
46
|
+
case '--format':
|
|
47
|
+
options.format = args[++i] as Options['format'];
|
|
48
|
+
break;
|
|
49
|
+
case '--output':
|
|
50
|
+
options.output = args[++i];
|
|
51
|
+
break;
|
|
52
|
+
case '--include-files':
|
|
53
|
+
options.includeFiles = true;
|
|
54
|
+
break;
|
|
55
|
+
case '--template':
|
|
56
|
+
options.template = args[++i];
|
|
57
|
+
break;
|
|
58
|
+
case '--staged':
|
|
59
|
+
options.staged = true;
|
|
60
|
+
break;
|
|
61
|
+
case '--unstaged':
|
|
62
|
+
options.unstaged = true;
|
|
63
|
+
break;
|
|
64
|
+
case '--no-ai':
|
|
65
|
+
options.noAi = true;
|
|
66
|
+
break;
|
|
67
|
+
case '--model':
|
|
68
|
+
options.model = args[++i];
|
|
69
|
+
break;
|
|
70
|
+
case '--copy':
|
|
71
|
+
options.copy = true;
|
|
72
|
+
break;
|
|
73
|
+
case '--verbose':
|
|
74
|
+
options.verbose = true;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return options;
|
|
80
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { spawnSync } from "child_process";
|
|
2
|
+
|
|
3
|
+
export function copyToClipboard(text: string): boolean {
|
|
4
|
+
try {
|
|
5
|
+
// Try pbcopy (macOS)
|
|
6
|
+
const pbcopy = spawnSync('pbcopy', [], {
|
|
7
|
+
input: text,
|
|
8
|
+
encoding: 'utf-8',
|
|
9
|
+
});
|
|
10
|
+
if (pbcopy.status === 0) return true;
|
|
11
|
+
|
|
12
|
+
// Try xclip (Linux)
|
|
13
|
+
const xclip = spawnSync('xclip', ['-selection', 'clipboard'], {
|
|
14
|
+
input: text,
|
|
15
|
+
encoding: 'utf-8',
|
|
16
|
+
});
|
|
17
|
+
if (xclip.status === 0) return true;
|
|
18
|
+
|
|
19
|
+
// Try wl-copy (Wayland)
|
|
20
|
+
const wlcopy = spawnSync('wl-copy', [], {
|
|
21
|
+
input: text,
|
|
22
|
+
encoding: 'utf-8',
|
|
23
|
+
});
|
|
24
|
+
if (wlcopy.status === 0) return true;
|
|
25
|
+
|
|
26
|
+
return false;
|
|
27
|
+
} catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
import type { Options, PRDescription } from "./types";
|
|
2
|
+
|
|
3
|
+
function formatGitHub(description: PRDescription, options: Options): string {
|
|
4
|
+
let output = '## Summary\n\n';
|
|
5
|
+
output += `${description.summary}\n\n`;
|
|
6
|
+
|
|
7
|
+
if (description.changes.length > 0) {
|
|
8
|
+
output += '## Changes\n\n';
|
|
9
|
+
description.changes.forEach(change => {
|
|
10
|
+
output += `- ${change}\n`;
|
|
11
|
+
});
|
|
12
|
+
output += '\n';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (options.includeFiles) {
|
|
16
|
+
output += '## What Changed\n\n';
|
|
17
|
+
|
|
18
|
+
if (description.whatChanged.added.length > 0) {
|
|
19
|
+
output += '### Added\n';
|
|
20
|
+
description.whatChanged.added.forEach(file => {
|
|
21
|
+
output += `- \`${file}\`\n`;
|
|
22
|
+
});
|
|
23
|
+
output += '\n';
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (description.whatChanged.modified.length > 0) {
|
|
27
|
+
output += '### Modified\n';
|
|
28
|
+
description.whatChanged.modified.forEach(file => {
|
|
29
|
+
output += `- \`${file}\`\n`;
|
|
30
|
+
});
|
|
31
|
+
output += '\n';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (description.whatChanged.deleted.length > 0) {
|
|
35
|
+
output += '### Deleted\n';
|
|
36
|
+
description.whatChanged.deleted.forEach(file => {
|
|
37
|
+
output += `- \`${file}\`\n`;
|
|
38
|
+
});
|
|
39
|
+
output += '\n';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
output += '## Why These Changes\n\n';
|
|
44
|
+
output += `${description.whyChanged}\n\n`;
|
|
45
|
+
|
|
46
|
+
if (description.breakingChanges.length > 0) {
|
|
47
|
+
output += '## Breaking Changes\n\n';
|
|
48
|
+
description.breakingChanges.forEach(change => {
|
|
49
|
+
output += `- 🚨 ${change}\n`;
|
|
50
|
+
});
|
|
51
|
+
output += '\n';
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
if (description.testPlan.length > 0) {
|
|
55
|
+
output += '## Testing\n\n';
|
|
56
|
+
output += '### Test Plan\n';
|
|
57
|
+
description.testPlan.forEach(test => {
|
|
58
|
+
output += `- [ ] ${test}\n`;
|
|
59
|
+
});
|
|
60
|
+
output += '\n';
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (description.additionalNotes.length > 0) {
|
|
64
|
+
output += '## Additional Notes\n\n';
|
|
65
|
+
description.additionalNotes.forEach(note => {
|
|
66
|
+
output += `- ${note}\n`;
|
|
67
|
+
});
|
|
68
|
+
output += '\n';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
return output;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function formatGitLab(description: PRDescription, options: Options): string {
|
|
75
|
+
let output = '## What does this MR do?\n\n';
|
|
76
|
+
output += `${description.summary}\n\n`;
|
|
77
|
+
|
|
78
|
+
if (description.changes.length > 0) {
|
|
79
|
+
output += '## Changes Made\n\n';
|
|
80
|
+
description.changes.forEach(change => {
|
|
81
|
+
output += `- ${change}\n`;
|
|
82
|
+
});
|
|
83
|
+
output += '\n';
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
output += '## Why was this MR needed?\n\n';
|
|
87
|
+
output += `${description.whyChanged}\n\n`;
|
|
88
|
+
|
|
89
|
+
if (description.breakingChanges.length > 0) {
|
|
90
|
+
output += '## Breaking Changes\n\n';
|
|
91
|
+
description.breakingChanges.forEach(change => {
|
|
92
|
+
output += `- ⚠️ ${change}\n`;
|
|
93
|
+
});
|
|
94
|
+
output += '\n';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
output += '## Does this MR meet the acceptance criteria?\n\n';
|
|
98
|
+
if (description.testPlan.length > 0) {
|
|
99
|
+
description.testPlan.forEach(test => {
|
|
100
|
+
output += `- [ ] ${test}\n`;
|
|
101
|
+
});
|
|
102
|
+
} else {
|
|
103
|
+
output += '- [ ] Tests added/updated\n';
|
|
104
|
+
output += '- [ ] Documentation updated\n';
|
|
105
|
+
output += '- [ ] Code reviewed\n';
|
|
106
|
+
output += '- [ ] All pipelines pass\n';
|
|
107
|
+
}
|
|
108
|
+
output += '\n';
|
|
109
|
+
|
|
110
|
+
if (options.includeFiles) {
|
|
111
|
+
output += '## Files Changed\n\n';
|
|
112
|
+
const totalFiles =
|
|
113
|
+
description.whatChanged.added.length +
|
|
114
|
+
description.whatChanged.modified.length +
|
|
115
|
+
description.whatChanged.deleted.length;
|
|
116
|
+
output += `${totalFiles} files changed\n\n`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return output;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
function formatBitbucket(description: PRDescription, options: Options): string {
|
|
123
|
+
let output = '# Description\n\n';
|
|
124
|
+
output += `${description.summary}\n\n`;
|
|
125
|
+
|
|
126
|
+
if (description.changes.length > 0) {
|
|
127
|
+
output += '## Changes\n\n';
|
|
128
|
+
description.changes.forEach(change => {
|
|
129
|
+
output += `* ${change}\n`;
|
|
130
|
+
});
|
|
131
|
+
output += '\n';
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
output += '## Context\n\n';
|
|
135
|
+
output += `${description.whyChanged}\n\n`;
|
|
136
|
+
|
|
137
|
+
if (description.breakingChanges.length > 0) {
|
|
138
|
+
output += '## Breaking Changes\n\n';
|
|
139
|
+
description.breakingChanges.forEach(change => {
|
|
140
|
+
output += `* ${change}\n`;
|
|
141
|
+
});
|
|
142
|
+
output += '\n';
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
output += '## Testing\n\n';
|
|
146
|
+
if (description.testPlan.length > 0) {
|
|
147
|
+
description.testPlan.forEach(test => {
|
|
148
|
+
output += `* [ ] ${test}\n`;
|
|
149
|
+
});
|
|
150
|
+
} else {
|
|
151
|
+
output += '* [ ] Tests pass\n';
|
|
152
|
+
output += '* [ ] Code reviewed\n';
|
|
153
|
+
}
|
|
154
|
+
output += '\n';
|
|
155
|
+
|
|
156
|
+
return output;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
function formatPlain(description: PRDescription, options: Options): string {
|
|
160
|
+
let output = `# ${description.summary}\n\n`;
|
|
161
|
+
|
|
162
|
+
if (description.changes.length > 0) {
|
|
163
|
+
output += '## Changes\n\n';
|
|
164
|
+
description.changes.forEach(change => {
|
|
165
|
+
output += `- ${change}\n`;
|
|
166
|
+
});
|
|
167
|
+
output += '\n';
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
if (options.includeFiles) {
|
|
171
|
+
const totalFiles =
|
|
172
|
+
description.whatChanged.added.length +
|
|
173
|
+
description.whatChanged.modified.length +
|
|
174
|
+
description.whatChanged.deleted.length;
|
|
175
|
+
output += `## Files Changed: ${totalFiles}\n\n`;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
output += '## Details\n\n';
|
|
179
|
+
output += `${description.whyChanged}\n\n`;
|
|
180
|
+
|
|
181
|
+
if (description.breakingChanges.length > 0) {
|
|
182
|
+
output += '## Breaking Changes\n\n';
|
|
183
|
+
description.breakingChanges.forEach(change => {
|
|
184
|
+
output += `- ${change}\n`;
|
|
185
|
+
});
|
|
186
|
+
output += '\n';
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
return output;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export function formatOutput(description: PRDescription, options: Options): string {
|
|
193
|
+
switch (options.format) {
|
|
194
|
+
case 'gitlab':
|
|
195
|
+
return formatGitLab(description, options);
|
|
196
|
+
case 'bitbucket':
|
|
197
|
+
return formatBitbucket(description, options);
|
|
198
|
+
case 'plain':
|
|
199
|
+
return formatPlain(description, options);
|
|
200
|
+
case 'github':
|
|
201
|
+
default:
|
|
202
|
+
return formatGitHub(description, options);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
export function applyTemplate(template: string, description: PRDescription): string {
|
|
207
|
+
let output = template;
|
|
208
|
+
|
|
209
|
+
output = output.replace(/\{\{summary\}\}/g, description.summary);
|
|
210
|
+
output = output.replace(/\{\{changes\}\}/g, description.changes.join('\n- '));
|
|
211
|
+
output = output.replace(/\{\{why_changed\}\}/g, description.whyChanged);
|
|
212
|
+
output = output.replace(
|
|
213
|
+
/\{\{breaking_changes\}\}/g,
|
|
214
|
+
description.breakingChanges.join('\n- ')
|
|
215
|
+
);
|
|
216
|
+
output = output.replace(/\{\{test_plan\}\}/g, description.testPlan.join('\n- [ ] '));
|
|
217
|
+
output = output.replace(
|
|
218
|
+
/\{\{files_added\}\}/g,
|
|
219
|
+
description.whatChanged.added.join('\n- ')
|
|
220
|
+
);
|
|
221
|
+
output = output.replace(
|
|
222
|
+
/\{\{files_modified\}\}/g,
|
|
223
|
+
description.whatChanged.modified.join('\n- ')
|
|
224
|
+
);
|
|
225
|
+
output = output.replace(
|
|
226
|
+
/\{\{files_deleted\}\}/g,
|
|
227
|
+
description.whatChanged.deleted.join('\n- ')
|
|
228
|
+
);
|
|
229
|
+
|
|
230
|
+
return output;
|
|
231
|
+
}
|