@rfxlamia/skillkit 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (247) hide show
  1. package/agents/agents/creative-copywriter.md +212 -0
  2. package/agents/agents/dario-amodei.md +135 -0
  3. package/agents/agents/doc-simplifier.md +63 -0
  4. package/agents/agents/kotlin-pro.md +433 -0
  5. package/agents/agents/red-team.md +136 -0
  6. package/agents/agents/sam-altman.md +121 -0
  7. package/agents/agents/seo-manager.md +184 -0
  8. package/package.json +1 -1
  9. package/skills/skillkit-help/SKILL.md +81 -0
  10. package/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
  11. package/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
  12. package/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
  13. package/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  14. package/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  15. package/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
  16. package/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  17. package/skills/skillkit-help/template/SKILL.md +52 -0
  18. package/skills/skills/adversarial-review/SKILL.md +219 -0
  19. package/skills/skills/baby-education/SKILL.md +260 -0
  20. package/skills/skills/baby-education/references/advanced-techniques.md +323 -0
  21. package/skills/skills/baby-education/references/transformations.md +345 -0
  22. package/skills/skills/been-there-done-that/SKILL.md +455 -0
  23. package/skills/skills/been-there-done-that/references/analysis-patterns.md +162 -0
  24. package/skills/skills/been-there-done-that/references/git-commands.md +132 -0
  25. package/skills/skills/been-there-done-that/references/tree-insertion-logic.md +145 -0
  26. package/skills/skills/coolhunter/SKILL.md +270 -0
  27. package/skills/skills/coolhunter/assets/elicitation-methods.csv +51 -0
  28. package/skills/skills/coolhunter/knowledge/elicitation-methods.md +312 -0
  29. package/skills/skills/coolhunter/references/workflow-execution.md +238 -0
  30. package/skills/skills/coolhunter/workflow-plan-coolhunter.md +232 -0
  31. package/skills/skills/creative-copywriting/SKILL.md +324 -0
  32. package/skills/skills/creative-copywriting/databases/README.md +60 -0
  33. package/skills/skills/creative-copywriting/databases/carousel-structures.csv +16 -0
  34. package/skills/skills/creative-copywriting/databases/emotional-arcs.csv +11 -0
  35. package/skills/skills/creative-copywriting/databases/hook-formulas.csv +51 -0
  36. package/skills/skills/creative-copywriting/databases/power-words.csv +201 -0
  37. package/skills/skills/creative-copywriting/databases/psychological-triggers.csv +21 -0
  38. package/skills/skills/creative-copywriting/databases/read-more-patterns.csv +26 -0
  39. package/skills/skills/creative-copywriting/databases/swipe-triggers.csv +31 -0
  40. package/skills/skills/creative-copywriting/references/carousel-psychology.md +223 -0
  41. package/skills/skills/creative-copywriting/references/hook-anatomy.md +169 -0
  42. package/skills/skills/creative-copywriting/references/power-word-science.md +134 -0
  43. package/skills/skills/creative-copywriting/references/storytelling-frameworks.md +157 -0
  44. package/skills/skills/diverse-content-gen/SKILL.md +201 -0
  45. package/skills/skills/diverse-content-gen/references/advanced-techniques.md +320 -0
  46. package/skills/skills/diverse-content-gen/references/research-findings.md +379 -0
  47. package/skills/skills/diverse-content-gen/references/task-workflows.md +241 -0
  48. package/skills/skills/diverse-content-gen/references/tool-integration.md +419 -0
  49. package/skills/skills/diverse-content-gen/references/troubleshooting.md +426 -0
  50. package/skills/skills/diverse-content-gen/references/vs-core-technique.md +240 -0
  51. package/skills/skills/framework-critical-thinking/SKILL.md +220 -0
  52. package/skills/skills/framework-critical-thinking/references/bias_detector.md +375 -0
  53. package/skills/skills/framework-critical-thinking/references/fallback_handler.md +239 -0
  54. package/skills/skills/framework-critical-thinking/references/memory_curator.md +161 -0
  55. package/skills/skills/framework-critical-thinking/references/metacognitive_monitor.md +297 -0
  56. package/skills/skills/framework-critical-thinking/references/producer_critic_orchestrator.md +333 -0
  57. package/skills/skills/framework-critical-thinking/references/reasoning_router.md +235 -0
  58. package/skills/skills/framework-critical-thinking/references/reasoning_validator.md +97 -0
  59. package/skills/skills/framework-critical-thinking/references/reflection_trigger.md +78 -0
  60. package/skills/skills/framework-critical-thinking/references/self_verification.md +388 -0
  61. package/skills/skills/framework-critical-thinking/references/uncertainty_quantifier.md +207 -0
  62. package/skills/skills/framework-initiative/SKILL.md +231 -0
  63. package/skills/skills/framework-initiative/references/examples.md +150 -0
  64. package/skills/skills/framework-initiative/references/impact-analysis.md +157 -0
  65. package/skills/skills/framework-initiative/references/intent-patterns.md +145 -0
  66. package/skills/skills/framework-initiative/references/star-framework.md +165 -0
  67. package/skills/skills/humanize-docs/SKILL.md +203 -0
  68. package/skills/skills/humanize-docs/references/advanced-techniques.md +13 -0
  69. package/skills/skills/humanize-docs/references/core-transformations.md +368 -0
  70. package/skills/skills/humanize-docs/references/detection-patterns.md +400 -0
  71. package/skills/skills/humanize-docs/references/examples-gallery.md +374 -0
  72. package/skills/skills/imagine/SKILL.md +190 -0
  73. package/skills/skills/imagine/references/artstyle-corporate-memphis.md +625 -0
  74. package/skills/skills/imagine/references/artstyle-crewdson-hyperrealism.md +295 -0
  75. package/skills/skills/imagine/references/artstyle-iphone-social-media.md +426 -0
  76. package/skills/skills/imagine/references/artstyle-sciencesaru.md +276 -0
  77. package/skills/skills/pre-deploy-checklist/README.md +26 -0
  78. package/skills/skills/pre-deploy-checklist/SKILL.md +153 -0
  79. package/skills/skills/pre-deploy-checklist/references/checklist-categories.md +174 -0
  80. package/skills/skills/pre-deploy-checklist/references/domain-prompts.md +216 -0
  81. package/skills/skills/prompt-engineering/SKILL.md +209 -0
  82. package/skills/skills/prompt-engineering/references/advanced-combinations.md +444 -0
  83. package/skills/skills/prompt-engineering/references/chain-of-thought.md +140 -0
  84. package/skills/skills/prompt-engineering/references/decision_matrix.md +220 -0
  85. package/skills/skills/prompt-engineering/references/few-shot.md +346 -0
  86. package/skills/skills/prompt-engineering/references/json-format.md +270 -0
  87. package/skills/skills/prompt-engineering/references/natural-language.md +420 -0
  88. package/skills/skills/prompt-engineering/references/pitfalls.md +365 -0
  89. package/skills/skills/prompt-engineering/references/prompt-chaining.md +498 -0
  90. package/skills/skills/prompt-engineering/references/react.md +108 -0
  91. package/skills/skills/prompt-engineering/references/self-consistency.md +322 -0
  92. package/skills/skills/prompt-engineering/references/tree-of-thoughts.md +386 -0
  93. package/skills/skills/prompt-engineering/references/xml-format.md +220 -0
  94. package/skills/skills/prompt-engineering/references/yaml-format.md +488 -0
  95. package/skills/skills/prompt-engineering/references/zero-shot.md +74 -0
  96. package/skills/skills/quick-spec/SKILL.md +280 -0
  97. package/skills/skills/quick-spec/assets/tech-spec-template.md +74 -0
  98. package/skills/skills/quick-spec/references/step-01-understand.md +189 -0
  99. package/skills/skills/quick-spec/references/step-02-investigate.md +144 -0
  100. package/skills/skills/quick-spec/references/step-03-generate.md +128 -0
  101. package/skills/skills/quick-spec/references/step-04-review.md +173 -0
  102. package/skills/skills/quick-spec/tests/__pycache__/test_skill.cpython-314-pytest-9.0.2.pyc +0 -0
  103. package/skills/skills/quick-spec/tests/test_scenarios.md +83 -0
  104. package/skills/skills/quick-spec/tests/test_skill.py +136 -0
  105. package/skills/skills/readme-expert/SKILL.md +538 -0
  106. package/skills/skills/readme-expert/knowledge/INDEX.md +192 -0
  107. package/skills/skills/readme-expert/knowledge/application/quality-standards.md +470 -0
  108. package/skills/skills/readme-expert/knowledge/application/script-executor.md +604 -0
  109. package/skills/skills/readme-expert/knowledge/application/template-library.md +822 -0
  110. package/skills/skills/readme-expert/knowledge/foundation/codebase-scanner.md +361 -0
  111. package/skills/skills/readme-expert/knowledge/foundation/validation-checklist.md +481 -0
  112. package/skills/skills/red-teaming/SKILL.md +321 -0
  113. package/skills/skills/red-teaming/references/ai-llm-redteam.md +517 -0
  114. package/skills/skills/red-teaming/references/attack-techniques.md +410 -0
  115. package/skills/skills/red-teaming/references/cybersecurity-redteam.md +383 -0
  116. package/skills/skills/red-teaming/references/tools-frameworks.md +446 -0
  117. package/skills/skills/releasing/.skillkit-mode +1 -0
  118. package/skills/skills/releasing/SKILL.md +225 -0
  119. package/skills/skills/releasing/references/version-detection.md +108 -0
  120. package/skills/skills/screenwriter/SKILL.md +273 -0
  121. package/skills/skills/screenwriter/references/advanced-techniques.md +216 -0
  122. package/skills/skills/screenwriter/references/pipeline-integration.md +266 -0
  123. package/skills/skills/skillkit/.claude/settings.local.json +7 -0
  124. package/skills/skills/skillkit/.claude-plugin/plugin.json +27 -0
  125. package/skills/skills/skillkit/CHANGELOG.md +484 -0
  126. package/skills/skills/skillkit/SKILL.md +511 -0
  127. package/skills/skills/skillkit/commands/skillkit.md +6 -0
  128. package/skills/skills/skillkit/commands/validate-plan.md +6 -0
  129. package/skills/skills/skillkit/commands/verify.md +6 -0
  130. package/skills/skills/skillkit/knowledge/INDEX.md +352 -0
  131. package/skills/skills/skillkit/knowledge/application/09-case-studies.md +257 -0
  132. package/skills/skills/skillkit/knowledge/application/10-technical-architecture.md +324 -0
  133. package/skills/skills/skillkit/knowledge/application/11-adoption-strategy.md +267 -0
  134. package/skills/skills/skillkit/knowledge/application/12-testing-and-validation.md +276 -0
  135. package/skills/skills/skillkit/knowledge/application/13-competitive-landscape.md +198 -0
  136. package/skills/skills/skillkit/knowledge/foundation/01-why-skills-exist.md +246 -0
  137. package/skills/skills/skillkit/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  138. package/skills/skills/skillkit/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  139. package/skills/skills/skillkit/knowledge/foundation/04-hybrid-patterns.md +308 -0
  140. package/skills/skills/skillkit/knowledge/foundation/05-token-economics.md +275 -0
  141. package/skills/skills/skillkit/knowledge/foundation/06-platform-constraints.md +237 -0
  142. package/skills/skills/skillkit/knowledge/foundation/07-security-concerns.md +322 -0
  143. package/skills/skills/skillkit/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  144. package/skills/skills/skillkit/knowledge/plugin-guide.md +614 -0
  145. package/skills/skills/skillkit/knowledge/tools/14-validation-tools-guide.md +150 -0
  146. package/skills/skills/skillkit/knowledge/tools/15-cost-tools-guide.md +157 -0
  147. package/skills/skills/skillkit/knowledge/tools/16-security-tools-guide.md +122 -0
  148. package/skills/skills/skillkit/knowledge/tools/17-pattern-tools-guide.md +161 -0
  149. package/skills/skills/skillkit/knowledge/tools/18-decision-helper-guide.md +243 -0
  150. package/skills/skills/skillkit/knowledge/tools/19-test-generator-guide.md +275 -0
  151. package/skills/skills/skillkit/knowledge/tools/20-split-skill-guide.md +149 -0
  152. package/skills/skills/skillkit/knowledge/tools/21-quality-scorer-guide.md +226 -0
  153. package/skills/skills/skillkit/knowledge/tools/22-migration-helper-guide.md +356 -0
  154. package/skills/skills/skillkit/knowledge/tools/23-subagent-creation-guide.md +448 -0
  155. package/skills/skills/skillkit/knowledge/tools/24-behavioral-testing-guide.md +122 -0
  156. package/skills/skills/skillkit/references/proposal-generation.md +982 -0
  157. package/skills/skills/skillkit/references/rationalization-catalog.md +75 -0
  158. package/skills/skills/skillkit/references/research-methodology.md +661 -0
  159. package/skills/skills/skillkit/references/section-2-full-creation-workflow.md +452 -0
  160. package/skills/skills/skillkit/references/section-3-validation-workflow-existing-skill.md +63 -0
  161. package/skills/skills/skillkit/references/section-4-decision-workflow-skills-vs-subagents.md +64 -0
  162. package/skills/skills/skillkit/references/section-5-migration-workflow-doc-to-skill.md +58 -0
  163. package/skills/skills/skillkit/references/section-6-subagent-creation-workflow.md +499 -0
  164. package/skills/skills/skillkit/references/section-7-knowledge-reference-map.md +72 -0
  165. package/skills/skills/skillkit/scripts/__pycache__/decision_helper.cpython-314.pyc +0 -0
  166. package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-312.pyc +0 -0
  167. package/skills/skills/skillkit/scripts/__pycache__/quick_validate.cpython-314.pyc +0 -0
  168. package/skills/skills/skillkit/scripts/__pycache__/test_generator.cpython-314-pytest-9.0.2.pyc +0 -0
  169. package/skills/skills/skillkit/scripts/decision_helper.py +799 -0
  170. package/skills/skills/skillkit/scripts/init_skill.py +400 -0
  171. package/skills/skills/skillkit/scripts/init_subagent.py +231 -0
  172. package/skills/skills/skillkit/scripts/migration_helper.py +669 -0
  173. package/skills/skills/skillkit/scripts/package_skill.py +211 -0
  174. package/skills/skills/skillkit/scripts/pattern_detector.py +381 -0
  175. package/skills/skills/skillkit/scripts/pattern_detector_new.py +382 -0
  176. package/skills/skills/skillkit/scripts/pressure_tester.py +157 -0
  177. package/skills/skills/skillkit/scripts/quality_scorer.py +999 -0
  178. package/skills/skills/skillkit/scripts/quick_validate.py +100 -0
  179. package/skills/skills/skillkit/scripts/security_scanner.py +474 -0
  180. package/skills/skills/skillkit/scripts/split_skill.py +540 -0
  181. package/skills/skills/skillkit/scripts/test_generator.py +695 -0
  182. package/skills/skills/skillkit/scripts/token_estimator.py +493 -0
  183. package/skills/skills/skillkit/scripts/utils/__init__.py +49 -0
  184. package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-312.pyc +0 -0
  185. package/skills/skills/skillkit/scripts/utils/__pycache__/__init__.cpython-314.pyc +0 -0
  186. package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-312.pyc +0 -0
  187. package/skills/skills/skillkit/scripts/utils/__pycache__/budget_tracker.cpython-314.pyc +0 -0
  188. package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-312.pyc +0 -0
  189. package/skills/skills/skillkit/scripts/utils/__pycache__/output_formatter.cpython-314.pyc +0 -0
  190. package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-312.pyc +0 -0
  191. package/skills/skills/skillkit/scripts/utils/__pycache__/reference_validator.cpython-314.pyc +0 -0
  192. package/skills/skills/skillkit/scripts/utils/budget_tracker.py +388 -0
  193. package/skills/skills/skillkit/scripts/utils/output_formatter.py +263 -0
  194. package/skills/skills/skillkit/scripts/utils/reference_validator.py +401 -0
  195. package/skills/skills/skillkit/scripts/validate_skill.py +594 -0
  196. package/skills/skills/skillkit/tests/test_behavioral.py +39 -0
  197. package/skills/skills/skillkit/tests/test_scenarios.md +83 -0
  198. package/skills/skills/skillkit/tests/test_skill.py +136 -0
  199. package/skills/skills/skillkit-help/SKILL.md +81 -0
  200. package/skills/skills/skillkit-help/knowledge/application/09-case-studies.md +257 -0
  201. package/skills/skills/skillkit-help/knowledge/application/12-testing-and-validation.md +276 -0
  202. package/skills/skills/skillkit-help/knowledge/foundation/01-why-skills-exist.md +246 -0
  203. package/skills/skills/skillkit-help/knowledge/foundation/02-skills-vs-subagents-comparison.md +312 -0
  204. package/skills/skills/skillkit-help/knowledge/foundation/03-skills-vs-subagents-decision-tree.md +346 -0
  205. package/skills/skills/skillkit-help/knowledge/foundation/06-platform-constraints.md +237 -0
  206. package/skills/skills/skillkit-help/knowledge/foundation/08-when-not-to-use-skills.md +270 -0
  207. package/skills/skills/skillkit-help/template/SKILL.md +52 -0
  208. package/skills/skills/social-media-seo/SKILL.md +278 -0
  209. package/skills/skills/social-media-seo/databases/caption-styles.csv +31 -0
  210. package/skills/skills/social-media-seo/databases/engagement-tactics.csv +16 -0
  211. package/skills/skills/social-media-seo/databases/hashtag-strategies.csv +21 -0
  212. package/skills/skills/social-media-seo/databases/hook-formulas.csv +26 -0
  213. package/skills/skills/social-media-seo/databases/keyword-clusters.csv +11 -0
  214. package/skills/skills/social-media-seo/databases/thread-structures.csv +26 -0
  215. package/skills/skills/social-media-seo/databases/viral-patterns.csv +21 -0
  216. package/skills/skills/social-media-seo/references/analytics-guide.md +321 -0
  217. package/skills/skills/social-media-seo/references/instagram-seo.md +235 -0
  218. package/skills/skills/social-media-seo/references/threads-seo.md +305 -0
  219. package/skills/skills/social-media-seo/references/x-twitter-seo.md +337 -0
  220. package/skills/skills/social-media-seo/scripts/query_database.py +191 -0
  221. package/skills/skills/storyteller/SKILL.md +241 -0
  222. package/skills/skills/storyteller/references/transformation-methodology.md +293 -0
  223. package/skills/skills/storyteller/references/visual-vocabulary.md +177 -0
  224. package/skills/skills/thread-pro/SKILL.md +162 -0
  225. package/skills/skills/thread-pro/anti-ai-patterns.md +120 -0
  226. package/skills/skills/thread-pro/hook-formulas.md +138 -0
  227. package/skills/skills/thread-pro/references/anti-ai-patterns.md +120 -0
  228. package/skills/skills/thread-pro/references/hook-formulas.md +138 -0
  229. package/skills/skills/thread-pro/references/thread-structures.md +240 -0
  230. package/skills/skills/thread-pro/references/voice-injection.md +130 -0
  231. package/skills/skills/thread-pro/thread-structures.md +240 -0
  232. package/skills/skills/thread-pro/voice-injection.md +130 -0
  233. package/skills/skills/tinkering/SKILL.md +251 -0
  234. package/skills/skills/tinkering/references/graduation-checklist.md +100 -0
  235. package/skills/skills/validate-plan/.skillkit-mode +1 -0
  236. package/skills/skills/validate-plan/SKILL.md +406 -0
  237. package/skills/skills/validate-plan/references/dry-principles.md +251 -0
  238. package/skills/skills/validate-plan/references/gap-analysis-guide.md +320 -0
  239. package/skills/skills/validate-plan/references/tdd-patterns.md +413 -0
  240. package/skills/skills/validate-plan/references/yagni-checklist.md +330 -0
  241. package/skills/skills/verify-before-ship/.skillkit-mode +1 -0
  242. package/skills/skills/verify-before-ship/SKILL.md +116 -0
  243. package/skills/skills/verify-before-ship/references/anti-rationalization.md +212 -0
  244. package/skills/skills/verify-before-ship/references/verification-gates.md +305 -0
  245. package/skills-manifest.json +8 -2
  246. package/src/picker.js +11 -5
  247. package/src/picker.test.js +36 -1
