novahiz 0.1.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/LICENSE +202 -0
- package/NOTICE.md +46 -0
- package/README.md +123 -0
- package/adapters/README.md +13 -0
- package/adapters/opencode/agent/novahiz-agent.md +31 -0
- package/adapters/opencode/commands/novahiz-clean.md +15 -0
- package/adapters/opencode/commands/novahiz-doctor.md +9 -0
- package/adapters/opencode/commands/novahiz-plan.md +24 -0
- package/adapters/opencode/commands/novahiz-status.md +11 -0
- package/adapters/opencode/instructions.md +69 -0
- package/adapters/opencode/novahiz.ts +266 -0
- package/bin/novahiz.cmd +2 -0
- package/bin/novahiz.mjs +7 -0
- package/bundled-skills/AGENTS.md +50 -0
- package/bundled-skills/LICENSE +21 -0
- package/bundled-skills/README.md +202 -0
- package/bundled-skills/SKILL.md +313 -0
- package/bundled-skills/a11y-audit/SKILL.md +211 -0
- package/bundled-skills/a11y-audit/assets/sample-component.tsx +51 -0
- package/bundled-skills/a11y-audit/expected_outputs/sample-contrast-output.txt +39 -0
- package/bundled-skills/a11y-audit/expected_outputs/sample-scan-output.json +34 -0
- package/bundled-skills/a11y-audit/expected_outputs/sample-scan-report.md +63 -0
- package/bundled-skills/a11y-audit/references/aria-patterns.md +223 -0
- package/bundled-skills/a11y-audit/references/audit-report-template.md +46 -0
- package/bundled-skills/a11y-audit/references/ci-cd-integration.md +127 -0
- package/bundled-skills/a11y-audit/references/color-contrast-guide.md +83 -0
- package/bundled-skills/a11y-audit/references/examples-by-framework.md +312 -0
- package/bundled-skills/a11y-audit/references/framework-a11y-patterns.md +661 -0
- package/bundled-skills/a11y-audit/references/testing-checklist.md +41 -0
- package/bundled-skills/a11y-audit/references/wcag-22-new-criteria.md +79 -0
- package/bundled-skills/a11y-audit/references/wcag-quick-ref.md +113 -0
- package/bundled-skills/a11y-audit/scripts/a11y_scanner.py +684 -0
- package/bundled-skills/a11y-audit/scripts/contrast_checker.py +504 -0
- package/bundled-skills/ab-testing/SKILL.md +353 -0
- package/bundled-skills/ab-testing/evals/evals.json +105 -0
- package/bundled-skills/ab-testing/references/sample-size-guide.md +263 -0
- package/bundled-skills/ab-testing/references/test-templates.md +277 -0
- package/bundled-skills/ad-creative/SKILL.md +425 -0
- package/bundled-skills/ad-creative/assets/creative-review-template.html +400 -0
- package/bundled-skills/ad-creative/evals/evals.json +217 -0
- package/bundled-skills/ad-creative/references/creative-review-page.md +106 -0
- package/bundled-skills/ad-creative/references/creative-roadmap.md +118 -0
- package/bundled-skills/ad-creative/references/generative-tools.md +637 -0
- package/bundled-skills/ad-creative/references/hook-system.md +115 -0
- package/bundled-skills/ad-creative/references/imessage-video-ads.md +201 -0
- package/bundled-skills/ad-creative/references/meta-creative-formats.md +114 -0
- package/bundled-skills/ad-creative/references/motion-video-ads.md +126 -0
- package/bundled-skills/ad-creative/references/platform-specs.md +213 -0
- package/bundled-skills/ad-creative/references/short-form-video-specs.md +213 -0
- package/bundled-skills/ad-creative/references/static-ad-templates.md +308 -0
- package/bundled-skills/ads/SKILL.md +499 -0
- package/bundled-skills/ads/evals/evals.json +157 -0
- package/bundled-skills/ads/references/abm-playbook.md +93 -0
- package/bundled-skills/ads/references/ad-copy-templates.md +207 -0
- package/bundled-skills/ads/references/audience-targeting.md +243 -0
- package/bundled-skills/ads/references/audit-guardrails.md +83 -0
- package/bundled-skills/ads/references/b2b-paid-playbook.md +115 -0
- package/bundled-skills/ads/references/conversion-tracking.md +361 -0
- package/bundled-skills/ads/references/creative-research-automation.md +103 -0
- package/bundled-skills/ads/references/google-ads-audit-checklist.md +84 -0
- package/bundled-skills/ads/references/google-search-playbook.md +120 -0
- package/bundled-skills/ads/references/linkedin-b2b-playbook.md +107 -0
- package/bundled-skills/ads/references/meta-decision-system.md +176 -0
- package/bundled-skills/ads/references/payback-period.md +69 -0
- package/bundled-skills/ads/references/platform-setup-checklists.md +277 -0
- package/bundled-skills/ads/references/rsa-output-spec.md +88 -0
- package/bundled-skills/adversarial-reviewer/SKILL.md +247 -0
- package/bundled-skills/agent-device/SKILL.md +20 -0
- package/bundled-skills/ai-seo/SKILL.md +488 -0
- package/bundled-skills/ai-seo/evals/evals.json +135 -0
- package/bundled-skills/ai-seo/references/agent-readiness.md +57 -0
- package/bundled-skills/ai-seo/references/citations-vs-recommendations.md +85 -0
- package/bundled-skills/ai-seo/references/content-patterns.md +287 -0
- package/bundled-skills/ai-seo/references/content-types.md +71 -0
- package/bundled-skills/ai-seo/references/format-volatility.md +98 -0
- package/bundled-skills/ai-seo/references/okf.md +104 -0
- package/bundled-skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/bundled-skills/ai-seo/references/youtube-ai-citations.md +60 -0
- package/bundled-skills/analytics/SKILL.md +310 -0
- package/bundled-skills/analytics/evals/evals.json +90 -0
- package/bundled-skills/analytics/references/event-library.md +260 -0
- package/bundled-skills/analytics/references/ga4-implementation.md +300 -0
- package/bundled-skills/analytics/references/gtm-implementation.md +390 -0
- package/bundled-skills/android-emulator/SKILL.md +32 -0
- package/bundled-skills/anti-AI-design/SKILL.md +189 -0
- package/bundled-skills/anti-pattern-detector/SKILL.md +185 -0
- package/bundled-skills/anti-pattern-detector/references/async-network-patterns.md +581 -0
- package/bundled-skills/anti-pattern-detector/references/build-deploy-patterns.md +554 -0
- package/bundled-skills/anti-pattern-detector/references/cache-patterns.md +446 -0
- package/bundled-skills/anti-pattern-detector/references/cloud-infra-patterns.md +538 -0
- package/bundled-skills/anti-pattern-detector/references/concurrency-patterns.md +558 -0
- package/bundled-skills/anti-pattern-detector/references/language-specific-patterns.md +740 -0
- package/bundled-skills/anti-pattern-detector/references/monitoring-patterns.md +456 -0
- package/bundled-skills/api-design-reviewer/SKILL.md +433 -0
- package/bundled-skills/api-design-reviewer/references/api_antipatterns.md +680 -0
- package/bundled-skills/api-design-reviewer/references/rest_design_rules.md +487 -0
- package/bundled-skills/api-design-reviewer/scripts/api_linter.py +956 -0
- package/bundled-skills/api-design-reviewer/scripts/api_scorecard.py +1661 -0
- package/bundled-skills/api-design-reviewer/scripts/breaking_change_detector.py +1102 -0
- package/bundled-skills/apple-hig-expert/SKILL.md +108 -0
- package/bundled-skills/apple-hig-expert/references/accessibility.md +55 -0
- package/bundled-skills/apple-hig-expert/references/platform-specifics.md +48 -0
- package/bundled-skills/apple-hig-expert/references/visual-design.md +69 -0
- package/bundled-skills/apple-hig-expert/scripts/hig_checker.py +97 -0
- package/bundled-skills/apple-hig-expert/templates/hig-audit-template.md +83 -0
- package/bundled-skills/build-graph/SKILL.md +38 -0
- package/bundled-skills/claude-history-ingest/SKILL.md +463 -0
- package/bundled-skills/claude-history-ingest/references/claude-data-format.md +118 -0
- package/bundled-skills/clean-code/SKILL.md +99 -0
- package/bundled-skills/code-reviewer/README.md +92 -0
- package/bundled-skills/code-reviewer/SKILL.md +183 -0
- package/bundled-skills/code-reviewer/assets/sample_c_clean.c +71 -0
- package/bundled-skills/code-reviewer/assets/sample_c_smells.c +66 -0
- package/bundled-skills/code-reviewer/assets/sample_csharp_clean.cs +100 -0
- package/bundled-skills/code-reviewer/assets/sample_csharp_smells.cs +78 -0
- package/bundled-skills/code-reviewer/assets/sample_java_clean.java +55 -0
- package/bundled-skills/code-reviewer/assets/sample_java_smells.java +56 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_c_clean_quality.json +65 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_c_smells_quality.json +155 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_csharp_clean_quality.json +135 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_csharp_smells_quality.json +143 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_java_clean_quality.json +53 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_java_smells_quality.json +83 -0
- package/bundled-skills/code-reviewer/languages/c.md +103 -0
- package/bundled-skills/code-reviewer/languages/cpp.md +103 -0
- package/bundled-skills/code-reviewer/languages/csharp.md +97 -0
- package/bundled-skills/code-reviewer/languages/dart.md +108 -0
- package/bundled-skills/code-reviewer/languages/go.md +92 -0
- package/bundled-skills/code-reviewer/languages/java.md +103 -0
- package/bundled-skills/code-reviewer/languages/kotlin.md +88 -0
- package/bundled-skills/code-reviewer/languages/php.md +109 -0
- package/bundled-skills/code-reviewer/languages/python.md +94 -0
- package/bundled-skills/code-reviewer/languages/ruby.md +105 -0
- package/bundled-skills/code-reviewer/languages/rust.md +99 -0
- package/bundled-skills/code-reviewer/languages/swift.md +88 -0
- package/bundled-skills/code-reviewer/languages/typescript.md +97 -0
- package/bundled-skills/code-reviewer/rules/universal.md +49 -0
- package/bundled-skills/code-reviewer/scripts/code_quality_checker.py +1020 -0
- package/bundled-skills/code-reviewer/scripts/pr_analyzer.py +535 -0
- package/bundled-skills/code-reviewer/scripts/review_report_generator.py +505 -0
- package/bundled-skills/code-understand/SKILL.md +90 -0
- package/bundled-skills/codex-history-ingest/SKILL.md +248 -0
- package/bundled-skills/codex-history-ingest/references/codex-data-format.md +82 -0
- package/bundled-skills/cold-email/SKILL.md +159 -0
- package/bundled-skills/cold-email/evals/evals.json +94 -0
- package/bundled-skills/cold-email/references/benchmarks.md +83 -0
- package/bundled-skills/cold-email/references/follow-up-sequences.md +81 -0
- package/bundled-skills/cold-email/references/frameworks.md +90 -0
- package/bundled-skills/cold-email/references/personalization.md +79 -0
- package/bundled-skills/cold-email/references/subject-lines.md +53 -0
- package/bundled-skills/competitor-profiling/SKILL.md +415 -0
- package/bundled-skills/competitor-profiling/evals/evals.json +85 -0
- package/bundled-skills/competitor-profiling/references/templates.md +167 -0
- package/bundled-skills/competitor-profiling/references/tool-reference.md +179 -0
- package/bundled-skills/computer-use/SKILL.md +41 -0
- package/bundled-skills/content-strategy/SKILL.md +439 -0
- package/bundled-skills/content-strategy/evals/evals.json +116 -0
- package/bundled-skills/content-strategy/references/content-distribution.md +83 -0
- package/bundled-skills/content-strategy/references/headless-cms.md +194 -0
- package/bundled-skills/copilot-history-ingest/SKILL.md +376 -0
- package/bundled-skills/copilot-history-ingest/references/copilot-data-format.md +321 -0
- package/bundled-skills/copy-editing/SKILL.md +457 -0
- package/bundled-skills/copy-editing/evals/evals.json +89 -0
- package/bundled-skills/copy-editing/references/checklist.md +66 -0
- package/bundled-skills/copy-editing/references/content-refresh.md +38 -0
- package/bundled-skills/copy-editing/references/plain-english-alternatives.md +394 -0
- package/bundled-skills/copywriting/SKILL.md +256 -0
- package/bundled-skills/copywriting/evals/evals.json +126 -0
- package/bundled-skills/copywriting/references/copy-frameworks.md +433 -0
- package/bundled-skills/copywriting/references/natural-transitions.md +272 -0
- package/bundled-skills/cro/SKILL.md +187 -0
- package/bundled-skills/cro/evals/evals.json +111 -0
- package/bundled-skills/cro/references/experiments.md +248 -0
- package/bundled-skills/cro/references/form.md +422 -0
- package/bundled-skills/cross-linker/SKILL.md +309 -0
- package/bundled-skills/customer-research/SKILL.md +305 -0
- package/bundled-skills/customer-research/evals/evals.json +176 -0
- package/bundled-skills/customer-research/references/interviews-and-surveys.md +155 -0
- package/bundled-skills/customer-research/references/source-guides.md +401 -0
- package/bundled-skills/daily-update/SKILL.md +223 -0
- package/bundled-skills/dart-add-unit-test/SKILL.md +122 -0
- package/bundled-skills/dart-build-cli-app/SKILL.md +185 -0
- package/bundled-skills/dart-collect-coverage/SKILL.md +141 -0
- package/bundled-skills/dart-fix-runtime-errors/SKILL.md +166 -0
- package/bundled-skills/dart-generate-test-mocks/SKILL.md +155 -0
- package/bundled-skills/dart-migrate-to-checks-package/SKILL.md +528 -0
- package/bundled-skills/dart-resolve-package-conflicts/SKILL.md +116 -0
- package/bundled-skills/dart-run-static-analysis/SKILL.md +104 -0
- package/bundled-skills/dart-setup-ffi-assets/SKILL.md +419 -0
- package/bundled-skills/dart-use-doc-examples/SKILL.md +96 -0
- package/bundled-skills/dart-use-ffigen/SKILL.md +218 -0
- package/bundled-skills/dart-use-pattern-matching/SKILL.md +146 -0
- package/bundled-skills/dart-use-primary-constructors/SKILL.md +262 -0
- package/bundled-skills/dart-write-documentation/SKILL.md +136 -0
- package/bundled-skills/database-designer/README.md +388 -0
- package/bundled-skills/database-designer/SKILL.md +314 -0
- package/bundled-skills/database-designer/assets/sample_query_patterns.json +375 -0
- package/bundled-skills/database-designer/assets/sample_schema.json +372 -0
- package/bundled-skills/database-designer/assets/sample_schema.sql +207 -0
- package/bundled-skills/database-designer/expected_outputs/index_optimization_sample.txt +60 -0
- package/bundled-skills/database-designer/expected_outputs/migration_sample.txt +124 -0
- package/bundled-skills/database-designer/expected_outputs/schema_analysis_sample.txt +222 -0
- package/bundled-skills/database-designer/index_optimizer.py +926 -0
- package/bundled-skills/database-designer/migration_generator.py +1199 -0
- package/bundled-skills/database-designer/references/database-design-reference.md +476 -0
- package/bundled-skills/database-designer/references/database_selection_decision_tree.md +373 -0
- package/bundled-skills/database-designer/references/index_strategy_patterns.md +424 -0
- package/bundled-skills/database-designer/references/normalization_guide.md +354 -0
- package/bundled-skills/database-designer/schema_analyzer.py +982 -0
- package/bundled-skills/debug-issue/SKILL.md +28 -0
- package/bundled-skills/defuddle/SKILL.md +41 -0
- package/bundled-skills/dependency-auditor/README.md +524 -0
- package/bundled-skills/dependency-auditor/SKILL.md +85 -0
- package/bundled-skills/dependency-auditor/assets/sample_go.mod +53 -0
- package/bundled-skills/dependency-auditor/assets/sample_package.json +72 -0
- package/bundled-skills/dependency-auditor/assets/sample_requirements.txt +71 -0
- package/bundled-skills/dependency-auditor/expected_outputs/sample_license_report.txt +37 -0
- package/bundled-skills/dependency-auditor/expected_outputs/sample_upgrade_plan.txt +59 -0
- package/bundled-skills/dependency-auditor/expected_outputs/sample_vulnerability_report.json +71 -0
- package/bundled-skills/dependency-auditor/references/dependency_management_best_practices.md +643 -0
- package/bundled-skills/dependency-auditor/references/license_compatibility_matrix.md +238 -0
- package/bundled-skills/dependency-auditor/references/vulnerability_assessment_guide.md +461 -0
- package/bundled-skills/dependency-auditor/scripts/dep_scanner.py +794 -0
- package/bundled-skills/dependency-auditor/scripts/license_checker.py +996 -0
- package/bundled-skills/dependency-auditor/scripts/upgrade_planner.py +1029 -0
- package/bundled-skills/dependency-auditor/test-inventory.json +421 -0
- package/bundled-skills/dependency-auditor/test-project/package.json +72 -0
- package/bundled-skills/design-taste-frontend/SKILL.md +247 -0
- package/bundled-skills/dogfood/SKILL.md +27 -0
- package/bundled-skills/eas-app-stores/SKILL.md +176 -0
- package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
- package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
- package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
- package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
- package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
- package/bundled-skills/eas-hosting/SKILL.md +431 -0
- package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/SKILL.md +54 -0
- package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/references/metrics.md +98 -0
- package/bundled-skills/eas-observe/references/queries.md +403 -0
- package/bundled-skills/eas-observe/references/setup.md +476 -0
- package/bundled-skills/eas-observe/references/third-party.md +136 -0
- package/bundled-skills/eas-simulator/SKILL.md +208 -0
- package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
- package/bundled-skills/eas-simulator/references/controllers.md +106 -0
- package/bundled-skills/eas-simulator/references/run-your-app.md +224 -0
- package/bundled-skills/eas-simulator/references/troubleshooting.md +44 -0
- package/bundled-skills/eas-update/SKILL.md +146 -0
- package/bundled-skills/eas-update/agents/openai.yaml +4 -0
- package/bundled-skills/eas-update-insights/SKILL.md +238 -0
- package/bundled-skills/eas-update-insights/agents/openai.yaml +4 -0
- package/bundled-skills/eas-update-insights/references/channel-insights-schema.md +47 -0
- package/bundled-skills/eas-update-insights/references/update-insights-schema.md +69 -0
- package/bundled-skills/eas-workflows/SKILL.md +99 -0
- package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
- package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
- package/bundled-skills/eas-workflows/scripts/package.json +6 -0
- package/bundled-skills/emails/SKILL.md +311 -0
- package/bundled-skills/emails/evals/evals.json +93 -0
- package/bundled-skills/emails/references/copy-guidelines.md +113 -0
- package/bundled-skills/emails/references/email-types.md +515 -0
- package/bundled-skills/emails/references/sequence-templates.md +168 -0
- package/bundled-skills/engineering-standards/SKILL.md +736 -0
- package/bundled-skills/env-secrets-manager/SKILL.md +260 -0
- package/bundled-skills/env-secrets-manager/references/secret-patterns.md +41 -0
- package/bundled-skills/env-secrets-manager/references/validation-detection-rotation.md +358 -0
- package/bundled-skills/env-secrets-manager/scripts/env_auditor.py +145 -0
- package/bundled-skills/explore-codebase/SKILL.md +29 -0
- package/bundled-skills/expo-animation/LICENSE +21 -0
- package/bundled-skills/expo-animation/RECIPES.md +385 -0
- package/bundled-skills/expo-animation/SKILL.md +267 -0
- package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
- package/bundled-skills/expo-app-clip/SKILL.md +290 -0
- package/bundled-skills/expo-app-clip/agents/openai.yaml +4 -0
- package/bundled-skills/expo-app-clip/references/native-module.md +96 -0
- package/bundled-skills/expo-brownfield/SKILL.md +62 -0
- package/bundled-skills/expo-brownfield/agents/openai.yaml +4 -0
- package/bundled-skills/expo-brownfield/references/brownfield-integrated.md +526 -0
- package/bundled-skills/expo-brownfield/references/brownfield-isolated.md +451 -0
- package/bundled-skills/expo-brownfield/references/comparison.md +63 -0
- package/bundled-skills/expo-brownfield/references/troubleshooting.md +88 -0
- package/bundled-skills/expo-data-fetching/SKILL.md +478 -0
- package/bundled-skills/expo-data-fetching/agents/openai.yaml +4 -0
- package/bundled-skills/expo-data-fetching/references/expo-router-loaders.md +341 -0
- package/bundled-skills/expo-data-fetching/references/offline-and-cancellation.md +68 -0
- package/bundled-skills/expo-design-system/SKILL.md +376 -0
- package/bundled-skills/expo-design-system/agents/openai.yaml +4 -0
- package/bundled-skills/expo-design-system/references/audit.md +190 -0
- package/bundled-skills/expo-design-system/references/native-slop.md +74 -0
- package/bundled-skills/expo-dev-client/SKILL.md +182 -0
- package/bundled-skills/expo-dev-client/agents/openai.yaml +4 -0
- package/bundled-skills/expo-dom/SKILL.md +425 -0
- package/bundled-skills/expo-dom/agents/openai.yaml +4 -0
- package/bundled-skills/expo-examples/SKILL.md +106 -0
- package/bundled-skills/expo-examples/agents/openai.yaml +4 -0
- package/bundled-skills/expo-examples/references/catalog.md +105 -0
- package/bundled-skills/expo-migrate-module/SKILL.md +113 -0
- package/bundled-skills/expo-migrate-module/agents/openai.yaml +4 -0
- package/bundled-skills/expo-migrate-module/references/compatibility.md +73 -0
- package/bundled-skills/expo-migrate-module/references/example.md +212 -0
- package/bundled-skills/expo-migrate-module/references/migration-map.md +306 -0
- package/bundled-skills/expo-module/SKILL.md +151 -0
- package/bundled-skills/expo-module/agents/openai.yaml +4 -0
- package/bundled-skills/expo-module/references/config-plugin.md +90 -0
- package/bundled-skills/expo-module/references/create-expo-module.md +206 -0
- package/bundled-skills/expo-module/references/lifecycle.md +127 -0
- package/bundled-skills/expo-module/references/module-config.md +48 -0
- package/bundled-skills/expo-module/references/native-module.md +286 -0
- package/bundled-skills/expo-module/references/native-view.md +171 -0
- package/bundled-skills/expo-native-ui/SKILL.md +201 -0
- package/bundled-skills/expo-native-ui/agents/openai.yaml +4 -0
- package/bundled-skills/expo-native-ui/references/controls.md +231 -0
- package/bundled-skills/expo-native-ui/references/gradients.md +106 -0
- package/bundled-skills/expo-native-ui/references/icons.md +232 -0
- package/bundled-skills/expo-native-ui/references/media.md +193 -0
- package/bundled-skills/expo-native-ui/references/storage.md +121 -0
- package/bundled-skills/expo-native-ui/references/visual-effects.md +198 -0
- package/bundled-skills/expo-native-ui/references/webgpu-three.md +605 -0
- package/bundled-skills/expo-overview/SKILL.md +115 -0
- package/bundled-skills/expo-overview/agents/openai.yaml +4 -0
- package/bundled-skills/expo-project-structure/SKILL.md +114 -0
- package/bundled-skills/expo-project-structure/agents/openai.yaml +4 -0
- package/bundled-skills/expo-router/SKILL.md +240 -0
- package/bundled-skills/expo-router/agents/openai.yaml +4 -0
- package/bundled-skills/expo-router/references/form-sheet.md +253 -0
- package/bundled-skills/expo-router/references/route-structure.md +229 -0
- package/bundled-skills/expo-router/references/search.md +248 -0
- package/bundled-skills/expo-router/references/tabs.md +433 -0
- package/bundled-skills/expo-router/references/toolbar-and-headers.md +284 -0
- package/bundled-skills/expo-router/references/zoom-transitions.md +158 -0
- package/bundled-skills/expo-skill-eval/SKILL.md +314 -0
- package/bundled-skills/expo-skill-eval/agents/visual-grader.md +52 -0
- package/bundled-skills/expo-skill-eval/references/design-rubric.md +45 -0
- package/bundled-skills/expo-skill-eval/references/runtime-matrix.md +34 -0
- package/bundled-skills/expo-skill-eval/scripts/check-static.sh +64 -0
- package/bundled-skills/expo-skill-eval/scripts/clean-fixture.sh +56 -0
- package/bundled-skills/expo-skill-eval/scripts/generate_viewer.py +450 -0
- package/bundled-skills/expo-skill-eval/scripts/latest-sdk.sh +46 -0
- package/bundled-skills/expo-skill-eval/scripts/make-fixture.sh +95 -0
- package/bundled-skills/expo-skill-eval/scripts/make-workspace.sh +31 -0
- package/bundled-skills/expo-skill-eval/scripts/snapshot-android.sh +284 -0
- package/bundled-skills/expo-skill-eval/scripts/snapshot-ios.sh +132 -0
- package/bundled-skills/expo-skill-eval/scripts/snapshot-web.sh +61 -0
- package/bundled-skills/expo-skill-feedback/SKILL.md +87 -0
- package/bundled-skills/expo-skill-feedback/agents/openai.yaml +4 -0
- package/bundled-skills/expo-skill-feedback/scripts/skill-event.cjs +180 -0
- package/bundled-skills/expo-skill-feedback/scripts/telemetry.cjs +65 -0
- package/bundled-skills/expo-skill-feedback/scripts/telemetry_common.cjs +171 -0
- package/bundled-skills/expo-ui/SKILL.md +101 -0
- package/bundled-skills/expo-ui/agents/openai.yaml +4 -0
- package/bundled-skills/expo-ui/references/drop-in-replacements.md +27 -0
- package/bundled-skills/expo-ui/references/jetpack-compose.md +73 -0
- package/bundled-skills/expo-ui/references/swift-ui.md +73 -0
- package/bundled-skills/expo-ui/references/universal.md +104 -0
- package/bundled-skills/expo-ui/scripts/list-components.js +193 -0
- package/bundled-skills/expo-upgrade/SKILL.md +150 -0
- package/bundled-skills/expo-upgrade/agents/openai.yaml +4 -0
- package/bundled-skills/expo-upgrade/references/expo-av-to-audio.md +132 -0
- package/bundled-skills/expo-upgrade/references/expo-av-to-video.md +160 -0
- package/bundled-skills/expo-upgrade/references/native-tabs.md +124 -0
- package/bundled-skills/expo-upgrade/references/new-architecture.md +79 -0
- package/bundled-skills/expo-upgrade/references/react-19.md +79 -0
- package/bundled-skills/expo-upgrade/references/react-compiler.md +59 -0
- package/bundled-skills/expo-upgrade/references/react-navigation-to-expo-router.md +61 -0
- package/bundled-skills/expo-web-to-native/SKILL.md +91 -0
- package/bundled-skills/expo-web-to-native/agents/openai.yaml +4 -0
- package/bundled-skills/expo-web-to-native/references/false-friends.md +119 -0
- package/bundled-skills/expo-web-to-native/references/native-patterns.md +39 -0
- package/bundled-skills/expo-web-to-native/references/run-as-goal.md +48 -0
- package/bundled-skills/expo-web-to-native/references/verify-on-device.md +45 -0
- package/bundled-skills/find-skills/SKILL.md +141 -0
- package/bundled-skills/fix/SKILL.md +113 -0
- package/bundled-skills/fix/flaky-taxonomy.md +134 -0
- package/bundled-skills/flutter-add-integration-test/SKILL.md +163 -0
- package/bundled-skills/flutter-add-widget-preview/SKILL.md +145 -0
- package/bundled-skills/flutter-add-widget-test/SKILL.md +154 -0
- package/bundled-skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
- package/bundled-skills/flutter-build-responsive-layout/SKILL.md +139 -0
- package/bundled-skills/flutter-fix-layout-issues/SKILL.md +130 -0
- package/bundled-skills/flutter-implement-json-serialization/SKILL.md +153 -0
- package/bundled-skills/flutter-setup-declarative-routing/SKILL.md +255 -0
- package/bundled-skills/flutter-setup-localization/SKILL.md +210 -0
- package/bundled-skills/flutter-use-http-package/SKILL.md +174 -0
- package/bundled-skills/gate/SKILL.md +13 -0
- package/bundled-skills/graph-colorize/SKILL.md +180 -0
- package/bundled-skills/hermes-history-ingest/SKILL.md +239 -0
- package/bundled-skills/hermes-history-ingest/references/hermes-data-format.md +131 -0
- package/bundled-skills/humanizer/SKILL.md +374 -0
- package/bundled-skills/impeccable/SKILL.md +89 -0
- package/bundled-skills/impeccable/reference/adapt.md +312 -0
- package/bundled-skills/impeccable/reference/adapt.native.md +58 -0
- package/bundled-skills/impeccable/reference/android.md +46 -0
- package/bundled-skills/impeccable/reference/animate.md +89 -0
- package/bundled-skills/impeccable/reference/audit.md +136 -0
- package/bundled-skills/impeccable/reference/audit.native.md +139 -0
- package/bundled-skills/impeccable/reference/bolder.md +33 -0
- package/bundled-skills/impeccable/reference/clarify.md +94 -0
- package/bundled-skills/impeccable/reference/colorize.md +86 -0
- package/bundled-skills/impeccable/reference/craft-floor.md +44 -0
- package/bundled-skills/impeccable/reference/craft.md +5 -0
- package/bundled-skills/impeccable/reference/critique.md +806 -0
- package/bundled-skills/impeccable/reference/degraded/asset-producer.md +37 -0
- package/bundled-skills/impeccable/reference/degraded/documenter.md +24 -0
- package/bundled-skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/bundled-skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/bundled-skills/impeccable/reference/delight.md +70 -0
- package/bundled-skills/impeccable/reference/distill.md +111 -0
- package/bundled-skills/impeccable/reference/doctor.md +54 -0
- package/bundled-skills/impeccable/reference/document.md +416 -0
- package/bundled-skills/impeccable/reference/extract.md +69 -0
- package/bundled-skills/impeccable/reference/harden.md +336 -0
- package/bundled-skills/impeccable/reference/hooks.md +111 -0
- package/bundled-skills/impeccable/reference/init.md +131 -0
- package/bundled-skills/impeccable/reference/ios.md +51 -0
- package/bundled-skills/impeccable/reference/layout.md +84 -0
- package/bundled-skills/impeccable/reference/live-setup.md +104 -0
- package/bundled-skills/impeccable/reference/live.md +325 -0
- package/bundled-skills/impeccable/reference/new-work.md +145 -0
- package/bundled-skills/impeccable/reference/onboard.md +234 -0
- package/bundled-skills/impeccable/reference/operate.md +61 -0
- package/bundled-skills/impeccable/reference/optimize.md +258 -0
- package/bundled-skills/impeccable/reference/overdrive.md +127 -0
- package/bundled-skills/impeccable/reference/polish.md +105 -0
- package/bundled-skills/impeccable/reference/quieter.md +99 -0
- package/bundled-skills/impeccable/reference/routing.md +24 -0
- package/bundled-skills/impeccable/reference/shape.md +59 -0
- package/bundled-skills/impeccable/reference/typeset.md +80 -0
- package/bundled-skills/impeccable/reference/visualize.md +46 -0
- package/bundled-skills/impeccable/scripts/VERSION +1 -0
- package/bundled-skills/impeccable/scripts/bin/windows-x64/impeccable.exe +0 -0
- package/bundled-skills/impeccable/scripts/command-metadata.json +94 -0
- package/bundled-skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/bundled-skills/impeccable/scripts/data/font-index.json +1 -0
- package/bundled-skills/impeccable/scripts/impeccable +206 -0
- package/bundled-skills/impeccable/scripts/impeccable.cmd +214 -0
- package/bundled-skills/impeccable/scripts/live-browser-dom.js +167 -0
- package/bundled-skills/impeccable/scripts/live-browser-ignores.js +242 -0
- package/bundled-skills/impeccable/scripts/live-browser-session.js +144 -0
- package/bundled-skills/impeccable/scripts/live-browser.js +12990 -0
- package/bundled-skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/bundled-skills/impl-validator/SKILL.md +118 -0
- package/bundled-skills/ios-simulator/SKILL.md +32 -0
- package/bundled-skills/json-canvas/SKILL.md +244 -0
- package/bundled-skills/json-canvas/references/EXAMPLES.md +329 -0
- package/bundled-skills/launch/SKILL.md +381 -0
- package/bundled-skills/launch/evals/evals.json +106 -0
- package/bundled-skills/llm-wiki/SKILL.md +661 -0
- package/bundled-skills/llm-wiki/references/WRITING.md +28 -0
- package/bundled-skills/llm-wiki/references/karpathy-pattern.md +45 -0
- package/bundled-skills/marketing-plan/SKILL.md +300 -0
- package/bundled-skills/marketing-plan/evals/evals.json +112 -0
- package/bundled-skills/marketing-plan/references/aarrr-framework.md +180 -0
- package/bundled-skills/marketing-plan/references/budget-planning.md +168 -0
- package/bundled-skills/marketing-plan/references/client-types.md +373 -0
- package/bundled-skills/marketing-plan/references/current-state-rubric.md +255 -0
- package/bundled-skills/marketing-plan/references/example-quietude.md +972 -0
- package/bundled-skills/marketing-plan/references/funding-stage-unlocks.md +230 -0
- package/bundled-skills/marketing-plan/references/growth-patterns.md +190 -0
- package/bundled-skills/marketing-plan/references/idea-cross-reference.md +265 -0
- package/bundled-skills/marketing-plan/references/measurement-framework.md +213 -0
- package/bundled-skills/marketing-plan/references/methodology.md +363 -0
- package/bundled-skills/marketing-plan/references/ops-stack-mapping.md +197 -0
- package/bundled-skills/marketing-plan/references/plan-template.md +494 -0
- package/bundled-skills/marketing-plan/references/team-and-agency-model.md +278 -0
- package/bundled-skills/marketing-psychology/SKILL.md +455 -0
- package/bundled-skills/marketing-psychology/evals/evals.json +88 -0
- package/bundled-skills/mcp-server-builder/README.md +50 -0
- package/bundled-skills/mcp-server-builder/SKILL.md +100 -0
- package/bundled-skills/mcp-server-builder/references/openapi-extraction-guide.md +34 -0
- package/bundled-skills/mcp-server-builder/references/production-hardening-guide.md +78 -0
- package/bundled-skills/mcp-server-builder/references/python-server-template.md +22 -0
- package/bundled-skills/mcp-server-builder/references/typescript-server-template.md +19 -0
- package/bundled-skills/mcp-server-builder/references/validation-checklist.md +30 -0
- package/bundled-skills/mcp-server-builder/scripts/mcp_validator.py +186 -0
- package/bundled-skills/mcp-server-builder/scripts/openapi_to_mcp.py +284 -0
- package/bundled-skills/memory/SKILL.md +10 -0
- package/bundled-skills/memory-bridge/SKILL.md +163 -0
- package/bundled-skills/memory-save/SKILL.md +88 -0
- package/bundled-skills/migrate/SKILL.md +135 -0
- package/bundled-skills/migrate/cypress-mapping.md +79 -0
- package/bundled-skills/migrate/selenium-mapping.md +94 -0
- package/bundled-skills/novahiz-analyse/SKILL.md +74 -0
- package/bundled-skills/novahiz-audit/SKILL.md +75 -0
- package/bundled-skills/novahiz-clarify/SKILL.md +94 -0
- package/bundled-skills/novahiz-converge/SKILL.md +76 -0
- package/bundled-skills/novahiz-gate/SKILL.md +82 -0
- package/bundled-skills/novahiz-implement/SKILL.md +80 -0
- package/bundled-skills/novahiz-memory/SKILL.md +58 -0
- package/bundled-skills/novahiz-plan/SKILL.md +100 -0
- package/bundled-skills/novahiz-planner/SKILL.md +104 -0
- package/bundled-skills/novahiz-task/SKILL.md +105 -0
- package/bundled-skills/obsidian-bases/SKILL.md +499 -0
- package/bundled-skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md +173 -0
- package/bundled-skills/obsidian-cli/SKILL.md +106 -0
- package/bundled-skills/obsidian-layout-adjustment/SKILL.md +226 -0
- package/bundled-skills/obsidian-layout-adjustment/evals/evals.json +53 -0
- package/bundled-skills/obsidian-layout-adjustment/references/workflow-reference.md +212 -0
- package/bundled-skills/obsidian-markdown/SKILL.md +196 -0
- package/bundled-skills/obsidian-markdown/references/CALLOUTS.md +58 -0
- package/bundled-skills/obsidian-markdown/references/EMBEDS.md +70 -0
- package/bundled-skills/obsidian-markdown/references/PROPERTIES.md +61 -0
- package/bundled-skills/offers/SKILL.md +155 -0
- package/bundled-skills/offers/evals/evals.json +21 -0
- package/bundled-skills/offers/references/bonus-stacking.md +150 -0
- package/bundled-skills/offers/references/examples.md +215 -0
- package/bundled-skills/offers/references/guarantee-design.md +172 -0
- package/bundled-skills/offers/references/offer-anatomy.md +203 -0
- package/bundled-skills/offers/references/offer-formats.md +240 -0
- package/bundled-skills/offers/references/saas-offers.md +116 -0
- package/bundled-skills/offers/references/scarcity-urgency.md +175 -0
- package/bundled-skills/offers/references/value-equation.md +134 -0
- package/bundled-skills/onboarding/SKILL.md +261 -0
- package/bundled-skills/onboarding/evals/evals.json +108 -0
- package/bundled-skills/onboarding/references/activation-models.md +57 -0
- package/bundled-skills/onboarding/references/experiments.md +258 -0
- package/bundled-skills/onboarding/references/minimum-path-to-value.md +49 -0
- package/bundled-skills/openclaw-history-ingest/SKILL.md +257 -0
- package/bundled-skills/openclaw-history-ingest/references/openclaw-data-format.md +154 -0
- package/bundled-skills/orchestration/SKILL.md +69 -0
- package/bundled-skills/pi-history-ingest/SKILL.md +312 -0
- package/bundled-skills/playwright-agent/SKILL.md +142 -0
- package/bundled-skills/postgresql-optimization/SKILL.md +179 -0
- package/bundled-skills/pricing/SKILL.md +295 -0
- package/bundled-skills/pricing/evals/evals.json +119 -0
- package/bundled-skills/pricing/references/pricing-models.md +66 -0
- package/bundled-skills/pricing/references/pricing-page-teardown.md +85 -0
- package/bundled-skills/pricing/references/research-methods.md +152 -0
- package/bundled-skills/pricing/references/tier-structure.md +232 -0
- package/bundled-skills/product-marketing/SKILL.md +255 -0
- package/bundled-skills/product-marketing/evals/evals.json +98 -0
- package/bundled-skills/prospecting/SKILL.md +262 -0
- package/bundled-skills/prospecting/evals/evals.json +122 -0
- package/bundled-skills/prospecting/references/b2b-prospecting.md +106 -0
- package/bundled-skills/prospecting/references/compliance.md +123 -0
- package/bundled-skills/prospecting/references/data-sources.md +287 -0
- package/bundled-skills/prospecting/references/demand-signals.md +129 -0
- package/bundled-skills/prospecting/references/local-prospecting.md +165 -0
- package/bundled-skills/prospecting/references/saas-prospecting.md +123 -0
- package/bundled-skills/refactor-safely/SKILL.md +29 -0
- package/bundled-skills/review-changes/SKILL.md +30 -0
- package/bundled-skills/review-delta/SKILL.md +46 -0
- package/bundled-skills/review-pr/SKILL.md +66 -0
- package/bundled-skills/sales-enablement/SKILL.md +359 -0
- package/bundled-skills/sales-enablement/evals/evals.json +91 -0
- package/bundled-skills/sales-enablement/references/deck-frameworks.md +263 -0
- package/bundled-skills/sales-enablement/references/demo-scripts.md +355 -0
- package/bundled-skills/sales-enablement/references/objection-library.md +270 -0
- package/bundled-skills/sales-enablement/references/one-pager-templates.md +208 -0
- package/bundled-skills/security-guidance/SKILL.md +161 -0
- package/bundled-skills/security-guidance/references/pretooluse_hook_canon.md +141 -0
- package/bundled-skills/senior-architect/SKILL.md +343 -0
- package/bundled-skills/senior-architect/references/architecture_patterns.md +470 -0
- package/bundled-skills/senior-architect/references/system_design_workflows.md +536 -0
- package/bundled-skills/senior-architect/references/tech_decision_guide.md +412 -0
- package/bundled-skills/senior-architect/scripts/architecture_diagram_generator.py +660 -0
- package/bundled-skills/senior-architect/scripts/dependency_analyzer.py +615 -0
- package/bundled-skills/senior-architect/scripts/project_architect.py +749 -0
- package/bundled-skills/senior-backend/SKILL.md +467 -0
- package/bundled-skills/senior-backend/profiles/django-monolith.json +57 -0
- package/bundled-skills/senior-backend/profiles/fastapi-python.json +58 -0
- package/bundled-skills/senior-backend/profiles/go-or-rust-microservice.json +62 -0
- package/bundled-skills/senior-backend/profiles/node-express.json +57 -0
- package/bundled-skills/senior-backend/references/api_design_patterns.md +530 -0
- package/bundled-skills/senior-backend/references/backend_security_practices.md +1075 -0
- package/bundled-skills/senior-backend/references/composition_map.md +58 -0
- package/bundled-skills/senior-backend/references/database_optimization_guide.md +593 -0
- package/bundled-skills/senior-backend/references/forcing_questions.md +100 -0
- package/bundled-skills/senior-backend/scripts/api_load_tester.py +607 -0
- package/bundled-skills/senior-backend/scripts/api_scaffolder.py +645 -0
- package/bundled-skills/senior-backend/scripts/backend_decision_engine.py +397 -0
- package/bundled-skills/senior-backend/scripts/database_migration_tool.py +858 -0
- package/bundled-skills/seo-audit/SKILL.md +499 -0
- package/bundled-skills/seo-audit/evals/evals.json +136 -0
- package/bundled-skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/bundled-skills/seo-audit/references/international-seo.md +230 -0
- package/bundled-skills/session-brain/SKILL.md +101 -0
- package/bundled-skills/session-search/SKILL.md +97 -0
- package/bundled-skills/skill-creator/LICENSE.txt +202 -0
- package/bundled-skills/skill-creator/SKILL.md +485 -0
- package/bundled-skills/skill-creator/agents/analyzer.md +274 -0
- package/bundled-skills/skill-creator/agents/comparator.md +202 -0
- package/bundled-skills/skill-creator/agents/grader.md +223 -0
- package/bundled-skills/skill-creator/assets/eval_review.html +146 -0
- package/bundled-skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bundled-skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bundled-skills/skill-creator/references/schemas.md +430 -0
- package/bundled-skills/skill-creator/scripts/__init__.py +0 -0
- package/bundled-skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bundled-skills/skill-creator/scripts/generate_report.py +326 -0
- package/bundled-skills/skill-creator/scripts/improve_description.py +247 -0
- package/bundled-skills/skill-creator/scripts/package_skill.py +136 -0
- package/bundled-skills/skill-creator/scripts/quick_validate.py +103 -0
- package/bundled-skills/skill-creator/scripts/run_eval.py +310 -0
- package/bundled-skills/skill-creator/scripts/run_loop.py +328 -0
- package/bundled-skills/skill-creator/scripts/utils.py +47 -0
- package/bundled-skills/social/SKILL.md +413 -0
- package/bundled-skills/social/evals/evals.json +107 -0
- package/bundled-skills/social/references/carousel-frameworks.md +141 -0
- package/bundled-skills/social/references/listening-sources-template.md +123 -0
- package/bundled-skills/social/references/listening.md +283 -0
- package/bundled-skills/social/references/platform-limits.md +110 -0
- package/bundled-skills/social/references/platforms.md +170 -0
- package/bundled-skills/social/references/post-templates.md +179 -0
- package/bundled-skills/social/references/reverse-engineering.md +195 -0
- package/bundled-skills/social/references/short-form-video.md +237 -0
- package/bundled-skills/spec-driven-workflow/SKILL.md +333 -0
- package/bundled-skills/spec-driven-workflow/references/acceptance_criteria_patterns.md +497 -0
- package/bundled-skills/spec-driven-workflow/references/bounded_autonomy_rules.md +273 -0
- package/bundled-skills/spec-driven-workflow/references/spec_format_guide.md +531 -0
- package/bundled-skills/spec-driven-workflow/scripts/spec_generator.py +338 -0
- package/bundled-skills/spec-driven-workflow/scripts/spec_validator.py +461 -0
- package/bundled-skills/spec-driven-workflow/scripts/test_extractor.py +431 -0
- package/bundled-skills/supabase/CHANGELOG.md +78 -0
- package/bundled-skills/supabase/SKILL.md +149 -0
- package/bundled-skills/supabase/assets/feedback-issue-template.md +17 -0
- package/bundled-skills/supabase/references/skill-feedback.md +17 -0
- package/bundled-skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
- package/bundled-skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/bundled-skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/bundled-skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/bundled-skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/bundled-skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/bundled-skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/bundled-skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/bundled-skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/bundled-skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/bundled-skills/tag-taxonomy/SKILL.md +218 -0
- package/bundled-skills/typescript-expert/SKILL.md +431 -0
- package/bundled-skills/typescript-expert/references/tsconfig-strict.json +45 -0
- package/bundled-skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/bundled-skills/typescript-expert/references/utility-types.ts +335 -0
- package/bundled-skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/bundled-skills/ui-design-system/SKILL.md +379 -0
- package/bundled-skills/ui-design-system/assets/design_system_doc_template.md +180 -0
- package/bundled-skills/ui-design-system/references/component-architecture.md +396 -0
- package/bundled-skills/ui-design-system/references/developer-handoff.md +509 -0
- package/bundled-skills/ui-design-system/references/responsive-calculations.md +390 -0
- package/bundled-skills/ui-design-system/references/token-generation.md +324 -0
- package/bundled-skills/ui-design-system/scripts/design_token_generator.py +590 -0
- package/bundled-skills/vault-skill-factory/SKILL.md +143 -0
- package/bundled-skills/video/SKILL.md +346 -0
- package/bundled-skills/video/evals/evals.json +103 -0
- package/bundled-skills/video/references/ai-video-prompting.md +175 -0
- package/bundled-skills/video/references/edit-anatomy.md +84 -0
- package/bundled-skills/wiki-agent/SKILL.md +322 -0
- package/bundled-skills/wiki-capture/SKILL.md +337 -0
- package/bundled-skills/wiki-capture/references/RAW-FORMAT.md +115 -0
- package/bundled-skills/wiki-context-pack/SKILL.md +89 -0
- package/bundled-skills/wiki-dashboard/SKILL.md +472 -0
- package/bundled-skills/wiki-dedup/SKILL.md +320 -0
- package/bundled-skills/wiki-digest/SKILL.md +243 -0
- package/bundled-skills/wiki-export/SKILL.md +445 -0
- package/bundled-skills/wiki-history-ingest/SKILL.md +61 -0
- package/bundled-skills/wiki-import/SKILL.md +276 -0
- package/bundled-skills/wiki-ingest/SKILL.md +563 -0
- package/bundled-skills/wiki-ingest/references/ingest-prompts.md +54 -0
- package/bundled-skills/wiki-ingest/references/pageindex.md +72 -0
- package/bundled-skills/wiki-ingest/references/url-sources.md +295 -0
- package/bundled-skills/wiki-lint/SKILL.md +643 -0
- package/bundled-skills/wiki-narrate/SKILL.md +120 -0
- package/bundled-skills/wiki-narrate/references/voices.md +29 -0
- package/bundled-skills/wiki-query/SKILL.md +307 -0
- package/bundled-skills/wiki-rebuild/SKILL.md +212 -0
- package/bundled-skills/wiki-research/SKILL.md +319 -0
- package/bundled-skills/wiki-setup/SKILL.md +359 -0
- package/bundled-skills/wiki-stage-commit/SKILL.md +164 -0
- package/bundled-skills/wiki-status/SKILL.md +556 -0
- package/bundled-skills/wiki-switch/SKILL.md +115 -0
- package/bundled-skills/wiki-synthesize/SKILL.md +212 -0
- package/bundled-skills/wiki-update/SKILL.md +271 -0
- package/bundled-skills/write-a-skill/SKILL.md +141 -0
- package/bundled-skills/write-a-skill/references/companion_tooling.md +67 -0
- package/bundled-skills/write-a-skill/references/description_design_patterns.md +139 -0
- package/bundled-skills/write-a-skill/references/progressive_disclosure_principles.md +89 -0
- package/bundled-skills/write-a-skill/references/quality_gates_for_skills.md +158 -0
- package/bundled-skills/write-a-skill/scripts/skill_description_validator.py +255 -0
- package/bundled-skills/write-a-skill/scripts/skill_review_checklist_runner.py +268 -0
- package/bundled-skills/write-a-skill/scripts/skill_structure_validator.py +277 -0
- package/bundled-skills/zero-hallucination-coder/SKILL.md +271 -0
- package/catalog/categories.json +1030 -0
- package/catalog/overrides.json +525 -0
- package/catalog/providers.json +145 -0
- package/catalog/rules.json +112 -0
- package/docs/ARCHITECTURE.md +82 -0
- package/docs/CONSTITUTION.md +60 -0
- package/docs/EXECUTION.md +79 -0
- package/docs/HARNESSES.md +38 -0
- package/docs/INSTALL.md +123 -0
- package/docs/PROVIDERS.md +128 -0
- package/docs/ROADMAPS.md +74 -0
- package/docs/RULES.md +85 -0
- package/docs/TOKENS.md +48 -0
- package/install/bootstrap.mjs +273 -0
- package/install/install.mjs +466 -0
- package/install/install.ps1 +3 -0
- package/install/install.sh +4 -0
- package/install/lib.mjs +198 -0
- package/install/prompt.mjs +16 -0
- package/install/uninstall.mjs +109 -0
- package/mcp/novahiz-tools/README.md +26 -0
- package/mcp/novahiz-tools/index.mjs +452 -0
- package/novahiz.config.example.json +39 -0
- package/package.json +76 -0
- package/skills/a11y-audit/SKILL.md +211 -0
- package/skills/a11y-audit/assets/sample-component.tsx +51 -0
- package/skills/a11y-audit/expected_outputs/sample-contrast-output.txt +39 -0
- package/skills/a11y-audit/expected_outputs/sample-scan-output.json +34 -0
- package/skills/a11y-audit/expected_outputs/sample-scan-report.md +63 -0
- package/skills/a11y-audit/references/aria-patterns.md +223 -0
- package/skills/a11y-audit/references/audit-report-template.md +46 -0
- package/skills/a11y-audit/references/ci-cd-integration.md +127 -0
- package/skills/a11y-audit/references/color-contrast-guide.md +83 -0
- package/skills/a11y-audit/references/examples-by-framework.md +312 -0
- package/skills/a11y-audit/references/framework-a11y-patterns.md +661 -0
- package/skills/a11y-audit/references/testing-checklist.md +41 -0
- package/skills/a11y-audit/references/wcag-22-new-criteria.md +79 -0
- package/skills/a11y-audit/references/wcag-quick-ref.md +113 -0
- package/skills/a11y-audit/scripts/a11y_scanner.py +684 -0
- package/skills/a11y-audit/scripts/contrast_checker.py +504 -0
- package/skills/adversarial-reviewer/SKILL.md +247 -0
- package/skills/ai-security/SKILL.md +364 -0
- package/skills/ai-security/references/atlas-coverage.md +150 -0
- package/skills/ai-security/scripts/ai_threat_scanner.py +564 -0
- package/skills/anti-AI-design/SKILL.md +189 -0
- package/skills/anti-pattern-detector/SKILL.md +185 -0
- package/skills/anti-pattern-detector/references/async-network-patterns.md +581 -0
- package/skills/anti-pattern-detector/references/build-deploy-patterns.md +554 -0
- package/skills/anti-pattern-detector/references/cache-patterns.md +446 -0
- package/skills/anti-pattern-detector/references/cloud-infra-patterns.md +538 -0
- package/skills/anti-pattern-detector/references/concurrency-patterns.md +558 -0
- package/skills/anti-pattern-detector/references/language-specific-patterns.md +740 -0
- package/skills/anti-pattern-detector/references/monitoring-patterns.md +456 -0
- package/skills/api-design-reviewer/SKILL.md +433 -0
- package/skills/api-design-reviewer/references/api_antipatterns.md +680 -0
- package/skills/api-design-reviewer/references/rest_design_rules.md +487 -0
- package/skills/api-design-reviewer/scripts/api_linter.py +956 -0
- package/skills/api-design-reviewer/scripts/api_scorecard.py +1661 -0
- package/skills/api-design-reviewer/scripts/breaking_change_detector.py +1102 -0
- package/skills/apple-hig-expert/SKILL.md +108 -0
- package/skills/apple-hig-expert/references/accessibility.md +55 -0
- package/skills/apple-hig-expert/references/platform-specifics.md +48 -0
- package/skills/apple-hig-expert/references/visual-design.md +69 -0
- package/skills/apple-hig-expert/scripts/hig_checker.py +97 -0
- package/skills/apple-hig-expert/templates/hig-audit-template.md +83 -0
- package/skills/clean-code/SKILL.md +99 -0
- package/skills/code-reviewer/README.md +92 -0
- package/skills/code-reviewer/SKILL.md +183 -0
- package/skills/code-reviewer/assets/sample_c_clean.c +71 -0
- package/skills/code-reviewer/assets/sample_c_smells.c +66 -0
- package/skills/code-reviewer/assets/sample_csharp_clean.cs +100 -0
- package/skills/code-reviewer/assets/sample_csharp_smells.cs +78 -0
- package/skills/code-reviewer/assets/sample_java_clean.java +55 -0
- package/skills/code-reviewer/assets/sample_java_smells.java +56 -0
- package/skills/code-reviewer/expected_outputs/sample_c_clean_quality.json +65 -0
- package/skills/code-reviewer/expected_outputs/sample_c_smells_quality.json +155 -0
- package/skills/code-reviewer/expected_outputs/sample_csharp_clean_quality.json +135 -0
- package/skills/code-reviewer/expected_outputs/sample_csharp_smells_quality.json +143 -0
- package/skills/code-reviewer/expected_outputs/sample_java_clean_quality.json +53 -0
- package/skills/code-reviewer/expected_outputs/sample_java_smells_quality.json +83 -0
- package/skills/code-reviewer/languages/c.md +103 -0
- package/skills/code-reviewer/languages/cpp.md +103 -0
- package/skills/code-reviewer/languages/csharp.md +97 -0
- package/skills/code-reviewer/languages/dart.md +108 -0
- package/skills/code-reviewer/languages/go.md +92 -0
- package/skills/code-reviewer/languages/java.md +103 -0
- package/skills/code-reviewer/languages/kotlin.md +88 -0
- package/skills/code-reviewer/languages/php.md +109 -0
- package/skills/code-reviewer/languages/python.md +94 -0
- package/skills/code-reviewer/languages/ruby.md +105 -0
- package/skills/code-reviewer/languages/rust.md +99 -0
- package/skills/code-reviewer/languages/swift.md +88 -0
- package/skills/code-reviewer/languages/typescript.md +97 -0
- package/skills/code-reviewer/rules/universal.md +49 -0
- package/skills/code-reviewer/scripts/code_quality_checker.py +1020 -0
- package/skills/code-reviewer/scripts/pr_analyzer.py +535 -0
- package/skills/code-reviewer/scripts/review_report_generator.py +505 -0
- package/skills/code-understand/SKILL.md +90 -0
- package/skills/database-designer/README.md +388 -0
- package/skills/database-designer/SKILL.md +314 -0
- package/skills/database-designer/assets/sample_query_patterns.json +375 -0
- package/skills/database-designer/assets/sample_schema.json +372 -0
- package/skills/database-designer/assets/sample_schema.sql +207 -0
- package/skills/database-designer/expected_outputs/index_optimization_sample.txt +60 -0
- package/skills/database-designer/expected_outputs/migration_sample.txt +124 -0
- package/skills/database-designer/expected_outputs/schema_analysis_sample.txt +222 -0
- package/skills/database-designer/index_optimizer.py +926 -0
- package/skills/database-designer/migration_generator.py +1199 -0
- package/skills/database-designer/references/database-design-reference.md +476 -0
- package/skills/database-designer/references/database_selection_decision_tree.md +373 -0
- package/skills/database-designer/references/index_strategy_patterns.md +424 -0
- package/skills/database-designer/references/normalization_guide.md +354 -0
- package/skills/database-designer/schema_analyzer.py +982 -0
- package/skills/defuddle/SKILL.md +41 -0
- package/skills/dependency-auditor/README.md +524 -0
- package/skills/dependency-auditor/SKILL.md +85 -0
- package/skills/dependency-auditor/assets/sample_go.mod +53 -0
- package/skills/dependency-auditor/assets/sample_package.json +72 -0
- package/skills/dependency-auditor/assets/sample_requirements.txt +71 -0
- package/skills/dependency-auditor/expected_outputs/sample_license_report.txt +37 -0
- package/skills/dependency-auditor/expected_outputs/sample_upgrade_plan.txt +59 -0
- package/skills/dependency-auditor/expected_outputs/sample_vulnerability_report.json +71 -0
- package/skills/dependency-auditor/references/dependency_management_best_practices.md +643 -0
- package/skills/dependency-auditor/references/license_compatibility_matrix.md +238 -0
- package/skills/dependency-auditor/references/vulnerability_assessment_guide.md +461 -0
- package/skills/dependency-auditor/scripts/dep_scanner.py +794 -0
- package/skills/dependency-auditor/scripts/license_checker.py +996 -0
- package/skills/dependency-auditor/scripts/upgrade_planner.py +1029 -0
- package/skills/dependency-auditor/test-inventory.json +421 -0
- package/skills/dependency-auditor/test-project/package.json +72 -0
- package/skills/design-taste-frontend/SKILL.md +247 -0
- package/skills/engineering-standards/SKILL.md +736 -0
- package/skills/env-secrets-manager/SKILL.md +260 -0
- package/skills/env-secrets-manager/references/secret-patterns.md +41 -0
- package/skills/env-secrets-manager/references/validation-detection-rotation.md +358 -0
- package/skills/env-secrets-manager/scripts/env_auditor.py +145 -0
- package/skills/fix/SKILL.md +113 -0
- package/skills/fix/flaky-taxonomy.md +134 -0
- package/skills/gate/SKILL.md +13 -0
- package/skills/humanizer/SKILL.md +374 -0
- package/skills/mcp-server-builder/README.md +50 -0
- package/skills/mcp-server-builder/SKILL.md +100 -0
- package/skills/mcp-server-builder/references/openapi-extraction-guide.md +34 -0
- package/skills/mcp-server-builder/references/production-hardening-guide.md +78 -0
- package/skills/mcp-server-builder/references/python-server-template.md +22 -0
- package/skills/mcp-server-builder/references/typescript-server-template.md +19 -0
- package/skills/mcp-server-builder/references/validation-checklist.md +30 -0
- package/skills/mcp-server-builder/scripts/mcp_validator.py +186 -0
- package/skills/mcp-server-builder/scripts/openapi_to_mcp.py +284 -0
- package/skills/memory/SKILL.md +10 -0
- package/skills/migrate/SKILL.md +135 -0
- package/skills/migrate/cypress-mapping.md +79 -0
- package/skills/migrate/selenium-mapping.md +94 -0
- package/skills/novahiz-analyse/SKILL.md +74 -0
- package/skills/novahiz-audit/SKILL.md +75 -0
- package/skills/novahiz-clarify/SKILL.md +94 -0
- package/skills/novahiz-converge/SKILL.md +76 -0
- package/skills/novahiz-gate/SKILL.md +82 -0
- package/skills/novahiz-implement/SKILL.md +80 -0
- package/skills/novahiz-memory/SKILL.md +58 -0
- package/skills/novahiz-plan/SKILL.md +99 -0
- package/skills/novahiz-planner/SKILL.md +104 -0
- package/skills/novahiz-task/SKILL.md +105 -0
- package/skills/playwright-agent/SKILL.md +142 -0
- package/skills/postgresql-optimization/SKILL.md +179 -0
- package/skills/review-changes/SKILL.md +30 -0
- package/skills/security-guidance/SKILL.md +160 -0
- package/skills/security-guidance/references/pretooluse_hook_canon.md +141 -0
- package/skills/senior-architect/SKILL.md +343 -0
- package/skills/senior-architect/references/architecture_patterns.md +470 -0
- package/skills/senior-architect/references/system_design_workflows.md +536 -0
- package/skills/senior-architect/references/tech_decision_guide.md +412 -0
- package/skills/senior-architect/scripts/architecture_diagram_generator.py +660 -0
- package/skills/senior-architect/scripts/dependency_analyzer.py +615 -0
- package/skills/senior-architect/scripts/project_architect.py +749 -0
- package/skills/senior-backend/SKILL.md +467 -0
- package/skills/senior-backend/profiles/django-monolith.json +57 -0
- package/skills/senior-backend/profiles/fastapi-python.json +58 -0
- package/skills/senior-backend/profiles/go-or-rust-microservice.json +62 -0
- package/skills/senior-backend/profiles/node-express.json +57 -0
- package/skills/senior-backend/references/api_design_patterns.md +530 -0
- package/skills/senior-backend/references/backend_security_practices.md +1075 -0
- package/skills/senior-backend/references/composition_map.md +58 -0
- package/skills/senior-backend/references/database_optimization_guide.md +593 -0
- package/skills/senior-backend/references/forcing_questions.md +100 -0
- package/skills/senior-backend/scripts/api_load_tester.py +607 -0
- package/skills/senior-backend/scripts/api_scaffolder.py +645 -0
- package/skills/senior-backend/scripts/backend_decision_engine.py +397 -0
- package/skills/senior-backend/scripts/database_migration_tool.py +858 -0
- package/skills/senior-secops/SKILL.md +505 -0
- package/skills/senior-secops/references/compliance_requirements.md +792 -0
- package/skills/senior-secops/references/security_standards.md +718 -0
- package/skills/senior-secops/references/vulnerability_management_guide.md +487 -0
- package/skills/senior-secops/scripts/compliance_checker.py +1107 -0
- package/skills/senior-secops/scripts/security_scanner.py +471 -0
- package/skills/senior-secops/scripts/vulnerability_assessor.py +563 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +247 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +328 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/spec-driven-workflow/SKILL.md +333 -0
- package/skills/spec-driven-workflow/references/acceptance_criteria_patterns.md +497 -0
- package/skills/spec-driven-workflow/references/bounded_autonomy_rules.md +273 -0
- package/skills/spec-driven-workflow/references/spec_format_guide.md +531 -0
- package/skills/spec-driven-workflow/scripts/spec_generator.py +338 -0
- package/skills/spec-driven-workflow/scripts/spec_validator.py +461 -0
- package/skills/spec-driven-workflow/scripts/test_extractor.py +431 -0
- package/skills/supabase/CHANGELOG.md +78 -0
- package/skills/supabase/SKILL.md +149 -0
- package/skills/supabase/assets/feedback-issue-template.md +17 -0
- package/skills/supabase/references/skill-feedback.md +17 -0
- package/skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
- package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/skills/typescript-expert/SKILL.md +431 -0
- package/skills/typescript-expert/references/tsconfig-strict.json +45 -0
- package/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/skills/typescript-expert/references/utility-types.ts +335 -0
- package/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/skills/ui-design-system/SKILL.md +379 -0
- package/skills/ui-design-system/assets/design_system_doc_template.md +180 -0
- package/skills/ui-design-system/references/component-architecture.md +396 -0
- package/skills/ui-design-system/references/developer-handoff.md +509 -0
- package/skills/ui-design-system/references/responsive-calculations.md +390 -0
- package/skills/ui-design-system/references/token-generation.md +324 -0
- package/skills/ui-design-system/scripts/design_token_generator.py +590 -0
- package/skills/write-a-skill/SKILL.md +141 -0
- package/skills/write-a-skill/references/companion_tooling.md +67 -0
- package/skills/write-a-skill/references/description_design_patterns.md +139 -0
- package/skills/write-a-skill/references/progressive_disclosure_principles.md +89 -0
- package/skills/write-a-skill/references/quality_gates_for_skills.md +158 -0
- package/skills/write-a-skill/scripts/skill_description_validator.py +255 -0
- package/skills/write-a-skill/scripts/skill_review_checklist_runner.py +268 -0
- package/skills/write-a-skill/scripts/skill_structure_validator.py +277 -0
- package/skills/zero-hallucination-coder/SKILL.md +271 -0
- package/src/catalog.ts +266 -0
- package/src/classify.ts +201 -0
- package/src/cli.ts +115 -0
- package/src/commands/clean.ts +114 -0
- package/src/commands/context.ts +130 -0
- package/src/commands/doctor.ts +191 -0
- package/src/commands/gate.ts +192 -0
- package/src/commands/inspect.ts +296 -0
- package/src/commands/report.ts +85 -0
- package/src/commands/task.ts +310 -0
- package/src/commands/tokens.ts +85 -0
- package/src/content.ts +70 -0
- package/src/db.ts +143 -0
- package/src/deps.ts +36 -0
- package/src/exec.ts +85 -0
- package/src/gate.ts +261 -0
- package/src/ledger.ts +468 -0
- package/src/providers.ts +52 -0
- package/src/relevance.ts +73 -0
- package/src/render.ts +107 -0
- package/src/spec.ts +306 -0
- package/src/targets.ts +296 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,956 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
API Linter - Analyzes OpenAPI/Swagger specifications for REST conventions and best practices.
|
|
4
|
+
|
|
5
|
+
This script validates API designs against established conventions including:
|
|
6
|
+
- Resource naming conventions (kebab-case resources, camelCase fields)
|
|
7
|
+
- HTTP method usage patterns
|
|
8
|
+
- URL structure consistency
|
|
9
|
+
- Error response format standards
|
|
10
|
+
- Documentation completeness
|
|
11
|
+
- Pagination patterns
|
|
12
|
+
- Versioning compliance
|
|
13
|
+
|
|
14
|
+
Supports both OpenAPI JSON specifications and raw endpoint definition JSON.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import json
|
|
19
|
+
import re
|
|
20
|
+
import sys
|
|
21
|
+
from typing import Any, Dict, List, Tuple, Optional, Set
|
|
22
|
+
from urllib.parse import urlparse
|
|
23
|
+
from dataclasses import dataclass, field
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
@dataclass
|
|
27
|
+
class LintIssue:
|
|
28
|
+
"""Represents a linting issue found in the API specification."""
|
|
29
|
+
severity: str # 'error', 'warning', 'info'
|
|
30
|
+
category: str
|
|
31
|
+
message: str
|
|
32
|
+
path: str
|
|
33
|
+
suggestion: str = ""
|
|
34
|
+
line_number: Optional[int] = None
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
@dataclass
|
|
38
|
+
class LintReport:
|
|
39
|
+
"""Complete linting report with issues and statistics."""
|
|
40
|
+
issues: List[LintIssue] = field(default_factory=list)
|
|
41
|
+
total_endpoints: int = 0
|
|
42
|
+
endpoints_with_issues: int = 0
|
|
43
|
+
score: float = 0.0
|
|
44
|
+
|
|
45
|
+
def add_issue(self, issue: LintIssue) -> None:
|
|
46
|
+
"""Add an issue to the report."""
|
|
47
|
+
self.issues.append(issue)
|
|
48
|
+
|
|
49
|
+
def get_issues_by_severity(self) -> Dict[str, List[LintIssue]]:
|
|
50
|
+
"""Group issues by severity level."""
|
|
51
|
+
grouped = {'error': [], 'warning': [], 'info': []}
|
|
52
|
+
for issue in self.issues:
|
|
53
|
+
if issue.severity in grouped:
|
|
54
|
+
grouped[issue.severity].append(issue)
|
|
55
|
+
return grouped
|
|
56
|
+
|
|
57
|
+
def calculate_score(self) -> float:
|
|
58
|
+
"""Calculate overall API quality score (0-100)."""
|
|
59
|
+
if self.total_endpoints == 0:
|
|
60
|
+
return 100.0
|
|
61
|
+
|
|
62
|
+
error_penalty = len([i for i in self.issues if i.severity == 'error']) * 10
|
|
63
|
+
warning_penalty = len([i for i in self.issues if i.severity == 'warning']) * 3
|
|
64
|
+
info_penalty = len([i for i in self.issues if i.severity == 'info']) * 1
|
|
65
|
+
|
|
66
|
+
total_penalty = error_penalty + warning_penalty + info_penalty
|
|
67
|
+
base_score = 100.0
|
|
68
|
+
|
|
69
|
+
# Penalty per endpoint to normalize across API sizes
|
|
70
|
+
penalty_per_endpoint = total_penalty / self.total_endpoints if self.total_endpoints > 0 else total_penalty
|
|
71
|
+
|
|
72
|
+
self.score = max(0.0, base_score - penalty_per_endpoint)
|
|
73
|
+
return self.score
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class APILinter:
|
|
77
|
+
"""Main API linting engine."""
|
|
78
|
+
|
|
79
|
+
def __init__(self):
|
|
80
|
+
self.report = LintReport()
|
|
81
|
+
self.openapi_spec: Optional[Dict] = None
|
|
82
|
+
self.raw_endpoints: Optional[Dict] = None
|
|
83
|
+
|
|
84
|
+
# Regex patterns for naming conventions
|
|
85
|
+
self.kebab_case_pattern = re.compile(r'^[a-z]+(?:-[a-z0-9]+)*$')
|
|
86
|
+
self.camel_case_pattern = re.compile(r'^[a-z][a-zA-Z0-9]*$')
|
|
87
|
+
self.snake_case_pattern = re.compile(r'^[a-z]+(?:_[a-z0-9]+)*$')
|
|
88
|
+
self.pascal_case_pattern = re.compile(r'^[A-Z][a-zA-Z0-9]*$')
|
|
89
|
+
|
|
90
|
+
# Standard HTTP methods
|
|
91
|
+
self.http_methods = {'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS'}
|
|
92
|
+
|
|
93
|
+
# Standard HTTP status codes by method
|
|
94
|
+
self.standard_status_codes = {
|
|
95
|
+
'GET': {200, 304, 404},
|
|
96
|
+
'POST': {200, 201, 400, 409, 422},
|
|
97
|
+
'PUT': {200, 204, 400, 404, 409},
|
|
98
|
+
'PATCH': {200, 204, 400, 404, 409},
|
|
99
|
+
'DELETE': {200, 204, 404},
|
|
100
|
+
'HEAD': {200, 404},
|
|
101
|
+
'OPTIONS': {200}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
# Common error status codes
|
|
105
|
+
self.common_error_codes = {400, 401, 403, 404, 405, 409, 422, 429, 500, 502, 503}
|
|
106
|
+
|
|
107
|
+
def lint_openapi_spec(self, spec: Dict[str, Any]) -> LintReport:
|
|
108
|
+
"""Lint an OpenAPI/Swagger specification."""
|
|
109
|
+
self.openapi_spec = spec
|
|
110
|
+
self.report = LintReport()
|
|
111
|
+
|
|
112
|
+
# Basic structure validation
|
|
113
|
+
self._validate_openapi_structure()
|
|
114
|
+
|
|
115
|
+
# Info section validation
|
|
116
|
+
self._validate_info_section()
|
|
117
|
+
|
|
118
|
+
# Server section validation
|
|
119
|
+
self._validate_servers_section()
|
|
120
|
+
|
|
121
|
+
# Paths validation (main linting logic)
|
|
122
|
+
self._validate_paths_section()
|
|
123
|
+
|
|
124
|
+
# Components validation
|
|
125
|
+
self._validate_components_section()
|
|
126
|
+
|
|
127
|
+
# Security validation
|
|
128
|
+
self._validate_security_section()
|
|
129
|
+
|
|
130
|
+
# Calculate final score
|
|
131
|
+
self.report.calculate_score()
|
|
132
|
+
|
|
133
|
+
return self.report
|
|
134
|
+
|
|
135
|
+
def lint_raw_endpoints(self, endpoints: Dict[str, Any]) -> LintReport:
|
|
136
|
+
"""Lint raw endpoint definitions."""
|
|
137
|
+
self.raw_endpoints = endpoints
|
|
138
|
+
self.report = LintReport()
|
|
139
|
+
|
|
140
|
+
# Validate raw endpoint structure
|
|
141
|
+
self._validate_raw_endpoint_structure()
|
|
142
|
+
|
|
143
|
+
# Lint each endpoint
|
|
144
|
+
for endpoint_path, endpoint_data in endpoints.get('endpoints', {}).items():
|
|
145
|
+
self._lint_raw_endpoint(endpoint_path, endpoint_data)
|
|
146
|
+
|
|
147
|
+
self.report.calculate_score()
|
|
148
|
+
return self.report
|
|
149
|
+
|
|
150
|
+
def _validate_openapi_structure(self) -> None:
|
|
151
|
+
"""Validate basic OpenAPI document structure."""
|
|
152
|
+
required_fields = ['openapi', 'info', 'paths']
|
|
153
|
+
|
|
154
|
+
for field in required_fields:
|
|
155
|
+
if field not in self.openapi_spec:
|
|
156
|
+
self.report.add_issue(LintIssue(
|
|
157
|
+
severity='error',
|
|
158
|
+
category='structure',
|
|
159
|
+
message=f"Missing required field: {field}",
|
|
160
|
+
path=f"/{field}",
|
|
161
|
+
suggestion=f"Add the '{field}' field to the root of your OpenAPI specification"
|
|
162
|
+
))
|
|
163
|
+
|
|
164
|
+
def _validate_info_section(self) -> None:
|
|
165
|
+
"""Validate the info section of OpenAPI spec."""
|
|
166
|
+
if 'info' not in self.openapi_spec:
|
|
167
|
+
return
|
|
168
|
+
|
|
169
|
+
info = self.openapi_spec['info']
|
|
170
|
+
required_info_fields = ['title', 'version']
|
|
171
|
+
recommended_info_fields = ['description', 'contact']
|
|
172
|
+
|
|
173
|
+
for field in required_info_fields:
|
|
174
|
+
if field not in info:
|
|
175
|
+
self.report.add_issue(LintIssue(
|
|
176
|
+
severity='error',
|
|
177
|
+
category='documentation',
|
|
178
|
+
message=f"Missing required info field: {field}",
|
|
179
|
+
path=f"/info/{field}",
|
|
180
|
+
suggestion=f"Add a '{field}' field to the info section"
|
|
181
|
+
))
|
|
182
|
+
|
|
183
|
+
for field in recommended_info_fields:
|
|
184
|
+
if field not in info:
|
|
185
|
+
self.report.add_issue(LintIssue(
|
|
186
|
+
severity='warning',
|
|
187
|
+
category='documentation',
|
|
188
|
+
message=f"Missing recommended info field: {field}",
|
|
189
|
+
path=f"/info/{field}",
|
|
190
|
+
suggestion=f"Consider adding a '{field}' field to improve API documentation"
|
|
191
|
+
))
|
|
192
|
+
|
|
193
|
+
# Validate version format
|
|
194
|
+
if 'version' in info:
|
|
195
|
+
version = info['version']
|
|
196
|
+
if not re.match(r'^\d+\.\d+(\.\d+)?(-\w+)?$', version):
|
|
197
|
+
self.report.add_issue(LintIssue(
|
|
198
|
+
severity='warning',
|
|
199
|
+
category='versioning',
|
|
200
|
+
message=f"Version format '{version}' doesn't follow semantic versioning",
|
|
201
|
+
path="/info/version",
|
|
202
|
+
suggestion="Use semantic versioning format (e.g., '1.0.0', '2.1.3-beta')"
|
|
203
|
+
))
|
|
204
|
+
|
|
205
|
+
def _validate_servers_section(self) -> None:
|
|
206
|
+
"""Validate the servers section."""
|
|
207
|
+
if 'servers' not in self.openapi_spec:
|
|
208
|
+
self.report.add_issue(LintIssue(
|
|
209
|
+
severity='warning',
|
|
210
|
+
category='configuration',
|
|
211
|
+
message="Missing servers section",
|
|
212
|
+
path="/servers",
|
|
213
|
+
suggestion="Add a servers section to specify API base URLs"
|
|
214
|
+
))
|
|
215
|
+
return
|
|
216
|
+
|
|
217
|
+
servers = self.openapi_spec['servers']
|
|
218
|
+
if not isinstance(servers, list) or len(servers) == 0:
|
|
219
|
+
self.report.add_issue(LintIssue(
|
|
220
|
+
severity='warning',
|
|
221
|
+
category='configuration',
|
|
222
|
+
message="Empty servers section",
|
|
223
|
+
path="/servers",
|
|
224
|
+
suggestion="Add at least one server URL"
|
|
225
|
+
))
|
|
226
|
+
|
|
227
|
+
def _validate_paths_section(self) -> None:
|
|
228
|
+
"""Validate all API paths and operations."""
|
|
229
|
+
if 'paths' not in self.openapi_spec:
|
|
230
|
+
return
|
|
231
|
+
|
|
232
|
+
paths = self.openapi_spec['paths']
|
|
233
|
+
if not paths:
|
|
234
|
+
self.report.add_issue(LintIssue(
|
|
235
|
+
severity='error',
|
|
236
|
+
category='structure',
|
|
237
|
+
message="No paths defined in API specification",
|
|
238
|
+
path="/paths",
|
|
239
|
+
suggestion="Define at least one API endpoint"
|
|
240
|
+
))
|
|
241
|
+
return
|
|
242
|
+
|
|
243
|
+
self.report.total_endpoints = sum(
|
|
244
|
+
len([method for method in path_obj.keys() if method.upper() in self.http_methods])
|
|
245
|
+
for path_obj in paths.values() if isinstance(path_obj, dict)
|
|
246
|
+
)
|
|
247
|
+
|
|
248
|
+
endpoints_with_issues = set()
|
|
249
|
+
|
|
250
|
+
for path, path_obj in paths.items():
|
|
251
|
+
if not isinstance(path_obj, dict):
|
|
252
|
+
continue
|
|
253
|
+
|
|
254
|
+
# Validate path structure
|
|
255
|
+
path_issues = self._validate_path_structure(path)
|
|
256
|
+
if path_issues:
|
|
257
|
+
endpoints_with_issues.add(path)
|
|
258
|
+
|
|
259
|
+
# Validate each operation in the path
|
|
260
|
+
for method, operation in path_obj.items():
|
|
261
|
+
if method.upper() not in self.http_methods:
|
|
262
|
+
continue
|
|
263
|
+
|
|
264
|
+
operation_issues = self._validate_operation(path, method.upper(), operation)
|
|
265
|
+
if operation_issues:
|
|
266
|
+
endpoints_with_issues.add(path)
|
|
267
|
+
|
|
268
|
+
self.report.endpoints_with_issues = len(endpoints_with_issues)
|
|
269
|
+
|
|
270
|
+
def _validate_path_structure(self, path: str) -> bool:
|
|
271
|
+
"""Validate REST path structure and naming conventions."""
|
|
272
|
+
has_issues = False
|
|
273
|
+
|
|
274
|
+
# Check if path starts with slash
|
|
275
|
+
if not path.startswith('/'):
|
|
276
|
+
self.report.add_issue(LintIssue(
|
|
277
|
+
severity='error',
|
|
278
|
+
category='url_structure',
|
|
279
|
+
message=f"Path must start with '/' character: {path}",
|
|
280
|
+
path=f"/paths/{path}",
|
|
281
|
+
suggestion=f"Change '{path}' to '/{path.lstrip('/')}'"
|
|
282
|
+
))
|
|
283
|
+
has_issues = True
|
|
284
|
+
|
|
285
|
+
# Split path into segments
|
|
286
|
+
segments = [seg for seg in path.split('/') if seg]
|
|
287
|
+
|
|
288
|
+
# Check for empty segments (double slashes)
|
|
289
|
+
if '//' in path:
|
|
290
|
+
self.report.add_issue(LintIssue(
|
|
291
|
+
severity='error',
|
|
292
|
+
category='url_structure',
|
|
293
|
+
message=f"Path contains empty segments: {path}",
|
|
294
|
+
path=f"/paths/{path}",
|
|
295
|
+
suggestion="Remove double slashes from the path"
|
|
296
|
+
))
|
|
297
|
+
has_issues = True
|
|
298
|
+
|
|
299
|
+
# Validate each segment
|
|
300
|
+
for i, segment in enumerate(segments):
|
|
301
|
+
# Skip parameter segments
|
|
302
|
+
if segment.startswith('{') and segment.endswith('}'):
|
|
303
|
+
# Validate parameter naming
|
|
304
|
+
param_name = segment[1:-1]
|
|
305
|
+
if not self.camel_case_pattern.match(param_name) and not self.kebab_case_pattern.match(param_name):
|
|
306
|
+
self.report.add_issue(LintIssue(
|
|
307
|
+
severity='warning',
|
|
308
|
+
category='naming',
|
|
309
|
+
message=f"Path parameter '{param_name}' should use camelCase or kebab-case",
|
|
310
|
+
path=f"/paths/{path}",
|
|
311
|
+
suggestion=f"Use camelCase (e.g., 'userId') or kebab-case (e.g., 'user-id')"
|
|
312
|
+
))
|
|
313
|
+
has_issues = True
|
|
314
|
+
continue
|
|
315
|
+
|
|
316
|
+
# Check for resource naming conventions
|
|
317
|
+
if not self.kebab_case_pattern.match(segment):
|
|
318
|
+
# Allow version segments like 'v1', 'v2'
|
|
319
|
+
if not re.match(r'^v\d+$', segment):
|
|
320
|
+
self.report.add_issue(LintIssue(
|
|
321
|
+
severity='warning',
|
|
322
|
+
category='naming',
|
|
323
|
+
message=f"Resource segment '{segment}' should use kebab-case",
|
|
324
|
+
path=f"/paths/{path}",
|
|
325
|
+
suggestion=f"Use kebab-case for '{segment}' (e.g., 'user-profiles', 'order-items')"
|
|
326
|
+
))
|
|
327
|
+
has_issues = True
|
|
328
|
+
|
|
329
|
+
# Check for verb usage in URLs (anti-pattern)
|
|
330
|
+
common_verbs = {'get', 'post', 'put', 'delete', 'create', 'update', 'remove', 'add'}
|
|
331
|
+
if segment.lower() in common_verbs:
|
|
332
|
+
self.report.add_issue(LintIssue(
|
|
333
|
+
severity='warning',
|
|
334
|
+
category='rest_conventions',
|
|
335
|
+
message=f"Avoid verbs in URLs: '{segment}' in {path}",
|
|
336
|
+
path=f"/paths/{path}",
|
|
337
|
+
suggestion="Use HTTP methods instead of verbs in URLs. Use nouns for resources."
|
|
338
|
+
))
|
|
339
|
+
has_issues = True
|
|
340
|
+
|
|
341
|
+
# Check path depth (avoid over-nesting)
|
|
342
|
+
if len(segments) > 6:
|
|
343
|
+
self.report.add_issue(LintIssue(
|
|
344
|
+
severity='warning',
|
|
345
|
+
category='url_structure',
|
|
346
|
+
message=f"Path has excessive nesting ({len(segments)} levels): {path}",
|
|
347
|
+
path=f"/paths/{path}",
|
|
348
|
+
suggestion="Consider flattening the resource hierarchy or using query parameters"
|
|
349
|
+
))
|
|
350
|
+
has_issues = True
|
|
351
|
+
|
|
352
|
+
# Check for consistent versioning
|
|
353
|
+
if any('v' + str(i) in segments for i in range(1, 10)):
|
|
354
|
+
version_segments = [seg for seg in segments if re.match(r'^v\d+$', seg)]
|
|
355
|
+
if len(version_segments) > 1:
|
|
356
|
+
self.report.add_issue(LintIssue(
|
|
357
|
+
severity='error',
|
|
358
|
+
category='versioning',
|
|
359
|
+
message=f"Multiple version segments in path: {path}",
|
|
360
|
+
path=f"/paths/{path}",
|
|
361
|
+
suggestion="Use only one version segment per path"
|
|
362
|
+
))
|
|
363
|
+
has_issues = True
|
|
364
|
+
|
|
365
|
+
return has_issues
|
|
366
|
+
|
|
367
|
+
def _validate_operation(self, path: str, method: str, operation: Dict[str, Any]) -> bool:
|
|
368
|
+
"""Validate individual operation (HTTP method + path combination)."""
|
|
369
|
+
has_issues = False
|
|
370
|
+
operation_path = f"/paths/{path}/{method.lower()}"
|
|
371
|
+
|
|
372
|
+
# Check for required operation fields
|
|
373
|
+
if 'responses' not in operation:
|
|
374
|
+
self.report.add_issue(LintIssue(
|
|
375
|
+
severity='error',
|
|
376
|
+
category='structure',
|
|
377
|
+
message=f"Missing responses section for {method} {path}",
|
|
378
|
+
path=f"{operation_path}/responses",
|
|
379
|
+
suggestion="Define expected responses for this operation"
|
|
380
|
+
))
|
|
381
|
+
has_issues = True
|
|
382
|
+
|
|
383
|
+
# Check for operation documentation
|
|
384
|
+
if 'summary' not in operation:
|
|
385
|
+
self.report.add_issue(LintIssue(
|
|
386
|
+
severity='warning',
|
|
387
|
+
category='documentation',
|
|
388
|
+
message=f"Missing summary for {method} {path}",
|
|
389
|
+
path=f"{operation_path}/summary",
|
|
390
|
+
suggestion="Add a brief summary describing what this operation does"
|
|
391
|
+
))
|
|
392
|
+
has_issues = True
|
|
393
|
+
|
|
394
|
+
if 'description' not in operation:
|
|
395
|
+
self.report.add_issue(LintIssue(
|
|
396
|
+
severity='info',
|
|
397
|
+
category='documentation',
|
|
398
|
+
message=f"Missing description for {method} {path}",
|
|
399
|
+
path=f"{operation_path}/description",
|
|
400
|
+
suggestion="Add a detailed description for better API documentation"
|
|
401
|
+
))
|
|
402
|
+
has_issues = True
|
|
403
|
+
|
|
404
|
+
# Validate HTTP method usage patterns
|
|
405
|
+
method_issues = self._validate_http_method_usage(path, method, operation)
|
|
406
|
+
if method_issues:
|
|
407
|
+
has_issues = True
|
|
408
|
+
|
|
409
|
+
# Validate responses
|
|
410
|
+
if 'responses' in operation:
|
|
411
|
+
response_issues = self._validate_responses(path, method, operation['responses'])
|
|
412
|
+
if response_issues:
|
|
413
|
+
has_issues = True
|
|
414
|
+
|
|
415
|
+
# Validate parameters
|
|
416
|
+
if 'parameters' in operation:
|
|
417
|
+
param_issues = self._validate_parameters(path, method, operation['parameters'])
|
|
418
|
+
if param_issues:
|
|
419
|
+
has_issues = True
|
|
420
|
+
|
|
421
|
+
# Validate request body
|
|
422
|
+
if 'requestBody' in operation:
|
|
423
|
+
body_issues = self._validate_request_body(path, method, operation['requestBody'])
|
|
424
|
+
if body_issues:
|
|
425
|
+
has_issues = True
|
|
426
|
+
|
|
427
|
+
return has_issues
|
|
428
|
+
|
|
429
|
+
def _validate_http_method_usage(self, path: str, method: str, operation: Dict[str, Any]) -> bool:
|
|
430
|
+
"""Validate proper HTTP method usage patterns."""
|
|
431
|
+
has_issues = False
|
|
432
|
+
|
|
433
|
+
# GET requests should not have request body
|
|
434
|
+
if method == 'GET' and 'requestBody' in operation:
|
|
435
|
+
self.report.add_issue(LintIssue(
|
|
436
|
+
severity='error',
|
|
437
|
+
category='rest_conventions',
|
|
438
|
+
message=f"GET request should not have request body: {method} {path}",
|
|
439
|
+
path=f"/paths/{path}/{method.lower()}/requestBody",
|
|
440
|
+
suggestion="Remove requestBody from GET request or use POST if body is needed"
|
|
441
|
+
))
|
|
442
|
+
has_issues = True
|
|
443
|
+
|
|
444
|
+
# DELETE requests typically should not have request body
|
|
445
|
+
if method == 'DELETE' and 'requestBody' in operation:
|
|
446
|
+
self.report.add_issue(LintIssue(
|
|
447
|
+
severity='warning',
|
|
448
|
+
category='rest_conventions',
|
|
449
|
+
message=f"DELETE request typically should not have request body: {method} {path}",
|
|
450
|
+
path=f"/paths/{path}/{method.lower()}/requestBody",
|
|
451
|
+
suggestion="Consider using query parameters or path parameters instead"
|
|
452
|
+
))
|
|
453
|
+
has_issues = True
|
|
454
|
+
|
|
455
|
+
# POST/PUT/PATCH should typically have request body (except for actions)
|
|
456
|
+
if method in ['POST', 'PUT', 'PATCH'] and 'requestBody' not in operation:
|
|
457
|
+
# Check if this is an action endpoint
|
|
458
|
+
if not any(action in path.lower() for action in ['activate', 'deactivate', 'reset', 'confirm']):
|
|
459
|
+
self.report.add_issue(LintIssue(
|
|
460
|
+
severity='info',
|
|
461
|
+
category='rest_conventions',
|
|
462
|
+
message=f"{method} request typically should have request body: {method} {path}",
|
|
463
|
+
path=f"/paths/{path}/{method.lower()}",
|
|
464
|
+
suggestion=f"Consider adding requestBody for {method} operation or use GET if no data is being sent"
|
|
465
|
+
))
|
|
466
|
+
has_issues = True
|
|
467
|
+
|
|
468
|
+
return has_issues
|
|
469
|
+
|
|
470
|
+
def _validate_responses(self, path: str, method: str, responses: Dict[str, Any]) -> bool:
|
|
471
|
+
"""Validate response definitions."""
|
|
472
|
+
has_issues = False
|
|
473
|
+
|
|
474
|
+
# Check for success response
|
|
475
|
+
success_codes = {'200', '201', '202', '204'}
|
|
476
|
+
has_success = any(code in responses for code in success_codes)
|
|
477
|
+
|
|
478
|
+
if not has_success:
|
|
479
|
+
self.report.add_issue(LintIssue(
|
|
480
|
+
severity='error',
|
|
481
|
+
category='responses',
|
|
482
|
+
message=f"Missing success response for {method} {path}",
|
|
483
|
+
path=f"/paths/{path}/{method.lower()}/responses",
|
|
484
|
+
suggestion="Define at least one success response (200, 201, 202, or 204)"
|
|
485
|
+
))
|
|
486
|
+
has_issues = True
|
|
487
|
+
|
|
488
|
+
# Check for error responses
|
|
489
|
+
has_error_responses = any(code.startswith('4') or code.startswith('5') for code in responses.keys())
|
|
490
|
+
|
|
491
|
+
if not has_error_responses:
|
|
492
|
+
self.report.add_issue(LintIssue(
|
|
493
|
+
severity='warning',
|
|
494
|
+
category='responses',
|
|
495
|
+
message=f"Missing error responses for {method} {path}",
|
|
496
|
+
path=f"/paths/{path}/{method.lower()}/responses",
|
|
497
|
+
suggestion="Define common error responses (400, 404, 500, etc.)"
|
|
498
|
+
))
|
|
499
|
+
has_issues = True
|
|
500
|
+
|
|
501
|
+
# Validate individual response codes
|
|
502
|
+
for status_code, response in responses.items():
|
|
503
|
+
if status_code == 'default':
|
|
504
|
+
continue
|
|
505
|
+
|
|
506
|
+
try:
|
|
507
|
+
code_int = int(status_code)
|
|
508
|
+
except ValueError:
|
|
509
|
+
self.report.add_issue(LintIssue(
|
|
510
|
+
severity='error',
|
|
511
|
+
category='responses',
|
|
512
|
+
message=f"Invalid status code '{status_code}' for {method} {path}",
|
|
513
|
+
path=f"/paths/{path}/{method.lower()}/responses/{status_code}",
|
|
514
|
+
suggestion="Use valid HTTP status codes (e.g., 200, 404, 500)"
|
|
515
|
+
))
|
|
516
|
+
has_issues = True
|
|
517
|
+
continue
|
|
518
|
+
|
|
519
|
+
# Check if status code is appropriate for the method
|
|
520
|
+
expected_codes = self.standard_status_codes.get(method, set())
|
|
521
|
+
common_codes = {400, 401, 403, 404, 429, 500} # Always acceptable
|
|
522
|
+
|
|
523
|
+
if expected_codes and code_int not in expected_codes and code_int not in common_codes:
|
|
524
|
+
self.report.add_issue(LintIssue(
|
|
525
|
+
severity='info',
|
|
526
|
+
category='responses',
|
|
527
|
+
message=f"Uncommon status code {status_code} for {method} {path}",
|
|
528
|
+
path=f"/paths/{path}/{method.lower()}/responses/{status_code}",
|
|
529
|
+
suggestion=f"Consider using standard codes for {method}: {sorted(expected_codes)}"
|
|
530
|
+
))
|
|
531
|
+
has_issues = True
|
|
532
|
+
|
|
533
|
+
return has_issues
|
|
534
|
+
|
|
535
|
+
def _validate_parameters(self, path: str, method: str, parameters: List[Dict[str, Any]]) -> bool:
|
|
536
|
+
"""Validate parameter definitions."""
|
|
537
|
+
has_issues = False
|
|
538
|
+
|
|
539
|
+
for i, param in enumerate(parameters):
|
|
540
|
+
param_path = f"/paths/{path}/{method.lower()}/parameters[{i}]"
|
|
541
|
+
|
|
542
|
+
# Check required fields
|
|
543
|
+
if 'name' not in param:
|
|
544
|
+
self.report.add_issue(LintIssue(
|
|
545
|
+
severity='error',
|
|
546
|
+
category='parameters',
|
|
547
|
+
message=f"Parameter missing name field in {method} {path}",
|
|
548
|
+
path=f"{param_path}/name",
|
|
549
|
+
suggestion="Add a name field to the parameter"
|
|
550
|
+
))
|
|
551
|
+
has_issues = True
|
|
552
|
+
continue
|
|
553
|
+
|
|
554
|
+
if 'in' not in param:
|
|
555
|
+
self.report.add_issue(LintIssue(
|
|
556
|
+
severity='error',
|
|
557
|
+
category='parameters',
|
|
558
|
+
message=f"Parameter '{param['name']}' missing 'in' field in {method} {path}",
|
|
559
|
+
path=f"{param_path}/in",
|
|
560
|
+
suggestion="Specify parameter location (query, path, header, cookie)"
|
|
561
|
+
))
|
|
562
|
+
has_issues = True
|
|
563
|
+
|
|
564
|
+
# Validate parameter naming
|
|
565
|
+
param_name = param['name']
|
|
566
|
+
param_location = param.get('in', '')
|
|
567
|
+
|
|
568
|
+
if param_location == 'query':
|
|
569
|
+
# Query parameters should use camelCase or kebab-case
|
|
570
|
+
if not self.camel_case_pattern.match(param_name) and not self.kebab_case_pattern.match(param_name):
|
|
571
|
+
self.report.add_issue(LintIssue(
|
|
572
|
+
severity='warning',
|
|
573
|
+
category='naming',
|
|
574
|
+
message=f"Query parameter '{param_name}' should use camelCase or kebab-case in {method} {path}",
|
|
575
|
+
path=f"{param_path}/name",
|
|
576
|
+
suggestion="Use camelCase (e.g., 'pageSize') or kebab-case (e.g., 'page-size')"
|
|
577
|
+
))
|
|
578
|
+
has_issues = True
|
|
579
|
+
|
|
580
|
+
elif param_location == 'path':
|
|
581
|
+
# Path parameters should use camelCase or kebab-case
|
|
582
|
+
if not self.camel_case_pattern.match(param_name) and not self.kebab_case_pattern.match(param_name):
|
|
583
|
+
self.report.add_issue(LintIssue(
|
|
584
|
+
severity='warning',
|
|
585
|
+
category='naming',
|
|
586
|
+
message=f"Path parameter '{param_name}' should use camelCase or kebab-case in {method} {path}",
|
|
587
|
+
path=f"{param_path}/name",
|
|
588
|
+
suggestion="Use camelCase (e.g., 'userId') or kebab-case (e.g., 'user-id')"
|
|
589
|
+
))
|
|
590
|
+
has_issues = True
|
|
591
|
+
|
|
592
|
+
# Path parameters must be required
|
|
593
|
+
if not param.get('required', False):
|
|
594
|
+
self.report.add_issue(LintIssue(
|
|
595
|
+
severity='error',
|
|
596
|
+
category='parameters',
|
|
597
|
+
message=f"Path parameter '{param_name}' must be required in {method} {path}",
|
|
598
|
+
path=f"{param_path}/required",
|
|
599
|
+
suggestion="Set required: true for path parameters"
|
|
600
|
+
))
|
|
601
|
+
has_issues = True
|
|
602
|
+
|
|
603
|
+
return has_issues
|
|
604
|
+
|
|
605
|
+
def _validate_request_body(self, path: str, method: str, request_body: Dict[str, Any]) -> bool:
|
|
606
|
+
"""Validate request body definition."""
|
|
607
|
+
has_issues = False
|
|
608
|
+
|
|
609
|
+
if 'content' not in request_body:
|
|
610
|
+
self.report.add_issue(LintIssue(
|
|
611
|
+
severity='error',
|
|
612
|
+
category='request_body',
|
|
613
|
+
message=f"Request body missing content for {method} {path}",
|
|
614
|
+
path=f"/paths/{path}/{method.lower()}/requestBody/content",
|
|
615
|
+
suggestion="Define content types for the request body"
|
|
616
|
+
))
|
|
617
|
+
has_issues = True
|
|
618
|
+
|
|
619
|
+
return has_issues
|
|
620
|
+
|
|
621
|
+
def _validate_components_section(self) -> None:
|
|
622
|
+
"""Validate the components section."""
|
|
623
|
+
if 'components' not in self.openapi_spec:
|
|
624
|
+
self.report.add_issue(LintIssue(
|
|
625
|
+
severity='info',
|
|
626
|
+
category='structure',
|
|
627
|
+
message="Missing components section",
|
|
628
|
+
path="/components",
|
|
629
|
+
suggestion="Consider defining reusable components (schemas, responses, parameters)"
|
|
630
|
+
))
|
|
631
|
+
return
|
|
632
|
+
|
|
633
|
+
components = self.openapi_spec['components']
|
|
634
|
+
|
|
635
|
+
# Validate schemas
|
|
636
|
+
if 'schemas' in components:
|
|
637
|
+
self._validate_schemas(components['schemas'])
|
|
638
|
+
|
|
639
|
+
def _validate_schemas(self, schemas: Dict[str, Any]) -> None:
|
|
640
|
+
"""Validate schema definitions."""
|
|
641
|
+
for schema_name, schema in schemas.items():
|
|
642
|
+
# Check schema naming (should be PascalCase)
|
|
643
|
+
if not self.pascal_case_pattern.match(schema_name):
|
|
644
|
+
self.report.add_issue(LintIssue(
|
|
645
|
+
severity='warning',
|
|
646
|
+
category='naming',
|
|
647
|
+
message=f"Schema name '{schema_name}' should use PascalCase",
|
|
648
|
+
path=f"/components/schemas/{schema_name}",
|
|
649
|
+
suggestion=f"Use PascalCase for schema names (e.g., 'UserProfile', 'OrderItem')"
|
|
650
|
+
))
|
|
651
|
+
|
|
652
|
+
# Validate schema properties
|
|
653
|
+
if isinstance(schema, dict) and 'properties' in schema:
|
|
654
|
+
self._validate_schema_properties(schema_name, schema['properties'])
|
|
655
|
+
|
|
656
|
+
def _validate_schema_properties(self, schema_name: str, properties: Dict[str, Any]) -> None:
|
|
657
|
+
"""Validate schema property naming."""
|
|
658
|
+
for prop_name, prop_def in properties.items():
|
|
659
|
+
# Properties should use camelCase
|
|
660
|
+
if not self.camel_case_pattern.match(prop_name):
|
|
661
|
+
self.report.add_issue(LintIssue(
|
|
662
|
+
severity='warning',
|
|
663
|
+
category='naming',
|
|
664
|
+
message=f"Property '{prop_name}' in schema '{schema_name}' should use camelCase",
|
|
665
|
+
path=f"/components/schemas/{schema_name}/properties/{prop_name}",
|
|
666
|
+
suggestion="Use camelCase for property names (e.g., 'firstName', 'createdAt')"
|
|
667
|
+
))
|
|
668
|
+
|
|
669
|
+
def _validate_security_section(self) -> None:
|
|
670
|
+
"""Validate security definitions."""
|
|
671
|
+
if 'security' not in self.openapi_spec and 'components' not in self.openapi_spec:
|
|
672
|
+
self.report.add_issue(LintIssue(
|
|
673
|
+
severity='warning',
|
|
674
|
+
category='security',
|
|
675
|
+
message="No security configuration found",
|
|
676
|
+
path="/security",
|
|
677
|
+
suggestion="Define security schemes and apply them to operations"
|
|
678
|
+
))
|
|
679
|
+
|
|
680
|
+
def _validate_raw_endpoint_structure(self) -> None:
|
|
681
|
+
"""Validate structure of raw endpoint definitions."""
|
|
682
|
+
if 'endpoints' not in self.raw_endpoints:
|
|
683
|
+
self.report.add_issue(LintIssue(
|
|
684
|
+
severity='error',
|
|
685
|
+
category='structure',
|
|
686
|
+
message="Missing 'endpoints' field in raw endpoint definition",
|
|
687
|
+
path="/endpoints",
|
|
688
|
+
suggestion="Provide an 'endpoints' object containing endpoint definitions"
|
|
689
|
+
))
|
|
690
|
+
return
|
|
691
|
+
|
|
692
|
+
endpoints = self.raw_endpoints['endpoints']
|
|
693
|
+
self.report.total_endpoints = len(endpoints)
|
|
694
|
+
|
|
695
|
+
def _lint_raw_endpoint(self, path: str, endpoint_data: Dict[str, Any]) -> None:
|
|
696
|
+
"""Lint individual raw endpoint definition."""
|
|
697
|
+
# Validate path structure
|
|
698
|
+
self._validate_path_structure(path)
|
|
699
|
+
|
|
700
|
+
# Check for required fields
|
|
701
|
+
if 'method' not in endpoint_data:
|
|
702
|
+
self.report.add_issue(LintIssue(
|
|
703
|
+
severity='error',
|
|
704
|
+
category='structure',
|
|
705
|
+
message=f"Missing method field for endpoint {path}",
|
|
706
|
+
path=f"/endpoints/{path}/method",
|
|
707
|
+
suggestion="Specify HTTP method (GET, POST, PUT, PATCH, DELETE)"
|
|
708
|
+
))
|
|
709
|
+
return
|
|
710
|
+
|
|
711
|
+
method = endpoint_data['method'].upper()
|
|
712
|
+
if method not in self.http_methods:
|
|
713
|
+
self.report.add_issue(LintIssue(
|
|
714
|
+
severity='error',
|
|
715
|
+
category='structure',
|
|
716
|
+
message=f"Invalid HTTP method '{method}' for endpoint {path}",
|
|
717
|
+
path=f"/endpoints/{path}/method",
|
|
718
|
+
suggestion=f"Use valid HTTP methods: {', '.join(sorted(self.http_methods))}"
|
|
719
|
+
))
|
|
720
|
+
|
|
721
|
+
def generate_json_report(self) -> str:
|
|
722
|
+
"""Generate JSON format report."""
|
|
723
|
+
issues_by_severity = self.report.get_issues_by_severity()
|
|
724
|
+
|
|
725
|
+
report_data = {
|
|
726
|
+
"summary": {
|
|
727
|
+
"total_endpoints": self.report.total_endpoints,
|
|
728
|
+
"endpoints_with_issues": self.report.endpoints_with_issues,
|
|
729
|
+
"total_issues": len(self.report.issues),
|
|
730
|
+
"errors": len(issues_by_severity['error']),
|
|
731
|
+
"warnings": len(issues_by_severity['warning']),
|
|
732
|
+
"info": len(issues_by_severity['info']),
|
|
733
|
+
"score": round(self.report.score, 2)
|
|
734
|
+
},
|
|
735
|
+
"issues": []
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
for issue in self.report.issues:
|
|
739
|
+
report_data["issues"].append({
|
|
740
|
+
"severity": issue.severity,
|
|
741
|
+
"category": issue.category,
|
|
742
|
+
"message": issue.message,
|
|
743
|
+
"path": issue.path,
|
|
744
|
+
"suggestion": issue.suggestion
|
|
745
|
+
})
|
|
746
|
+
|
|
747
|
+
return json.dumps(report_data, indent=2)
|
|
748
|
+
|
|
749
|
+
def generate_text_report(self) -> str:
|
|
750
|
+
"""Generate human-readable text report."""
|
|
751
|
+
issues_by_severity = self.report.get_issues_by_severity()
|
|
752
|
+
|
|
753
|
+
report_lines = [
|
|
754
|
+
"═══════════════════════════════════════════════════════════════",
|
|
755
|
+
" API LINTING REPORT",
|
|
756
|
+
"═══════════════════════════════════════════════════════════════",
|
|
757
|
+
"",
|
|
758
|
+
"SUMMARY:",
|
|
759
|
+
f" Total Endpoints: {self.report.total_endpoints}",
|
|
760
|
+
f" Endpoints with Issues: {self.report.endpoints_with_issues}",
|
|
761
|
+
f" Overall Score: {self.report.score:.1f}/100.0",
|
|
762
|
+
"",
|
|
763
|
+
"ISSUE BREAKDOWN:",
|
|
764
|
+
f" 🔴 Errors: {len(issues_by_severity['error'])}",
|
|
765
|
+
f" 🟡 Warnings: {len(issues_by_severity['warning'])}",
|
|
766
|
+
f" ℹ️ Info: {len(issues_by_severity['info'])}",
|
|
767
|
+
"",
|
|
768
|
+
]
|
|
769
|
+
|
|
770
|
+
if not self.report.issues:
|
|
771
|
+
report_lines.extend([
|
|
772
|
+
"🎉 Congratulations! No issues found in your API specification.",
|
|
773
|
+
""
|
|
774
|
+
])
|
|
775
|
+
else:
|
|
776
|
+
# Group issues by category
|
|
777
|
+
issues_by_category = {}
|
|
778
|
+
for issue in self.report.issues:
|
|
779
|
+
if issue.category not in issues_by_category:
|
|
780
|
+
issues_by_category[issue.category] = []
|
|
781
|
+
issues_by_category[issue.category].append(issue)
|
|
782
|
+
|
|
783
|
+
for category, issues in issues_by_category.items():
|
|
784
|
+
report_lines.append(f"{'═' * 60}")
|
|
785
|
+
report_lines.append(f"CATEGORY: {category.upper().replace('_', ' ')}")
|
|
786
|
+
report_lines.append(f"{'═' * 60}")
|
|
787
|
+
|
|
788
|
+
for issue in issues:
|
|
789
|
+
severity_icon = {"error": "🔴", "warning": "🟡", "info": "ℹ️"}[issue.severity]
|
|
790
|
+
|
|
791
|
+
report_lines.extend([
|
|
792
|
+
f"{severity_icon} {issue.severity.upper()}: {issue.message}",
|
|
793
|
+
f" Path: {issue.path}",
|
|
794
|
+
])
|
|
795
|
+
|
|
796
|
+
if issue.suggestion:
|
|
797
|
+
report_lines.append(f" 💡 Suggestion: {issue.suggestion}")
|
|
798
|
+
|
|
799
|
+
report_lines.append("")
|
|
800
|
+
|
|
801
|
+
# Add scoring breakdown
|
|
802
|
+
report_lines.extend([
|
|
803
|
+
"═══════════════════════════════════════════════════════════════",
|
|
804
|
+
"SCORING DETAILS:",
|
|
805
|
+
"═══════════════════════════════════════════════════════════════",
|
|
806
|
+
f"Base Score: 100.0",
|
|
807
|
+
f"Errors Penalty: -{len(issues_by_severity['error']) * 10} (10 points per error)",
|
|
808
|
+
f"Warnings Penalty: -{len(issues_by_severity['warning']) * 3} (3 points per warning)",
|
|
809
|
+
f"Info Penalty: -{len(issues_by_severity['info']) * 1} (1 point per info)",
|
|
810
|
+
f"Final Score: {self.report.score:.1f}/100.0",
|
|
811
|
+
""
|
|
812
|
+
])
|
|
813
|
+
|
|
814
|
+
# Add recommendations based on score
|
|
815
|
+
if self.report.score >= 90:
|
|
816
|
+
report_lines.append("🏆 Excellent! Your API design follows best practices.")
|
|
817
|
+
elif self.report.score >= 80:
|
|
818
|
+
report_lines.append("✅ Good API design with minor areas for improvement.")
|
|
819
|
+
elif self.report.score >= 70:
|
|
820
|
+
report_lines.append("⚠️ Fair API design. Consider addressing warnings and errors.")
|
|
821
|
+
elif self.report.score >= 50:
|
|
822
|
+
report_lines.append("❌ Poor API design. Multiple issues need attention.")
|
|
823
|
+
else:
|
|
824
|
+
report_lines.append("🚨 Critical API design issues. Immediate attention required.")
|
|
825
|
+
|
|
826
|
+
return "\n".join(report_lines)
|
|
827
|
+
|
|
828
|
+
|
|
829
|
+
# Embedded sample OpenAPI spec — intentionally imperfect (a verb in a URL, a
|
|
830
|
+
# snake_case property) so --sample produces a representative report.
|
|
831
|
+
SAMPLE_OPENAPI_SPEC = {
|
|
832
|
+
"openapi": "3.0.0",
|
|
833
|
+
"info": {"title": "Sample API", "version": "1.0.0"},
|
|
834
|
+
"servers": [{"url": "https://api.example.com"}],
|
|
835
|
+
"paths": {
|
|
836
|
+
"/user-profiles/{userId}": {
|
|
837
|
+
"get": {
|
|
838
|
+
"summary": "Get a user profile",
|
|
839
|
+
"responses": {"200": {"description": "OK"}, "404": {"description": "Not found"}},
|
|
840
|
+
"parameters": [{"name": "userId", "in": "path", "required": True}],
|
|
841
|
+
}
|
|
842
|
+
},
|
|
843
|
+
"/user-profiles/create": {
|
|
844
|
+
"post": {
|
|
845
|
+
"summary": "Create a user profile (verb-in-URL anti-pattern)",
|
|
846
|
+
"responses": {"201": {"description": "Created"}},
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
},
|
|
850
|
+
"components": {
|
|
851
|
+
"schemas": {
|
|
852
|
+
"UserProfile": {"properties": {"first_name": {"type": "string"}}}
|
|
853
|
+
}
|
|
854
|
+
},
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
|
|
858
|
+
def main():
|
|
859
|
+
"""Main CLI entry point."""
|
|
860
|
+
parser = argparse.ArgumentParser(
|
|
861
|
+
description="Analyze OpenAPI/Swagger specifications for REST conventions and best practices",
|
|
862
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
863
|
+
epilog="""
|
|
864
|
+
Examples:
|
|
865
|
+
python api_linter.py openapi.json
|
|
866
|
+
python api_linter.py --format json openapi.json > report.json
|
|
867
|
+
python api_linter.py --raw-endpoints endpoints.json
|
|
868
|
+
python api_linter.py --sample --format json
|
|
869
|
+
"""
|
|
870
|
+
)
|
|
871
|
+
|
|
872
|
+
parser.add_argument(
|
|
873
|
+
'input_file',
|
|
874
|
+
nargs='?',
|
|
875
|
+
help='Input file: OpenAPI/Swagger JSON file or raw endpoints JSON'
|
|
876
|
+
)
|
|
877
|
+
|
|
878
|
+
parser.add_argument(
|
|
879
|
+
'--sample',
|
|
880
|
+
action='store_true',
|
|
881
|
+
help='Lint an embedded sample OpenAPI spec (no input file needed)'
|
|
882
|
+
)
|
|
883
|
+
|
|
884
|
+
parser.add_argument(
|
|
885
|
+
'--format',
|
|
886
|
+
choices=['text', 'json'],
|
|
887
|
+
default='text',
|
|
888
|
+
help='Output format (default: text)'
|
|
889
|
+
)
|
|
890
|
+
|
|
891
|
+
parser.add_argument(
|
|
892
|
+
'--raw-endpoints',
|
|
893
|
+
action='store_true',
|
|
894
|
+
help='Treat input as raw endpoint definitions instead of OpenAPI spec'
|
|
895
|
+
)
|
|
896
|
+
|
|
897
|
+
parser.add_argument(
|
|
898
|
+
'--output',
|
|
899
|
+
help='Output file (default: stdout)'
|
|
900
|
+
)
|
|
901
|
+
|
|
902
|
+
args = parser.parse_args()
|
|
903
|
+
|
|
904
|
+
# Load input data — from the embedded sample or the input file
|
|
905
|
+
if args.sample:
|
|
906
|
+
input_data = SAMPLE_OPENAPI_SPEC
|
|
907
|
+
else:
|
|
908
|
+
if not args.input_file:
|
|
909
|
+
parser.error("input_file is required (or use --sample)")
|
|
910
|
+
try:
|
|
911
|
+
with open(args.input_file, 'r') as f:
|
|
912
|
+
input_data = json.load(f)
|
|
913
|
+
except FileNotFoundError:
|
|
914
|
+
print(f"Error: Input file '{args.input_file}' not found.", file=sys.stderr)
|
|
915
|
+
return 1
|
|
916
|
+
except json.JSONDecodeError as e:
|
|
917
|
+
print(f"Error: Invalid JSON in '{args.input_file}': {e}", file=sys.stderr)
|
|
918
|
+
return 1
|
|
919
|
+
|
|
920
|
+
# Initialize linter and run analysis
|
|
921
|
+
linter = APILinter()
|
|
922
|
+
|
|
923
|
+
try:
|
|
924
|
+
if args.raw_endpoints:
|
|
925
|
+
report = linter.lint_raw_endpoints(input_data)
|
|
926
|
+
else:
|
|
927
|
+
report = linter.lint_openapi_spec(input_data)
|
|
928
|
+
except Exception as e:
|
|
929
|
+
print(f"Error during linting: {e}", file=sys.stderr)
|
|
930
|
+
return 1
|
|
931
|
+
|
|
932
|
+
# Generate report
|
|
933
|
+
if args.format == 'json':
|
|
934
|
+
output = linter.generate_json_report()
|
|
935
|
+
else:
|
|
936
|
+
output = linter.generate_text_report()
|
|
937
|
+
|
|
938
|
+
# Write output
|
|
939
|
+
if args.output:
|
|
940
|
+
try:
|
|
941
|
+
with open(args.output, 'w') as f:
|
|
942
|
+
f.write(output)
|
|
943
|
+
print(f"Report written to {args.output}")
|
|
944
|
+
except IOError as e:
|
|
945
|
+
print(f"Error writing to '{args.output}': {e}", file=sys.stderr)
|
|
946
|
+
return 1
|
|
947
|
+
else:
|
|
948
|
+
print(output)
|
|
949
|
+
|
|
950
|
+
# Return appropriate exit code
|
|
951
|
+
error_count = len([i for i in report.issues if i.severity == 'error'])
|
|
952
|
+
return 1 if error_count > 0 else 0
|
|
953
|
+
|
|
954
|
+
|
|
955
|
+
if __name__ == '__main__':
|
|
956
|
+
sys.exit(main())
|