@bgicli/bgicli 2.2.8 → 2.2.10

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 (113) hide show
  1. package/data/skills/anthropic-algorithmic-art/SKILL.md +405 -0
  2. package/data/skills/anthropic-canvas-design/SKILL.md +130 -0
  3. package/data/skills/anthropic-claude-api/SKILL.md +243 -0
  4. package/data/skills/anthropic-doc-coauthoring/SKILL.md +375 -0
  5. package/data/skills/anthropic-docx/SKILL.md +590 -0
  6. package/data/skills/anthropic-frontend-design/SKILL.md +42 -0
  7. package/data/skills/anthropic-internal-comms/SKILL.md +32 -0
  8. package/data/skills/anthropic-mcp-builder/SKILL.md +236 -0
  9. package/data/skills/anthropic-pdf/SKILL.md +314 -0
  10. package/data/skills/anthropic-pptx/SKILL.md +232 -0
  11. package/data/skills/anthropic-skill-creator/SKILL.md +485 -0
  12. package/data/skills/anthropic-webapp-testing/SKILL.md +96 -0
  13. package/data/skills/anthropic-xlsx/SKILL.md +292 -0
  14. package/data/skills/arxiv-database/SKILL.md +362 -0
  15. package/data/skills/astropy/SKILL.md +329 -0
  16. package/data/skills/ctx-advanced-evaluation/SKILL.md +402 -0
  17. package/data/skills/ctx-bdi-mental-states/SKILL.md +311 -0
  18. package/data/skills/ctx-context-compression/SKILL.md +272 -0
  19. package/data/skills/ctx-context-degradation/SKILL.md +206 -0
  20. package/data/skills/ctx-context-fundamentals/SKILL.md +201 -0
  21. package/data/skills/ctx-context-optimization/SKILL.md +195 -0
  22. package/data/skills/ctx-evaluation/SKILL.md +251 -0
  23. package/data/skills/ctx-filesystem-context/SKILL.md +287 -0
  24. package/data/skills/ctx-hosted-agents/SKILL.md +260 -0
  25. package/data/skills/ctx-memory-systems/SKILL.md +225 -0
  26. package/data/skills/ctx-multi-agent-patterns/SKILL.md +257 -0
  27. package/data/skills/ctx-project-development/SKILL.md +291 -0
  28. package/data/skills/ctx-tool-design/SKILL.md +271 -0
  29. package/data/skills/dhdna-profiler/SKILL.md +162 -0
  30. package/data/skills/generate-image/SKILL.md +183 -0
  31. package/data/skills/geomaster/SKILL.md +365 -0
  32. package/data/skills/get-available-resources/SKILL.md +275 -0
  33. package/data/skills/hamelsmu-build-review-interface/SKILL.md +96 -0
  34. package/data/skills/hamelsmu-error-analysis/SKILL.md +164 -0
  35. package/data/skills/hamelsmu-eval-audit/SKILL.md +183 -0
  36. package/data/skills/hamelsmu-evaluate-rag/SKILL.md +177 -0
  37. package/data/skills/hamelsmu-generate-synthetic-data/SKILL.md +131 -0
  38. package/data/skills/hamelsmu-validate-evaluator/SKILL.md +212 -0
  39. package/data/skills/hamelsmu-write-judge-prompt/SKILL.md +144 -0
  40. package/data/skills/hf-cli/SKILL.md +174 -0
  41. package/data/skills/hf-mcp/SKILL.md +178 -0
  42. package/data/skills/hugging-face-dataset-viewer/SKILL.md +121 -0
  43. package/data/skills/hugging-face-datasets/SKILL.md +542 -0
  44. package/data/skills/hugging-face-evaluation/SKILL.md +651 -0
  45. package/data/skills/hugging-face-jobs/SKILL.md +1042 -0
  46. package/data/skills/hugging-face-model-trainer/SKILL.md +717 -0
  47. package/data/skills/hugging-face-paper-pages/SKILL.md +239 -0
  48. package/data/skills/hugging-face-paper-publisher/SKILL.md +624 -0
  49. package/data/skills/hugging-face-tool-builder/SKILL.md +110 -0
  50. package/data/skills/hugging-face-trackio/SKILL.md +115 -0
  51. package/data/skills/hugging-face-vision-trainer/SKILL.md +593 -0
  52. package/data/skills/huggingface-gradio/SKILL.md +245 -0
  53. package/data/skills/matlab/SKILL.md +376 -0
  54. package/data/skills/modal/SKILL.md +381 -0
  55. package/data/skills/openai-cloudflare-deploy/SKILL.md +224 -0
  56. package/data/skills/openai-develop-web-game/SKILL.md +149 -0
  57. package/data/skills/openai-doc/SKILL.md +80 -0
  58. package/data/skills/openai-figma/SKILL.md +42 -0
  59. package/data/skills/openai-figma-implement-design/SKILL.md +264 -0
  60. package/data/skills/openai-gh-address-comments/SKILL.md +25 -0
  61. package/data/skills/openai-gh-fix-ci/SKILL.md +69 -0
  62. package/data/skills/openai-imagegen/SKILL.md +174 -0
  63. package/data/skills/openai-jupyter-notebook/SKILL.md +107 -0
  64. package/data/skills/openai-linear/SKILL.md +87 -0
  65. package/data/skills/openai-netlify-deploy/SKILL.md +247 -0
  66. package/data/skills/openai-notion-knowledge-capture/SKILL.md +56 -0
  67. package/data/skills/openai-notion-meeting-intelligence/SKILL.md +60 -0
  68. package/data/skills/openai-notion-research-documentation/SKILL.md +59 -0
  69. package/data/skills/openai-notion-spec-to-implementation/SKILL.md +58 -0
  70. package/data/skills/openai-openai-docs/SKILL.md +69 -0
  71. package/data/skills/openai-pdf/SKILL.md +67 -0
  72. package/data/skills/openai-playwright/SKILL.md +147 -0
  73. package/data/skills/openai-render-deploy/SKILL.md +479 -0
  74. package/data/skills/openai-screenshot/SKILL.md +267 -0
  75. package/data/skills/openai-security-best-practices/SKILL.md +86 -0
  76. package/data/skills/openai-security-ownership-map/SKILL.md +206 -0
  77. package/data/skills/openai-security-threat-model/SKILL.md +81 -0
  78. package/data/skills/openai-sentry/SKILL.md +123 -0
  79. package/data/skills/openai-sora/SKILL.md +178 -0
  80. package/data/skills/openai-speech/SKILL.md +144 -0
  81. package/data/skills/openai-spreadsheet/SKILL.md +145 -0
  82. package/data/skills/openai-transcribe/SKILL.md +81 -0
  83. package/data/skills/openai-vercel-deploy/SKILL.md +77 -0
  84. package/data/skills/openai-yeet/SKILL.md +28 -0
  85. package/data/skills/pennylane/SKILL.md +224 -0
  86. package/data/skills/polars-bio/SKILL.md +374 -0
  87. package/data/skills/primekg/SKILL.md +97 -0
  88. package/data/skills/pymatgen/SKILL.md +689 -0
  89. package/data/skills/qiskit/SKILL.md +273 -0
  90. package/data/skills/qutip/SKILL.md +316 -0
  91. package/data/skills/recursive-decomposition/SKILL.md +185 -0
  92. package/data/skills/rowan/SKILL.md +427 -0
  93. package/data/skills/scholar-evaluation/SKILL.md +298 -0
  94. package/data/skills/sentry-create-alert/SKILL.md +210 -0
  95. package/data/skills/sentry-fix-issues/SKILL.md +126 -0
  96. package/data/skills/sentry-pr-code-review/SKILL.md +105 -0
  97. package/data/skills/sentry-python-sdk/SKILL.md +317 -0
  98. package/data/skills/sentry-setup-ai-monitoring/SKILL.md +217 -0
  99. package/data/skills/stable-baselines3/SKILL.md +297 -0
  100. package/data/skills/sympy/SKILL.md +498 -0
  101. package/data/skills/trailofbits-ask-questions-if-underspecified/SKILL.md +85 -0
  102. package/data/skills/trailofbits-audit-context-building/SKILL.md +302 -0
  103. package/data/skills/trailofbits-differential-review/SKILL.md +220 -0
  104. package/data/skills/trailofbits-insecure-defaults/SKILL.md +117 -0
  105. package/data/skills/trailofbits-modern-python/SKILL.md +333 -0
  106. package/data/skills/trailofbits-property-based-testing/SKILL.md +123 -0
  107. package/data/skills/trailofbits-semgrep-rule-creator/SKILL.md +172 -0
  108. package/data/skills/trailofbits-sharp-edges/SKILL.md +292 -0
  109. package/data/skills/trailofbits-variant-analysis/SKILL.md +142 -0
  110. package/data/skills/transformers.js/SKILL.md +637 -0
  111. package/data/skills/writing/SKILL.md +419 -0
  112. package/dist/bgi.js +66 -2
  113. package/package.json +1 -1