@@ -0,0 +1,191 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Social Media SEO Database Query Helper
4
+
5
+ Simple utility to search and filter CSV databases programmatically.
6
+ Usage:
7
+ python query_database.py caption-styles --platform instagram --goal educate
8
+ python query_database.py hook-formulas --emotion curiosity --min-conversion 5.0
9
+ python query_database.py hashtag-strategies --platform twitter
10
+ """
11
+
12
+ import csv
13
+ import sys
14
+ from pathlib import Path
15
+ from typing import List, Dict, Any
16
+
17
+
18
+ class DatabaseQuery:
19
+ """Query CSV databases with filtering capabilities."""
20
+
21
+ def __init__(self, db_path: Path):
22
+ self.db_path = db_path
23
+ self.data = []
24
+ self._load_data()
25
+
26
+ def _load_data(self):
27
+ """Load CSV data into memory."""
28
+ with open(self.db_path, 'r', encoding='utf-8') as f:
29
+ reader = csv.DictReader(f)
30
+ self.data = list(reader)
31
+
32
+ def filter(self, **kwargs) -> List[Dict[str, Any]]:
33
+ """
34
+ Filter data by column values.
35
+
36
+ Args:
37
+ **kwargs: Column name and value pairs to filter by
38
+ Use _min or _max suffix for numeric comparisons
39
+
40
+ Returns:
41
+ List of matching rows
42
+ """
43
+ results = self.data.copy()
44
+
45
+ for key, value in kwargs.items():
46
+ # Handle min/max numeric filters
47
+ if key.endswith('_min'):
48
+ col = key.replace('_min', '')
49
+ results = [r for r in results if self._to_number(r.get(col, '0')) >= value]
50
+ elif key.endswith('_max'):
51
+ col = key.replace('_max', '')
52
+ results = [r for r in results if self._to_number(r.get(col, '0')) <= value]
53
+ # Handle string filters (case-insensitive partial match)
54
+ else:
55
+ results = [r for r in results if value.lower() in r.get(key, '').lower()]
56
+
57
+ return results
58
+
59
+ def sort(self, results: List[Dict], by: str, reverse: bool = False) -> List[Dict]:
60
+ """Sort results by a column."""
61
+ return sorted(results, key=lambda x: self._to_number(x.get(by, '0')), reverse=reverse)
62
+
63
+ @staticmethod
64
+ def _to_number(value: str) -> float:
65
+ """Convert string to number, handling percentages."""
66
+ try:
67
+ # Handle percentage strings like "8.2%"
68
+ if '%' in value:
69
+ return float(value.replace('%', ''))
70
+ return float(value)
71
+ except ValueError:
72
+ return 0.0
73
+
74
+ def display(self, results: List[Dict], columns: List[str] = None, limit: int = None):
75
+ """Display results in readable format."""
76
+ if not results:
77
+ print("No results found.")
78
+ return
79
+
80
+ if limit:
81
+ results = results[:limit]
82
+
83
+ # Use specified columns or all columns
84
+ cols = columns or list(results[0].keys())
85
+
86
+ print(f"\n{'='*80}")
87
+ print(f"Found {len(results)} results")
88
+ print(f"{'='*80}\n")
89
+
90
+ for i, row in enumerate(results, 1):
91
+ print(f"Result #{i}:")
92
+ for col in cols:
93
+ if col in row and row[col]:
94
+ print(f" {col}: {row[col]}")
95
+ print()
96
+
97
+
98
+ def main():
99
+ """CLI interface for database queries."""
100
+ if len(sys.argv) < 2:
101
+ print("Usage: python query_database.py <database-name> [--filter key=value] [--sort column] [--limit N]")
102
+ print("\nAvailable databases:")
103
+ print(" caption-styles")
104
+ print(" hook-formulas")
105
+ print(" thread-structures")
106
+ print(" hashtag-strategies")
107
+ print(" viral-patterns")
108
+ print(" engagement-tactics")
109
+ print(" keyword-clusters")
110
+ print("\nExamples:")
111
+ print(" python query_database.py caption-styles --platform instagram --goal educate")
112
+ print(" python query_database.py hook-formulas --emotion curiosity --conversion_min 5.0")
113
+ print(" python query_database.py hashtag-strategies --platform twitter --sort avg_reach_boost")
114
+ sys.exit(1)
115
+
116
+ # Parse and validate database name (prevent path traversal)
117
+ db_name = sys.argv[1]
118
+
119
+ # Whitelist of valid database names
120
+ valid_databases = {
121
+ 'caption-styles', 'hook-formulas', 'thread-structures',
122
+ 'hashtag-strategies', 'viral-patterns', 'engagement-tactics',
123
+ 'keyword-clusters'
124
+ }
125
+
126
+ if db_name not in valid_databases:
127
+ print(f"Error: Invalid database name '{db_name}'")
128
+ print(f"Valid databases: {', '.join(sorted(valid_databases))}")
129
+ sys.exit(1)
130
+
131
+ # Construct safe path
132
+ script_dir = Path(__file__).resolve().parent
133
+ db_path = (script_dir.parent / 'databases' / f'{db_name}.csv').resolve()
134
+
135
+ # Verify path is within databases directory (prevent traversal)
136
+ databases_dir = (script_dir.parent / 'databases').resolve()
137
+ if not db_path.is_relative_to(databases_dir):
138
+ print(f"Error: Path traversal detected")
139
+ sys.exit(1)
140
+
141
+ if not db_path.exists():
142
+ print(f"Error: Database '{db_name}' not found at {db_path}")
143
+ sys.exit(1)
144
+
145
+ # Initialize query
146
+ query = DatabaseQuery(db_path)
147
+
148
+ # Parse filters
149
+ filters = {}
150
+ sort_by = None
151
+ limit = None
152
+
153
+ i = 2
154
+ while i < len(sys.argv):
155
+ arg = sys.argv[i]
156
+
157
+ if arg == '--sort' and i + 1 < len(sys.argv):
158
+ sort_by = sys.argv[i + 1]
159
+ i += 2
160
+ elif arg == '--limit' and i + 1 < len(sys.argv):
161
+ limit = int(sys.argv[i + 1])
162
+ i += 2
163
+ elif '=' in arg:
164
+ key, value = arg.split('=', 1)
165
+ key = key.lstrip('--')
166
+ # Try to convert to number if it looks numeric
167
+ try:
168
+ if '.' in value:
169
+ value = float(value)
170
+ elif value.isdigit():
171
+ value = int(value)
172
+ except ValueError:
173
+ pass
174
+ filters[key] = value
175
+ i += 1
176
+ else:
177
+ i += 1
178
+
179
+ # Execute query
180
+ results = query.filter(**filters)
181
+
182
+ # Sort if requested
183
+ if sort_by:
184
+ results = query.sort(results, by=sort_by, reverse=True)
185
+
186
+ # Display results
187
+ query.display(results, limit=limit)
188
+
189
+
190
+ if __name__ == '__main__':
191
+ main()
@@ -0,0 +1,241 @@
1
+ ---
2
+ name: storyteller
3
+ description: >
4
+ Transform abstract/metaphorical narrative into concrete visual story structure.
5
+
6
+ USE WHEN: Converting poetic/theatrical narrative from diverse-content-gen into
7
+ scene-by-scene visual breakdowns ready for screenwriter formatting.
8
+
9
+ PIPELINE POSITION: diverse-content-gen → **storyteller** → screenwriter → production-validator → imagine → arch-v
10
+
11
+ PRIMARY FUNCTION: Bridge the gap between "altar pribadi" (abstract metaphor) and
12
+ "woman returns daily to same beach spot" (filmable scene).
13
+
14
+ OUTPUT: Scene breakdown with concrete visual actions, preserved emotional core,
15
+ and story logic documentation.
16
+ category: creative
17
+ ---
18
+
19
+ # Storyteller Skill
20
+
21
+ ## Overview
22
+
23
+ This skill transforms metaphorical/theatrical narrative content into concrete, filmable visual stories. It serves as the critical translation layer between poetic writing and production-ready screenplay format.
24
+
25
+ **The Problem It Solves:**
26
+ ```
27
+ INPUT: "Aku menjadi laut yang membeku, menunggu pelaut yang tidak kembali"
28
+ PROBLEM: What does this LOOK LIKE on screen?
29
+ OUTPUT: Woman stands at frozen beach at dawn, staring at horizon where ship
30
+ disappeared. She places his jacket on the ice. Days pass (montage).
31
+ She returns. Always returns.
32
+ ```
33
+
34
+ **Core Principle:** Preserve emotional truth while making content filmable.
35
+
36
+ ---
37
+
38
+ ## Core Transformation Workflow
39
+
40
+ ### Step 1: Extract Emotional Core
41
+ **What does the metaphor FEEL like?**
42
+
43
+ Read the metaphorical content and identify:
44
+ - **Primary Emotion:** The dominant feeling (longing, grief, obsession, hope)
45
+ - **Emotional Intensity:** Scale 1-10, how extreme is this feeling?
46
+ - **Relationship Dynamic:** Who feels what toward whom?
47
+ - **Temporal Context:** Is this present pain, past memory, future fear?
48
+
49
+ **Example:**
50
+ ```
51
+ Metaphor: "Aku menjadikanmu altar pribadi"
52
+ Primary Emotion: Worship/devotion bordering on obsession
53
+ Intensity: 9/10 (extreme, unhealthy level)
54
+ Dynamic: Speaker → Beloved (one-directional adoration)
55
+ Temporal: Present state, ongoing condition
56
+ ```
57
+
58
+ ### Step 2: Find Visual Equivalent
59
+ **What ACTIONS show this emotion?**
60
+
61
+ Translate abstract emotion into visible behavior using this framework:
62
+
63
+ | Emotion Type | Visual Translation Strategy |
64
+ |--------------|----------------------------|
65
+ | **Longing/Waiting** | Character returns to same location repeatedly; keeps object belonging to absent person; checks phone/window/door obsessively |
66
+ | **Worship/Devotion** | Ritualistic behaviors (daily routines, shrine-like arrangements); serving without being asked; positioning self lower than object of worship |
67
+ | **Loss/Grief** | Empty spaces where person used to be; untouched belongings; inability to change/move on from environment |
68
+ | **Obsession** | Collection of items; repetitive actions; deteriorating self-care while maintaining focus on other |
69
+ | **Fear of Abandonment** | Checking behaviors; keeping lights on; sleeping in wrong positions; startling at sounds |
70
+
71
+ **Visual Vocabulary Reference:** [references/visual-vocabulary.md](references/visual-vocabulary.md)
72
+
73
+ ### Step 3: Generate Scene Breakdown
74
+ **Build filmable scenes around visual actions**
75
+
76
+ For each emotional beat in the source material:
77
+
78
+ 1. **Identify Location:** Where would this emotion naturally occur?
79
+ 2. **Define Action:** What does the character DO to show this emotion?
80
+ 3. **Select Props/Objects:** What physical items carry symbolic weight?
81
+ 4. **Establish Time:** When does this happen? (time progression matters)
82
+ 5. **Document Story Logic:** Why does this visual choice work?
83
+
84
+ **Scene Template:**
85
+ ```
86
+ SCENE [NUMBER]: [Brief Description]
87
+ Location: [Specific place]
88
+ Time: [Time of day/progression]
89
+ Action: [What character physically does]
90
+ Key Visuals: [Important visual elements]
91
+ Emotional Beat: [What audience should feel]
92
+ Story Logic: [Why this visual choice represents the metaphor]
93
+ ```
94
+
95
+ ### Step 4: Create Story Logic Map
96
+ **Document the metaphor→visual transformation**
97
+
98
+ For transparency and creative consistency, document:
99
+
100
+ ```
101
+ STORY LOGIC MAP
102
+ ===============
103
+ Original Metaphor: "..."
104
+ Emotional Core: [extracted emotion]
105
+ Visual Translation: [chosen visual representation]
106
+ Why It Works: [explanation of connection]
107
+ Alternative Considered: [what else could work]
108
+ ```
109
+
110
+ ---
111
+
112
+ ## Output Format
113
+
114
+ ### Scene Breakdown Structure
115
+
116
+ ```markdown
117
+ # Visual Story Breakdown: [Title]
118
+
119
+ ## Source Material Summary
120
+ - **Original Concept:** [From diverse-content-gen]
121
+ - **Emotional Core:** [Primary emotion identified]
122
+ - **Tone:** [Preserved from source]
123
+ - **Target Duration:** [5-10 minutes]
124
+
125
+ ## Character(s)
126
+ - **[Name]:** [Brief visual description, emotional state]
127
+
128
+ ## Scene-by-Scene Breakdown
129
+
130
+ ### Scene 1: [Title]
131
+ **Location:** [Specific, filmable location]
132
+ **Time:** [Time of day]
133
+ **Duration:** [30-60 seconds estimate]
134
+
135
+ **Visual Action:**
136
+ [Detailed description of what character does - FILMABLE actions only]
137
+
138
+ **Key Visuals:**
139
+ - [Visual element 1]
140
+ - [Visual element 2]
141
+ - [Visual element 3]
142
+
143
+ **Emotional Beat:** [What audience feels]
144
+
145
+ **Story Logic:** [How this scene translates the original metaphor]
146
+
147
+ ---
148
+
149
+ ### Scene 2: [Title]
150
+ [Continue same format...]
151
+
152
+ ---
153
+
154
+ ## Story Logic Map
155
+ | Original Metaphor | Emotional Core | Visual Translation | Why It Works |
156
+ |-------------------|----------------|-------------------|--------------|
157
+ | "..." | ... | ... | ... |
158
+
159
+ ## Technical Notes for Screenwriter
160
+ - [Any specific notes about pacing, transitions, or visual consistency]
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Transformation Guidelines
166
+
167
+ ### What Makes a Scene "Filmable"
168
+
169
+ ✅ **FILMABLE:**
170
+ - Physical actions (walking, touching, looking, moving objects)
171
+ - Observable emotions (tears, shaking, stillness, posture)
172
+ - Environmental details (weather, lighting, objects in space)
173
+ - Time progression (morning→night, seasons changing)
174
+
175
+ ❌ **NOT FILMABLE:**
176
+ - Internal thoughts ("She thinks about him")
177
+ - Abstract concepts ("Love fills the room")
178
+ - Unvisualizable metaphors ("Her heart is a frozen sea")
179
+ - Telling instead of showing ("She is sad")
180
+
181
+ ### Converting Common Metaphorical Patterns
182
+
183
+ | Metaphor Type | Visual Approach |
184
+ |---------------|-----------------|
185
+ | **"I am [element]"** (sea, fire, ice) | Show character interacting with that element; use element as setting backdrop; character's behavior mirrors element properties |
186
+ | **"You are my [sacred thing]"** (altar, god, sun) | Show ritualistic worship-like behaviors; lighting/composition that elevates the beloved; character positioning that shows devotion |
187
+ | **"I am waiting for..."** | Show passage of time; same location revisited; objects accumulated or deteriorating; physical signs of waiting |
188
+ | **"When you left..."** | Empty spaces; untouched belongings; paused activities; contrast with "before" flashbacks |
189
+
190
+ ### Detailed Methodology
191
+ For step-by-step transformation process with worked examples:
192
+ - [references/transformation-methodology.md](references/transformation-methodology.md)
193
+
194
+ ---
195
+
196
+ ## Integration with Pipeline
197
+
198
+ ### Input: diverse-content-gen Output
199
+ Expect structured narrative ideas with:
200
+ - POV, Setting, Tone, Structure already defined
201
+ - "Why This Wins" analysis (emotional hooks identified)
202
+ - Metaphorical/theatrical language
203
+ - NOT scene-by-scene yet
204
+
205
+ ### Output: Ready for Screenwriter
206
+ Provide scene breakdowns with:
207
+ - Concrete locations and times
208
+ - Physical, filmable actions
209
+ - Key visuals for each scene
210
+ - Emotional progression documented
211
+ - Story logic preserved
212
+
213
+ **Screenwriter will then:**
214
+ - Add proper screenplay formatting (sluglines, etc.)
215
+ - Wrap in XML tags for pipeline
216
+ - Add technical metadata (duration, characters list)
217
+
218
+ ---
219
+
220
+ ## Quality Checklist
221
+
222
+ Before outputting scene breakdown, verify:
223
+
224
+ - [ ] Every scene describes VISIBLE action (not internal thought)
225
+ - [ ] Emotional core from source material is preserved
226
+ - [ ] Story logic map explains all metaphor→visual translations
227
+ - [ ] Scenes follow logical time/space progression
228
+ - [ ] Total scene count appropriate for target duration (8-15 for 5-10 min)
229
+ - [ ] Key visuals are specific enough for image generation
230
+ - [ ] No unexplained jumps in emotion or location
231
+ - [ ] Tone consistency maintained throughout
232
+
233
+ ---
234
+
235
+ ## Additional Resources
236
+
237
+ ### Detailed Transformation Process
238
+ [references/transformation-methodology.md](references/transformation-methodology.md)
239
+
240
+ ### Visual Vocabulary Reference
241
+ [references/visual-vocabulary.md](references/visual-vocabulary.md)