@trieungoctam/vibekit 1.0.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 +21 -0
- package/README.md +85 -0
- package/agents/debugger.md +158 -0
- package/agents/docs-manager.md +220 -0
- package/agents/planner.md +129 -0
- package/agents/researcher.md +58 -0
- package/agents/reviewer.md +152 -0
- package/agents/tester.md +126 -0
- package/bin/vibekit.js +18 -0
- package/hooks/lib/ck-config-utils.cjs +831 -0
- package/hooks/lib/colors.cjs +95 -0
- package/hooks/lib/config-counter.cjs +103 -0
- package/hooks/lib/context-builder.cjs +616 -0
- package/hooks/lib/git-info-cache.cjs +143 -0
- package/hooks/lib/hook-logger.cjs +92 -0
- package/hooks/lib/privacy-checker.cjs +297 -0
- package/hooks/lib/project-detector.cjs +474 -0
- package/hooks/lib/scout-checker.cjs +263 -0
- package/hooks/lib/transcript-parser.cjs +181 -0
- package/hooks/post-edit-simplify-reminder.cjs +156 -0
- package/hooks/privacy-block.cjs +166 -0
- package/hooks/scout-block.cjs +147 -0
- package/hooks/session-init.cjs +360 -0
- package/package.json +41 -0
- package/rules/development-rules.md +52 -0
- package/rules/documentation-management.md +121 -0
- package/rules/orchestration-protocol.md +43 -0
- package/rules/primary-workflow.md +57 -0
- package/rules/team-coordination-rules.md +90 -0
- package/skills/ai/agent-browser/SKILL.md +294 -0
- package/skills/ai/agent-browser/references/.gitkeep +0 -0
- package/skills/ai/agent-browser/references/agent-browser-vs-chrome-devtools.md +112 -0
- package/skills/ai/agent-browser/references/browserbase-cloud-setup.md +161 -0
- package/skills/ai/ai-artist/SKILL.md +122 -0
- package/skills/ai/ai-artist/data/awesome-prompts.csv +3592 -0
- package/skills/ai/ai-artist/data/lighting.csv +19 -0
- package/skills/ai/ai-artist/data/nano-banana-templates.csv +17 -0
- package/skills/ai/ai-artist/data/platforms.csv +11 -0
- package/skills/ai/ai-artist/data/styles.csv +26 -0
- package/skills/ai/ai-artist/data/techniques.csv +19 -0
- package/skills/ai/ai-artist/data/use-cases.csv +16 -0
- package/skills/ai/ai-artist/references/advanced-techniques.md +184 -0
- package/skills/ai/ai-artist/references/awesome-nano-banana-pro-prompts.md +8575 -0
- package/skills/ai/ai-artist/references/domain-code.md +66 -0
- package/skills/ai/ai-artist/references/domain-data.md +72 -0
- package/skills/ai/ai-artist/references/domain-marketing.md +66 -0
- package/skills/ai/ai-artist/references/domain-patterns.md +33 -0
- package/skills/ai/ai-artist/references/domain-writing.md +68 -0
- package/skills/ai/ai-artist/references/image-prompting.md +141 -0
- package/skills/ai/ai-artist/references/llm-prompting.md +165 -0
- package/skills/ai/ai-artist/references/nano-banana.md +136 -0
- package/skills/ai/ai-artist/references/reasoning-techniques.md +201 -0
- package/skills/ai/ai-artist/references/validation-workflow.md +117 -0
- package/skills/ai/ai-artist/scripts/core.py +197 -0
- package/skills/ai/ai-artist/scripts/extract_prompts.py +102 -0
- package/skills/ai/ai-artist/scripts/generate.py +370 -0
- package/skills/ai/ai-artist/scripts/search.py +147 -0
- package/skills/ai/ai-multimodal/.env.example +204 -0
- package/skills/ai/ai-multimodal/SKILL.md +110 -0
- package/skills/ai/ai-multimodal/references/audio-processing.md +387 -0
- package/skills/ai/ai-multimodal/references/image-generation.md +939 -0
- package/skills/ai/ai-multimodal/references/music-generation.md +311 -0
- package/skills/ai/ai-multimodal/references/video-analysis.md +515 -0
- package/skills/ai/ai-multimodal/references/video-generation.md +457 -0
- package/skills/ai/ai-multimodal/references/vision-understanding.md +492 -0
- package/skills/ai/ai-multimodal/scripts/.coverage +0 -0
- package/skills/ai/ai-multimodal/scripts/check_setup.py +315 -0
- package/skills/ai/ai-multimodal/scripts/document_converter.py +395 -0
- package/skills/ai/ai-multimodal/scripts/gemini_batch_process.py +1185 -0
- package/skills/ai/ai-multimodal/scripts/media_optimizer.py +506 -0
- package/skills/ai/ai-multimodal/scripts/requirements.txt +26 -0
- package/skills/ai/ai-multimodal/scripts/tests/.coverage +0 -0
- package/skills/ai/ai-multimodal/scripts/tests/requirements.txt +20 -0
- package/skills/ai/ai-multimodal/scripts/tests/test_document_converter.py +74 -0
- package/skills/ai/ai-multimodal/scripts/tests/test_gemini_batch_process.py +362 -0
- package/skills/ai/ai-multimodal/scripts/tests/test_media_optimizer.py +373 -0
- package/skills/ai/mcp-management/README.md +219 -0
- package/skills/ai/mcp-management/SKILL.md +210 -0
- package/skills/ai/mcp-management/assets/tools.json +3146 -0
- package/skills/ai/mcp-management/references/configuration.md +114 -0
- package/skills/ai/mcp-management/references/gemini-cli-integration.md +221 -0
- package/skills/ai/mcp-management/references/mcp-protocol.md +116 -0
- package/skills/ai/mcp-management/scripts/.env.example +10 -0
- package/skills/ai/mcp-management/scripts/cli.ts +195 -0
- package/skills/ai/mcp-management/scripts/dist/analyze-tools.js +70 -0
- package/skills/ai/mcp-management/scripts/dist/cli.js +160 -0
- package/skills/ai/mcp-management/scripts/dist/mcp-client.js +183 -0
- package/skills/ai/mcp-management/scripts/mcp-client.ts +230 -0
- package/skills/ai/mcp-management/scripts/package.json +20 -0
- package/skills/ai/mcp-management/scripts/tsconfig.json +15 -0
- package/skills/core/brainstorm/SKILL.md +164 -0
- package/skills/core/brainstorm/scripts/frame-template.html +214 -0
- package/skills/core/brainstorm/scripts/helper.js +88 -0
- package/skills/core/brainstorm/scripts/server.cjs +338 -0
- package/skills/core/brainstorm/scripts/start-server.sh +153 -0
- package/skills/core/brainstorm/scripts/stop-server.sh +55 -0
- package/skills/core/brainstorm/spec-document-reviewer-prompt.md +49 -0
- package/skills/core/brainstorm/visual-companion.md +286 -0
- package/skills/core/code-review/SKILL.md +147 -0
- package/skills/core/code-review/references/code-review-reception.md +113 -0
- package/skills/core/code-review/references/codebase-scan-workflow.md +29 -0
- package/skills/core/code-review/references/edge-case-scouting.md +119 -0
- package/skills/core/code-review/references/parallel-review-workflow.md +69 -0
- package/skills/core/code-review/references/requesting-code-review.md +116 -0
- package/skills/core/code-review/references/task-management-reviews.md +140 -0
- package/skills/core/code-review/references/verification-before-completion.md +139 -0
- package/skills/core/cook/README.md +86 -0
- package/skills/core/cook/SKILL.md +113 -0
- package/skills/core/cook/references/intent-detection.md +101 -0
- package/skills/core/cook/references/review-cycle.md +75 -0
- package/skills/core/cook/references/subagent-patterns.md +75 -0
- package/skills/core/cook/references/workflow-steps.md +172 -0
- package/skills/core/debug/SKILL.md +121 -0
- package/skills/core/debug/references/defense-in-depth.md +124 -0
- package/skills/core/debug/references/frontend-verification.md +103 -0
- package/skills/core/debug/references/investigation-methodology.md +101 -0
- package/skills/core/debug/references/log-and-ci-analysis.md +97 -0
- package/skills/core/debug/references/performance-diagnostics.md +113 -0
- package/skills/core/debug/references/reporting-standards.md +122 -0
- package/skills/core/debug/references/root-cause-tracing.md +122 -0
- package/skills/core/debug/references/systematic-debugging.md +102 -0
- package/skills/core/debug/references/task-management-debugging.md +155 -0
- package/skills/core/debug/references/verification.md +123 -0
- package/skills/core/debug/scripts/find-polluter.sh +63 -0
- package/skills/core/debug/scripts/find-polluter.test.md +102 -0
- package/skills/core/execute/SKILL.md +70 -0
- package/skills/core/fix/SKILL.md +111 -0
- package/skills/core/fix/references/complexity-assessment.md +72 -0
- package/skills/core/fix/references/mode-selection.md +46 -0
- package/skills/core/fix/references/parallel-exploration.md +100 -0
- package/skills/core/fix/references/review-cycle.md +77 -0
- package/skills/core/fix/references/skill-activation-matrix.md +78 -0
- package/skills/core/fix/references/task-orchestration.md +103 -0
- package/skills/core/fix/references/workflow-ci.md +28 -0
- package/skills/core/fix/references/workflow-deep.md +122 -0
- package/skills/core/fix/references/workflow-logs.md +72 -0
- package/skills/core/fix/references/workflow-quick.md +59 -0
- package/skills/core/fix/references/workflow-standard.md +111 -0
- package/skills/core/fix/references/workflow-test.md +75 -0
- package/skills/core/fix/references/workflow-types.md +33 -0
- package/skills/core/fix/references/workflow-ui.md +75 -0
- package/skills/core/plan/SKILL.md +145 -0
- package/skills/core/plan/plan-document-reviewer-prompt.md +49 -0
- package/skills/core/subagent-dev/SKILL.md +277 -0
- package/skills/core/subagent-dev/code-quality-reviewer-prompt.md +26 -0
- package/skills/core/subagent-dev/implementer-prompt.md +113 -0
- package/skills/core/subagent-dev/spec-reviewer-prompt.md +61 -0
- package/skills/core/tdd/SKILL.md +371 -0
- package/skills/core/tdd/testing-anti-patterns.md +299 -0
- package/skills/core/test/SKILL.md +109 -0
- package/skills/core/test/references/report-format.md +58 -0
- package/skills/core/test/references/test-execution-workflow.md +103 -0
- package/skills/core/test/references/ui-testing-workflow.md +65 -0
- package/skills/core/verify/SKILL.md +139 -0
- package/skills/dev/backend-dev/SKILL.md +96 -0
- package/skills/dev/backend-dev/references/backend-api-design.md +495 -0
- package/skills/dev/backend-dev/references/backend-architecture.md +454 -0
- package/skills/dev/backend-dev/references/backend-authentication.md +338 -0
- package/skills/dev/backend-dev/references/backend-code-quality.md +659 -0
- package/skills/dev/backend-dev/references/backend-debugging.md +904 -0
- package/skills/dev/backend-dev/references/backend-devops.md +494 -0
- package/skills/dev/backend-dev/references/backend-mindset.md +387 -0
- package/skills/dev/backend-dev/references/backend-performance.md +397 -0
- package/skills/dev/backend-dev/references/backend-security.md +290 -0
- package/skills/dev/backend-dev/references/backend-technologies.md +256 -0
- package/skills/dev/backend-dev/references/backend-testing.md +429 -0
- package/skills/dev/context-engineering/SKILL.md +108 -0
- package/skills/dev/context-engineering/references/context-compression.md +84 -0
- package/skills/dev/context-engineering/references/context-degradation.md +93 -0
- package/skills/dev/context-engineering/references/context-fundamentals.md +75 -0
- package/skills/dev/context-engineering/references/context-optimization.md +82 -0
- package/skills/dev/context-engineering/references/evaluation.md +89 -0
- package/skills/dev/context-engineering/references/memory-systems.md +88 -0
- package/skills/dev/context-engineering/references/multi-agent-patterns.md +90 -0
- package/skills/dev/context-engineering/references/project-development.md +97 -0
- package/skills/dev/context-engineering/references/runtime-awareness.md +202 -0
- package/skills/dev/context-engineering/references/tool-design.md +86 -0
- package/skills/dev/context-engineering/scripts/compression_evaluator.py +349 -0
- package/skills/dev/context-engineering/scripts/context_analyzer.py +317 -0
- package/skills/dev/context-engineering/scripts/tests/test_edge_cases.py +246 -0
- package/skills/dev/databases/SKILL.md +84 -0
- package/skills/dev/databases/analytics.md +198 -0
- package/skills/dev/databases/db-design.md +188 -0
- package/skills/dev/databases/incremental-etl.md +213 -0
- package/skills/dev/databases/references/mongodb-aggregation.md +447 -0
- package/skills/dev/databases/references/mongodb-atlas.md +465 -0
- package/skills/dev/databases/references/mongodb-crud.md +408 -0
- package/skills/dev/databases/references/mongodb-indexing.md +442 -0
- package/skills/dev/databases/references/postgresql-administration.md +594 -0
- package/skills/dev/databases/references/postgresql-performance.md +527 -0
- package/skills/dev/databases/references/postgresql-psql-cli.md +467 -0
- package/skills/dev/databases/references/postgresql-queries.md +475 -0
- package/skills/dev/databases/scripts/.coverage +0 -0
- package/skills/dev/databases/scripts/db_backup.py +502 -0
- package/skills/dev/databases/scripts/db_migrate.py +426 -0
- package/skills/dev/databases/scripts/db_performance_check.py +457 -0
- package/skills/dev/databases/scripts/requirements.txt +20 -0
- package/skills/dev/databases/scripts/tests/coverage-db.json +1 -0
- package/skills/dev/databases/scripts/tests/requirements.txt +4 -0
- package/skills/dev/databases/scripts/tests/test_db_backup.py +340 -0
- package/skills/dev/databases/scripts/tests/test_db_migrate.py +277 -0
- package/skills/dev/databases/scripts/tests/test_db_performance_check.py +370 -0
- package/skills/dev/databases/stacks/bigquery.md +231 -0
- package/skills/dev/databases/stacks/d1_cloudflare.md +137 -0
- package/skills/dev/databases/stacks/mysql.md +216 -0
- package/skills/dev/databases/stacks/postgres.md +235 -0
- package/skills/dev/databases/stacks/sqlite.md +244 -0
- package/skills/dev/databases/transactional.md +176 -0
- package/skills/dev/devops/.env.example +76 -0
- package/skills/dev/devops/SKILL.md +97 -0
- package/skills/dev/devops/references/browser-rendering.md +305 -0
- package/skills/dev/devops/references/cloudflare-d1-kv.md +123 -0
- package/skills/dev/devops/references/cloudflare-platform.md +271 -0
- package/skills/dev/devops/references/cloudflare-r2-storage.md +280 -0
- package/skills/dev/devops/references/cloudflare-workers-advanced.md +312 -0
- package/skills/dev/devops/references/cloudflare-workers-apis.md +309 -0
- package/skills/dev/devops/references/cloudflare-workers-basics.md +418 -0
- package/skills/dev/devops/references/docker-basics.md +297 -0
- package/skills/dev/devops/references/docker-compose.md +292 -0
- package/skills/dev/devops/references/gcloud-platform.md +297 -0
- package/skills/dev/devops/references/gcloud-services.md +304 -0
- package/skills/dev/devops/references/kubernetes-basics.md +99 -0
- package/skills/dev/devops/references/kubernetes-helm-advanced.md +75 -0
- package/skills/dev/devops/references/kubernetes-helm.md +81 -0
- package/skills/dev/devops/references/kubernetes-kubectl.md +74 -0
- package/skills/dev/devops/references/kubernetes-security-advanced.md +98 -0
- package/skills/dev/devops/references/kubernetes-security.md +95 -0
- package/skills/dev/devops/references/kubernetes-troubleshooting-advanced.md +74 -0
- package/skills/dev/devops/references/kubernetes-troubleshooting.md +49 -0
- package/skills/dev/devops/references/kubernetes-workflows-advanced.md +75 -0
- package/skills/dev/devops/references/kubernetes-workflows.md +78 -0
- package/skills/dev/devops/scripts/cloudflare_deploy.py +269 -0
- package/skills/dev/devops/scripts/docker_optimize.py +332 -0
- package/skills/dev/devops/scripts/requirements.txt +20 -0
- package/skills/dev/devops/scripts/tests/requirements.txt +3 -0
- package/skills/dev/devops/scripts/tests/test_cloudflare_deploy.py +285 -0
- package/skills/dev/devops/scripts/tests/test_docker_optimize.py +436 -0
- package/skills/dev/frontend-design/SKILL.md +78 -0
- package/skills/dev/frontend-design/references/ai-multimodal-overview.md +165 -0
- package/skills/dev/frontend-design/references/analysis-best-practices.md +80 -0
- package/skills/dev/frontend-design/references/analysis-prompts.md +141 -0
- package/skills/dev/frontend-design/references/analysis-techniques.md +118 -0
- package/skills/dev/frontend-design/references/animejs.md +396 -0
- package/skills/dev/frontend-design/references/asset-generation.md +337 -0
- package/skills/dev/frontend-design/references/design-extraction-overview.md +71 -0
- package/skills/dev/frontend-design/references/extraction-best-practices.md +141 -0
- package/skills/dev/frontend-design/references/extraction-output-templates.md +162 -0
- package/skills/dev/frontend-design/references/extraction-prompts.md +127 -0
- package/skills/dev/frontend-design/references/technical-accessibility.md +119 -0
- package/skills/dev/frontend-design/references/technical-best-practices.md +97 -0
- package/skills/dev/frontend-design/references/technical-optimization.md +44 -0
- package/skills/dev/frontend-design/references/technical-overview.md +90 -0
- package/skills/dev/frontend-design/references/technical-workflows.md +150 -0
- package/skills/dev/frontend-design/references/visual-analysis-overview.md +95 -0
- package/skills/dev/frontend-design/references/workflow-3d.md +102 -0
- package/skills/dev/frontend-design/references/workflow-describe.md +87 -0
- package/skills/dev/frontend-design/references/workflow-immersive.md +87 -0
- package/skills/dev/frontend-design/references/workflow-quick.md +57 -0
- package/skills/dev/frontend-design/references/workflow-screenshot.md +63 -0
- package/skills/dev/frontend-design/references/workflow-video.md +74 -0
- package/skills/dev/frontend-dev/SKILL.md +400 -0
- package/skills/dev/frontend-dev/resources/common-patterns.md +331 -0
- package/skills/dev/frontend-dev/resources/complete-examples.md +872 -0
- package/skills/dev/frontend-dev/resources/component-patterns.md +502 -0
- package/skills/dev/frontend-dev/resources/data-fetching.md +767 -0
- package/skills/dev/frontend-dev/resources/file-organization.md +502 -0
- package/skills/dev/frontend-dev/resources/loading-and-error-states.md +501 -0
- package/skills/dev/frontend-dev/resources/performance.md +406 -0
- package/skills/dev/frontend-dev/resources/routing-guide.md +364 -0
- package/skills/dev/frontend-dev/resources/styling-guide.md +428 -0
- package/skills/dev/frontend-dev/resources/typescript-standards.md +418 -0
- package/skills/dev/git/SKILL.md +114 -0
- package/skills/dev/git/references/branch-management.md +88 -0
- package/skills/dev/git/references/commit-standards.md +46 -0
- package/skills/dev/git/references/gh-cli-guide.md +109 -0
- package/skills/dev/git/references/safety-protocols.md +69 -0
- package/skills/dev/git/references/workflow-commit.md +58 -0
- package/skills/dev/git/references/workflow-merge.md +48 -0
- package/skills/dev/git/references/workflow-pr.md +58 -0
- package/skills/dev/git/references/workflow-push.md +52 -0
- package/skills/dev/git-worktree/SKILL.md +218 -0
- package/skills/utils/ask/SKILL.md +58 -0
- package/skills/utils/bootstrap/SKILL.md +101 -0
- package/skills/utils/bootstrap/references/shared-phases.md +59 -0
- package/skills/utils/bootstrap/references/workflow-auto.md +52 -0
- package/skills/utils/bootstrap/references/workflow-fast.md +50 -0
- package/skills/utils/bootstrap/references/workflow-full.md +60 -0
- package/skills/utils/bootstrap/references/workflow-parallel.md +59 -0
- package/skills/utils/ck-help/SKILL.md +102 -0
- package/skills/utils/ck-help/scripts/ck-help.py +1321 -0
- package/skills/utils/ck-help/scripts/commands_data.yaml +3 -0
- package/skills/utils/ck-help/scripts/skills_data.yaml +593 -0
- package/skills/utils/copywriting/SKILL.md +94 -0
- package/skills/utils/copywriting/references/copy-formulas.md +150 -0
- package/skills/utils/copywriting/references/cta-patterns.md +168 -0
- package/skills/utils/copywriting/references/email-copy.md +193 -0
- package/skills/utils/copywriting/references/headline-templates.md +140 -0
- package/skills/utils/copywriting/references/landing-page-copy.md +175 -0
- package/skills/utils/copywriting/references/power-words.md +189 -0
- package/skills/utils/copywriting/references/social-media-copy.md +222 -0
- package/skills/utils/copywriting/references/workflow-cro.md +83 -0
- package/skills/utils/copywriting/references/workflow-enhance.md +32 -0
- package/skills/utils/copywriting/references/workflow-fast.md +29 -0
- package/skills/utils/copywriting/references/workflow-good.md +39 -0
- package/skills/utils/copywriting/references/writing-styles.md +247 -0
- package/skills/utils/copywriting/scripts/extract-writing-styles.py +308 -0
- package/skills/utils/copywriting/templates/copy-brief.md +49 -0
- package/skills/utils/docs/SKILL.md +55 -0
- package/skills/utils/docs/references/init-workflow.md +32 -0
- package/skills/utils/docs/references/summarize-workflow.md +18 -0
- package/skills/utils/docs/references/update-workflow.md +59 -0
- package/skills/utils/journal/SKILL.md +11 -0
- package/skills/utils/kanban/SKILL.md +99 -0
- package/skills/utils/preview/SKILL.md +75 -0
- package/skills/utils/preview/references/generation-modes.md +95 -0
- package/skills/utils/preview/references/view-mode.md +42 -0
- package/skills/utils/repomix/SKILL.md +248 -0
- package/skills/utils/repomix/references/configuration.md +211 -0
- package/skills/utils/repomix/references/usage-patterns.md +232 -0
- package/skills/utils/repomix/scripts/.coverage +0 -0
- package/skills/utils/repomix/scripts/README.md +179 -0
- package/skills/utils/repomix/scripts/repomix_batch.py +455 -0
- package/skills/utils/repomix/scripts/repos.example.json +15 -0
- package/skills/utils/repomix/scripts/requirements.txt +15 -0
- package/skills/utils/repomix/scripts/tests/test_repomix_batch.py +531 -0
- package/skills/utils/research/SKILL.md +171 -0
- package/skills/utils/scout/SKILL.md +89 -0
- package/skills/utils/scout/references/external-scouting.md +140 -0
- package/skills/utils/scout/references/internal-scouting.md +119 -0
- package/skills/utils/scout/references/task-management-scouting.md +125 -0
- package/skills/utils/sequential-thinking/.env.example +8 -0
- package/skills/utils/sequential-thinking/README.md +183 -0
- package/skills/utils/sequential-thinking/SKILL.md +95 -0
- package/skills/utils/sequential-thinking/package.json +31 -0
- package/skills/utils/sequential-thinking/references/advanced-strategies.md +79 -0
- package/skills/utils/sequential-thinking/references/advanced-techniques.md +76 -0
- package/skills/utils/sequential-thinking/references/core-patterns.md +95 -0
- package/skills/utils/sequential-thinking/references/examples-api.md +88 -0
- package/skills/utils/sequential-thinking/references/examples-architecture.md +94 -0
- package/skills/utils/sequential-thinking/references/examples-debug.md +90 -0
- package/skills/utils/sequential-thinking/scripts/format-thought.js +159 -0
- package/skills/utils/sequential-thinking/scripts/process-thought.js +236 -0
- package/skills/utils/sequential-thinking/tests/format-thought.test.js +133 -0
- package/skills/utils/sequential-thinking/tests/process-thought.test.js +215 -0
- package/skills/utils/write-skill/SKILL.md +655 -0
- package/skills/utils/write-skill/anthropic-best-practices.md +1150 -0
- package/skills/utils/write-skill/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/utils/write-skill/graphviz-conventions.dot +172 -0
- package/skills/utils/write-skill/persuasion-principles.md +187 -0
- package/skills/utils/write-skill/render-graphs.js +168 -0
- package/skills/utils/write-skill/testing-skills-with-subagents.md +384 -0
- package/src/commands/init.js +238 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Fast Copy Workflow
|
|
2
|
+
|
|
3
|
+
Quick, creative copy generation with minimal research.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- Simple copy requests (social posts, short descriptions)
|
|
8
|
+
- Time-sensitive content needs
|
|
9
|
+
- Clear context already provided
|
|
10
|
+
|
|
11
|
+
## Workflow Steps
|
|
12
|
+
|
|
13
|
+
1. **Screenshots provided** → Use `ck:ai-multimodal` skill to analyze context
|
|
14
|
+
2. **Videos provided** → Use `ck:ai-multimodal` video-analysis for context
|
|
15
|
+
3. **Write** → Use `fullstack-developer` agent directly to produce copy
|
|
16
|
+
|
|
17
|
+
## Speed Optimization
|
|
18
|
+
|
|
19
|
+
- Skip research phase—use provided context
|
|
20
|
+
- Apply formulas from `copy-formulas.md` directly
|
|
21
|
+
- Single-pass writing, minimal revision
|
|
22
|
+
|
|
23
|
+
## Best For
|
|
24
|
+
|
|
25
|
+
- Social media posts
|
|
26
|
+
- Short product descriptions
|
|
27
|
+
- Quick email drafts
|
|
28
|
+
- Ad variations
|
|
29
|
+
- Micro-copy (buttons, labels, tooltips)
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Quality Copy Workflow
|
|
2
|
+
|
|
3
|
+
Thorough copy development with research, planning, and execution.
|
|
4
|
+
|
|
5
|
+
## When to Use
|
|
6
|
+
|
|
7
|
+
- High-stakes content (landing pages, sales pages, campaigns)
|
|
8
|
+
- Complex products/services requiring deep understanding
|
|
9
|
+
- Brand-critical messaging
|
|
10
|
+
|
|
11
|
+
## Workflow Steps
|
|
12
|
+
|
|
13
|
+
1. **Screenshots provided** → Use `ck:ai-multimodal` skill for detailed context analysis
|
|
14
|
+
2. **Videos provided** → Use `ck:ai-multimodal` video-analysis for comprehensive context
|
|
15
|
+
3. **Research** → Spawn multiple `researcher` agents in parallel:
|
|
16
|
+
- Competitor messaging analysis
|
|
17
|
+
- Target audience insights
|
|
18
|
+
- Industry best practices
|
|
19
|
+
- Product/service details
|
|
20
|
+
4. **Scout codebase** → `/ck:scout ext` (preferred) or `/ck:scout` to find relevant files
|
|
21
|
+
5. **Plan** → Use `planner` agent to outline copy structure and strategy
|
|
22
|
+
6. **Write** → Use `fullstack-developer` agent to execute plan
|
|
23
|
+
|
|
24
|
+
## Quality Checklist
|
|
25
|
+
|
|
26
|
+
- [ ] Research validates messaging direction
|
|
27
|
+
- [ ] Plan reviewed against user requirements
|
|
28
|
+
- [ ] Copy follows chosen formula (AIDA, PAS, etc.)
|
|
29
|
+
- [ ] Multiple headline options provided
|
|
30
|
+
- [ ] CTAs tested for clarity
|
|
31
|
+
- [ ] Social proof integrated
|
|
32
|
+
- [ ] Objections anticipated and addressed
|
|
33
|
+
|
|
34
|
+
## Related References
|
|
35
|
+
|
|
36
|
+
- `copy-formulas.md` - Core copywriting structures
|
|
37
|
+
- `headline-templates.md` - Headline variations
|
|
38
|
+
- `landing-page-copy.md` - Page structure
|
|
39
|
+
- `writing-styles.md` - Voice and tone options
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# Writing Styles Guide
|
|
2
|
+
|
|
3
|
+
Define, extract, and apply consistent writing voices across content.
|
|
4
|
+
|
|
5
|
+
## Style Dimensions Framework
|
|
6
|
+
|
|
7
|
+
Every writing style can be mapped across these dimensions:
|
|
8
|
+
|
|
9
|
+
| Dimension | Spectrum | Description |
|
|
10
|
+
|-----------|----------|-------------|
|
|
11
|
+
| Tone | Formal ↔ Casual | How official or relaxed |
|
|
12
|
+
| Pace | Fast ↔ Measured | Sentence length, rhythm |
|
|
13
|
+
| Vocabulary | Simple ↔ Technical | Word complexity level |
|
|
14
|
+
| Emotion | Reserved ↔ Expressive | Emotional intensity |
|
|
15
|
+
| Humor | Serious ↔ Playful | Use of wit, jokes |
|
|
16
|
+
| Perspective | Third-person ↔ First-person | Pronoun usage |
|
|
17
|
+
| Authority | Peer ↔ Expert | Positioning relative to reader |
|
|
18
|
+
|
|
19
|
+
## Pre-Built Style Definitions
|
|
20
|
+
|
|
21
|
+
### Casual Conversational
|
|
22
|
+
|
|
23
|
+
**Best for:** Indie hackers, startups, personal brands
|
|
24
|
+
|
|
25
|
+
**Dimensions:**
|
|
26
|
+
- Tone: Casual
|
|
27
|
+
- Pace: Fast
|
|
28
|
+
- Vocabulary: Simple
|
|
29
|
+
- Emotion: Expressive
|
|
30
|
+
- Humor: Playful
|
|
31
|
+
- Perspective: First-person
|
|
32
|
+
|
|
33
|
+
**Characteristics:**
|
|
34
|
+
- Contractions ("you're", "isn't")
|
|
35
|
+
- Short sentences, fragments OK
|
|
36
|
+
- Personal pronouns ("I", "you")
|
|
37
|
+
- Informal transitions ("So here's the thing...")
|
|
38
|
+
- Emoji usage acceptable
|
|
39
|
+
|
|
40
|
+
**Example:**
|
|
41
|
+
> "Look, I get it. Marketing feels overwhelming. But here's what I learned after burning through $10k on ads that didn't work—it doesn't have to be complicated."
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
### Professional Authoritative
|
|
46
|
+
|
|
47
|
+
**Best for:** Enterprise SaaS, B2B, consulting
|
|
48
|
+
|
|
49
|
+
**Dimensions:**
|
|
50
|
+
- Tone: Formal
|
|
51
|
+
- Pace: Measured
|
|
52
|
+
- Vocabulary: Technical
|
|
53
|
+
- Emotion: Reserved
|
|
54
|
+
- Humor: Serious
|
|
55
|
+
- Perspective: Third-person / We
|
|
56
|
+
|
|
57
|
+
**Characteristics:**
|
|
58
|
+
- Complete sentences
|
|
59
|
+
- Industry terminology
|
|
60
|
+
- Data-driven claims
|
|
61
|
+
- Formal transitions
|
|
62
|
+
- No emoji
|
|
63
|
+
|
|
64
|
+
**Example:**
|
|
65
|
+
> "Organizations that implement structured content strategies outperform competitors by 3.5x in lead generation. This comprehensive guide examines the frameworks that drive measurable results."
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### Edgy Provocative
|
|
70
|
+
|
|
71
|
+
**Best for:** Disruptor brands, hot takes, thought leadership
|
|
72
|
+
|
|
73
|
+
**Dimensions:**
|
|
74
|
+
- Tone: Casual-to-Formal (varies)
|
|
75
|
+
- Pace: Fast
|
|
76
|
+
- Vocabulary: Simple with punchy terms
|
|
77
|
+
- Emotion: Expressive
|
|
78
|
+
- Humor: Playful but sharp
|
|
79
|
+
- Perspective: First-person
|
|
80
|
+
|
|
81
|
+
**Characteristics:**
|
|
82
|
+
- Bold claims
|
|
83
|
+
- Contrarian positions
|
|
84
|
+
- Short, punchy sentences
|
|
85
|
+
- Pattern interrupts
|
|
86
|
+
- Strategic use of questions
|
|
87
|
+
|
|
88
|
+
**Example:**
|
|
89
|
+
> "Everything you know about content marketing is wrong. Seriously. The 'best practices' everyone follows? They're why you're invisible. Let me show you what actually works."
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
### Luxe Minimalist
|
|
94
|
+
|
|
95
|
+
**Best for:** Premium products, luxury brands, high-end services
|
|
96
|
+
|
|
97
|
+
**Dimensions:**
|
|
98
|
+
- Tone: Formal
|
|
99
|
+
- Pace: Measured, spacious
|
|
100
|
+
- Vocabulary: Elegant, selective
|
|
101
|
+
- Emotion: Reserved but refined
|
|
102
|
+
- Humor: Subtle or absent
|
|
103
|
+
- Perspective: Second-person
|
|
104
|
+
|
|
105
|
+
**Characteristics:**
|
|
106
|
+
- Fewer words, more impact
|
|
107
|
+
- White space between ideas
|
|
108
|
+
- Refined vocabulary
|
|
109
|
+
- Understated confidence
|
|
110
|
+
- No hard sell
|
|
111
|
+
|
|
112
|
+
**Example:**
|
|
113
|
+
> "Exceptional results require exceptional attention. We work with founders who understand that true growth cannot be rushed. By invitation only."
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
### Warm Supportive
|
|
118
|
+
|
|
119
|
+
**Best for:** Wellness, coaching, education, community
|
|
120
|
+
|
|
121
|
+
**Dimensions:**
|
|
122
|
+
- Tone: Casual
|
|
123
|
+
- Pace: Measured
|
|
124
|
+
- Vocabulary: Simple
|
|
125
|
+
- Emotion: Expressive
|
|
126
|
+
- Humor: Gentle
|
|
127
|
+
- Perspective: First-person plural ("we")
|
|
128
|
+
|
|
129
|
+
**Characteristics:**
|
|
130
|
+
- Empathetic language
|
|
131
|
+
- Inclusive pronouns
|
|
132
|
+
- Encouraging tone
|
|
133
|
+
- Validation before advice
|
|
134
|
+
- Gentle CTAs
|
|
135
|
+
|
|
136
|
+
**Example:**
|
|
137
|
+
> "It's okay if you're feeling stuck. We've all been there. The journey isn't always linear, and that's completely normal. Let's explore some gentle ways to move forward together."
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
### Technical Educator
|
|
142
|
+
|
|
143
|
+
**Best for:** Developer content, technical tutorials, documentation
|
|
144
|
+
|
|
145
|
+
**Dimensions:**
|
|
146
|
+
- Tone: Neutral-to-Casual
|
|
147
|
+
- Pace: Measured
|
|
148
|
+
- Vocabulary: Technical but explained
|
|
149
|
+
- Emotion: Reserved
|
|
150
|
+
- Humor: Dry/nerdy
|
|
151
|
+
- Perspective: Second-person
|
|
152
|
+
|
|
153
|
+
**Characteristics:**
|
|
154
|
+
- Code examples
|
|
155
|
+
- Step-by-step structure
|
|
156
|
+
- Precise terminology
|
|
157
|
+
- Assumes competence
|
|
158
|
+
- Occasional dry humor
|
|
159
|
+
|
|
160
|
+
**Example:**
|
|
161
|
+
> "Here's the thing about async/await—it's not magic, it's just syntactic sugar over Promises. Let's break down what's actually happening under the hood, and why your code isn't working the way you expect."
|
|
162
|
+
|
|
163
|
+
## Style Extraction Prompt
|
|
164
|
+
|
|
165
|
+
Use this prompt to analyze existing content and extract its style:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
Analyze this content and extract the writing style:
|
|
169
|
+
|
|
170
|
+
[PASTE CONTENT]
|
|
171
|
+
|
|
172
|
+
Provide:
|
|
173
|
+
1. Tone (formal ↔ casual):
|
|
174
|
+
2. Pace (fast ↔ measured):
|
|
175
|
+
3. Vocabulary (simple ↔ technical):
|
|
176
|
+
4. Emotion (reserved ↔ expressive):
|
|
177
|
+
5. Humor (serious ↔ playful):
|
|
178
|
+
6. Perspective (pronoun usage):
|
|
179
|
+
7. Sentence structure patterns:
|
|
180
|
+
8. Signature phrases/patterns:
|
|
181
|
+
9. What to DO in this style:
|
|
182
|
+
10. What to AVOID in this style:
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Style Application Prompt
|
|
186
|
+
|
|
187
|
+
Use this prompt to write in a specific style:
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
Write [CONTENT TYPE] in the following style:
|
|
191
|
+
|
|
192
|
+
**Tone:** [casual/formal]
|
|
193
|
+
**Pace:** [fast/measured]
|
|
194
|
+
**Vocabulary:** [simple/technical]
|
|
195
|
+
**Emotion:** [reserved/expressive]
|
|
196
|
+
**Perspective:** [first/second/third person]
|
|
197
|
+
|
|
198
|
+
**DO:**
|
|
199
|
+
- [specific patterns to use]
|
|
200
|
+
|
|
201
|
+
**DON'T:**
|
|
202
|
+
- [patterns to avoid]
|
|
203
|
+
|
|
204
|
+
Topic: [TOPIC]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Writing Style File Format
|
|
208
|
+
|
|
209
|
+
Store custom styles in `assets/writing-styles/`:
|
|
210
|
+
|
|
211
|
+
```yaml
|
|
212
|
+
# assets/writing-styles/indie-hacker.yaml
|
|
213
|
+
name: Indie Hacker
|
|
214
|
+
description: Authentic, scrappy, behind-the-scenes vibe
|
|
215
|
+
|
|
216
|
+
dimensions:
|
|
217
|
+
tone: casual
|
|
218
|
+
pace: fast
|
|
219
|
+
vocabulary: simple
|
|
220
|
+
emotion: expressive
|
|
221
|
+
humor: self-deprecating
|
|
222
|
+
perspective: first-person
|
|
223
|
+
|
|
224
|
+
patterns:
|
|
225
|
+
- Short sentences
|
|
226
|
+
- Fragments for emphasis
|
|
227
|
+
- Numbers and specifics
|
|
228
|
+
- "Here's what I learned"
|
|
229
|
+
- Behind-the-scenes honesty
|
|
230
|
+
|
|
231
|
+
avoid:
|
|
232
|
+
- Corporate speak
|
|
233
|
+
- Passive voice
|
|
234
|
+
- Vague claims
|
|
235
|
+
- Salesy language
|
|
236
|
+
|
|
237
|
+
examples:
|
|
238
|
+
- "Shipped v1 in 48 hours. It was broken. People loved it anyway."
|
|
239
|
+
- "Revenue last month: $4,293. Not life-changing, but real."
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Integration
|
|
243
|
+
|
|
244
|
+
Use with:
|
|
245
|
+
- `brand-guidelines` skill - Align with brand voice
|
|
246
|
+
- `/youtube:blog` command - Apply style to video-to-article
|
|
247
|
+
- `/content:good` command - Style-aware content generation
|
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Extract Writing Styles from assets/writing-styles/ directory.
|
|
4
|
+
|
|
5
|
+
Supports multiple file types:
|
|
6
|
+
- Text: .md, .txt
|
|
7
|
+
- Documents: .pdf, .docx, .xlsx, .pptx (via document_converter.py)
|
|
8
|
+
- Media: .jpg, .jpeg, .png, .webp, .mp4, .mov (via gemini_batch_process.py)
|
|
9
|
+
|
|
10
|
+
Usage:
|
|
11
|
+
python extract-writing-styles.py --list # List available style files
|
|
12
|
+
python extract-writing-styles.py --style <name> # Extract specific style
|
|
13
|
+
python extract-writing-styles.py --all # Extract all styles
|
|
14
|
+
python extract-writing-styles.py --all --json # Output as JSON
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
import argparse
|
|
18
|
+
import json
|
|
19
|
+
import os
|
|
20
|
+
import re
|
|
21
|
+
import subprocess
|
|
22
|
+
import sys
|
|
23
|
+
from pathlib import Path
|
|
24
|
+
from typing import Any, Dict, List, Optional
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
# File type categories
|
|
28
|
+
TEXT_FORMATS = {'.md', '.txt'}
|
|
29
|
+
DOC_FORMATS = {'.pdf', '.docx', '.xlsx', '.pptx'}
|
|
30
|
+
IMAGE_FORMATS = {'.jpg', '.jpeg', '.png', '.webp', '.heic'}
|
|
31
|
+
VIDEO_FORMATS = {'.mp4', '.mov', '.avi', '.mkv'}
|
|
32
|
+
ALL_FORMATS = TEXT_FORMATS | DOC_FORMATS | IMAGE_FORMATS | VIDEO_FORMATS
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def find_project_root(start_dir: Path) -> Path:
|
|
36
|
+
"""Find project root by looking for .claude directory."""
|
|
37
|
+
for parent in [start_dir] + list(start_dir.parents):
|
|
38
|
+
if (parent / '.claude').exists():
|
|
39
|
+
return parent
|
|
40
|
+
return start_dir
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
PROJECT_ROOT = find_project_root(Path(__file__).parent)
|
|
44
|
+
STYLES_DIR = PROJECT_ROOT / 'assets' / 'writing-styles'
|
|
45
|
+
AI_MULTIMODAL_SCRIPTS = PROJECT_ROOT / '.claude' / 'skills' / 'ai-multimodal' / 'scripts'
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def get_style_files() -> Dict[str, Any]:
|
|
49
|
+
"""List all style files in the writing-styles directory."""
|
|
50
|
+
if not STYLES_DIR.exists():
|
|
51
|
+
return {'error': f'Directory not found: {STYLES_DIR}', 'files': []}
|
|
52
|
+
|
|
53
|
+
files = []
|
|
54
|
+
for f in STYLES_DIR.iterdir():
|
|
55
|
+
if f.is_file() and f.suffix.lower() in ALL_FORMATS:
|
|
56
|
+
files.append({
|
|
57
|
+
'name': f.stem,
|
|
58
|
+
'path': str(f),
|
|
59
|
+
'type': get_file_type(f),
|
|
60
|
+
'size': f.stat().st_size
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
return {'files': sorted(files, key=lambda x: x['name']), 'directory': str(STYLES_DIR)}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
def get_file_type(file_path: Path) -> str:
|
|
67
|
+
"""Categorize file by type."""
|
|
68
|
+
ext = file_path.suffix.lower()
|
|
69
|
+
if ext in TEXT_FORMATS:
|
|
70
|
+
return 'text'
|
|
71
|
+
if ext in DOC_FORMATS:
|
|
72
|
+
return 'document'
|
|
73
|
+
if ext in IMAGE_FORMATS:
|
|
74
|
+
return 'image'
|
|
75
|
+
if ext in VIDEO_FORMATS:
|
|
76
|
+
return 'video'
|
|
77
|
+
return 'unknown'
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def extract_text_content(file_path: Path) -> str:
|
|
81
|
+
"""Extract content from text files (.md, .txt)."""
|
|
82
|
+
try:
|
|
83
|
+
return file_path.read_text(encoding='utf-8')
|
|
84
|
+
except Exception as e:
|
|
85
|
+
return f'Error reading file: {e}'
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
def extract_document_content(file_path: Path, verbose: bool = False) -> str:
|
|
89
|
+
"""Extract content from documents using document_converter.py."""
|
|
90
|
+
converter = AI_MULTIMODAL_SCRIPTS / 'document_converter.py'
|
|
91
|
+
if not converter.exists():
|
|
92
|
+
return f'Error: document_converter.py not found at {converter}'
|
|
93
|
+
|
|
94
|
+
output_file = STYLES_DIR / f'.temp_{file_path.stem}_extraction.md'
|
|
95
|
+
|
|
96
|
+
try:
|
|
97
|
+
cmd = [
|
|
98
|
+
sys.executable, str(converter),
|
|
99
|
+
'--input', str(file_path),
|
|
100
|
+
'--output', str(output_file),
|
|
101
|
+
'--prompt', '''Extract the writing style characteristics from this document.
|
|
102
|
+
Identify: tone, vocabulary, sentence structure, rhetorical devices, formatting patterns.
|
|
103
|
+
Output as structured markdown with clear sections.'''
|
|
104
|
+
]
|
|
105
|
+
if verbose:
|
|
106
|
+
cmd.append('--verbose')
|
|
107
|
+
|
|
108
|
+
result = subprocess.run(cmd, capture_output=True, text=True, timeout=300)
|
|
109
|
+
|
|
110
|
+
if output_file.exists():
|
|
111
|
+
content = output_file.read_text(encoding='utf-8')
|
|
112
|
+
output_file.unlink() # Clean up temp file
|
|
113
|
+
return content
|
|
114
|
+
else:
|
|
115
|
+
return f'Conversion failed: {result.stderr}'
|
|
116
|
+
|
|
117
|
+
except subprocess.TimeoutExpired:
|
|
118
|
+
return 'Error: Document conversion timed out'
|
|
119
|
+
except Exception as e:
|
|
120
|
+
return f'Error: {e}'
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
def extract_media_content(file_path: Path, verbose: bool = False) -> str:
|
|
124
|
+
"""Extract writing style from media using gemini_batch_process.py."""
|
|
125
|
+
processor = AI_MULTIMODAL_SCRIPTS / 'gemini_batch_process.py'
|
|
126
|
+
if not processor.exists():
|
|
127
|
+
return f'Error: gemini_batch_process.py not found at {processor}'
|
|
128
|
+
|
|
129
|
+
try:
|
|
130
|
+
prompt = '''Analyze this content and identify any writing style characteristics visible.
|
|
131
|
+
Look for: text overlays, captions, typography choices, messaging tone, branding voice.
|
|
132
|
+
Describe the writing style in terms of: tone, vocabulary level, sentence structure, key phrases.
|
|
133
|
+
Output as structured analysis.'''
|
|
134
|
+
|
|
135
|
+
cmd = [
|
|
136
|
+
sys.executable, str(processor),
|
|
137
|
+
'--files', str(file_path),
|
|
138
|
+
'--task', 'analyze',
|
|
139
|
+
'--prompt', prompt
|
|
140
|
+
]
|
|
141
|
+
|
|
142
|
+
result = subprocess.run(cmd, capture_output=True, text=True, timeout=300)
|
|
143
|
+
return result.stdout if result.stdout else result.stderr
|
|
144
|
+
|
|
145
|
+
except subprocess.TimeoutExpired:
|
|
146
|
+
return 'Error: Media analysis timed out'
|
|
147
|
+
except Exception as e:
|
|
148
|
+
return f'Error: {e}'
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
def extract_style_content(file_path: Path, verbose: bool = False) -> Dict[str, Any]:
|
|
152
|
+
"""Extract writing style content from any supported file type."""
|
|
153
|
+
if not file_path.exists():
|
|
154
|
+
return {'error': f'File not found: {file_path}'}
|
|
155
|
+
|
|
156
|
+
file_type = get_file_type(file_path)
|
|
157
|
+
|
|
158
|
+
if file_type == 'text':
|
|
159
|
+
content = extract_text_content(file_path)
|
|
160
|
+
elif file_type == 'document':
|
|
161
|
+
content = extract_document_content(file_path, verbose)
|
|
162
|
+
elif file_type in ('image', 'video'):
|
|
163
|
+
content = extract_media_content(file_path, verbose)
|
|
164
|
+
else:
|
|
165
|
+
return {'error': f'Unsupported file type: {file_path.suffix}'}
|
|
166
|
+
|
|
167
|
+
# Parse the content for style information
|
|
168
|
+
result = {
|
|
169
|
+
'file': str(file_path),
|
|
170
|
+
'type': file_type,
|
|
171
|
+
'title': '',
|
|
172
|
+
'sections': [],
|
|
173
|
+
'styles': [],
|
|
174
|
+
'rawContent': content
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
# Extract title from first H1
|
|
178
|
+
title_match = re.search(r'^#\s+(.+)$', content, re.MULTILINE)
|
|
179
|
+
if title_match:
|
|
180
|
+
result['title'] = title_match.group(1).strip()
|
|
181
|
+
|
|
182
|
+
# Extract sections (H2 headers)
|
|
183
|
+
for i, match in enumerate(re.finditer(r'^##\s+(.+)$', content, re.MULTILINE)):
|
|
184
|
+
result['sections'].append({
|
|
185
|
+
'title': match.group(1).strip(),
|
|
186
|
+
'lineNumber': content[:match.start()].count('\n') + 1
|
|
187
|
+
})
|
|
188
|
+
|
|
189
|
+
# Extract style entries from tables
|
|
190
|
+
table_pattern = r'\|.*?\|.*?\|.*?\|'
|
|
191
|
+
for match in re.finditer(table_pattern, content, re.MULTILINE):
|
|
192
|
+
row = match.group(0)
|
|
193
|
+
if '---' not in row and 'Style' not in row:
|
|
194
|
+
cols = [c.strip() for c in row.split('|') if c.strip()]
|
|
195
|
+
if len(cols) >= 2:
|
|
196
|
+
result['styles'].append({
|
|
197
|
+
'name': re.sub(r'\*+', '', cols[0]),
|
|
198
|
+
'keywords': cols[1] if len(cols) > 1 else '',
|
|
199
|
+
'description': ' | '.join(cols[2:]) if len(cols) > 2 else ''
|
|
200
|
+
})
|
|
201
|
+
|
|
202
|
+
return result
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
def format_output(data: Dict[str, Any], as_json: bool = False) -> str:
|
|
206
|
+
"""Format output for display."""
|
|
207
|
+
if as_json:
|
|
208
|
+
return json.dumps(data, indent=2, ensure_ascii=False)
|
|
209
|
+
|
|
210
|
+
if 'error' in data:
|
|
211
|
+
return f"Error: {data['error']}"
|
|
212
|
+
|
|
213
|
+
output = []
|
|
214
|
+
|
|
215
|
+
if 'files' in data:
|
|
216
|
+
# List mode
|
|
217
|
+
output.append('# Available Writing Styles\n')
|
|
218
|
+
output.append(f"Directory: {data['directory']}\n")
|
|
219
|
+
|
|
220
|
+
if not data['files']:
|
|
221
|
+
output.append('\nNo style files found. Add files to assets/writing-styles/')
|
|
222
|
+
else:
|
|
223
|
+
output.append('\n| Style | Type | Size |')
|
|
224
|
+
output.append('|---|---|---|')
|
|
225
|
+
for f in data['files']:
|
|
226
|
+
size_kb = f['size'] / 1024
|
|
227
|
+
output.append(f"| {f['name']} | {f['type']} | {size_kb:.1f}KB |")
|
|
228
|
+
|
|
229
|
+
elif 'title' in data:
|
|
230
|
+
# Single style extraction
|
|
231
|
+
if data.get('title'):
|
|
232
|
+
output.append(f"# {data['title']}\n")
|
|
233
|
+
|
|
234
|
+
output.append(f"**File Type:** {data.get('type', 'unknown')}\n")
|
|
235
|
+
|
|
236
|
+
if data.get('styles'):
|
|
237
|
+
output.append(f"\n## Extracted Styles ({len(data['styles'])})\n")
|
|
238
|
+
for s in data['styles'][:30]: # Limit to 30 styles
|
|
239
|
+
output.append(f"### {s['name']}")
|
|
240
|
+
output.append(f"**Keywords:** {s['keywords']}\n")
|
|
241
|
+
|
|
242
|
+
if data.get('sections'):
|
|
243
|
+
output.append('\n## Sections\n')
|
|
244
|
+
for s in data['sections']:
|
|
245
|
+
output.append(f"- {s['title']} (line {s['lineNumber']})")
|
|
246
|
+
|
|
247
|
+
return '\n'.join(output)
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
def main():
|
|
251
|
+
parser = argparse.ArgumentParser(
|
|
252
|
+
description='Extract writing styles from assets/writing-styles/ directory',
|
|
253
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
254
|
+
epilog='''
|
|
255
|
+
Supported formats:
|
|
256
|
+
Text: .md, .txt
|
|
257
|
+
Documents: .pdf, .docx, .xlsx, .pptx (requires GEMINI_API_KEY)
|
|
258
|
+
Images: .jpg, .jpeg, .png, .webp (requires GEMINI_API_KEY)
|
|
259
|
+
Videos: .mp4, .mov (requires GEMINI_API_KEY)
|
|
260
|
+
|
|
261
|
+
Examples:
|
|
262
|
+
python extract-writing-styles.py --list
|
|
263
|
+
python extract-writing-styles.py --style default
|
|
264
|
+
python extract-writing-styles.py --all --json
|
|
265
|
+
'''
|
|
266
|
+
)
|
|
267
|
+
|
|
268
|
+
parser.add_argument('--list', action='store_true', help='List available style files')
|
|
269
|
+
parser.add_argument('--style', type=str, help='Extract specific style by name')
|
|
270
|
+
parser.add_argument('--all', action='store_true', help='Extract all styles')
|
|
271
|
+
parser.add_argument('--json', action='store_true', help='Output as JSON')
|
|
272
|
+
parser.add_argument('--verbose', '-v', action='store_true', help='Verbose output')
|
|
273
|
+
|
|
274
|
+
args = parser.parse_args()
|
|
275
|
+
|
|
276
|
+
if args.list or (not args.style and not args.all):
|
|
277
|
+
result = get_style_files()
|
|
278
|
+
elif args.style:
|
|
279
|
+
# Find the file with matching name
|
|
280
|
+
style_files = get_style_files()
|
|
281
|
+
if 'error' in style_files:
|
|
282
|
+
result = style_files
|
|
283
|
+
else:
|
|
284
|
+
matching = [f for f in style_files['files'] if f['name'] == args.style]
|
|
285
|
+
if matching:
|
|
286
|
+
result = extract_style_content(Path(matching[0]['path']), args.verbose)
|
|
287
|
+
else:
|
|
288
|
+
result = {'error': f"Style '{args.style}' not found"}
|
|
289
|
+
elif args.all:
|
|
290
|
+
style_files = get_style_files()
|
|
291
|
+
if 'error' in style_files:
|
|
292
|
+
result = style_files
|
|
293
|
+
else:
|
|
294
|
+
result = {
|
|
295
|
+
'title': 'All Writing Styles',
|
|
296
|
+
'files': []
|
|
297
|
+
}
|
|
298
|
+
for f in style_files['files']:
|
|
299
|
+
extracted = extract_style_content(Path(f['path']), args.verbose)
|
|
300
|
+
result['files'].append({'name': f['name'], **extracted})
|
|
301
|
+
else:
|
|
302
|
+
result = get_style_files()
|
|
303
|
+
|
|
304
|
+
print(format_output(result, args.json))
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
if __name__ == '__main__':
|
|
308
|
+
main()
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Copy Brief Template
|
|
2
|
+
|
|
3
|
+
## Project Info
|
|
4
|
+
|
|
5
|
+
| Field | Value |
|
|
6
|
+
|-------|-------|
|
|
7
|
+
| Project | |
|
|
8
|
+
| Deliverable | |
|
|
9
|
+
| Due Date | |
|
|
10
|
+
| Writer | |
|
|
11
|
+
|
|
12
|
+
## Audience
|
|
13
|
+
|
|
14
|
+
**Who:**
|
|
15
|
+
**Pain points:**
|
|
16
|
+
**Goals:**
|
|
17
|
+
**Awareness level:** (Unaware / Problem-aware / Solution-aware / Product-aware)
|
|
18
|
+
|
|
19
|
+
## Copy Details
|
|
20
|
+
|
|
21
|
+
**Type:** (headline / email / landing page / ad / social)
|
|
22
|
+
**Tone:** (professional / casual / urgent / playful)
|
|
23
|
+
**Length:**
|
|
24
|
+
**Primary CTA:**
|
|
25
|
+
|
|
26
|
+
## Key Messages
|
|
27
|
+
|
|
28
|
+
1.
|
|
29
|
+
2.
|
|
30
|
+
3.
|
|
31
|
+
|
|
32
|
+
## Proof Points
|
|
33
|
+
|
|
34
|
+
-
|
|
35
|
+
-
|
|
36
|
+
|
|
37
|
+
## Constraints
|
|
38
|
+
|
|
39
|
+
- Must include:
|
|
40
|
+
- Must avoid:
|
|
41
|
+
- Brand voice notes:
|
|
42
|
+
|
|
43
|
+
## Formula to Use
|
|
44
|
+
|
|
45
|
+
[ ] AIDA [ ] PAS [ ] BAB [ ] 4Ps [ ] FAB
|
|
46
|
+
|
|
47
|
+
## Success Metrics
|
|
48
|
+
|
|
49
|
+
-
|