@@ -0,0 +1,271 @@
1
+ ---
2
+ name: tool-design
3
+ description: This skill should be used when the user asks to "design agent tools", "create tool descriptions", "reduce tool complexity", "implement MCP tools", or mentions tool consolidation, architectural reduction, tool naming conventions, or agent-tool interfaces.
4
+ ---
5
+
6
+ # Tool Design for Agents
7
+
8
+ Design every tool as a contract between a deterministic system and a non-deterministic agent. Unlike human-facing APIs, agent-facing tools must make the contract unambiguous through the description alone -- agents infer intent from descriptions and generate calls that must match expected formats. Every ambiguity becomes a potential failure mode that no amount of prompt engineering can fix.
9
+
10
+ ## When to Activate
11
+
12
+ Activate this skill when:
13
+ - Creating new tools for agent systems
14
+ - Debugging tool-related failures or misuse
15
+ - Optimizing existing tool sets for better agent performance
16
+ - Designing tool APIs from scratch
17
+ - Evaluating third-party tools for agent integration
18
+ - Standardizing tool conventions across a codebase
19
+
20
+ ## Core Concepts
21
+
22
+ Design tools around the consolidation principle: if a human engineer cannot definitively say which tool should be used in a given situation, an agent cannot be expected to do better. Reduce the tool set until each tool has one unambiguous purpose, because agents select tools by comparing descriptions and any overlap introduces selection errors.
23
+
24
+ Treat every tool description as prompt engineering that shapes agent behavior. The description is not documentation for humans -- it is injected into the agent's context and directly steers reasoning. Write descriptions that answer what the tool does, when to use it, and what it returns, because these three questions are exactly what agents evaluate during tool selection.
25
+
26
+ ## Detailed Topics
27
+
28
+ ### The Tool-Agent Interface
29
+
30
+ **Tools as Contracts**
31
+ Design each tool as a self-contained contract. When humans call APIs, they read docs, understand conventions, and make appropriate requests. Agents must infer the entire contract from a single description block. Make the contract unambiguous by including format examples, expected patterns, and explicit constraints. Omit nothing that a caller needs to know, because agents cannot ask clarifying questions before making a call.
32
+
33
+ **Tool Description as Prompt**
34
+ Write tool descriptions knowing they load directly into agent context and collectively steer behavior. A vague description like "Search the database" with cryptic parameter names forces the agent to guess -- and guessing produces incorrect calls. Instead, include usage context, parameter format examples, and sensible defaults. Every word in the description either helps or hurts tool selection accuracy.
35
+
36
+ **Namespacing and Organization**
37
+ Namespace tools under common prefixes as the collection grows, because agents benefit from hierarchical grouping. When an agent needs database operations, it routes to the `db_*` namespace; when it needs web interactions, it routes to `web_*`. Without namespacing, agents must evaluate every tool in a flat list, which degrades selection accuracy as the count grows.
38
+
39
+ ### The Consolidation Principle
40
+
41
+ **Single Comprehensive Tools**
42
+ Build single comprehensive tools instead of multiple narrow tools that overlap. Rather than implementing `list_users`, `list_events`, and `create_event` separately, implement `schedule_event` that finds availability and schedules in one call. The comprehensive tool handles the full workflow internally, removing the agent's burden of chaining calls in the correct order.
43
+
44
+ **Why Consolidation Works**
45
+ Apply consolidation because agents have limited context and attention. Each tool in the collection competes for attention during tool selection, each description consumes context budget tokens, and overlapping functionality creates ambiguity. Consolidation eliminates redundant descriptions, removes selection ambiguity, and shrinks the effective tool set. Vercel demonstrated this principle by reducing their agent from 17 specialized tools to 2 general-purpose tools and achieving better performance -- fewer tools meant less confusion and more reliable tool selection.
46
+
47
+ **When Not to Consolidate**
48
+ Keep tools separate when they have fundamentally different behaviors, serve different contexts, or must be callable independently. Over-consolidation creates a different problem: a single tool with too many parameters and modes becomes hard for agents to parameterize correctly.
49
+
50
+ ### Architectural Reduction
51
+
52
+ Push the consolidation principle to its logical extreme by removing most specialized tools in favor of primitive, general-purpose capabilities. Production evidence shows this approach can outperform sophisticated multi-tool architectures.
53
+
54
+ **The File System Agent Pattern**
55
+ Provide direct file system access through a single command execution tool instead of building custom tools for data exploration, schema lookup, and query validation. The agent uses standard Unix utilities (grep, cat, find, ls) to explore and operate on the system. This works because file systems are a proven abstraction that models understand deeply, standard tools have predictable behavior, agents can chain primitives flexibly rather than being constrained to predefined workflows, and good documentation in files replaces summarization tools.
56
+
57
+ **When Reduction Outperforms Complexity**
58
+ Choose reduction when the data layer is well-documented and consistently structured, the model has sufficient reasoning capability, specialized tools were constraining rather than enabling the model, or more time is spent maintaining scaffolding than improving outcomes. Avoid reduction when underlying data is messy or poorly documented, the domain requires specialized knowledge the model lacks, safety constraints must limit agent actions, or operations genuinely benefit from structured workflows.
59
+
60
+ **Build for Future Models**
61
+ Design minimal architectures that benefit from model improvements rather than sophisticated architectures that lock in current limitations. Ask whether each tool enables new capabilities or constrains reasoning the model could handle on its own -- tools built as "guardrails" often become liabilities as models improve.
62
+
63
+ See [Architectural Reduction Case Study](./references/architectural_reduction.md) for production evidence.
64
+
65
+ ### Tool Description Engineering
66
+
67
+ **Description Structure**
68
+ Structure every tool description to answer four questions:
69
+
70
+ 1. What does the tool do? State exactly what the tool accomplishes -- avoid vague language like "helps with" or "can be used for."
71
+ 2. When should it be used? Specify direct triggers ("User asks about pricing") and indirect signals ("Need current market rates").
72
+ 3. What inputs does it accept? Describe each parameter with types, constraints, defaults, and format examples.
73
+ 4. What does it return? Document the output format, structure, successful response examples, and error conditions.
74
+
75
+ **Default Parameter Selection**
76
+ Set defaults to reflect common use cases. Defaults reduce agent burden by eliminating unnecessary parameter specification and prevent errors from omitted parameters. Choose defaults that produce useful results without requiring the agent to understand every option.
77
+
78
+ ### Response Format Optimization
79
+
80
+ Offer response format options (concise vs. detailed) because tool response size significantly impacts context usage. Concise format returns essential fields only, suitable for confirmations. Detailed format returns complete objects, suitable when full context drives decisions. Document when to use each format in the tool description so agents learn to select appropriately.
81
+
82
+ ### Error Message Design
83
+
84
+ Design error messages for two audiences: developers debugging issues and agents recovering from failures. For agents, every error message must be actionable -- it must state what went wrong and how to correct it. Include retry guidance for retryable errors, corrected format examples for input errors, and specific missing fields for incomplete requests. An error that says only "failed" provides zero recovery signal.
85
+
86
+ ### Tool Definition Schema
87
+
88
+ Establish a consistent schema across all tools. Use verb-noun pattern for tool names (`get_customer`, `create_order`), consistent parameter names across tools (always `customer_id`, never sometimes `id` and sometimes `identifier`), and consistent return field names. Consistency reduces the cognitive load on agents and improves cross-tool generalization.
89
+
90
+ ### Tool Collection Design
91
+
92
+ Limit tool collections to 10-20 tools for most applications, because research shows description overlap causes model confusion and more tools do not always lead to better outcomes. When more tools are genuinely needed, use namespacing to create logical groupings. Implement selection mechanisms: tool grouping by domain, example-based selection hints, and umbrella tools that route to specialized sub-tools.
93
+
94
+ ### MCP Tool Naming Requirements
95
+
96
+ Always use fully qualified tool names with MCP (Model Context Protocol) to avoid "tool not found" errors.
97
+
98
+ Format: `ServerName:tool_name`
99
+
100
+ ```python
101
+ # Correct: Fully qualified names
102
+ "Use the BigQuery:bigquery_schema tool to retrieve table schemas."
103
+ "Use the GitHub:create_issue tool to create issues."
104
+
105
+ # Incorrect: Unqualified names
106
+ "Use the bigquery_schema tool..." # May fail with multiple servers
107
+ ```
108
+
109
+ Without the server prefix, agents may fail to locate tools when multiple MCP servers are available. Establish naming conventions that include server context in all tool references.
110
+
111
+ ### Using Agents to Optimize Tools
112
+
113
+ Feed observed tool failures back to an agent to diagnose issues and improve descriptions. Production testing shows this approach achieves 40% reduction in task completion time by helping future agents avoid mistakes.
114
+
115
+ **The Tool-Testing Agent Pattern**:
116
+
117
+ ```python
118
+ def optimize_tool_description(tool_spec, failure_examples):
119
+ """
120
+ Use an agent to analyze tool failures and improve descriptions.
121
+
122
+ Process:
123
+ 1. Agent attempts to use tool across diverse tasks
124
+ 2. Collect failure modes and friction points
125
+ 3. Agent analyzes failures and proposes improvements
126
+ 4. Test improved descriptions against same tasks
127
+ """
128
+ prompt = f"""
129
+ Analyze this tool specification and the observed failures.
130
+
131
+ Tool: {tool_spec}
132
+
133
+ Failures observed:
134
+ {failure_examples}
135
+
136
+ Identify:
137
+ 1. Why agents are failing with this tool
138
+ 2. What information is missing from the description
139
+ 3. What ambiguities cause incorrect usage
140
+
141
+ Propose an improved tool description that addresses these issues.
142
+ """
143
+
144
+ return get_agent_response(prompt)
145
+ ```
146
+
147
+ This creates a feedback loop: agents using tools generate failure data, which agents then use to improve tool descriptions, which reduces future failures.
148
+
149
+ ### Testing Tool Design
150
+
151
+ Evaluate tool designs against five criteria: unambiguity, completeness, recoverability, efficiency, and consistency. Test by presenting representative agent requests and evaluating the resulting tool calls against expected behavior.
152
+
153
+ ## Practical Guidance
154
+
155
+ ### Tool Selection Framework
156
+
157
+ When designing tool collections:
158
+ 1. Identify distinct workflows agents must accomplish
159
+ 2. Group related actions into comprehensive tools
160
+ 3. Ensure each tool has a clear, unambiguous purpose
161
+ 4. Document error cases and recovery paths
162
+ 5. Test with actual agent interactions
163
+
164
+ ## Examples
165
+
166
+ **Example 1: Well-Designed Tool**
167
+ ```python
168
+ def get_customer(customer_id: str, format: str = "concise"):
169
+ """
170
+ Retrieve customer information by ID.
171
+
172
+ Use when:
173
+ - User asks about specific customer details
174
+ - Need customer context for decision-making
175
+ - Verifying customer identity
176
+
177
+ Args:
178
+ customer_id: Format "CUST-######" (e.g., "CUST-000001")
179
+ format: "concise" for key fields, "detailed" for complete record
180
+
181
+ Returns:
182
+ Customer object with requested fields
183
+
184
+ Errors:
185
+ NOT_FOUND: Customer ID not found
186
+ INVALID_FORMAT: ID must match CUST-###### pattern
187
+ """
188
+ ```
189
+
190
+ **Example 2: Poor Tool Design**
191
+
192
+ This example demonstrates several tool design anti-patterns:
193
+
194
+ ```python
195
+ def search(query):
196
+ """Search the database."""
197
+ pass
198
+ ```
199
+
200
+ **Problems with this design:**
201
+
202
+ 1. **Vague name**: "search" is ambiguous - search what, for what purpose?
203
+ 2. **Missing parameters**: What database? What format should query take?
204
+ 3. **No return description**: What does this function return? A list? A string? Error handling?
205
+ 4. **No usage context**: When should an agent use this versus other tools?
206
+ 5. **No error handling**: What happens if the database is unavailable?
207
+
208
+ **Failure modes:**
209
+ - Agents may call this tool when they should use a more specific tool
210
+ - Agents cannot determine correct query format
211
+ - Agents cannot interpret results
212
+ - Agents cannot recover from failures
213
+
214
+ ## Guidelines
215
+
216
+ 1. Write descriptions that answer what, when, and what returns
217
+ 2. Use consolidation to reduce ambiguity
218
+ 3. Implement response format options for token efficiency
219
+ 4. Design error messages for agent recovery
220
+ 5. Establish and follow consistent naming conventions
221
+ 6. Limit tool count and use namespacing for organization
222
+ 7. Test tool designs with actual agent interactions
223
+ 8. Iterate based on observed failure modes
224
+ 9. Question whether each tool enables or constrains the model
225
+ 10. Prefer primitive, general-purpose tools over specialized wrappers
226
+ 11. Invest in documentation quality over tooling sophistication
227
+ 12. Build minimal architectures that benefit from model improvements
228
+
229
+ ## Gotchas
230
+
231
+ 1. **Vague descriptions**: Descriptions like "Search the database for customer information" leave too many questions unanswered. State the exact database, query format, and return shape.
232
+ 2. **Cryptic parameter names**: Parameters named `x`, `val`, or `param1` force agents to guess meaning. Use descriptive names that convey purpose without reading further documentation.
233
+ 3. **Missing error recovery guidance**: Tools that fail with generic messages like "Error occurred" provide no recovery signal. Every error response must tell the agent what went wrong and what to try next.
234
+ 4. **Inconsistent naming across tools**: Using `id` in one tool, `identifier` in another, and `customer_id` in a third creates confusion. Standardize parameter names across the entire tool collection.
235
+ 5. **MCP namespace collisions**: When multiple MCP tool providers register tools with similar names (e.g., two servers both exposing `search`), agents cannot disambiguate. Always use fully qualified `ServerName:tool_name` format and audit for collisions when adding new providers.
236
+ 6. **Tool description rot**: Descriptions become inaccurate as underlying APIs evolve -- parameters get added, return formats change, error codes shift. Treat descriptions as code: version them, review them during API changes, and test them against current behavior.
237
+ 7. **Over-consolidation**: Making a single tool handle too many workflows produces parameter lists so large that agents struggle to select the right combination. If a tool requires more than 8-10 parameters or serves fundamentally different use cases, split it.
238
+ 8. **Parameter explosion**: Too many optional parameters overwhelm agent decision-making. Each parameter the agent must evaluate adds cognitive load. Provide sensible defaults, group related options into format presets, and move rarely-used parameters into an `options` object.
239
+ 9. **Missing error context**: Error messages that say only "failed" or "invalid input" without specifying which input, why it failed, or what a valid input looks like leave agents unable to self-correct. Include the invalid value, the expected format, and a concrete example in every error response.
240
+
241
+ ## Integration
242
+
243
+ This skill connects to:
244
+ - context-fundamentals - How tools interact with context
245
+ - multi-agent-patterns - Specialized tools per agent
246
+ - evaluation - Evaluating tool effectiveness
247
+
248
+ ## References
249
+
250
+ Internal references:
251
+ - [Best Practices Reference](./references/best_practices.md) - Read when: designing a new tool from scratch or auditing an existing tool collection for quality gaps
252
+ - [Architectural Reduction Case Study](./references/architectural_reduction.md) - Read when: considering removing specialized tools in favor of primitives, or evaluating whether a complex tool architecture is justified
253
+
254
+ Related skills in this collection:
255
+ - context-fundamentals - Tool context interactions
256
+ - evaluation - Tool testing patterns
257
+
258
+ External resources:
259
+ - MCP (Model Context Protocol) documentation - Read when: implementing tools for multi-server agent environments or debugging tool routing failures
260
+ - Framework tool conventions - Read when: adopting a new agent framework and need to map tool design principles to framework-specific APIs
261
+ - API design best practices for agents - Read when: translating existing human-facing APIs into agent-facing tool interfaces
262
+ - Vercel d0 agent architecture case study - Read when: evaluating whether to consolidate tools or seeking production evidence for architectural reduction
263
+
264
+ ---
265
+
266
+ ## Skill Metadata
267
+
268
+ **Created**: 2025-12-20
269
+ **Last Updated**: 2026-03-17
270
+ **Author**: Agent Skills for Context Engineering Contributors
271
+ **Version**: 2.0.0
@@ -0,0 +1,162 @@
1
+ ---
2
+ name: dhdna-profiler
3
+ description: Extract cognitive patterns and thinking fingerprints from any text. Use this skill when the user wants to analyze how someone thinks, understand cognitive style, profile writing or speech patterns, compare thinking styles between people, asks "what's my thinking style", "analyze how this person reasons", "cognitive profile", "thinking pattern", "DHDNA", "digital DNA", or wants to understand the mind behind any text. Also trigger when the user provides text and wants deeper insight into the author's reasoning patterns, decision-making style, or cognitive signature.
4
+ allowed-tools: Read Write
5
+ license: MIT license
6
+ metadata:
7
+ skill-author: AHK Strategies (ashrafkahoush-ux)
8
+ ---
9
+
10
+ # DHDNA Profiler — Cognitive Pattern Extraction
11
+
12
+ A structured system for extracting the cognitive fingerprint of any text's author. Based on the Digital Human DNA (DHDNA) framework — the theory that every mind has a unique signature pattern expressed through how it reasons, decides, values, and communicates.
13
+
14
+ Published research: [DHDNA Pre-print (DOI: 10.5281/zenodo.18736629)](https://doi.org/10.5281/zenodo.18736629) | [IDNA Consolidation v2 (DOI: 10.5281/zenodo.18807387)](https://doi.org/10.5281/zenodo.18807387)
15
+
16
+ ## Core Concept
17
+
18
+ Just as biological DNA encodes physical identity through base pairs, Digital Human DNA encodes cognitive identity through thinking patterns. Every person's combination of analytical depth, creative range, emotional processing, strategic thinking, and ethical reasoning creates a **unique cognitive signature** — as distinctive as a fingerprint.
19
+
20
+ The profiler doesn't judge thinking as "good" or "bad." It maps the topology of how a mind works.
21
+
22
+ ## The 12 Cognitive Dimensions
23
+
24
+ When profiling text, score each dimension on a 1–10 scale based on evidence in the text:
25
+
26
+ | # | Dimension | What It Measures | Low Score (1-3) | High Score (8-10) |
27
+ | --- | ------------------------ | ---------------------------------------------------------------- | ---------------------------------- | ------------------------------------------- |
28
+ | 1 | **Analytical Depth** | Logical rigor, structured reasoning, causal chains | Intuitive, holistic, pattern-based | Systematic, proof-oriented, precise |
29
+ | 2 | **Creative Range** | Novelty of connections, metaphor use, lateral thinking | Conventional, incremental | Paradigm-breaking, cross-domain synthesis |
30
+ | 3 | **Emotional Processing** | Emotional vocabulary, empathy signals, affect integration | Detached, clinical | Emotionally rich, feeling-integrated |
31
+ | 4 | **Linguistic Precision** | Vocabulary sophistication, sentence architecture, rhetoric | Simple, direct | Architecturally complex, nuanced |
32
+ | 5 | **Ethical Reasoning** | Values signals, fairness concern, consequence awareness | Pragmatic, outcome-focused | Principle-driven, justice-oriented |
33
+ | 6 | **Strategic Thinking** | Long-term planning, competitive awareness, resource optimization | Tactical, reactive | Multi-move, game-theoretic |
34
+ | 7 | **Memory Integration** | Reference to past experience, historical patterns, continuity | Present-focused | Deep historical awareness, precedent-driven |
35
+ | 8 | **Social Intelligence** | Audience awareness, perspective-taking, relational framing | Self-referential | Deeply other-aware, coalition-building |
36
+ | 9 | **Domain Expertise** | Technical depth, specialized knowledge, jargon confidence | Generalist | Deep specialist |
37
+ | 10 | **Intuitive Reasoning** | Gut-feel signals, heuristic shortcuts, pattern leaps | Methodical, step-by-step | Leap-of-faith, insight-driven |
38
+ | 11 | **Temporal Orientation** | Time-horizon of thinking — past, present, or future focus | Present-anchored | Time-spanning, historical-to-futurist |
39
+ | 12 | **Metacognition** | Self-awareness of own thinking, uncertainty acknowledgment | Unreflective | Deeply self-aware, thinks about thinking |
40
+
41
+ ### The 6 Tension Pairs
42
+
43
+ Dimensions exist in tension — high scores on one often correlate with lower scores on its pair. These tensions ARE the cognitive signature:
44
+
45
+ | Pair | Tension | What It Reveals |
46
+ | -------------- | -------------------------- | ---------------------------------------------------------------------- |
47
+ | DIM 1 ↔ DIM 10 | Analytical ↔ Intuitive | Logic vs. Gut — how the mind reaches conclusions |
48
+ | DIM 3 ↔ DIM 6 | Emotional ↔ Strategic | Heart vs. Head — what drives decisions |
49
+ | DIM 2 ↔ DIM 5 | Creative ↔ Ethical | Freedom vs. Framework — innovation within or beyond rules |
50
+ | DIM 4 ↔ DIM 12 | Linguistic ↔ Metacognitive | Expression vs. Self-Awareness — external craft vs. internal reflection |
51
+ | DIM 7 ↔ DIM 11 | Memory ↔ Temporal | Past vs. Time Itself — experience vs. time-horizon |
52
+ | DIM 8 ↔ DIM 9 | Social ↔ Domain | Breadth vs. Depth — people skills vs. technical mastery |
53
+
54
+ ## How to Profile
55
+
56
+ ### Phase 1 — Evidence Collection
57
+
58
+ Read the text carefully. For each dimension, identify **specific textual evidence**:
59
+
60
+ - Direct quotes that demonstrate the dimension
61
+ - Structural patterns (how arguments are built)
62
+ - What's present AND what's absent (gaps reveal as much as content)
63
+ - Recurring patterns across multiple passages
64
+
65
+ ### Phase 2 — Scoring
66
+
67
+ For each of the 12 dimensions:
68
+
69
+ 1. Score 1-10 based on evidence
70
+ 2. Cite the strongest textual evidence for that score
71
+ 3. Flag confidence level: HIGH (multiple clear signals), MEDIUM (some signals), LOW (inferred)
72
+
73
+ ### Phase 3 — Pattern Synthesis
74
+
75
+ After scoring, identify:
76
+
77
+ **Dominant Pattern:** The 2-3 highest-scoring dimensions — this is the mind's "home base"
78
+
79
+ **Shadow Pattern:** The 2-3 lowest-scoring dimensions — this is where the mind doesn't naturally go
80
+
81
+ **Signature Tensions:** Which tension pairs show the widest gap? These define the cognitive style more than any individual score.
82
+
83
+ **Reasoning Topology:** How does the mind move through ideas?
84
+
85
+ - Linear (A → B → C → conclusion)
86
+ - Spiral (approaches the same idea from multiple angles, each time deeper)
87
+ - Web (connects disparate domains into synthesis)
88
+ - Dialectic (thesis → antithesis → synthesis)
89
+ - Fractal (same pattern at micro and macro levels)
90
+
91
+ **Decision Fingerprint:** When facing choices, does this mind:
92
+
93
+ - Analyze first, then decide? (Analytical-dominant)
94
+ - Feel first, then rationalize? (Emotional-dominant)
95
+ - Envision the outcome first, then work backward? (Strategic-dominant)
96
+ - Question the question itself? (Metacognitive-dominant)
97
+
98
+ ### Phase 4 — Profile Output
99
+
100
+ Present the profile as:
101
+
102
+ ```
103
+ ═══════════════════════════════════════════
104
+ DHDNA COGNITIVE PROFILE
105
+ Subject: [Name or "Anonymous"]
106
+ Text analyzed: [N words / N paragraphs]
107
+ Confidence: [HIGH / MEDIUM / LOW]
108
+ ═══════════════════════════════════════════
109
+
110
+ DIMENSION SCORES:
111
+ 1. Analytical Depth ···· [█████████·] 9/10
112
+ 2. Creative Range ······ [███████···] 7/10
113
+ ... (all 12)
114
+
115
+ TENSION MAP:
116
+ Analytical ████████░░ ↔ ░░████████ Intuitive
117
+ Emotional ███░░░░░░░ ↔ ░░░░░░████ Strategic
118
+ ... (all 6 pairs)
119
+
120
+ DOMINANT PATTERN: [Top 2-3 dimensions]
121
+ SHADOW PATTERN: [Bottom 2-3 dimensions]
122
+ REASONING TOPOLOGY: [Linear / Spiral / Web / Dialectic / Fractal]
123
+ DECISION FINGERPRINT: [Analyze-first / Feel-first / Envision-first / Question-first]
124
+
125
+ NARRATIVE SYNTHESIS:
126
+ [2-3 paragraph natural language description of how this mind works,
127
+ what makes it distinctive, and what it might miss]
128
+
129
+ KEY QUOTES:
130
+ [3-5 most revealing quotes with dimension attribution]
131
+ ═══════════════════════════════════════════
132
+ ```
133
+
134
+ ## Comparison Mode
135
+
136
+ When the user provides two or more texts from different authors, produce individual profiles and then a **comparison synthesis**:
137
+
138
+ - Where do the minds converge? (shared high dimensions)
139
+ - Where do they diverge? (opposing scores on the same dimension)
140
+ - Which tension pairs would create productive disagreement?
141
+ - If these minds were in a room together, what would the conversation look like?
142
+
143
+ ## Self-Profile Mode
144
+
145
+ If the user asks to profile their own thinking (using the conversation history as text), be transparent:
146
+
147
+ - Score based on the conversation so far
148
+ - Acknowledge that conversational text may not represent the full range
149
+ - Note that people often think differently when writing for an AI vs. writing for humans
150
+ - Offer to re-profile if the user provides other writing samples
151
+
152
+ ## What This Is NOT
153
+
154
+ - Not a personality test (MBTI, Big Five, etc.) — those measure behavioral tendencies, DHDNA measures cognitive architecture
155
+ - Not a judgment of intelligence — a chess grandmaster and a poet may score very differently but both demonstrate profound cognitive capability
156
+ - Not static — a person's DHDNA evolves as they learn, experience, and grow. A profile is a snapshot, not a destiny.
157
+
158
+ ## Built By
159
+
160
+ [AHK Strategies](https://ahkstrategies.net) — AI Horizon Knowledge
161
+ Full platform: [themindbook.app](https://themindbook.app)
162
+ Research: [DHDNA Paper (DOI: 10.5281/zenodo.18736629)](https://doi.org/10.5281/zenodo.18736629)
@@ -0,0 +1,183 @@
1
+ ---
2
+ name: generate-image
3
+ description: Generate or edit images using AI models (FLUX, Nano Banana 2). Use for general-purpose image generation including photos, illustrations, artwork, visual assets, concept art, and any image that is not a technical diagram or schematic. For flowcharts, circuits, pathways, and technical diagrams, use the scientific-schematics skill instead.
4
+ license: MIT license
5
+ compatibility: Requires an OpenRouter API key
6
+ metadata:
7
+ skill-author: K-Dense Inc.
8
+ ---
9
+
10
+ # Generate Image
11
+
12
+ Generate and edit high-quality images using OpenRouter's image generation models including FLUX.2 Pro and Gemini 3.1 Flash Image Preview.
13
+
14
+ ## When to Use This Skill
15
+
16
+ **Use generate-image for:**
17
+ - Photos and photorealistic images
18
+ - Artistic illustrations and artwork
19
+ - Concept art and visual concepts
20
+ - Visual assets for presentations or documents
21
+ - Image editing and modifications
22
+ - Any general-purpose image generation needs
23
+
24
+ **Use scientific-schematics instead for:**
25
+ - Flowcharts and process diagrams
26
+ - Circuit diagrams and electrical schematics
27
+ - Biological pathways and signaling cascades
28
+ - System architecture diagrams
29
+ - CONSORT diagrams and methodology flowcharts
30
+ - Any technical/schematic diagrams
31
+
32
+ ## Quick Start
33
+
34
+ Use the `scripts/generate_image.py` script to generate or edit images:
35
+
36
+ ```bash
37
+ # Generate a new image
38
+ python scripts/generate_image.py "A beautiful sunset over mountains"
39
+
40
+ # Edit an existing image
41
+ python scripts/generate_image.py "Make the sky purple" --input photo.jpg
42
+ ```
43
+
44
+ This generates/edits an image and saves it as `generated_image.png` in the current directory.
45
+
46
+ ## API Key Setup
47
+
48
+ **CRITICAL**: The script requires an OpenRouter API key. Before running, check if the user has configured their API key:
49
+
50
+ 1. Look for a `.env` file in the project directory or parent directories
51
+ 2. Check for `OPENROUTER_API_KEY=<key>` in the `.env` file
52
+ 3. If not found, inform the user they need to:
53
+ - Create a `.env` file with `OPENROUTER_API_KEY=your-api-key-here`
54
+ - Or set the environment variable: `export OPENROUTER_API_KEY=your-api-key-here`
55
+ - Get an API key from: https://openrouter.ai/keys
56
+
57
+ The script will automatically detect the `.env` file and provide clear error messages if the API key is missing.
58
+
59
+ ## Model Selection
60
+
61
+ **Default model**: `google/gemini-3.1-flash-image-preview` (high quality, recommended)
62
+
63
+ **Available models for generation and editing**:
64
+ - `google/gemini-3.1-flash-image-preview` - High quality, supports generation + editing
65
+ - `black-forest-labs/flux.2-pro` - Fast, high quality, supports generation + editing
66
+
67
+ **Generation only**:
68
+ - `black-forest-labs/flux.2-flex` - Fast and cheap, but not as high quality as pro
69
+
70
+ Select based on:
71
+ - **Quality**: Use gemini-3.1-flash-image-preview or flux.2-pro
72
+ - **Editing**: Use gemini-3.1-flash-image-preview or flux.2-pro (both support image editing)
73
+ - **Cost**: Use flux.2-flex for generation only
74
+
75
+ ## Common Usage Patterns
76
+
77
+ ### Basic generation
78
+ ```bash
79
+ python scripts/generate_image.py "Your prompt here"
80
+ ```
81
+
82
+ ### Specify model
83
+ ```bash
84
+ python scripts/generate_image.py "A cat in space" --model "black-forest-labs/flux.2-pro"
85
+ ```
86
+
87
+ ### Custom output path
88
+ ```bash
89
+ python scripts/generate_image.py "Abstract art" --output artwork.png
90
+ ```
91
+
92
+ ### Edit an existing image
93
+ ```bash
94
+ python scripts/generate_image.py "Make the background blue" --input photo.jpg
95
+ ```
96
+
97
+ ### Edit with a specific model
98
+ ```bash
99
+ python scripts/generate_image.py "Add sunglasses to the person" --input portrait.png --model "black-forest-labs/flux.2-pro"
100
+ ```
101
+
102
+ ### Edit with custom output
103
+ ```bash
104
+ python scripts/generate_image.py "Remove the text from the image" --input screenshot.png --output cleaned.png
105
+ ```
106
+
107
+ ### Multiple images
108
+ Run the script multiple times with different prompts or output paths:
109
+ ```bash
110
+ python scripts/generate_image.py "Image 1 description" --output image1.png
111
+ python scripts/generate_image.py "Image 2 description" --output image2.png
112
+ ```
113
+
114
+ ## Script Parameters
115
+
116
+ - `prompt` (required): Text description of the image to generate, or editing instructions
117
+ - `--input` or `-i`: Input image path for editing (enables edit mode)
118
+ - `--model` or `-m`: OpenRouter model ID (default: google/gemini-3.1-flash-image-preview)
119
+ - `--output` or `-o`: Output file path (default: generated_image.png)
120
+ - `--api-key`: OpenRouter API key (overrides .env file)
121
+
122
+ ## Example Use Cases
123
+
124
+ ### For Scientific Documents
125
+ ```bash
126
+ # Generate a conceptual illustration for a paper
127
+ python scripts/generate_image.py "Microscopic view of cancer cells being attacked by immunotherapy agents, scientific illustration style" --output figures/immunotherapy_concept.png
128
+
129
+ # Create a visual for a presentation
130
+ python scripts/generate_image.py "DNA double helix structure with highlighted mutation site, modern scientific visualization" --output slides/dna_mutation.png
131
+ ```
132
+
133
+ ### For Presentations and Posters
134
+ ```bash
135
+ # Title slide background
136
+ python scripts/generate_image.py "Abstract blue and white background with subtle molecular patterns, professional presentation style" --output slides/background.png
137
+
138
+ # Poster hero image
139
+ python scripts/generate_image.py "Laboratory setting with modern equipment, photorealistic, well-lit" --output poster/hero.png
140
+ ```
141
+
142
+ ### For General Visual Content
143
+ ```bash
144
+ # Website or documentation images
145
+ python scripts/generate_image.py "Professional team collaboration around a digital whiteboard, modern office" --output docs/team_collaboration.png
146
+
147
+ # Marketing materials
148
+ python scripts/generate_image.py "Futuristic AI brain concept with glowing neural networks" --output marketing/ai_concept.png
149
+ ```
150
+
151
+ ## Error Handling
152
+
153
+ The script provides clear error messages for:
154
+ - Missing API key (with setup instructions)
155
+ - API errors (with status codes)
156
+ - Unexpected response formats
157
+ - Missing dependencies (requests library)
158
+
159
+ If the script fails, read the error message and address the issue before retrying.
160
+
161
+ ## Notes
162
+
163
+ - Images are returned as base64-encoded data URLs and automatically saved as PNG files
164
+ - The script supports both `images` and `content` response formats from different OpenRouter models
165
+ - Generation time varies by model (typically 5-30 seconds)
166
+ - For image editing, the input image is encoded as base64 and sent to the model
167
+ - Supported input image formats: PNG, JPEG, GIF, WebP
168
+ - Check OpenRouter pricing for cost information: https://openrouter.ai/models
169
+
170
+ ## Image Editing Tips
171
+
172
+ - Be specific about what changes you want (e.g., "change the sky to sunset colors" vs "edit the sky")
173
+ - Reference specific elements in the image when possible
174
+ - For best results, use clear and detailed editing instructions
175
+ - Both Gemini 3.1 Flash Image Preview and FLUX.2 Pro support image editing through OpenRouter
176
+
177
+ ## Integration with Other Skills
178
+
179
+ - **scientific-schematics**: Use for technical diagrams, flowcharts, circuits, pathways
180
+ - **generate-image**: Use for photos, illustrations, artwork, visual concepts
181
+ - **scientific-slides**: Combine with generate-image for visually rich presentations
182
+ - **latex-posters**: Use generate-image for poster visuals and hero images
183
+