bps-kit 1.0.1 → 1.0.2
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/package.json +1 -1
- package/templates/.agents/agents/backend-specialist.md +263 -0
- package/templates/.agents/agents/code-archaeologist.md +106 -0
- package/templates/.agents/agents/database-architect.md +226 -0
- package/templates/.agents/agents/debugger.md +225 -0
- package/templates/.agents/agents/devops-engineer.md +242 -0
- package/templates/.agents/agents/documentation-writer.md +104 -0
- package/templates/.agents/agents/explorer-agent.md +73 -0
- package/templates/.agents/agents/frontend-specialist.md +593 -0
- package/templates/.agents/agents/game-developer.md +162 -0
- package/templates/.agents/agents/mobile-developer.md +377 -0
- package/templates/.agents/agents/orchestrator.md +416 -0
- package/templates/.agents/agents/penetration-tester.md +188 -0
- package/templates/.agents/agents/performance-optimizer.md +187 -0
- package/templates/.agents/agents/product-manager.md +112 -0
- package/templates/.agents/agents/product-owner.md +95 -0
- package/templates/.agents/agents/project-planner.md +406 -0
- package/templates/.agents/agents/qa-automation-engineer.md +103 -0
- package/templates/.agents/agents/security-auditor.md +170 -0
- package/templates/.agents/agents/seo-specialist.md +111 -0
- package/templates/.agents/agents/test-engineer.md +158 -0
- package/templates/.agents/rules/GEMINI.md +219 -0
- package/templates/.agents/scripts/auto_preview.py +148 -0
- package/templates/.agents/scripts/checklist.py +217 -0
- package/templates/.agents/scripts/session_manager.py +120 -0
- package/templates/.agents/scripts/verify_all.py +327 -0
- package/templates/.agents/workflows/brainstorm.md +113 -0
- package/templates/.agents/workflows/create.md +59 -0
- package/templates/.agents/workflows/debug.md +103 -0
- package/templates/.agents/workflows/deploy.md +176 -0
- package/templates/.agents/workflows/enhance.md +63 -0
- package/templates/.agents/workflows/orchestrate.md +237 -0
- package/templates/.agents/workflows/plan.md +89 -0
- package/templates/.agents/workflows/preview.md +81 -0
- package/templates/.agents/workflows/setup-brain.md +39 -0
- package/templates/.agents/workflows/status.md +86 -0
- package/templates/.agents/workflows/test.md +144 -0
- package/templates/.agents/workflows/ui-ux-pro-max.md +296 -0
- package/templates/skills_normal/api-patterns/scripts/api_validator.py +211 -0
- package/templates/skills_normal/database-design/scripts/schema_validator.py +172 -0
- package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +183 -0
- package/templates/skills_normal/frontend-design/scripts/ux_audit.py +722 -0
- package/templates/skills_normal/git-pushing/scripts/smart_commit.sh +19 -0
- package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +184 -0
- package/templates/skills_normal/lint-and-validate/scripts/type_coverage.py +173 -0
- package/templates/skills_normal/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/templates/skills_normal/senior-fullstack/scripts/code_quality_analyzer.py +114 -0
- package/templates/skills_normal/senior-fullstack/scripts/fullstack_scaffolder.py +114 -0
- package/templates/skills_normal/senior-fullstack/scripts/project_scaffolder.py +114 -0
- package/templates/skills_normal/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/templates/skills_normal/testing-patterns/scripts/test_runner.py +219 -0
- package/templates/skills_normal/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/templates/vault/007/scripts/config.py +472 -0
- package/templates/vault/007/scripts/full_audit.py +1306 -0
- package/templates/vault/007/scripts/quick_scan.py +481 -0
- package/templates/vault/007/scripts/requirements.txt +26 -0
- package/templates/vault/007/scripts/scanners/__init__.py +0 -0
- package/templates/vault/007/scripts/scanners/dependency_scanner.py +1305 -0
- package/templates/vault/007/scripts/scanners/injection_scanner.py +1104 -0
- package/templates/vault/007/scripts/scanners/secrets_scanner.py +1008 -0
- package/templates/vault/007/scripts/score_calculator.py +693 -0
- package/templates/vault/agent-orchestrator/scripts/match_skills.py +329 -0
- package/templates/vault/agent-orchestrator/scripts/orchestrate.py +304 -0
- package/templates/vault/agent-orchestrator/scripts/requirements.txt +1 -0
- package/templates/vault/agent-orchestrator/scripts/scan_registry.py +508 -0
- package/templates/vault/ai-studio-image/scripts/config.py +613 -0
- package/templates/vault/ai-studio-image/scripts/generate.py +630 -0
- package/templates/vault/ai-studio-image/scripts/prompt_engine.py +424 -0
- package/templates/vault/ai-studio-image/scripts/requirements.txt +4 -0
- package/templates/vault/ai-studio-image/scripts/templates.py +349 -0
- package/templates/vault/android_ui_verification/scripts/verify_ui.sh +32 -0
- package/templates/vault/apify-audience-analysis/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-brand-reputation-monitoring/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-competitor-intelligence/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-content-analytics/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-ecommerce/reference/scripts/package.json +3 -0
- package/templates/vault/apify-ecommerce/reference/scripts/run_actor.js +369 -0
- package/templates/vault/apify-influencer-discovery/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-lead-generation/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-market-research/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-trend-analysis/reference/scripts/run_actor.js +363 -0
- package/templates/vault/apify-ultimate-scraper/reference/scripts/run_actor.js +363 -0
- package/templates/vault/audio-transcriber/scripts/install-requirements.sh +190 -0
- package/templates/vault/audio-transcriber/scripts/transcribe.py +486 -0
- package/templates/vault/claude-monitor/scripts/api_bench.py +240 -0
- package/templates/vault/claude-monitor/scripts/config.py +69 -0
- package/templates/vault/claude-monitor/scripts/health_check.py +362 -0
- package/templates/vault/claude-monitor/scripts/monitor.py +296 -0
- package/templates/vault/content-creator/scripts/brand_voice_analyzer.py +185 -0
- package/templates/vault/content-creator/scripts/seo_optimizer.py +419 -0
- package/templates/vault/context-agent/scripts/active_context.py +227 -0
- package/templates/vault/context-agent/scripts/compressor.py +149 -0
- package/templates/vault/context-agent/scripts/config.py +69 -0
- package/templates/vault/context-agent/scripts/context_loader.py +155 -0
- package/templates/vault/context-agent/scripts/context_manager.py +302 -0
- package/templates/vault/context-agent/scripts/models.py +103 -0
- package/templates/vault/context-agent/scripts/project_registry.py +132 -0
- package/templates/vault/context-agent/scripts/requirements.txt +6 -0
- package/templates/vault/context-agent/scripts/search.py +115 -0
- package/templates/vault/context-agent/scripts/session_parser.py +206 -0
- package/templates/vault/context-agent/scripts/session_summary.py +319 -0
- package/templates/vault/context-guardian/scripts/context_snapshot.py +229 -0
- package/templates/vault/docx/ooxml/scripts/pack.py +159 -0
- package/templates/vault/docx/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/docx/ooxml/scripts/validate.py +69 -0
- package/templates/vault/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/docx/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/docx/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/docx/scripts/__init__.py +1 -0
- package/templates/vault/docx/scripts/document.py +1276 -0
- package/templates/vault/docx/scripts/templates/comments.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsExtended.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/vault/docx/scripts/templates/commentsIds.xml +3 -0
- package/templates/vault/docx/scripts/templates/people.xml +3 -0
- package/templates/vault/docx/scripts/utilities.py +374 -0
- package/templates/vault/docx-official/ooxml/scripts/pack.py +159 -0
- package/templates/vault/docx-official/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/docx-official/ooxml/scripts/validate.py +69 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/docx-official/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/docx-official/scripts/__init__.py +1 -0
- package/templates/vault/docx-official/scripts/document.py +1276 -0
- package/templates/vault/docx-official/scripts/templates/comments.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsExtended.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsExtensible.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/commentsIds.xml +3 -0
- package/templates/vault/docx-official/scripts/templates/people.xml +3 -0
- package/templates/vault/docx-official/scripts/utilities.py +374 -0
- package/templates/vault/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/templates/vault/helm-chart-scaffolding/scripts/validate-chart.sh +244 -0
- package/templates/vault/i18n-localization/scripts/i18n_checker.py +241 -0
- package/templates/vault/instagram/scripts/account_setup.py +233 -0
- package/templates/vault/instagram/scripts/analyze.py +221 -0
- package/templates/vault/instagram/scripts/api_client.py +444 -0
- package/templates/vault/instagram/scripts/auth.py +411 -0
- package/templates/vault/instagram/scripts/comments.py +160 -0
- package/templates/vault/instagram/scripts/config.py +111 -0
- package/templates/vault/instagram/scripts/db.py +467 -0
- package/templates/vault/instagram/scripts/export.py +138 -0
- package/templates/vault/instagram/scripts/governance.py +233 -0
- package/templates/vault/instagram/scripts/hashtags.py +114 -0
- package/templates/vault/instagram/scripts/insights.py +170 -0
- package/templates/vault/instagram/scripts/media.py +65 -0
- package/templates/vault/instagram/scripts/messages.py +103 -0
- package/templates/vault/instagram/scripts/profile.py +58 -0
- package/templates/vault/instagram/scripts/publish.py +449 -0
- package/templates/vault/instagram/scripts/requirements.txt +5 -0
- package/templates/vault/instagram/scripts/run_all.py +189 -0
- package/templates/vault/instagram/scripts/schedule.py +189 -0
- package/templates/vault/instagram/scripts/serve_api.py +234 -0
- package/templates/vault/instagram/scripts/templates.py +155 -0
- package/templates/vault/junta-leiloeiros/scripts/db.py +216 -0
- package/templates/vault/junta-leiloeiros/scripts/export.py +137 -0
- package/templates/vault/junta-leiloeiros/scripts/requirements.txt +15 -0
- package/templates/vault/junta-leiloeiros/scripts/run_all.py +190 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/__init__.py +4 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/base_scraper.py +209 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/generic_scraper.py +110 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucap.py +110 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceac.py +72 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceal.py +72 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/juceb.py +68 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucec.py +63 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucema.py +211 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucemg.py +218 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucep.py +70 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepa.py +74 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepar.py +80 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepe.py +78 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucepi.py +69 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucer.py +256 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucerja.py +170 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucern.py +71 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucesc.py +89 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucesp.py +233 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucetins.py +134 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucis_df.py +63 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/jucisrs.py +299 -0
- package/templates/vault/junta-leiloeiros/scripts/scraper/states.py +99 -0
- package/templates/vault/junta-leiloeiros/scripts/serve_api.py +164 -0
- package/templates/vault/junta-leiloeiros/scripts/web_scraper_fallback.py +233 -0
- package/templates/vault/last30days/scripts/last30days.py +521 -0
- package/templates/vault/last30days/scripts/lib/__init__.py +1 -0
- package/templates/vault/last30days/scripts/lib/cache.py +152 -0
- package/templates/vault/last30days/scripts/lib/dates.py +124 -0
- package/templates/vault/last30days/scripts/lib/dedupe.py +120 -0
- package/templates/vault/last30days/scripts/lib/env.py +149 -0
- package/templates/vault/last30days/scripts/lib/http.py +152 -0
- package/templates/vault/last30days/scripts/lib/models.py +175 -0
- package/templates/vault/last30days/scripts/lib/normalize.py +160 -0
- package/templates/vault/last30days/scripts/lib/openai_reddit.py +230 -0
- package/templates/vault/last30days/scripts/lib/reddit_enrich.py +232 -0
- package/templates/vault/last30days/scripts/lib/render.py +383 -0
- package/templates/vault/last30days/scripts/lib/schema.py +336 -0
- package/templates/vault/last30days/scripts/lib/score.py +311 -0
- package/templates/vault/last30days/scripts/lib/ui.py +324 -0
- package/templates/vault/last30days/scripts/lib/websearch.py +401 -0
- package/templates/vault/last30days/scripts/lib/xai_x.py +217 -0
- package/templates/vault/leiloeiro-avaliacao/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-avaliacao/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-edital/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-edital/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-ia/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-ia/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-juridico/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-juridico/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-mercado/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-mercado/scripts/requirements.txt +1 -0
- package/templates/vault/leiloeiro-risco/scripts/governance.py +106 -0
- package/templates/vault/leiloeiro-risco/scripts/requirements.txt +1 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/database.ts +24 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/db.ts +35 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/index.ts +2 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/migrations.ts +31 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/db/schema.sql +8 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/index.ts +44 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/routes/todos.ts +155 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/backend/src/types/index.ts +35 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/App.css +384 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/App.tsx +81 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/api/todos.ts +57 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/ConfirmDialog.tsx +26 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/EmptyState.tsx +8 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoForm.tsx +43 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoItem.tsx +36 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/components/TodoList.tsx +27 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/hooks/useTodos.ts +81 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/index.css +48 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/main.tsx +10 -0
- package/templates/vault/loki-mode/examples/todo-app-generated/frontend/src/vite-env.d.ts +1 -0
- package/templates/vault/loki-mode/scripts/export-to-vibe-kanban.sh +178 -0
- package/templates/vault/loki-mode/scripts/loki-wrapper.sh +281 -0
- package/templates/vault/loki-mode/scripts/take-screenshots.js +55 -0
- package/templates/vault/matematico-tao/scripts/complexity_analyzer.py +544 -0
- package/templates/vault/matematico-tao/scripts/dependency_graph.py +538 -0
- package/templates/vault/mcp-builder/scripts/connections.py +151 -0
- package/templates/vault/mcp-builder/scripts/evaluation.py +373 -0
- package/templates/vault/mcp-builder/scripts/example_evaluation.xml +22 -0
- package/templates/vault/mcp-builder/scripts/requirements.txt +2 -0
- package/templates/vault/mobile-design/scripts/mobile_audit.py +670 -0
- package/templates/vault/notebooklm/scripts/__init__.py +81 -0
- package/templates/vault/notebooklm/scripts/ask_question.py +256 -0
- package/templates/vault/notebooklm/scripts/auth_manager.py +358 -0
- package/templates/vault/notebooklm/scripts/browser_session.py +255 -0
- package/templates/vault/notebooklm/scripts/browser_utils.py +107 -0
- package/templates/vault/notebooklm/scripts/cleanup_manager.py +302 -0
- package/templates/vault/notebooklm/scripts/config.py +44 -0
- package/templates/vault/notebooklm/scripts/notebook_manager.py +410 -0
- package/templates/vault/notebooklm/scripts/run.py +102 -0
- package/templates/vault/notebooklm/scripts/setup_environment.py +204 -0
- package/templates/vault/pdf/scripts/check_bounding_boxes.py +70 -0
- package/templates/vault/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/templates/vault/pdf/scripts/check_fillable_fields.py +12 -0
- package/templates/vault/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/templates/vault/pdf/scripts/create_validation_image.py +41 -0
- package/templates/vault/pdf/scripts/extract_form_field_info.py +152 -0
- package/templates/vault/pdf/scripts/fill_fillable_fields.py +114 -0
- package/templates/vault/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/templates/vault/pdf-official/scripts/check_bounding_boxes.py +70 -0
- package/templates/vault/pdf-official/scripts/check_bounding_boxes_test.py +226 -0
- package/templates/vault/pdf-official/scripts/check_fillable_fields.py +12 -0
- package/templates/vault/pdf-official/scripts/convert_pdf_to_images.py +35 -0
- package/templates/vault/pdf-official/scripts/create_validation_image.py +41 -0
- package/templates/vault/pdf-official/scripts/extract_form_field_info.py +152 -0
- package/templates/vault/pdf-official/scripts/fill_fillable_fields.py +114 -0
- package/templates/vault/pdf-official/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/templates/vault/planning-with-files/scripts/check-complete.sh +44 -0
- package/templates/vault/planning-with-files/scripts/init-session.sh +120 -0
- package/templates/vault/pptx/ooxml/scripts/pack.py +159 -0
- package/templates/vault/pptx/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/pptx/ooxml/scripts/validate.py +69 -0
- package/templates/vault/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/pptx/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/pptx/scripts/html2pptx.js +979 -0
- package/templates/vault/pptx/scripts/inventory.py +1020 -0
- package/templates/vault/pptx/scripts/rearrange.py +231 -0
- package/templates/vault/pptx/scripts/replace.py +385 -0
- package/templates/vault/pptx/scripts/thumbnail.py +450 -0
- package/templates/vault/pptx-official/ooxml/scripts/pack.py +159 -0
- package/templates/vault/pptx-official/ooxml/scripts/unpack.py +29 -0
- package/templates/vault/pptx-official/ooxml/scripts/validate.py +69 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/__init__.py +15 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/base.py +951 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/docx.py +274 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/pptx.py +315 -0
- package/templates/vault/pptx-official/ooxml/scripts/validation/redlining.py +279 -0
- package/templates/vault/pptx-official/scripts/html2pptx.js +979 -0
- package/templates/vault/pptx-official/scripts/inventory.py +1020 -0
- package/templates/vault/pptx-official/scripts/rearrange.py +231 -0
- package/templates/vault/pptx-official/scripts/replace.py +385 -0
- package/templates/vault/pptx-official/scripts/thumbnail.py +450 -0
- package/templates/vault/product-manager-toolkit/scripts/customer_interview_analyzer.py +441 -0
- package/templates/vault/product-manager-toolkit/scripts/rice_prioritizer.py +296 -0
- package/templates/vault/prompt-engineering-patterns/scripts/optimize-prompt.py +279 -0
- package/templates/vault/scripts/.skill_cache.json +7538 -0
- package/templates/vault/scripts/skill_search.py +228 -0
- package/templates/vault/senior-architect/scripts/architecture_diagram_generator.py +114 -0
- package/templates/vault/senior-architect/scripts/dependency_analyzer.py +114 -0
- package/templates/vault/senior-architect/scripts/project_architect.py +114 -0
- package/templates/vault/shopify-development/scripts/requirements.txt +19 -0
- package/templates/vault/shopify-development/scripts/shopify_graphql.py +428 -0
- package/templates/vault/shopify-development/scripts/shopify_init.py +441 -0
- package/templates/vault/shopify-development/scripts/tests/test_shopify_init.py +379 -0
- package/templates/vault/skill-creator/scripts/init_skill.py +303 -0
- package/templates/vault/skill-creator/scripts/package_skill.py +110 -0
- package/templates/vault/skill-creator/scripts/quick_validate.py +95 -0
- package/templates/vault/skill-installer/scripts/detect_skills.py +318 -0
- package/templates/vault/skill-installer/scripts/install_skill.py +1708 -0
- package/templates/vault/skill-installer/scripts/package_skill.py +417 -0
- package/templates/vault/skill-installer/scripts/requirements.txt +1 -0
- package/templates/vault/skill-installer/scripts/validate_skill.py +430 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/__init__.py +13 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/code_quality.py +247 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/cross_skill.py +134 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/dependencies.py +121 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/documentation.py +189 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/governance_audit.py +153 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/performance.py +164 -0
- package/templates/vault/skill-sentinel/scripts/analyzers/security.py +189 -0
- package/templates/vault/skill-sentinel/scripts/config.py +158 -0
- package/templates/vault/skill-sentinel/scripts/cost_optimizer.py +146 -0
- package/templates/vault/skill-sentinel/scripts/db.py +354 -0
- package/templates/vault/skill-sentinel/scripts/governance.py +58 -0
- package/templates/vault/skill-sentinel/scripts/recommender.py +228 -0
- package/templates/vault/skill-sentinel/scripts/report_generator.py +224 -0
- package/templates/vault/skill-sentinel/scripts/requirements.txt +1 -0
- package/templates/vault/skill-sentinel/scripts/run_audit.py +290 -0
- package/templates/vault/skill-sentinel/scripts/scanner.py +271 -0
- package/templates/vault/stability-ai/scripts/config.py +266 -0
- package/templates/vault/stability-ai/scripts/generate.py +687 -0
- package/templates/vault/stability-ai/scripts/requirements.txt +4 -0
- package/templates/vault/stability-ai/scripts/styles.py +174 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/bot-client.ts +86 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/handlers.ts +79 -0
- package/templates/vault/telegram/assets/boilerplate/nodejs/src/index.ts +32 -0
- package/templates/vault/telegram/scripts/send_message.py +143 -0
- package/templates/vault/telegram/scripts/setup_project.py +103 -0
- package/templates/vault/telegram/scripts/test_bot.py +144 -0
- package/templates/vault/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/templates/vault/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
- package/templates/vault/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
- package/templates/vault/ui-ux-pro-max/scripts/core.py +257 -0
- package/templates/vault/ui-ux-pro-max/scripts/design_system.py +487 -0
- package/templates/vault/ui-ux-pro-max/scripts/search.py +76 -0
- package/templates/vault/videodb/scripts/ws_listener.py +204 -0
- package/templates/vault/web-artifacts-builder/scripts/bundle-artifact.sh +54 -0
- package/templates/vault/web-artifacts-builder/scripts/init-artifact.sh +322 -0
- package/templates/vault/web-artifacts-builder/scripts/shadcn-components.tar.gz +0 -0
- package/templates/vault/webapp-testing/scripts/with_server.py +106 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/index.ts +125 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/template-manager.ts +67 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/types.ts +216 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/webhook-handler.ts +173 -0
- package/templates/vault/whatsapp-cloud-api/assets/boilerplate/nodejs/src/whatsapp-client.ts +193 -0
- package/templates/vault/whatsapp-cloud-api/scripts/send_test_message.py +137 -0
- package/templates/vault/whatsapp-cloud-api/scripts/setup_project.py +118 -0
- package/templates/vault/whatsapp-cloud-api/scripts/validate_config.py +190 -0
- package/templates/vault/youtube-summarizer/scripts/extract-transcript.py +65 -0
- package/templates/vault/youtube-summarizer/scripts/install-dependencies.sh +28 -0
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Auto-Discovery Engine for Agent Orchestrator.
|
|
4
|
+
|
|
5
|
+
Scans the skills ecosystem for SKILL.md files, parses metadata,
|
|
6
|
+
and maintains a centralized registry (registry.json).
|
|
7
|
+
|
|
8
|
+
Features:
|
|
9
|
+
- Runs automatically on every request (called by CLAUDE.md)
|
|
10
|
+
- Ultra-fast via MD5 hash caching (~<100ms when nothing changed)
|
|
11
|
+
- Auto-includes new skills, auto-removes deleted skills
|
|
12
|
+
- Zero manual intervention required
|
|
13
|
+
|
|
14
|
+
Usage:
|
|
15
|
+
python scan_registry.py # Quick scan (hash-based)
|
|
16
|
+
python scan_registry.py --status # Verbose status table
|
|
17
|
+
python scan_registry.py --force # Full re-scan ignoring hashes
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
import os
|
|
21
|
+
import sys
|
|
22
|
+
import json
|
|
23
|
+
import hashlib
|
|
24
|
+
import re
|
|
25
|
+
from pathlib import Path
|
|
26
|
+
from datetime import datetime
|
|
27
|
+
|
|
28
|
+
# ── Configuration ──────────────────────────────────────────────────────────
|
|
29
|
+
|
|
30
|
+
# Resolve paths relative to this script's location
|
|
31
|
+
_SCRIPT_DIR = Path(__file__).resolve().parent
|
|
32
|
+
ORCHESTRATOR_DIR = _SCRIPT_DIR.parent
|
|
33
|
+
SKILLS_ROOT = ORCHESTRATOR_DIR.parent
|
|
34
|
+
DATA_DIR = ORCHESTRATOR_DIR / "data"
|
|
35
|
+
REGISTRY_PATH = DATA_DIR / "registry.json"
|
|
36
|
+
HASHES_PATH = DATA_DIR / "registry_hashes.json"
|
|
37
|
+
|
|
38
|
+
# Where to search for SKILL.md files
|
|
39
|
+
SEARCH_PATHS = [
|
|
40
|
+
SKILLS_ROOT / ".claude" / "skills", # registered skills
|
|
41
|
+
SKILLS_ROOT, # top-level standalone
|
|
42
|
+
]
|
|
43
|
+
MAX_DEPTH = 3 # max directory depth for SKILL.md search
|
|
44
|
+
|
|
45
|
+
# Capability keyword mapping (PT + EN)
|
|
46
|
+
CAPABILITY_MAP = {
|
|
47
|
+
"data-extraction": [
|
|
48
|
+
"scrape", "extract", "crawl", "parse", "harvest", "collect",
|
|
49
|
+
"raspar", "extrair", "coletar", "dados",
|
|
50
|
+
],
|
|
51
|
+
"messaging": [
|
|
52
|
+
"whatsapp", "message", "send", "chat", "notification", "sms",
|
|
53
|
+
"mensagem", "enviar", "notificacao", "atendimento",
|
|
54
|
+
],
|
|
55
|
+
"social-media": [
|
|
56
|
+
"instagram", "facebook", "twitter", "post", "stories", "reels",
|
|
57
|
+
"social", "engagement", "feed", "follower",
|
|
58
|
+
],
|
|
59
|
+
"government-data": [
|
|
60
|
+
"junta", "leiloeiro", "cadastro", "governo", "comercial",
|
|
61
|
+
"tribunal", "diario oficial", "certidao", "registro",
|
|
62
|
+
],
|
|
63
|
+
"web-automation": [
|
|
64
|
+
"browser", "selenium", "playwright", "automate", "click",
|
|
65
|
+
"navegador", "automatizar", "automacao",
|
|
66
|
+
],
|
|
67
|
+
"api-integration": [
|
|
68
|
+
"api", "endpoint", "webhook", "rest", "graph", "oauth",
|
|
69
|
+
"integracao", "integrar",
|
|
70
|
+
],
|
|
71
|
+
"analytics": [
|
|
72
|
+
"insight", "analytics", "metrics", "dashboard", "report",
|
|
73
|
+
"relatorio", "metricas", "analise",
|
|
74
|
+
],
|
|
75
|
+
"content-management": [
|
|
76
|
+
"publish", "schedule", "template", "content", "media",
|
|
77
|
+
"publicar", "agendar", "conteudo", "midia",
|
|
78
|
+
],
|
|
79
|
+
"legal": [
|
|
80
|
+
"advogado", "direito", "juridico", "lei", "processo",
|
|
81
|
+
"acao", "peticao", "recurso", "sentenca", "juiz",
|
|
82
|
+
"divorcio", "guarda", "alimentos", "pensao", "alimenticia", "inventario", "heranca", "partilha",
|
|
83
|
+
"acidente de trabalho", "acidente",
|
|
84
|
+
"familia", "criminal", "penal", "crime", "feminicidio", "maria da penha",
|
|
85
|
+
"violencia domestica", "medida protetiva", "stalking",
|
|
86
|
+
"danos morais", "responsabilidade civil", "indenizacao", "dano",
|
|
87
|
+
"consumidor", "cdc", "plano de saude",
|
|
88
|
+
"trabalhista", "clt", "rescisao", "fgts", "horas extras",
|
|
89
|
+
"previdenciario", "aposentadoria", "aposentar", "inss",
|
|
90
|
+
"imobiliario", "usucapiao", "despejo", "inquilinato",
|
|
91
|
+
"alienacao fiduciaria", "bem de familia",
|
|
92
|
+
"tributario", "imposto", "icms", "execucao fiscal",
|
|
93
|
+
"administrativo", "licitacao", "improbidade", "mandado de seguranca",
|
|
94
|
+
"empresarial", "societario", "falencia", "recuperacao judicial",
|
|
95
|
+
"empresa", "ltda", "cnpj", "mei", "eireli", "contrato social",
|
|
96
|
+
"contrato", "clausula", "contestacao", "apelacao", "agravo",
|
|
97
|
+
"habeas corpus", "mandado", "liminar", "tutela",
|
|
98
|
+
"cpc", "stj", "stf", "sumula", "jurisprudencia",
|
|
99
|
+
"oab", "honorarios", "custas",
|
|
100
|
+
],
|
|
101
|
+
"auction": [
|
|
102
|
+
"leilao", "leilao judicial", "leilao extrajudicial", "hasta publica",
|
|
103
|
+
"arrematacao", "arrematar", "arrematante", "lance", "desagio",
|
|
104
|
+
"edital leilao", "penhora", "adjudicacao", "praca",
|
|
105
|
+
"imissao na posse", "carta arrematacao", "vil preco",
|
|
106
|
+
"avaliacao imovel", "laudo", "perito", "matricula",
|
|
107
|
+
"leiloeiro", "comissao leiloeiro",
|
|
108
|
+
],
|
|
109
|
+
"security": [
|
|
110
|
+
"seguranca", "security", "owasp", "vulnerability", "incident",
|
|
111
|
+
"pentest", "firewall", "malware", "phishing", "cve",
|
|
112
|
+
"autenticacao", "criptografia", "encryption",
|
|
113
|
+
],
|
|
114
|
+
"image-generation": [
|
|
115
|
+
"imagem", "image", "gerar imagem", "generate image",
|
|
116
|
+
"stable diffusion", "comfyui", "midjourney", "dall-e",
|
|
117
|
+
"foto", "ilustracao", "arte", "design",
|
|
118
|
+
],
|
|
119
|
+
"monitoring": [
|
|
120
|
+
"monitor", "monitorar", "health", "status",
|
|
121
|
+
"audit", "auditoria", "sentinel", "check",
|
|
122
|
+
],
|
|
123
|
+
"context-management": [
|
|
124
|
+
"contexto", "context", "sessao", "session", "compactacao", "compaction",
|
|
125
|
+
"comprimir", "compress", "snapshot", "checkpoint", "briefing",
|
|
126
|
+
"continuidade", "continuity", "preservar", "preserve",
|
|
127
|
+
"memoria", "memory", "resumo", "summary",
|
|
128
|
+
"salvar estado", "save state", "context window", "janela de contexto",
|
|
129
|
+
"perda de dados", "data loss", "backup",
|
|
130
|
+
],
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
# ── Utility Functions ──────────────────────────────────────────────────────
|
|
134
|
+
|
|
135
|
+
def md5_file(path: Path) -> str:
|
|
136
|
+
"""Compute MD5 hash of a file."""
|
|
137
|
+
h = hashlib.md5()
|
|
138
|
+
with open(path, "rb") as f:
|
|
139
|
+
for chunk in iter(lambda: f.read(8192), b""):
|
|
140
|
+
h.update(chunk)
|
|
141
|
+
return h.hexdigest()
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
def parse_yaml_frontmatter(path: Path) -> dict:
|
|
145
|
+
"""Extract YAML frontmatter from a SKILL.md file."""
|
|
146
|
+
try:
|
|
147
|
+
text = path.read_text(encoding="utf-8")
|
|
148
|
+
except Exception:
|
|
149
|
+
return {}
|
|
150
|
+
|
|
151
|
+
match = re.match(r"^---\s*\n(.*?)\n---", text, re.DOTALL)
|
|
152
|
+
if not match:
|
|
153
|
+
return {}
|
|
154
|
+
|
|
155
|
+
try:
|
|
156
|
+
import yaml
|
|
157
|
+
return yaml.safe_load(match.group(1)) or {}
|
|
158
|
+
except Exception:
|
|
159
|
+
# Fallback: manual parsing for name/description
|
|
160
|
+
result = {}
|
|
161
|
+
block = match.group(1)
|
|
162
|
+
for key in ("name", "description", "version"):
|
|
163
|
+
m = re.search(rf'^{key}:\s*["\']?(.+?)["\']?\s*$', block, re.MULTILINE)
|
|
164
|
+
if m:
|
|
165
|
+
result[key] = m.group(1).strip()
|
|
166
|
+
else:
|
|
167
|
+
# Handle multi-line description with >- or >
|
|
168
|
+
m2 = re.search(rf'^{key}:\s*>-?\s*\n((?:\s+.+\n?)+)', block, re.MULTILINE)
|
|
169
|
+
if m2:
|
|
170
|
+
lines = m2.group(1).strip().split("\n")
|
|
171
|
+
result[key] = " ".join(line.strip() for line in lines)
|
|
172
|
+
return result
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
def find_skill_files() -> list[Path]:
|
|
176
|
+
"""Find all SKILL.md files in the ecosystem."""
|
|
177
|
+
found = set()
|
|
178
|
+
|
|
179
|
+
for base in SEARCH_PATHS:
|
|
180
|
+
if not base.exists():
|
|
181
|
+
continue
|
|
182
|
+
for root, dirs, files in os.walk(base):
|
|
183
|
+
depth = len(Path(root).relative_to(base).parts)
|
|
184
|
+
if depth > MAX_DEPTH:
|
|
185
|
+
dirs.clear()
|
|
186
|
+
continue
|
|
187
|
+
|
|
188
|
+
# Skip the orchestrator itself
|
|
189
|
+
if "agent-orchestrator" in Path(root).parts:
|
|
190
|
+
continue
|
|
191
|
+
|
|
192
|
+
if "SKILL.md" in files:
|
|
193
|
+
found.add(Path(root) / "SKILL.md")
|
|
194
|
+
|
|
195
|
+
return sorted(found)
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
def detect_language(skill_dir: Path) -> str:
|
|
199
|
+
"""Detect primary language from scripts/ directory."""
|
|
200
|
+
scripts_dir = skill_dir / "scripts"
|
|
201
|
+
if not scripts_dir.exists():
|
|
202
|
+
return "none"
|
|
203
|
+
|
|
204
|
+
extensions = set()
|
|
205
|
+
for f in scripts_dir.rglob("*"):
|
|
206
|
+
if f.is_file():
|
|
207
|
+
extensions.add(f.suffix.lower())
|
|
208
|
+
|
|
209
|
+
if ".py" in extensions:
|
|
210
|
+
return "python"
|
|
211
|
+
if ".ts" in extensions or ".js" in extensions:
|
|
212
|
+
return "nodejs"
|
|
213
|
+
if ".sh" in extensions:
|
|
214
|
+
return "bash"
|
|
215
|
+
return "none"
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
def extract_capabilities(description: str) -> list[str]:
|
|
219
|
+
"""Map description keywords to capability tags using word boundary matching."""
|
|
220
|
+
if not description:
|
|
221
|
+
return []
|
|
222
|
+
|
|
223
|
+
desc_lower = description.lower()
|
|
224
|
+
desc_words = set(re.findall(r'[a-zA-ZÀ-ÿ]+', desc_lower))
|
|
225
|
+
caps = []
|
|
226
|
+
for cap, keywords in CAPABILITY_MAP.items():
|
|
227
|
+
for kw in keywords:
|
|
228
|
+
# Multi-word keywords: substring match. Single-word: exact word match.
|
|
229
|
+
if " " in kw:
|
|
230
|
+
if kw in desc_lower:
|
|
231
|
+
caps.append(cap)
|
|
232
|
+
break
|
|
233
|
+
elif kw in desc_words:
|
|
234
|
+
caps.append(cap)
|
|
235
|
+
break
|
|
236
|
+
return sorted(caps)
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
def extract_triggers(description: str) -> list[str]:
|
|
240
|
+
"""Extract trigger keywords from description text using word boundary matching."""
|
|
241
|
+
if not description:
|
|
242
|
+
return []
|
|
243
|
+
|
|
244
|
+
# Collect all keywords from all capability categories
|
|
245
|
+
all_keywords = set()
|
|
246
|
+
for keywords in CAPABILITY_MAP.values():
|
|
247
|
+
all_keywords.update(keywords)
|
|
248
|
+
|
|
249
|
+
desc_lower = description.lower()
|
|
250
|
+
desc_words = set(re.findall(r'[a-zA-ZÀ-ÿ]+', desc_lower))
|
|
251
|
+
found = []
|
|
252
|
+
for kw in sorted(all_keywords):
|
|
253
|
+
if " " in kw:
|
|
254
|
+
if kw in desc_lower:
|
|
255
|
+
found.append(kw)
|
|
256
|
+
elif kw in desc_words:
|
|
257
|
+
found.append(kw)
|
|
258
|
+
return found
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
def assess_status(skill_dir: Path) -> str:
|
|
262
|
+
"""Check if skill is complete (active) or incomplete."""
|
|
263
|
+
skill_md = skill_dir / "SKILL.md"
|
|
264
|
+
if not skill_md.exists():
|
|
265
|
+
return "missing"
|
|
266
|
+
|
|
267
|
+
has_scripts = (skill_dir / "scripts").exists()
|
|
268
|
+
has_refs = (skill_dir / "references").exists()
|
|
269
|
+
|
|
270
|
+
# Parse frontmatter to check for required fields
|
|
271
|
+
meta = parse_yaml_frontmatter(skill_md)
|
|
272
|
+
has_name = bool(meta.get("name"))
|
|
273
|
+
has_desc = bool(meta.get("description"))
|
|
274
|
+
|
|
275
|
+
if has_name and has_desc:
|
|
276
|
+
return "active"
|
|
277
|
+
return "incomplete"
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def is_registered(skill_dir: Path) -> bool:
|
|
281
|
+
"""Check if skill is in .claude/skills/."""
|
|
282
|
+
claude_skills = SKILLS_ROOT / ".claude" / "skills"
|
|
283
|
+
try:
|
|
284
|
+
skill_dir.relative_to(claude_skills)
|
|
285
|
+
return True
|
|
286
|
+
except ValueError:
|
|
287
|
+
return False
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
# ── Main Logic ─────────────────────────────────────────────────────────────
|
|
291
|
+
|
|
292
|
+
def load_hashes() -> dict:
|
|
293
|
+
"""Load stored hashes from registry_hashes.json."""
|
|
294
|
+
if HASHES_PATH.exists():
|
|
295
|
+
try:
|
|
296
|
+
return json.loads(HASHES_PATH.read_text(encoding="utf-8"))
|
|
297
|
+
except Exception:
|
|
298
|
+
pass
|
|
299
|
+
return {}
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
def save_hashes(hashes: dict):
|
|
303
|
+
"""Save hashes to registry_hashes.json."""
|
|
304
|
+
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
|
305
|
+
HASHES_PATH.write_text(json.dumps(hashes, indent=2), encoding="utf-8")
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
def load_registry() -> dict:
|
|
309
|
+
"""Load existing registry.json."""
|
|
310
|
+
if REGISTRY_PATH.exists():
|
|
311
|
+
try:
|
|
312
|
+
return json.loads(REGISTRY_PATH.read_text(encoding="utf-8"))
|
|
313
|
+
except Exception:
|
|
314
|
+
pass
|
|
315
|
+
return {"generated_at": None, "skills_root": str(SKILLS_ROOT), "skills": []}
|
|
316
|
+
|
|
317
|
+
|
|
318
|
+
def save_registry(registry: dict):
|
|
319
|
+
"""Save registry.json."""
|
|
320
|
+
DATA_DIR.mkdir(parents=True, exist_ok=True)
|
|
321
|
+
registry["generated_at"] = datetime.now().isoformat()
|
|
322
|
+
REGISTRY_PATH.write_text(json.dumps(registry, indent=2, ensure_ascii=False), encoding="utf-8")
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
def build_skill_entry(skill_md_path: Path) -> dict:
|
|
326
|
+
"""Build a registry entry from a SKILL.md file."""
|
|
327
|
+
skill_dir = skill_md_path.parent
|
|
328
|
+
meta = parse_yaml_frontmatter(skill_md_path)
|
|
329
|
+
description = meta.get("description", "")
|
|
330
|
+
|
|
331
|
+
# Support explicit capabilities in frontmatter
|
|
332
|
+
explicit_caps = meta.get("capabilities", [])
|
|
333
|
+
if isinstance(explicit_caps, str):
|
|
334
|
+
explicit_caps = [c.strip() for c in explicit_caps.split(",")]
|
|
335
|
+
|
|
336
|
+
auto_caps = extract_capabilities(description)
|
|
337
|
+
all_caps = sorted(set(auto_caps + explicit_caps))
|
|
338
|
+
|
|
339
|
+
return {
|
|
340
|
+
"name": meta.get("name", skill_dir.name),
|
|
341
|
+
"description": description,
|
|
342
|
+
"version": meta.get("version", ""),
|
|
343
|
+
"location": str(skill_dir),
|
|
344
|
+
"skill_md": str(skill_md_path),
|
|
345
|
+
"registered": is_registered(skill_dir),
|
|
346
|
+
"has_scripts": (skill_dir / "scripts").exists(),
|
|
347
|
+
"has_references": (skill_dir / "references").exists(),
|
|
348
|
+
"has_data": (skill_dir / "data").exists(),
|
|
349
|
+
"capabilities": all_caps,
|
|
350
|
+
"triggers": extract_triggers(description),
|
|
351
|
+
"language": detect_language(skill_dir),
|
|
352
|
+
"status": assess_status(skill_dir),
|
|
353
|
+
"last_modified": datetime.fromtimestamp(
|
|
354
|
+
skill_md_path.stat().st_mtime
|
|
355
|
+
).isoformat(),
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
def scan(force: bool = False) -> dict:
|
|
360
|
+
"""
|
|
361
|
+
Main scan function.
|
|
362
|
+
|
|
363
|
+
With hash caching:
|
|
364
|
+
1. Find all SKILL.md files
|
|
365
|
+
2. Compare MD5 hashes with stored values
|
|
366
|
+
3. Only re-parse files that changed, were added, or removed
|
|
367
|
+
4. Update registry incrementally
|
|
368
|
+
"""
|
|
369
|
+
current_files = find_skill_files()
|
|
370
|
+
current_paths = {str(f): f for f in current_files}
|
|
371
|
+
|
|
372
|
+
stored_hashes = load_hashes()
|
|
373
|
+
registry = load_registry()
|
|
374
|
+
|
|
375
|
+
# Build lookup of existing registry entries by skill_md path
|
|
376
|
+
existing_by_path = {}
|
|
377
|
+
for entry in registry.get("skills", []):
|
|
378
|
+
existing_by_path[entry.get("skill_md", "")] = entry
|
|
379
|
+
|
|
380
|
+
# Compute current hashes
|
|
381
|
+
new_hashes = {}
|
|
382
|
+
changed = False
|
|
383
|
+
|
|
384
|
+
for path_str, path_obj in current_paths.items():
|
|
385
|
+
current_hash = md5_file(path_obj)
|
|
386
|
+
new_hashes[path_str] = current_hash
|
|
387
|
+
|
|
388
|
+
if force or path_str not in stored_hashes or stored_hashes[path_str] != current_hash:
|
|
389
|
+
# New or modified - rebuild entry
|
|
390
|
+
entry = build_skill_entry(path_obj)
|
|
391
|
+
existing_by_path[path_str] = entry
|
|
392
|
+
changed = True
|
|
393
|
+
|
|
394
|
+
# Detect removed skills
|
|
395
|
+
for old_path in list(existing_by_path.keys()):
|
|
396
|
+
if old_path not in current_paths and old_path != "":
|
|
397
|
+
del existing_by_path[old_path]
|
|
398
|
+
changed = True
|
|
399
|
+
|
|
400
|
+
# Check if file set changed (additions/removals)
|
|
401
|
+
if set(new_hashes.keys()) != set(stored_hashes.keys()):
|
|
402
|
+
changed = True
|
|
403
|
+
|
|
404
|
+
# Deduplicate by skill name (case-insensitive).
|
|
405
|
+
# When the same skill exists in both skills/ and .claude/skills/,
|
|
406
|
+
# prefer the primary location (skills/) over the registered copy.
|
|
407
|
+
if changed or not REGISTRY_PATH.exists():
|
|
408
|
+
by_name = {}
|
|
409
|
+
for entry in existing_by_path.values():
|
|
410
|
+
name = entry.get("name", "").lower()
|
|
411
|
+
if not name:
|
|
412
|
+
continue
|
|
413
|
+
if name not in by_name:
|
|
414
|
+
by_name[name] = entry
|
|
415
|
+
else:
|
|
416
|
+
# Prefer the version NOT in .claude/skills/ (the primary source)
|
|
417
|
+
existing = by_name[name]
|
|
418
|
+
existing_is_registered = existing.get("registered", False)
|
|
419
|
+
new_is_registered = entry.get("registered", False)
|
|
420
|
+
if existing_is_registered and not new_is_registered:
|
|
421
|
+
by_name[name] = entry
|
|
422
|
+
# If both are primary or both registered, keep first found
|
|
423
|
+
|
|
424
|
+
registry["skills"] = sorted(by_name.values(), key=lambda s: s.get("name", ""))
|
|
425
|
+
save_registry(registry)
|
|
426
|
+
save_hashes(new_hashes)
|
|
427
|
+
return registry
|
|
428
|
+
else:
|
|
429
|
+
# Nothing changed, return existing
|
|
430
|
+
return registry
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
def print_status(registry: dict):
|
|
434
|
+
"""Print a formatted status table."""
|
|
435
|
+
skills = registry.get("skills", [])
|
|
436
|
+
|
|
437
|
+
if not skills:
|
|
438
|
+
print("No skills found in the ecosystem.")
|
|
439
|
+
return
|
|
440
|
+
|
|
441
|
+
print(f"\n{'='*80}")
|
|
442
|
+
print(f" Agent Orchestrator - Skill Registry Status")
|
|
443
|
+
print(f" Scanned at: {registry.get('generated_at', 'N/A')}")
|
|
444
|
+
print(f" Root: {registry.get('skills_root', 'N/A')}")
|
|
445
|
+
print(f"{'='*80}\n")
|
|
446
|
+
|
|
447
|
+
# Header
|
|
448
|
+
print(f" {'Name':<22} {'Status':<12} {'Lang':<10} {'Registered':<12} {'Capabilities'}")
|
|
449
|
+
print(f" {'-'*22} {'-'*12} {'-'*10} {'-'*12} {'-'*30}")
|
|
450
|
+
|
|
451
|
+
for s in sorted(skills, key=lambda x: x.get("name", "")):
|
|
452
|
+
name = s.get("name", "?")[:20]
|
|
453
|
+
status = s.get("status", "?")
|
|
454
|
+
lang = s.get("language", "none")
|
|
455
|
+
reg = "Yes" if s.get("registered") else "No"
|
|
456
|
+
caps = ", ".join(s.get("capabilities", []))[:30]
|
|
457
|
+
print(f" {name:<22} {status:<12} {lang:<10} {reg:<12} {caps}")
|
|
458
|
+
|
|
459
|
+
print(f"\n Total: {len(skills)} skills")
|
|
460
|
+
|
|
461
|
+
# Recommendations
|
|
462
|
+
unregistered = [s for s in skills if not s.get("registered")]
|
|
463
|
+
incomplete = [s for s in skills if s.get("status") == "incomplete"]
|
|
464
|
+
|
|
465
|
+
if unregistered:
|
|
466
|
+
print(f"\n [!] {len(unregistered)} skill(s) not registered in .claude/skills/:")
|
|
467
|
+
for s in unregistered:
|
|
468
|
+
print(f" - {s['name']} ({s['location']})")
|
|
469
|
+
|
|
470
|
+
if incomplete:
|
|
471
|
+
print(f"\n [!] {len(incomplete)} skill(s) with incomplete status:")
|
|
472
|
+
for s in incomplete:
|
|
473
|
+
print(f" - {s['name']} ({s['location']})")
|
|
474
|
+
|
|
475
|
+
print()
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
# ── CLI Entry Point ────────────────────────────────────────────────────────
|
|
479
|
+
|
|
480
|
+
def main():
|
|
481
|
+
force = "--force" in sys.argv
|
|
482
|
+
show_status = "--status" in sys.argv
|
|
483
|
+
|
|
484
|
+
registry = scan(force=force)
|
|
485
|
+
|
|
486
|
+
if show_status:
|
|
487
|
+
print_status(registry)
|
|
488
|
+
else:
|
|
489
|
+
# Default: output JSON summary for Claude to parse
|
|
490
|
+
skills = registry.get("skills", [])
|
|
491
|
+
summary = {
|
|
492
|
+
"total": len(skills),
|
|
493
|
+
"active": len([s for s in skills if s.get("status") == "active"]),
|
|
494
|
+
"incomplete": len([s for s in skills if s.get("status") == "incomplete"]),
|
|
495
|
+
"skills": [
|
|
496
|
+
{
|
|
497
|
+
"name": s.get("name"),
|
|
498
|
+
"status": s.get("status"),
|
|
499
|
+
"capabilities": s.get("capabilities", []),
|
|
500
|
+
}
|
|
501
|
+
for s in skills
|
|
502
|
+
],
|
|
503
|
+
}
|
|
504
|
+
print(json.dumps(summary, indent=2, ensure_ascii=False))
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
if __name__ == "__main__":
|
|
508
|
+
main()
|