shmakk 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -1
- package/package.json +6 -3
- package/scripts/import-skills.js +536 -0
- package/scripts/install-skills.js +64 -0
- package/skills/ai-elements.md +482 -0
- package/skills/architecture.md +151 -0
- package/skills/backend-adapter-aws-lambda.md +204 -0
- package/skills/backend-adapter-express.md +177 -0
- package/skills/backend-adapter-fastify.md +222 -0
- package/skills/backend-adapter-fetch.md +200 -0
- package/skills/backend-api-docs.md +22 -0
- package/skills/backend-aspire.md +232 -0
- package/skills/backend-aspnet-core.md +62 -0
- package/skills/backend-build-chatgpt-app.md +321 -0
- package/skills/backend-build-mcp-app.md +393 -0
- package/skills/backend-build-mcp-server.md +222 -0
- package/skills/backend-build-mcpb.md +200 -0
- package/skills/backend-building-ai-agent-on-cloudflare.md +401 -0
- package/skills/backend-caching.md +206 -0
- package/skills/backend-chatgpt-app-submission.md +157 -0
- package/skills/backend-chatgpt-apps.md +321 -0
- package/skills/backend-client-setup.md +318 -0
- package/skills/backend-containerize-aspnet-framework.md +455 -0
- package/skills/backend-create-spring-boot-java-project.md +164 -0
- package/skills/backend-create-spring-boot-kotlin-project.md +148 -0
- package/skills/backend-csharp-async.md +50 -0
- package/skills/backend-csharp-docs.md +63 -0
- package/skills/backend-csharp-mcp-server-generator.md +60 -0
- package/skills/backend-dotenv.md +201 -0
- package/skills/backend-dotenvx.md +119 -0
- package/skills/backend-env-vars.md +259 -0
- package/skills/backend-error-handling.md +254 -0
- package/skills/backend-fastapi.md +437 -0
- package/skills/backend-go-mcp-server-generator.md +335 -0
- package/skills/backend-java-mcp-server-generator.md +757 -0
- package/skills/backend-kotlin-mcp-server-generator.md +450 -0
- package/skills/backend-middlewares.md +243 -0
- package/skills/backend-multi-stage-dockerfile.md +47 -0
- package/skills/backend-nestjs.md +192 -0
- package/skills/backend-next-forge.md +375 -0
- package/skills/backend-nextjs.md +746 -0
- package/skills/backend-openapi-to-application-code.md +113 -0
- package/skills/backend-php-mcp-server-generator.md +523 -0
- package/skills/backend-python-mcp-server-generator.md +106 -0
- package/skills/backend-routing-middleware.md +251 -0
- package/skills/backend-ruby-mcp-server-generator.md +661 -0
- package/skills/backend-rust-mcp-server-generator.md +578 -0
- package/skills/backend-semantic-kernel.md +57 -0
- package/skills/backend-server-setup.md +379 -0
- package/skills/backend-server-side-calls.md +250 -0
- package/skills/backend-subscriptions.md +407 -0
- package/skills/backend-swift-mcp-server-generator.md +670 -0
- package/skills/backend-trpc-router.md +152 -0
- package/skills/backend-typescript-mcp-server-generator.md +91 -0
- package/skills/backend-validators.md +229 -0
- package/skills/backend.md +76 -0
- package/skills/backup.md +165 -0
- package/skills/budget.md +140 -0
- package/skills/business-gtm-0-to-1-launch.md +322 -0
- package/skills/business-gtm-operating-cadence.md +421 -0
- package/skills/business-gtm-positioning-strategy.md +439 -0
- package/skills/business-gtm-product-led-growth.md +340 -0
- package/skills/calendar.md +95 -0
- package/skills/code-review.md +130 -0
- package/skills/compliance.md +168 -0
- package/skills/contracts.md +130 -0
- package/skills/daily-job-run.md +46 -0
- package/skills/daily-webdesign.md +187 -0
- package/skills/database-bigquery-pipeline-audit.md +130 -0
- package/skills/database-cosmosdb-datamodeling.md +1046 -0
- package/skills/database-durable-objects.md +187 -0
- package/skills/database-ef-core.md +76 -0
- package/skills/database-fabric-lakehouse.md +107 -0
- package/skills/database-neon-postgres-egress-optimizer.md +213 -0
- package/skills/database-neon-postgres.md +218 -0
- package/skills/database-postgresql-code-review.md +213 -0
- package/skills/database-postgresql-optimization.md +405 -0
- package/skills/database-sql-code-review.md +302 -0
- package/skills/database-sql-optimization.md +297 -0
- package/skills/dependency-audit.md +165 -0
- package/skills/design-kami-landing.md +234 -0
- package/skills/design.md +221 -0
- package/skills/dev-acquire-codebase-knowledge.md +175 -0
- package/skills/dev-add-educational-comments.md +129 -0
- package/skills/dev-add-model-descriptions.md +74 -0
- package/skills/dev-adr-review.md +56 -0
- package/skills/dev-boost-prompt.md +26 -0
- package/skills/dev-build-run-debug.md +130 -0
- package/skills/dev-chunk.md +49 -0
- package/skills/dev-claude-md-improver.md +180 -0
- package/skills/dev-code-exemplars-blueprint-generator.md +127 -0
- package/skills/dev-code-tour.md +434 -0
- package/skills/dev-comment-code-generate-a-tutorial.md +27 -0
- package/skills/dev-commit.md +81 -0
- package/skills/dev-context-map.md +53 -0
- package/skills/dev-conventional-commit.md +73 -0
- package/skills/dev-create-architectural-decision-record.md +98 -0
- package/skills/dev-create-draft-pr.md +17 -0
- package/skills/dev-create-pr.md +17 -0
- package/skills/dev-create-readme.md +22 -0
- package/skills/dev-csharp-mstest.md +479 -0
- package/skills/dev-csharp-nunit.md +72 -0
- package/skills/dev-csharp-tunit.md +101 -0
- package/skills/dev-csharp-xunit.md +69 -0
- package/skills/dev-debug-failing-test.md +90 -0
- package/skills/dev-diff-analyze.md +32 -0
- package/skills/dev-diffs.md +24 -0
- package/skills/dev-dotnet-best-practices.md +86 -0
- package/skills/dev-dotnet-design-pattern-review.md +43 -0
- package/skills/dev-dotnet-timezone.md +110 -0
- package/skills/dev-dotnet-upgrade.md +117 -0
- package/skills/dev-doublecheck.md +278 -0
- package/skills/dev-explain-error.md +15 -0
- package/skills/dev-finding-discovery.md +164 -0
- package/skills/dev-fix-finding.md +111 -0
- package/skills/dev-full-file-edit.md +25 -0
- package/skills/dev-git-commit.md +125 -0
- package/skills/dev-git-flow-branch-creator.md +293 -0
- package/skills/dev-git-workflow.md +46 -0
- package/skills/dev-github-automation.md +64 -0
- package/skills/dev-github-code-review.md +1140 -0
- package/skills/dev-github-issues.md +202 -0
- package/skills/dev-gpt-5-4-prompting.md +55 -0
- package/skills/dev-investigation-mode.md +277 -0
- package/skills/dev-java-add-graalvm-native-image-support.md +450 -0
- package/skills/dev-java-docs.md +24 -0
- package/skills/dev-java-refactoring-extract-method.md +105 -0
- package/skills/dev-java-refactoring-remove-parameter.md +85 -0
- package/skills/dev-merge.md +73 -0
- package/skills/dev-migrate-create.md +36 -0
- package/skills/dev-migrate-validate.md +36 -0
- package/skills/dev-my-issues.md +9 -0
- package/skills/dev-my-pull-requests.md +15 -0
- package/skills/dev-planning-oracle-to-postgres-migration-integration-testing.md +45 -0
- package/skills/dev-playwright-generate-test.md +18 -0
- package/skills/dev-playwright.md +148 -0
- package/skills/dev-prompt-builder.md +142 -0
- package/skills/dev-pytest-coverage.md +29 -0
- package/skills/dev-python-manager-discovery.md +330 -0
- package/skills/dev-python-pypi-package-builder.md +445 -0
- package/skills/dev-readme-blueprint-generator.md +79 -0
- package/skills/dev-refactor-method-complexity-reduce.md +99 -0
- package/skills/dev-refactor-plan.md +66 -0
- package/skills/dev-refactor.md +646 -0
- package/skills/dev-review-and-refactor.md +16 -0
- package/skills/dev-reviewing-oracle-to-postgres-migration.md +68 -0
- package/skills/dev-ruff-recursive-fix.md +201 -0
- package/skills/dev-run-e2e-tests.md +126 -0
- package/skills/dev-run-pre-commit-checks.md +133 -0
- package/skills/dev-run-smoke-tests.md +127 -0
- package/skills/dev-scaffolding-oracle-to-postgres-migration-test-project.md +55 -0
- package/skills/dev-spring-boot-testing.md +190 -0
- package/skills/dev-sync-upstream.md +32 -0
- package/skills/dev-sync.md +74 -0
- package/skills/dev-tdd-workflow.md +23 -0
- package/skills/dev-terraform-azurerm-set-diff-analyzer.md +49 -0
- package/skills/dev-test-driven-development.md +372 -0
- package/skills/dev-test-gaps.md +18 -0
- package/skills/dev-test-triage.md +55 -0
- package/skills/dev-typer.md +267 -0
- package/skills/dev-typescript-setup.md +25 -0
- package/skills/dev-unified-diff-edit.md +16 -0
- package/skills/dev-unit-test-vue-pinia.md +198 -0
- package/skills/dev-using-git-worktrees.md +216 -0
- package/skills/dev-validation.md +99 -0
- package/skills/dev-verification.md +168 -0
- package/skills/dev-webapp-testing.md +134 -0
- package/skills/dev-write-coding-standards-from-file.md +317 -0
- package/skills/dev-write-tests.md +16 -0
- package/skills/devops-appinsights-instrumentation.md +49 -0
- package/skills/devops-az-cost-optimize.md +306 -0
- package/skills/devops-chronicle.md +154 -0
- package/skills/devops-deployments-cicd.md +331 -0
- package/skills/devops-devops-rollout-plan.md +118 -0
- package/skills/devops-geistdocs.md +276 -0
- package/skills/devops-observability.md +774 -0
- package/skills/devops-observe-metrics.md +35 -0
- package/skills/devops-observe-trace.md +30 -0
- package/skills/devops-phoenix-cli.md +163 -0
- package/skills/devops-phoenix-tracing.md +140 -0
- package/skills/devops-publish-to-pages.md +108 -0
- package/skills/devops-telemetry.md +87 -0
- package/skills/devops-update-avm-modules-in-bicep.md +61 -0
- package/skills/devops.md +81 -0
- package/skills/diagrams-canvas.md +204 -0
- package/skills/diagrams-draw-io-diagram-generator.md +463 -0
- package/skills/diagrams-excalidraw-diagram-generator.md +614 -0
- package/skills/diagrams-graphify.md +1277 -0
- package/skills/docs-bear-notes.md +108 -0
- package/skills/docs-create-llms.md +211 -0
- package/skills/docs-doc-gen.md +20 -0
- package/skills/docs-documentation-writer.md +46 -0
- package/skills/docs-llm-config.md +33 -0
- package/skills/docs-mkdocs-translations.md +109 -0
- package/skills/docs-obsidian-vault-maintainer.md +14 -0
- package/skills/docs-obsidian.md +82 -0
- package/skills/docs-prose.md +324 -0
- package/skills/docs-update-llms.md +217 -0
- package/skills/docs-update-markdown-file-index.md +77 -0
- package/skills/docs-wiki-maintainer.md +20 -0
- package/skills/documents.md +120 -0
- package/skills/email.md +113 -0
- package/skills/expenses.md +140 -0
- package/skills/file-ops.md +149 -0
- package/skills/files-convert-plaintext-to-md.md +363 -0
- package/skills/files-doc.md +81 -0
- package/skills/files-docx.md +594 -0
- package/skills/files-markdown-to-html.md +917 -0
- package/skills/files-nano-pdf.md +39 -0
- package/skills/files-pdf.md +315 -0
- package/skills/files-pdftk-server.md +163 -0
- package/skills/files-pptx-html-fidelity-audit.md +255 -0
- package/skills/files-pptx.md +231 -0
- package/skills/files-xlsx.md +301 -0
- package/skills/find-jobs.md +78 -0
- package/skills/format-conversion.md +157 -0
- package/skills/frontend-ai-elements.md +483 -0
- package/skills/frontend-ai-gateway.md +563 -0
- package/skills/frontend-ai-generation-persistence.md +242 -0
- package/skills/frontend-ai-sdk.md +799 -0
- package/skills/frontend-ai-visibility.md +127 -0
- package/skills/frontend-angular-developer.md +130 -0
- package/skills/frontend-aspnet-minimal-api-openapi.md +42 -0
- package/skills/frontend-bencium-innovative-ux-designer.md +719 -0
- package/skills/frontend-chat-sdk.md +666 -0
- package/skills/frontend-chrome-devtools.md +98 -0
- package/skills/frontend-frontend-app-builder.md +186 -0
- package/skills/frontend-frontend-design.md +43 -0
- package/skills/frontend-frontend-testing-debugging.md +143 -0
- package/skills/frontend-gsap-framer-scroll-animation.md +152 -0
- package/skills/frontend-internal-linking.md +109 -0
- package/skills/frontend-json-render.md +335 -0
- package/skills/frontend-keyword-clustering.md +118 -0
- package/skills/frontend-next-intl-add-language.md +20 -0
- package/skills/frontend-on-page-seo.md +112 -0
- package/skills/frontend-premium-frontend-ui.md +114 -0
- package/skills/frontend-react-best-practices.md +143 -0
- package/skills/frontend-schema-markup.md +160 -0
- package/skills/frontend-seo-audit.md +110 -0
- package/skills/frontend-swr.md +215 -0
- package/skills/frontend-technical-seo.md +162 -0
- package/skills/frontend-use-dom.md +418 -0
- package/skills/frontend-web-coder.md +564 -0
- package/skills/frontend-web-design-reviewer.md +369 -0
- package/skills/frontend-web-perf.md +202 -0
- package/skills/frontend.md +125 -0
- package/skills/general-adapter-standalone.md +199 -0
- package/skills/general-auth.md +356 -0
- package/skills/general-containerize-aspnetcore.md +393 -0
- package/skills/general-create-technical-spike.md +231 -0
- package/skills/general-cron-jobs.md +72 -0
- package/skills/general-ddd-aggregate.md +52 -0
- package/skills/general-ddd-context.md +46 -0
- package/skills/general-ddd-validate.md +51 -0
- package/skills/general-dependency-check.md +26 -0
- package/skills/general-email-marketing.md +86 -0
- package/skills/general-healthcheck.md +246 -0
- package/skills/general-import-infrastructure-as-code.md +368 -0
- package/skills/general-init.md +49 -0
- package/skills/general-java-junit.md +64 -0
- package/skills/general-java-springboot.md +66 -0
- package/skills/general-javascript-typescript-jest.md +45 -0
- package/skills/general-kotlin-springboot.md +71 -0
- package/skills/general-make-repo-contribution.md +91 -0
- package/skills/general-market-research.md +78 -0
- package/skills/general-marketplace.md +468 -0
- package/skills/general-model-recommendation.md +673 -0
- package/skills/general-payments.md +352 -0
- package/skills/general-quality-playbook.md +480 -0
- package/skills/general-run-integration-tests.md +113 -0
- package/skills/general-superjson.md +274 -0
- package/skills/general-swiftpm-macos.md +51 -0
- package/skills/general-threat-model.md +61 -0
- package/skills/invoices.md +167 -0
- package/skills/licenses.md +159 -0
- package/skills/logs.md +156 -0
- package/skills/marketing.md +139 -0
- package/skills/media-image-manipulation-image-magick.md +253 -0
- package/skills/media-imagegen.md +357 -0
- package/skills/media-openai-whisper-api.md +63 -0
- package/skills/media-openai-whisper.md +39 -0
- package/skills/media-peekaboo.md +191 -0
- package/skills/media-screenshot.md +268 -0
- package/skills/media-speech.md +145 -0
- package/skills/media-transcribe.md +82 -0
- package/skills/media-video-frames.md +47 -0
- package/skills/mobile-android-emulator-qa.md +81 -0
- package/skills/mobile-android-performance.md +280 -0
- package/skills/mobile-building-mcp-server-on-cloudflare.md +267 -0
- package/skills/mobile-building-native-ui.md +322 -0
- package/skills/mobile-expo-api-routes.md +369 -0
- package/skills/mobile-expo-cicd-workflows.md +92 -0
- package/skills/mobile-expo-deployment.md +191 -0
- package/skills/mobile-expo-dev-client.md +165 -0
- package/skills/mobile-expo-module.md +177 -0
- package/skills/mobile-expo-tailwind-setup.md +481 -0
- package/skills/mobile-expo-ui-jetpack-compose.md +41 -0
- package/skills/mobile-expo-ui-swift-ui.md +40 -0
- package/skills/mobile-ios-app-intents.md +78 -0
- package/skills/mobile-ios-debugger-agent.md +52 -0
- package/skills/mobile-ios-ettrace-performance.md +198 -0
- package/skills/mobile-ios-memgraph-leaks.md +77 -0
- package/skills/mobile-native-data-fetching.md +508 -0
- package/skills/mobile-packaging-notarization.md +48 -0
- package/skills/mobile-react-native-architecture.md +672 -0
- package/skills/mobile-react-native-mobile-design.md +438 -0
- package/skills/mobile-signing-entitlements.md +59 -0
- package/skills/mobile-swiftui-liquid-glass.md +91 -0
- package/skills/mobile-swiftui-patterns.md +210 -0
- package/skills/mobile-swiftui-performance-audit.md +108 -0
- package/skills/mobile-swiftui-ui-patterns.md +97 -0
- package/skills/mobile-swiftui-view-refactor.md +204 -0
- package/skills/mobile-upgrading-expo.md +134 -0
- package/skills/mobile.md +183 -0
- package/skills/notes.md +106 -0
- package/skills/planning-adr-create.md +62 -0
- package/skills/planning-adr-index.md +67 -0
- package/skills/planning-architecture-blueprint-generator.md +323 -0
- package/skills/planning-brainstorming.md +165 -0
- package/skills/planning-breakdown-epic-arch.md +67 -0
- package/skills/planning-breakdown-epic-pm.md +59 -0
- package/skills/planning-breakdown-feature-implementation.md +129 -0
- package/skills/planning-breakdown-feature-prd.md +62 -0
- package/skills/planning-breakdown-plan.md +510 -0
- package/skills/planning-breakdown-test.md +366 -0
- package/skills/planning-cloud-design-patterns.md +63 -0
- package/skills/planning-content-brief.md +128 -0
- package/skills/planning-content-strategy.md +138 -0
- package/skills/planning-content-translation.md +143 -0
- package/skills/planning-create-github-action-workflow-specification.md +277 -0
- package/skills/planning-create-github-issues-feature-from-implementation-plan.md +29 -0
- package/skills/planning-create-github-issues-for-unmet-specification-requirements.md +36 -0
- package/skills/planning-create-github-pull-request-from-specification.md +25 -0
- package/skills/planning-create-implementation-plan.md +158 -0
- package/skills/planning-create-specification.md +128 -0
- package/skills/planning-first-ask.md +31 -0
- package/skills/planning-folder-structure-blueprint-generator.md +406 -0
- package/skills/planning-gen-specs-as-issues.md +166 -0
- package/skills/planning-generate-snapshot.md +144 -0
- package/skills/planning-generate-status-report.md +336 -0
- package/skills/planning-metric-pack-designer.md +27 -0
- package/skills/planning-pm-spec.md +53 -0
- package/skills/planning-prd.md +144 -0
- package/skills/planning-project-assessment.md +182 -0
- package/skills/planning-project-setup-info-local.md +128 -0
- package/skills/planning-project-workflow-analysis-blueprint-generator.md +294 -0
- package/skills/planning-service-oriented-architecture.md +248 -0
- package/skills/planning-spec-to-backlog.md +544 -0
- package/skills/planning-technology-stack-blueprint-generator.md +243 -0
- package/skills/planning-update-implementation-plan.md +158 -0
- package/skills/planning-update-specification.md +128 -0
- package/skills/planning-what-context-needed.md +40 -0
- package/skills/planning-writing-plans.md +153 -0
- package/skills/prepare-application.md +81 -0
- package/skills/productivity-apple-notes.md +78 -0
- package/skills/productivity-apple-reminders.md +119 -0
- package/skills/productivity-capture-tasks-from-meeting-notes.md +680 -0
- package/skills/productivity-daily-prep.md +156 -0
- package/skills/productivity-email-drafter.md +101 -0
- package/skills/productivity-hr-onboarding.md +53 -0
- package/skills/productivity-things-mac.md +87 -0
- package/skills/productivity-update.md +169 -0
- package/skills/reminders.md +109 -0
- package/skills/research-dossier-collect.md +71 -0
- package/skills/research-kg-extract.md +37 -0
- package/skills/research-openai-docs.md +89 -0
- package/skills/research-research-add-items.md +31 -0
- package/skills/research-research-report.md +94 -0
- package/skills/research-research-synthesize.md +63 -0
- package/skills/research-summarize.md +88 -0
- package/skills/research-transformers-js.md +635 -0
- package/skills/research.md +119 -0
- package/skills/security-ai-prompt-engineering-safety-review.md +231 -0
- package/skills/security-attack-path-analysis.md +182 -0
- package/skills/security-gdpr-compliant.md +284 -0
- package/skills/security-mcp-security-audit.md +279 -0
- package/skills/security-pii-detect.md +31 -0
- package/skills/security-secret-scanning.md +243 -0
- package/skills/security-security-best-practices.md +87 -0
- package/skills/security-security-ownership-map.md +207 -0
- package/skills/security-security-review.md +169 -0
- package/skills/security-security-scan.md +138 -0
- package/skills/security-security-threat-model.md +82 -0
- package/skills/security-threat-model-analyst.md +76 -0
- package/skills/sysmon.md +181 -0
- package/skills/system-arch-linux-triage.md +32 -0
- package/skills/system-centos-linux-triage.md +32 -0
- package/skills/system-debian-linux-triage.md +32 -0
- package/skills/system-fedora-linux-triage.md +32 -0
- package/skills/system-geofeed-tuner.md +865 -0
- package/skills/system-iot-anomalies.md +15 -0
- package/skills/system-iot-firmware.md +16 -0
- package/skills/system-iot-fleet.md +14 -0
- package/skills/system-iot-register.md +19 -0
- package/skills/system-iot-witness-verify.md +15 -0
- package/skills/system-tmux.md +171 -0
- package/skills/system-window-management.md +228 -0
- package/skills/task-management.md +90 -0
- package/skills/tasks.md +102 -0
- package/skills/test-coverage.md +188 -0
- package/skills/ux-ui.md +128 -0
- package/skills/web.md +186 -0
- package/skills/workflow-act-on-feedback.md +15 -0
- package/skills/workflow-automate-this.md +245 -0
- package/skills/workflow-autoresearch.md +276 -0
- package/skills/workflow-coding-agent.md +317 -0
- package/skills/workflow-deep-research.md +44 -0
- package/skills/workflow-dispatching-parallel-agents.md +183 -0
- package/skills/workflow-eval-driven-dev.md +148 -0
- package/skills/workflow-executing-plans.md +71 -0
- package/skills/workflow-mentoring-juniors.md +311 -0
- package/skills/workflow-receiving-code-review.md +214 -0
- package/skills/workflow-repo-story-time.md +155 -0
- package/skills/workflow-requesting-code-review.md +104 -0
- package/skills/workflow-session-report.md +43 -0
- package/skills/workflow-structured-autonomy-generate.md +126 -0
- package/skills/workflow-subagent-driven-development.md +280 -0
- package/skills/writing.md +106 -0
- package/src/agent.js +0 -0
- package/src/browser.js +297 -0
- package/src/cli.js +25 -4
- package/src/code-reviewer.js +119 -0
- package/src/completions.js +1 -1
- package/src/control.js +222 -30
- package/src/coordinator.js +303 -0
- package/src/correction.js +29 -8
- package/src/edit-tracker.js +21 -0
- package/src/edit-viewer.js +414 -0
- package/src/endpoints.js +64 -15
- package/src/index.js +45 -11
- package/src/llm.js +86 -2
- package/src/mcp-client.js +416 -0
- package/src/memory.js +182 -0
- package/src/planner.js +216 -0
- package/src/rules.js +90 -0
- package/src/self-commands.js +757 -0
- package/src/services/voice.js +10 -7
- package/src/session-search.js +427 -0
- package/src/session.js +487 -99
- package/src/shmakk-server.js +91 -0
- package/src/skills.js +410 -3
- package/src/subagent.js +4 -1
- package/src/system-prompt.js +13 -5
- package/src/task-file.js +114 -0
- package/src/taskClassifier.js +246 -0
- package/src/team.js +752 -0
- package/src/tools.js +142 -21
- package/src/web.js +35 -5
- package/src/workflows.js +261 -0
- package/src/workspace-index.js +25 -6
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: python-pypi-package-builder
|
|
3
|
+
description: 'End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI. Covers all four build backends (setuptools+setuptools_scm, hatchling, flit, poetry), PEP 440 versioning, semantic versioning, dynamic git-tag versioning, OOP/SOLID design, type hints (PEP 484/526/544/561), Trusted Publishing (OIDC), and the full PyPA packaging flow. Use for: creating Python packages, pip-installable SDKs, CLI tools, framework plugins, pyproject.toml setup, py.typed, setuptools_scm, semver, mypy, pre-commit, GitHub Actions CI/CD, or PyPI publishing.'
|
|
4
|
+
category: dev
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Python PyPI Package Builder Skill
|
|
8
|
+
|
|
9
|
+
A complete, battle-tested guide for building, testing, linting, versioning, typing, and
|
|
10
|
+
publishing a production-grade Python library to PyPI — from first commit to community-ready
|
|
11
|
+
release.
|
|
12
|
+
|
|
13
|
+
> **AI Agent Instruction:** Read this entire file before writing a single line of code or
|
|
14
|
+
> creating any file. Every decision — layout, backend, versioning strategy, patterns, CI —
|
|
15
|
+
> has a decision rule here. Follow the decision trees in order. This skill applies to any
|
|
16
|
+
> Python package type (utility, SDK, CLI, plugin, data library). Do not skip sections.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Quick Navigation
|
|
21
|
+
|
|
22
|
+
| Section in this file | What it covers |
|
|
23
|
+
|---|---|
|
|
24
|
+
| [1. Skill Trigger](#1-skill-trigger) | When to load this skill |
|
|
25
|
+
| [2. Package Type Decision](#2-package-type-decision) | Identify what you are building |
|
|
26
|
+
| [3. Folder Structure Decision](#3-folder-structure-decision) | src/ vs flat vs monorepo |
|
|
27
|
+
| [4. Build Backend Decision](#4-build-backend-decision) | setuptools / hatchling / flit / poetry |
|
|
28
|
+
| [5. PyPA Packaging Flow](#5-pypa-packaging-flow) | The canonical publish pipeline |
|
|
29
|
+
| [6. Project Structure Templates](#6-project-structure-templates) | Full layouts for every option |
|
|
30
|
+
| [7. Versioning Strategy](#7-versioning-strategy) | PEP 440, semver, dynamic vs static |
|
|
31
|
+
|
|
32
|
+
| Reference file | What it covers |
|
|
33
|
+
|---|---|
|
|
34
|
+
| `references/pyproject-toml.md` | All four backend templates, `setuptools_scm`, `py.typed`, tool configs |
|
|
35
|
+
| `references/library-patterns.md` | OOP/SOLID, type hints, core class design, factory, protocols, CLI |
|
|
36
|
+
| `references/testing-quality.md` | `conftest.py`, unit/backend/async tests, ruff/mypy/pre-commit |
|
|
37
|
+
| `references/ci-publishing.md` | `ci.yml`, `publish.yml`, Trusted Publishing, TestPyPI, CHANGELOG, release checklist |
|
|
38
|
+
| `references/community-docs.md` | README, docstrings, CONTRIBUTING, SECURITY, anti-patterns, master checklist |
|
|
39
|
+
| `references/architecture-patterns.md` | Backend system (plugin/strategy), config layer, transport layer, CLI, backend injection |
|
|
40
|
+
| `references/versioning-strategy.md` | PEP 440, SemVer, pre-release, setuptools_scm deep-dive, flit static, decision engine |
|
|
41
|
+
| `references/release-governance.md` | Branch strategy, branch protection, OIDC, tag author validation, prevent invalid tags |
|
|
42
|
+
| `references/tooling-ruff.md` | Ruff-only setup (replaces black/isort), mypy config, pre-commit, asyncio_mode=auto |
|
|
43
|
+
|
|
44
|
+
**Scaffold script:** run `python skills/python-pypi-package-builder/scripts/scaffold.py --name your-package-name`
|
|
45
|
+
to generate the entire directory layout, stub files, and `pyproject.toml` in one command.
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## 1. Skill Trigger
|
|
50
|
+
|
|
51
|
+
Load this skill whenever the user wants to:
|
|
52
|
+
|
|
53
|
+
- Create, scaffold, or publish a Python package or library to PyPI
|
|
54
|
+
- Build a pip-installable SDK, utility, CLI tool, or framework extension
|
|
55
|
+
- Set up `pyproject.toml`, linting, mypy, pre-commit, or GitHub Actions for a Python project
|
|
56
|
+
- Understand versioning (`setuptools_scm`, PEP 440, semver, static versioning)
|
|
57
|
+
- Understand PyPA specs: `py.typed`, `MANIFEST.in`, `RECORD`, classifiers
|
|
58
|
+
- Publish to PyPI using Trusted Publishing (OIDC) or API tokens
|
|
59
|
+
- Refactor an existing package to follow modern Python packaging standards
|
|
60
|
+
- Add type hints, protocols, ABCs, or dataclasses to a Python library
|
|
61
|
+
- Apply OOP/SOLID design patterns to a Python package
|
|
62
|
+
- Choose between build backends (setuptools, hatchling, flit, poetry)
|
|
63
|
+
|
|
64
|
+
**Also trigger for phrases like:** "build a Python SDK", "publish my library", "set up PyPI CI",
|
|
65
|
+
"create a pip package", "how do I publish to PyPI", "pyproject.toml help", "PEP 561 typed",
|
|
66
|
+
"setuptools_scm version", "semver Python", "PEP 440", "git tag release", "Trusted Publishing".
|
|
67
|
+
|
|
68
|
+
---
|
|
69
|
+
|
|
70
|
+
## 2. Package Type Decision
|
|
71
|
+
|
|
72
|
+
Identify what the user is building **before** writing any code. Each type has distinct patterns.
|
|
73
|
+
|
|
74
|
+
### Decision Table
|
|
75
|
+
|
|
76
|
+
| Type | Core Pattern | Entry Point | Key Deps | Example Packages |
|
|
77
|
+
|---|---|---|---|---|
|
|
78
|
+
| **Utility library** | Module of pure functions + helpers | Import API only | Minimal | `arrow`, `humanize`, `boltons`, `more-itertools` |
|
|
79
|
+
| **API client / SDK** | Class with methods, auth, retry logic | Import API only | `httpx` or `requests` | `boto3`, `stripe-python`, `openai` |
|
|
80
|
+
| **CLI tool** | Command functions + argument parser | `[project.scripts]` or `[project.entry-points]` | `click` or `typer` | `black`, `ruff`, `httpie`, `rich` |
|
|
81
|
+
| **Framework plugin** | Plugin class, hook registration | `[project.entry-points."framework.plugin"]` | Framework dep | `pytest-*`, `django-*`, `flask-*` |
|
|
82
|
+
| **Data processing library** | Classes + functional pipeline | Import API only | Optional: `numpy`, `pandas` | `pydantic`, `marshmallow`, `cerberus` |
|
|
83
|
+
| **Mixed / generic** | Combination of above | Varies | Varies | Many real-world packages |
|
|
84
|
+
|
|
85
|
+
**Decision Rule:** Ask the user if unclear. A package can combine types (e.g., SDK with a CLI
|
|
86
|
+
entry point) — use the primary type for structural decisions and add secondary type patterns on top.
|
|
87
|
+
|
|
88
|
+
For implementation patterns of each type, see `references/library-patterns.md`.
|
|
89
|
+
|
|
90
|
+
### Package Naming Rules
|
|
91
|
+
|
|
92
|
+
- PyPI name: all lowercase, hyphens — `my-python-library`
|
|
93
|
+
- Python import name: underscores — `my_python_library`
|
|
94
|
+
- Check availability: https://pypi.org/search/ before starting
|
|
95
|
+
- Avoid shadowing popular packages (verify `pip install <name>` fails first)
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## 3. Folder Structure Decision
|
|
100
|
+
|
|
101
|
+
### Decision Tree
|
|
102
|
+
|
|
103
|
+
```
|
|
104
|
+
Does the package have 5+ internal modules OR multiple contributors OR complex sub-packages?
|
|
105
|
+
├── YES → Use src/ layout
|
|
106
|
+
│ Reason: prevents accidental import of uninstalled code during development;
|
|
107
|
+
│ separates source from project root files; PyPA-recommended for large projects.
|
|
108
|
+
│
|
|
109
|
+
├── NO → Is it a single-module, focused package (e.g., one file + helpers)?
|
|
110
|
+
│ ├── YES → Use flat layout
|
|
111
|
+
│ └── NO (medium complexity) → Use flat layout, migrate to src/ if it grows
|
|
112
|
+
│
|
|
113
|
+
└── Is it multiple related packages under one namespace (e.g., myorg.http, myorg.db)?
|
|
114
|
+
└── YES → Use namespace/monorepo layout
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Quick Rule Summary
|
|
118
|
+
|
|
119
|
+
| Situation | Use |
|
|
120
|
+
|---|---|
|
|
121
|
+
| New project, unknown future size | `src/` layout (safest default) |
|
|
122
|
+
| Single-purpose, 1–4 modules | Flat layout |
|
|
123
|
+
| Large library, many contributors | `src/` layout |
|
|
124
|
+
| Multiple packages in one repo | Namespace / monorepo |
|
|
125
|
+
| Migrating old flat project | Keep flat; migrate to `src/` at next major version |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 4. Build Backend Decision
|
|
130
|
+
|
|
131
|
+
### Decision Tree
|
|
132
|
+
|
|
133
|
+
```
|
|
134
|
+
Does the user need version derived automatically from git tags?
|
|
135
|
+
├── YES → Use setuptools + setuptools_scm
|
|
136
|
+
│ (git tag v1.0.0 → that IS your release workflow)
|
|
137
|
+
│
|
|
138
|
+
└── NO → Does the user want an all-in-one tool (deps + build + publish)?
|
|
139
|
+
├── YES → Use poetry (v2+ supports standard [project] table)
|
|
140
|
+
│
|
|
141
|
+
└── NO → Is the package pure Python with no C extensions?
|
|
142
|
+
├── YES, minimal config preferred → Use flit
|
|
143
|
+
│ (zero config, auto-discovers version from __version__)
|
|
144
|
+
│
|
|
145
|
+
└── YES, modern & fast preferred → Use hatchling
|
|
146
|
+
(zero-config, plugin system, no setup.py needed)
|
|
147
|
+
|
|
148
|
+
Does the package have C/Cython/Fortran extensions?
|
|
149
|
+
└── YES → MUST use setuptools (only backend with full native extension support)
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Backend Comparison
|
|
153
|
+
|
|
154
|
+
| Backend | Version source | Config | C extensions | Best for |
|
|
155
|
+
|---|---|---|---|---|
|
|
156
|
+
| `setuptools` + `setuptools_scm` | git tags (automatic) | `pyproject.toml` + optional `setup.py` shim | Yes | Projects with git-tag releases; any complexity |
|
|
157
|
+
| `hatchling` | manual or plugin | `pyproject.toml` only | No | New pure-Python projects; fast, modern |
|
|
158
|
+
| `flit` | `__version__` in `__init__.py` | `pyproject.toml` only | No | Very simple, single-module packages |
|
|
159
|
+
| `poetry` | `pyproject.toml` field | `pyproject.toml` only | No | Teams wanting integrated dep management |
|
|
160
|
+
|
|
161
|
+
For all four complete `pyproject.toml` templates, see `references/pyproject-toml.md`.
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
## 5. PyPA Packaging Flow
|
|
166
|
+
|
|
167
|
+
This is the canonical end-to-end flow from source code to user install.
|
|
168
|
+
**Every step must be understood before publishing.**
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
1. SOURCE TREE
|
|
172
|
+
Your code in version control (git)
|
|
173
|
+
└── pyproject.toml describes metadata + build system
|
|
174
|
+
|
|
175
|
+
2. BUILD
|
|
176
|
+
python -m build
|
|
177
|
+
└── Produces two artifacts in dist/:
|
|
178
|
+
├── *.tar.gz → source distribution (sdist)
|
|
179
|
+
└── *.whl → built distribution (wheel) — preferred by pip
|
|
180
|
+
|
|
181
|
+
3. VALIDATE
|
|
182
|
+
twine check dist/*
|
|
183
|
+
└── Checks metadata, README rendering, and PyPI compatibility
|
|
184
|
+
|
|
185
|
+
4. TEST PUBLISH (first release only)
|
|
186
|
+
twine upload --repository testpypi dist/*
|
|
187
|
+
└── Verify: pip install --index-url https://test.pypi.org/simple/ your-package
|
|
188
|
+
|
|
189
|
+
5. PUBLISH
|
|
190
|
+
twine upload dist/* ← manual fallback
|
|
191
|
+
OR GitHub Actions publish.yml ← recommended (Trusted Publishing / OIDC)
|
|
192
|
+
|
|
193
|
+
6. USER INSTALL
|
|
194
|
+
pip install your-package
|
|
195
|
+
pip install "your-package[extra]"
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
### Key PyPA Concepts
|
|
199
|
+
|
|
200
|
+
| Concept | What it means |
|
|
201
|
+
|---|---|
|
|
202
|
+
| **sdist** | Source distribution — your source + metadata; used when no wheel is available |
|
|
203
|
+
| **wheel (.whl)** | Pre-built binary — pip extracts directly into site-packages; no build step |
|
|
204
|
+
| **PEP 517/518** | Standard build system interface via `pyproject.toml [build-system]` table |
|
|
205
|
+
| **PEP 621** | Standard `[project]` table in `pyproject.toml`; all modern backends support it |
|
|
206
|
+
| **PEP 639** | `license` key as SPDX string (e.g., `"MIT"`, `"Apache-2.0"`) — not `{text = "MIT"}` |
|
|
207
|
+
| **PEP 561** | `py.typed` empty marker file — tells mypy/IDEs this package ships type information |
|
|
208
|
+
|
|
209
|
+
For complete CI workflow and publishing setup, see `references/ci-publishing.md`.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 6. Project Structure Templates
|
|
214
|
+
|
|
215
|
+
### A. src/ Layout (Recommended default for new projects)
|
|
216
|
+
|
|
217
|
+
```
|
|
218
|
+
your-package/
|
|
219
|
+
├── src/
|
|
220
|
+
│ └── your_package/
|
|
221
|
+
│ ├── __init__.py # Public API: __all__, __version__
|
|
222
|
+
│ ├── py.typed # PEP 561 marker — EMPTY FILE
|
|
223
|
+
│ ├── core.py # Primary implementation
|
|
224
|
+
│ ├── client.py # (API client type) or remove
|
|
225
|
+
│ ├── cli.py # (CLI type) click/typer commands, or remove
|
|
226
|
+
│ ├── config.py # Settings / configuration dataclass
|
|
227
|
+
│ ├── exceptions.py # Custom exception hierarchy
|
|
228
|
+
│ ├── models.py # Data classes, Pydantic models, TypedDicts
|
|
229
|
+
│ ├── utils.py # Internal helpers (prefix _utils if private)
|
|
230
|
+
│ ├── types.py # Shared type aliases and TypeVars
|
|
231
|
+
│ └── backends/ # (Plugin pattern) — remove if not needed
|
|
232
|
+
│ ├── __init__.py # Protocol / ABC interface definition
|
|
233
|
+
│ ├── memory.py # Default zero-dep implementation
|
|
234
|
+
│ └── redis.py # Optional heavy implementation
|
|
235
|
+
├── tests/
|
|
236
|
+
│ ├── __init__.py
|
|
237
|
+
│ ├── conftest.py # Shared fixtures
|
|
238
|
+
│ ├── unit/
|
|
239
|
+
│ │ ├── __init__.py
|
|
240
|
+
│ │ ├── test_core.py
|
|
241
|
+
│ │ ├── test_config.py
|
|
242
|
+
│ │ └── test_models.py
|
|
243
|
+
│ ├── integration/
|
|
244
|
+
│ │ ├── __init__.py
|
|
245
|
+
│ │ └── test_backends.py
|
|
246
|
+
│ └── e2e/ # Optional: end-to-end tests
|
|
247
|
+
│ └── __init__.py
|
|
248
|
+
├── docs/ # Optional: mkdocs or sphinx
|
|
249
|
+
├── scripts/
|
|
250
|
+
│ └── scaffold.py
|
|
251
|
+
├── .github/
|
|
252
|
+
│ ├── workflows/
|
|
253
|
+
│ │ ├── ci.yml
|
|
254
|
+
│ │ └── publish.yml
|
|
255
|
+
│ └── ISSUE_TEMPLATE/
|
|
256
|
+
│ ├── bug_report.md
|
|
257
|
+
│ └── feature_request.md
|
|
258
|
+
├── .pre-commit-config.yaml
|
|
259
|
+
├── pyproject.toml
|
|
260
|
+
├── CHANGELOG.md
|
|
261
|
+
├── CONTRIBUTING.md
|
|
262
|
+
├── SECURITY.md
|
|
263
|
+
├── LICENSE
|
|
264
|
+
├── README.md
|
|
265
|
+
└── .gitignore
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### B. Flat Layout (Small / focused packages)
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
your-package/
|
|
272
|
+
├── your_package/ # ← at root, not inside src/
|
|
273
|
+
│ ├── __init__.py
|
|
274
|
+
│ ├── py.typed
|
|
275
|
+
│ └── ... (same internal structure)
|
|
276
|
+
├── tests/
|
|
277
|
+
└── ... (same top-level files)
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### C. Namespace / Monorepo Layout (Multiple related packages)
|
|
281
|
+
|
|
282
|
+
```
|
|
283
|
+
your-org/
|
|
284
|
+
├── packages/
|
|
285
|
+
│ ├── your-org-core/
|
|
286
|
+
│ │ ├── src/your_org/core/
|
|
287
|
+
│ │ └── pyproject.toml
|
|
288
|
+
│ ├── your-org-http/
|
|
289
|
+
│ │ ├── src/your_org/http/
|
|
290
|
+
│ │ └── pyproject.toml
|
|
291
|
+
│ └── your-org-cli/
|
|
292
|
+
│ ├── src/your_org/cli/
|
|
293
|
+
│ └── pyproject.toml
|
|
294
|
+
├── .github/workflows/
|
|
295
|
+
└── README.md
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Each sub-package has its own `pyproject.toml`. They share the `your_org` namespace via PEP 420
|
|
299
|
+
implicit namespace packages (no `__init__.py` in the namespace root).
|
|
300
|
+
|
|
301
|
+
### Internal Module Guidelines
|
|
302
|
+
|
|
303
|
+
| File | Purpose | When to include |
|
|
304
|
+
|---|---|---|
|
|
305
|
+
| `__init__.py` | Public API surface; re-exports; `__version__` | Always |
|
|
306
|
+
| `py.typed` | PEP 561 typed-package marker (empty) | Always |
|
|
307
|
+
| `core.py` | Primary class / main logic | Always |
|
|
308
|
+
| `config.py` | Settings dataclass or Pydantic model | When configurable |
|
|
309
|
+
| `exceptions.py` | Exception hierarchy (`YourBaseError` → specifics) | Always |
|
|
310
|
+
| `models.py` | Data models / DTOs / TypedDicts | When data-heavy |
|
|
311
|
+
| `utils.py` | Internal helpers (not part of public API) | As needed |
|
|
312
|
+
| `types.py` | Shared `TypeVar`, `TypeAlias`, `Protocol` definitions | When complex typing |
|
|
313
|
+
| `cli.py` | CLI entry points (click/typer) | CLI type only |
|
|
314
|
+
| `backends/` | Plugin/strategy pattern | When swappable implementations |
|
|
315
|
+
| `_compat.py` | Python version compatibility shims | When 3.9–3.13 compat needed |
|
|
316
|
+
|
|
317
|
+
---
|
|
318
|
+
|
|
319
|
+
## 7. Versioning Strategy
|
|
320
|
+
|
|
321
|
+
### PEP 440 — The Standard
|
|
322
|
+
|
|
323
|
+
```
|
|
324
|
+
Canonical form: N[.N]+[{a|b|rc}N][.postN][.devN]
|
|
325
|
+
|
|
326
|
+
Examples:
|
|
327
|
+
1.0.0 Stable release
|
|
328
|
+
1.0.0a1 Alpha (pre-release)
|
|
329
|
+
1.0.0b2 Beta
|
|
330
|
+
1.0.0rc1 Release candidate
|
|
331
|
+
1.0.0.post1 Post-release (e.g., packaging fix only)
|
|
332
|
+
1.0.0.dev1 Development snapshot (not for PyPI)
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Semantic Versioning (recommended)
|
|
336
|
+
|
|
337
|
+
```
|
|
338
|
+
MAJOR.MINOR.PATCH
|
|
339
|
+
|
|
340
|
+
MAJOR: Breaking API change (remove/rename public function/class/arg)
|
|
341
|
+
MINOR: New feature, fully backward-compatible
|
|
342
|
+
PATCH: Bug fix, no API change
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
### Dynamic versioning with setuptools_scm (recommended for git-tag workflows)
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
# How it works:
|
|
349
|
+
git tag v1.0.0 → installed version = 1.0.0
|
|
350
|
+
git tag v1.1.0 → installed version = 1.1.0
|
|
351
|
+
(commits after tag) → version = 1.1.0.post1 (suffix stripped for PyPI)
|
|
352
|
+
|
|
353
|
+
# In code — NEVER hardcode when using setuptools_scm:
|
|
354
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
355
|
+
try:
|
|
356
|
+
__version__ = version("your-package")
|
|
357
|
+
except PackageNotFoundError:
|
|
358
|
+
__version__ = "0.0.0-dev" # Fallback for uninstalled dev checkouts
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
Required `pyproject.toml` config:
|
|
362
|
+
```toml
|
|
363
|
+
[tool.setuptools_scm]
|
|
364
|
+
version_scheme = "post-release"
|
|
365
|
+
local_scheme = "no-local-version" # Prevents +g<hash> from breaking PyPI uploads
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
**Critical:** always set `fetch-depth: 0` in every CI checkout step. Without full git history,
|
|
369
|
+
`setuptools_scm` cannot find tags and the build version silently falls back to `0.0.0+dev`.
|
|
370
|
+
|
|
371
|
+
### Static versioning (flit, hatchling manual, poetry)
|
|
372
|
+
|
|
373
|
+
```python
|
|
374
|
+
# your_package/__init__.py
|
|
375
|
+
__version__ = "1.0.0" # Update this before every release
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Version specifier best practices for dependencies
|
|
379
|
+
|
|
380
|
+
```toml
|
|
381
|
+
# In [project] dependencies:
|
|
382
|
+
"httpx>=0.24" # Minimum version — PREFERRED for libraries
|
|
383
|
+
"httpx>=0.24,<1.0" # Upper bound only when a known breaking change exists
|
|
384
|
+
"httpx==0.27.0" # Pin exactly ONLY in applications, NOT libraries
|
|
385
|
+
|
|
386
|
+
# NEVER do this in a library — it breaks dependency resolution for users:
|
|
387
|
+
# "httpx~=0.24.0" # Too tight
|
|
388
|
+
# "httpx==0.27.*" # Fragile
|
|
389
|
+
```
|
|
390
|
+
|
|
391
|
+
### Version bump → release flow
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
# 1. Update CHANGELOG.md — move [Unreleased] entries to [x.y.z] - YYYY-MM-DD
|
|
395
|
+
# 2. Commit the changelog
|
|
396
|
+
git add CHANGELOG.md
|
|
397
|
+
git commit -m "chore: prepare release vX.Y.Z"
|
|
398
|
+
# 3. Tag and push — this triggers publish.yml automatically
|
|
399
|
+
git tag vX.Y.Z
|
|
400
|
+
git push origin main --tags
|
|
401
|
+
# 4. Monitor GitHub Actions → verify on https://pypi.org/project/your-package/
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
For complete pyproject.toml templates for all four backends, see `references/pyproject-toml.md`.
|
|
405
|
+
|
|
406
|
+
---
|
|
407
|
+
|
|
408
|
+
## Where to Go Next
|
|
409
|
+
|
|
410
|
+
After understanding decisions and structure:
|
|
411
|
+
|
|
412
|
+
1. **Set up `pyproject.toml`** → `references/pyproject-toml.md`
|
|
413
|
+
All four backend templates (setuptools+scm, hatchling, flit, poetry), full tool configs,
|
|
414
|
+
`py.typed` setup, versioning config.
|
|
415
|
+
|
|
416
|
+
2. **Write your library code** → `references/library-patterns.md`
|
|
417
|
+
OOP/SOLID principles, type hints (PEP 484/526/544/561), core class design, factory functions,
|
|
418
|
+
`__init__.py`, plugin/backend pattern, CLI entry point.
|
|
419
|
+
|
|
420
|
+
3. **Add tests and code quality** → `references/testing-quality.md`
|
|
421
|
+
`conftest.py`, unit/backend/async tests, parametrize, ruff/mypy/pre-commit setup.
|
|
422
|
+
|
|
423
|
+
4. **Set up CI/CD and publish** → `references/ci-publishing.md`
|
|
424
|
+
`ci.yml`, `publish.yml` with Trusted Publishing (OIDC, no API tokens), CHANGELOG format,
|
|
425
|
+
release checklist.
|
|
426
|
+
|
|
427
|
+
5. **Polish for community/OSS** → `references/community-docs.md`
|
|
428
|
+
README sections, docstring format, CONTRIBUTING, SECURITY, issue templates, anti-patterns
|
|
429
|
+
table, and master release checklist.
|
|
430
|
+
|
|
431
|
+
6. **Design backends, config, transport, CLI** → `references/architecture-patterns.md`
|
|
432
|
+
Backend system (plugin/strategy pattern), Settings dataclass, HTTP transport layer,
|
|
433
|
+
CLI with click/typer, backend injection rules.
|
|
434
|
+
|
|
435
|
+
7. **Choose and implement a versioning strategy** → `references/versioning-strategy.md`
|
|
436
|
+
PEP 440 canonical forms, SemVer rules, pre-release identifiers, setuptools_scm deep-dive,
|
|
437
|
+
flit static versioning, decision engine (DEFAULT/BEGINNER/MINIMAL).
|
|
438
|
+
|
|
439
|
+
8. **Govern releases and secure the publish pipeline** → `references/release-governance.md`
|
|
440
|
+
Branch strategy, branch protection rules, OIDC Trusted Publishing setup, tag author
|
|
441
|
+
validation in CI, tag format enforcement, full governed `publish.yml`.
|
|
442
|
+
|
|
443
|
+
9. **Simplify tooling with Ruff** → `references/tooling-ruff.md`
|
|
444
|
+
Ruff-only setup replacing black/isort/flake8, mypy config, pre-commit hooks,
|
|
445
|
+
asyncio_mode=auto (remove @pytest.mark.asyncio), migration guide.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: readme-blueprint-generator
|
|
3
|
+
description: 'Intelligent README.md generation prompt that analyzes project documentation structure and creates comprehensive repository documentation. Scans .github/copilot directory files and copilot-instructions.md to extract project information, technology stack, architecture, development workflow, coding standards, and testing approaches while generating well-structured markdown documentation with proper formatting, cross-references, and developer-focused content.'
|
|
4
|
+
category: dev
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# README Generator Prompt
|
|
8
|
+
|
|
9
|
+
Generate a comprehensive README.md for this repository by analyzing the documentation files in the .github/copilot directory and the copilot-instructions.md file. Follow these steps:
|
|
10
|
+
|
|
11
|
+
1. Scan all the files in the .github/copilot folder, like:
|
|
12
|
+
- Architecture
|
|
13
|
+
- Code_Exemplars
|
|
14
|
+
- Coding_Standards
|
|
15
|
+
- Project_Folder_Structure
|
|
16
|
+
- Technology_Stack
|
|
17
|
+
- Unit_Tests
|
|
18
|
+
- Workflow_Analysis
|
|
19
|
+
|
|
20
|
+
2. Also review the copilot-instructions.md file in the .github folder
|
|
21
|
+
|
|
22
|
+
3. Create a README.md with the following sections:
|
|
23
|
+
|
|
24
|
+
## Project Name and Description
|
|
25
|
+
- Extract the project name and primary purpose from the documentation
|
|
26
|
+
- Include a concise description of what the project does
|
|
27
|
+
|
|
28
|
+
## Technology Stack
|
|
29
|
+
- List the primary technologies, languages, and frameworks used
|
|
30
|
+
- Include version information when available
|
|
31
|
+
- Source this information primarily from the Technology_Stack file
|
|
32
|
+
|
|
33
|
+
## Project Architecture
|
|
34
|
+
- Provide a high-level overview of the architecture
|
|
35
|
+
- Consider including a simple diagram if described in the documentation
|
|
36
|
+
- Source from the Architecture file
|
|
37
|
+
|
|
38
|
+
## Getting Started
|
|
39
|
+
- Include installation instructions based on the technology stack
|
|
40
|
+
- Add setup and configuration steps
|
|
41
|
+
- Include any prerequisites
|
|
42
|
+
|
|
43
|
+
## Project Structure
|
|
44
|
+
- Brief overview of the folder organization
|
|
45
|
+
- Source from Project_Folder_Structure file
|
|
46
|
+
|
|
47
|
+
## Key Features
|
|
48
|
+
- List main functionality and features of the project
|
|
49
|
+
- Extract from various documentation files
|
|
50
|
+
|
|
51
|
+
## Development Workflow
|
|
52
|
+
- Summarize the development process
|
|
53
|
+
- Include information about branching strategy if available
|
|
54
|
+
- Source from Workflow_Analysis file
|
|
55
|
+
|
|
56
|
+
## Coding Standards
|
|
57
|
+
- Summarize key coding standards and conventions
|
|
58
|
+
- Source from the Coding_Standards file
|
|
59
|
+
|
|
60
|
+
## Testing
|
|
61
|
+
- Explain testing approach and tools
|
|
62
|
+
- Source from Unit_Tests file
|
|
63
|
+
|
|
64
|
+
## Contributing
|
|
65
|
+
- Guidelines for contributing to the project
|
|
66
|
+
- Reference any code exemplars for guidance
|
|
67
|
+
- Source from Code_Exemplars and copilot-instructions
|
|
68
|
+
|
|
69
|
+
## License
|
|
70
|
+
- Include license information if available
|
|
71
|
+
|
|
72
|
+
Format the README with proper Markdown, including:
|
|
73
|
+
- Clear headings and subheadings
|
|
74
|
+
- Code blocks where appropriate
|
|
75
|
+
- Lists for better readability
|
|
76
|
+
- Links to other documentation files
|
|
77
|
+
- Badges for build status, version, etc. if information is available
|
|
78
|
+
|
|
79
|
+
Keep the README concise yet informative, focusing on what new developers or users would need to know about the project.
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor-method-complexity-reduce
|
|
3
|
+
description: 'Refactor given method `${input:methodName}` to reduce its cognitive complexity to `${input:complexityThreshold}` or below, by extracting helper methods.'
|
|
4
|
+
category: dev
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Refactor Method to Reduce Cognitive Complexity
|
|
8
|
+
|
|
9
|
+
## Objective
|
|
10
|
+
Refactor the method `${input:methodName}`, to reduce its cognitive complexity to `${input:complexityThreshold}` or below, by extracting logic into focused helper methods.
|
|
11
|
+
|
|
12
|
+
## Instructions
|
|
13
|
+
|
|
14
|
+
1. **Analyze the current method** to identify sources of cognitive complexity:
|
|
15
|
+
- Nested conditional statements
|
|
16
|
+
- Multiple if-else or switch chains
|
|
17
|
+
- Repeated code blocks
|
|
18
|
+
- Multiple loops with conditions
|
|
19
|
+
- Complex boolean expressions
|
|
20
|
+
|
|
21
|
+
2. **Identify extraction opportunities**:
|
|
22
|
+
- Validation logic that can be extracted into a separate method
|
|
23
|
+
- Type-specific or case-specific processing that repeats
|
|
24
|
+
- Complex transformations or calculations
|
|
25
|
+
- Common patterns that appear multiple times
|
|
26
|
+
|
|
27
|
+
3. **Extract focused helper methods**:
|
|
28
|
+
- Each helper should have a single, clear responsibility
|
|
29
|
+
- Extract validation into separate `Validate*` methods
|
|
30
|
+
- Extract type-specific logic into handler methods
|
|
31
|
+
- Create utility methods for common operations
|
|
32
|
+
- Use appropriate access levels (static, private, async)
|
|
33
|
+
|
|
34
|
+
4. **Simplify the main method**:
|
|
35
|
+
- Reduce nesting depth
|
|
36
|
+
- Replace massive if-else chains with smaller orchestrated calls
|
|
37
|
+
- Use switch statements where appropriate for cleaner dispatch
|
|
38
|
+
- Ensure the main method reads as a high-level flow
|
|
39
|
+
|
|
40
|
+
5. **Preserve functionality**:
|
|
41
|
+
- Maintain the same input/output behavior
|
|
42
|
+
- Keep all validation and error handling
|
|
43
|
+
- Preserve exception types and error messages
|
|
44
|
+
- Ensure all parameters are properly passed to helpers
|
|
45
|
+
|
|
46
|
+
6. **Best practices**:
|
|
47
|
+
- Make helper methods static when they don't need instance state
|
|
48
|
+
- Use null checks and guard clauses early
|
|
49
|
+
- Avoid creating unnecessary local variables
|
|
50
|
+
- Consider using tuples for multiple return values
|
|
51
|
+
- Group related helper methods together
|
|
52
|
+
|
|
53
|
+
## Implementation Approach
|
|
54
|
+
|
|
55
|
+
- Extract helper methods before refactoring the main flow
|
|
56
|
+
- Test incrementally to ensure no regressions
|
|
57
|
+
- Use meaningful names that describe the extracted responsibility
|
|
58
|
+
- Keep extracted methods close to where they're used
|
|
59
|
+
- Consider making repeated code patterns into generic methods
|
|
60
|
+
|
|
61
|
+
## Result
|
|
62
|
+
|
|
63
|
+
The refactored method should:
|
|
64
|
+
- Have cognitive complexity reduced to the target threshold of `${input:complexityThreshold}` or below
|
|
65
|
+
- Be more readable and maintainable
|
|
66
|
+
- Have clear separation of concerns
|
|
67
|
+
- Be easier to test and debug
|
|
68
|
+
- Retain all original functionality
|
|
69
|
+
|
|
70
|
+
## Testing and Validation
|
|
71
|
+
|
|
72
|
+
**CRITICAL: After completing the refactoring, you MUST:**
|
|
73
|
+
|
|
74
|
+
1. **Run all existing tests** related to the refactored method and its surrounding functionality
|
|
75
|
+
2. **MANDATORY: Explicitly verify test results show "failed=0"**
|
|
76
|
+
- **NEVER assume tests passed** - always examine the actual test output
|
|
77
|
+
- Search for the summary line containing pass/fail counts (e.g., "passed=X failed=Y")
|
|
78
|
+
- **If the summary shows any number other than "failed=0", tests have FAILED**
|
|
79
|
+
- If test output is in a file, read the entire file to locate and verify the failure count
|
|
80
|
+
- Running tests is NOT the same as verifying tests passed
|
|
81
|
+
- **Do not proceed** until you have explicitly confirmed zero failures
|
|
82
|
+
3. **If any tests fail (failed > 0):**
|
|
83
|
+
- State clearly how many tests failed
|
|
84
|
+
- Analyze each failure to understand what functionality was broken
|
|
85
|
+
- Common causes: null handling, empty collection checks, condition logic errors
|
|
86
|
+
- Identify the root cause in the refactored code
|
|
87
|
+
- Correct the refactored code to restore the original behavior
|
|
88
|
+
- Re-run tests and verify "failed=0" in the output
|
|
89
|
+
- Repeat until all tests pass (failed=0)
|
|
90
|
+
4. **Verify compilation** - Ensure there are no compilation errors
|
|
91
|
+
5. **Check cognitive complexity** - Confirm the metric is at or below the target threshold of `${input:complexityThreshold}`
|
|
92
|
+
|
|
93
|
+
## Confirmation Checklist
|
|
94
|
+
- [ ] Code compiles without errors
|
|
95
|
+
- [ ] **Test results explicitly state "failed=0"** (verified by reading the output)
|
|
96
|
+
- [ ] All test failures analyzed and corrected (if any occurred)
|
|
97
|
+
- [ ] Cognitive complexity is at or below the target threshold of `${input:complexityThreshold}`
|
|
98
|
+
- [ ] All original functionality is preserved
|
|
99
|
+
- [ ] Code follows project conventions and standards
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactor-plan
|
|
3
|
+
description: 'Plan a multi-file refactor with proper sequencing and rollback steps'
|
|
4
|
+
category: dev
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Refactor Plan
|
|
8
|
+
|
|
9
|
+
Create a detailed plan for this refactoring task.
|
|
10
|
+
|
|
11
|
+
## Refactor Goal
|
|
12
|
+
|
|
13
|
+
{{refactor_description}}
|
|
14
|
+
|
|
15
|
+
## Instructions
|
|
16
|
+
|
|
17
|
+
1. Search the codebase to understand current state
|
|
18
|
+
2. Identify all affected files and their dependencies
|
|
19
|
+
3. Plan changes in a safe sequence (types first, then implementations, then tests)
|
|
20
|
+
4. Include verification steps between changes
|
|
21
|
+
5. Consider rollback if something fails
|
|
22
|
+
|
|
23
|
+
## Output Format
|
|
24
|
+
|
|
25
|
+
```markdown
|
|
26
|
+
## Refactor Plan: [title]
|
|
27
|
+
|
|
28
|
+
### Current State
|
|
29
|
+
[Brief description of how things work now]
|
|
30
|
+
|
|
31
|
+
### Target State
|
|
32
|
+
[Brief description of how things will work after]
|
|
33
|
+
|
|
34
|
+
### Affected Files
|
|
35
|
+
| File | Change Type | Dependencies |
|
|
36
|
+
|------|-------------|--------------|
|
|
37
|
+
| path | modify/create/delete | blocks X, blocked by Y |
|
|
38
|
+
|
|
39
|
+
### Execution Plan
|
|
40
|
+
|
|
41
|
+
#### Phase 1: Types and Interfaces
|
|
42
|
+
- [ ] Step 1.1: [action] in `file.ts`
|
|
43
|
+
- [ ] Verify: [how to check it worked]
|
|
44
|
+
|
|
45
|
+
#### Phase 2: Implementation
|
|
46
|
+
- [ ] Step 2.1: [action] in `file.ts`
|
|
47
|
+
- [ ] Verify: [how to check]
|
|
48
|
+
|
|
49
|
+
#### Phase 3: Tests
|
|
50
|
+
- [ ] Step 3.1: Update tests in `file.test.ts`
|
|
51
|
+
- [ ] Verify: Run `npm test`
|
|
52
|
+
|
|
53
|
+
#### Phase 4: Cleanup
|
|
54
|
+
- [ ] Remove deprecated code
|
|
55
|
+
- [ ] Update documentation
|
|
56
|
+
|
|
57
|
+
### Rollback Plan
|
|
58
|
+
If something fails:
|
|
59
|
+
1. [Step to undo]
|
|
60
|
+
2. [Step to undo]
|
|
61
|
+
|
|
62
|
+
### Risks
|
|
63
|
+
- [Potential issue and mitigation]
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Shall I proceed with Phase 1?
|