skillware 0.2.9__tar.gz → 0.3.2__tar.gz

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 (87) hide show
  1. {skillware-0.2.9/skillware.egg-info → skillware-0.3.2}/PKG-INFO +73 -34
  2. {skillware-0.2.9 → skillware-0.3.2}/README.md +70 -31
  3. {skillware-0.2.9 → skillware-0.3.2}/pyproject.toml +3 -3
  4. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/mica_module/manifest.yaml +2 -1
  5. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/mica_module/skill.py +38 -6
  6. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/pii_masker/manifest.yaml +1 -0
  7. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/tos_evaluator/manifest.yaml +1 -0
  8. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/tos_evaluator/skill.py +12 -9
  9. skillware-0.3.2/skills/data_engineering/novelty_extractor/__init__.py +3 -0
  10. skillware-0.3.2/skills/data_engineering/novelty_extractor/card.json +37 -0
  11. skillware-0.3.2/skills/data_engineering/novelty_extractor/instructions.md +60 -0
  12. skillware-0.3.2/skills/data_engineering/novelty_extractor/manifest.yaml +46 -0
  13. skillware-0.3.2/skills/data_engineering/novelty_extractor/skill.py +111 -0
  14. skillware-0.3.2/skills/data_engineering/novelty_extractor/test_skill.py +105 -0
  15. {skillware-0.2.9 → skillware-0.3.2}/skills/data_engineering/synthetic_generator/manifest.yaml +1 -0
  16. {skillware-0.2.9 → skillware-0.3.2}/skills/data_engineering/synthetic_generator/skill.py +8 -9
  17. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/issue_resolver/manifest.yaml +1 -0
  18. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/manifest.yaml +1 -0
  19. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/skill.py +90 -44
  20. {skillware-0.2.9 → skillware-0.3.2}/skills/office/pdf_form_filler/manifest.yaml +1 -0
  21. {skillware-0.2.9 → skillware-0.3.2}/skills/optimization/prompt_rewriter/manifest.yaml +1 -0
  22. skillware-0.3.2/skillware/cli.py +299 -0
  23. {skillware-0.2.9 → skillware-0.3.2}/skillware/core/loader.py +16 -5
  24. {skillware-0.2.9 → skillware-0.3.2/skillware.egg-info}/PKG-INFO +73 -34
  25. {skillware-0.2.9 → skillware-0.3.2}/skillware.egg-info/SOURCES.txt +6 -0
  26. {skillware-0.2.9 → skillware-0.3.2}/skillware.egg-info/requires.txt +2 -2
  27. {skillware-0.2.9 → skillware-0.3.2}/tests/test_cli.py +82 -1
  28. skillware-0.2.9/skillware/cli.py +0 -162
  29. {skillware-0.2.9 → skillware-0.3.2}/LICENSE +0 -0
  30. {skillware-0.2.9 → skillware-0.3.2}/MANIFEST.in +0 -0
  31. {skillware-0.2.9 → skillware-0.3.2}/setup.cfg +0 -0
  32. {skillware-0.2.9 → skillware-0.3.2}/skills/__init__.py +0 -0
  33. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/__init__.py +0 -0
  34. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/mica_module/__init__.py +0 -0
  35. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/mica_module/card.json +0 -0
  36. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/mica_module/instructions.md +0 -0
  37. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/mica_module/mica_corpus.json +0 -0
  38. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/pii_masker/__init__.py +0 -0
  39. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/pii_masker/card.json +0 -0
  40. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/pii_masker/instructions.md +0 -0
  41. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/pii_masker/skill.py +0 -0
  42. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/tos_evaluator/__init__.py +0 -0
  43. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/tos_evaluator/card.json +0 -0
  44. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/tos_evaluator/instructions.md +0 -0
  45. {skillware-0.2.9 → skillware-0.3.2}/skills/compliance/tos_evaluator/test_skill.py +0 -0
  46. {skillware-0.2.9 → skillware-0.3.2}/skills/data_engineering/__init__.py +0 -0
  47. {skillware-0.2.9 → skillware-0.3.2}/skills/data_engineering/synthetic_generator/__init__.py +0 -0
  48. {skillware-0.2.9 → skillware-0.3.2}/skills/data_engineering/synthetic_generator/card.json +0 -0
  49. {skillware-0.2.9 → skillware-0.3.2}/skills/data_engineering/synthetic_generator/instructions.md +0 -0
  50. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/__init__.py +0 -0
  51. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/issue_resolver/__init__.py +0 -0
  52. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/issue_resolver/card.json +0 -0
  53. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/issue_resolver/instructions.md +0 -0
  54. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/issue_resolver/skill.py +0 -0
  55. {skillware-0.2.9 → skillware-0.3.2}/skills/dev_tools/issue_resolver/test_skill.py +0 -0
  56. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/__init__.py +0 -0
  57. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/__init__.py +0 -0
  58. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/card.json +0 -0
  59. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/data/entities.ftm.json +0 -0
  60. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/data/malicious_scs_2025.json +0 -0
  61. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/data/normalized_fbi_lazarus_20250722_180019.json +0 -0
  62. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/data/normalized_israel_nbctf_20250722_180019.json +0 -0
  63. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/data/normalized_uniswap_trm.json +0 -0
  64. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/instructions.md +0 -0
  65. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/maintenance/normalization_tool.py +0 -0
  66. {skillware-0.2.9 → skillware-0.3.2}/skills/finance/wallet_screening/maintenance/normalize_uniswap_trm.py +0 -0
  67. {skillware-0.2.9 → skillware-0.3.2}/skills/office/__init__.py +0 -0
  68. {skillware-0.2.9 → skillware-0.3.2}/skills/office/pdf_form_filler/__init__.py +0 -0
  69. {skillware-0.2.9 → skillware-0.3.2}/skills/office/pdf_form_filler/card.json +0 -0
  70. {skillware-0.2.9 → skillware-0.3.2}/skills/office/pdf_form_filler/instructions.md +0 -0
  71. {skillware-0.2.9 → skillware-0.3.2}/skills/office/pdf_form_filler/skill.py +0 -0
  72. {skillware-0.2.9 → skillware-0.3.2}/skills/office/pdf_form_filler/utils.py +0 -0
  73. {skillware-0.2.9 → skillware-0.3.2}/skills/optimization/__init__.py +0 -0
  74. {skillware-0.2.9 → skillware-0.3.2}/skills/optimization/prompt_rewriter/__init__.py +0 -0
  75. {skillware-0.2.9 → skillware-0.3.2}/skills/optimization/prompt_rewriter/card.json +0 -0
  76. {skillware-0.2.9 → skillware-0.3.2}/skills/optimization/prompt_rewriter/instructions.md +0 -0
  77. {skillware-0.2.9 → skillware-0.3.2}/skills/optimization/prompt_rewriter/skill.py +0 -0
  78. {skillware-0.2.9 → skillware-0.3.2}/skillware/__init__.py +0 -0
  79. {skillware-0.2.9 → skillware-0.3.2}/skillware/core/__init__.py +0 -0
  80. {skillware-0.2.9 → skillware-0.3.2}/skillware/core/base_skill.py +0 -0
  81. {skillware-0.2.9 → skillware-0.3.2}/skillware/core/env.py +0 -0
  82. {skillware-0.2.9 → skillware-0.3.2}/skillware.egg-info/dependency_links.txt +0 -0
  83. {skillware-0.2.9 → skillware-0.3.2}/skillware.egg-info/entry_points.txt +0 -0
  84. {skillware-0.2.9 → skillware-0.3.2}/skillware.egg-info/top_level.txt +0 -0
  85. {skillware-0.2.9 → skillware-0.3.2}/tests/test_loader.py +0 -0
  86. {skillware-0.2.9 → skillware-0.3.2}/tests/test_mica_module.py +0 -0
  87. {skillware-0.2.9 → skillware-0.3.2}/tests/test_skill_issuer.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skillware
3
- Version: 0.2.9
3
+ Version: 0.3.2
4
4
  Summary: A framework for modular, self-contained AI skills.
5
5
  Author-email: ARPA Hellenic Logical Systems <skillware-os@arpacorp.net>
6
6
  License: MIT License
@@ -45,7 +45,7 @@ Requires-Dist: black; extra == "dev"
45
45
  Provides-Extra: cli
46
46
  Requires-Dist: rich>=13.0; extra == "cli"
47
47
  Provides-Extra: gemini
48
- Requires-Dist: google-generativeai; extra == "gemini"
48
+ Requires-Dist: google-genai; extra == "gemini"
49
49
  Provides-Extra: claude
50
50
  Requires-Dist: anthropic; extra == "claude"
51
51
  Provides-Extra: openai
@@ -54,7 +54,7 @@ Provides-Extra: office
54
54
  Requires-Dist: pymupdf; extra == "office"
55
55
  Provides-Extra: all
56
56
  Requires-Dist: rich>=13.0; extra == "all"
57
- Requires-Dist: google-generativeai; extra == "all"
57
+ Requires-Dist: google-genai; extra == "all"
58
58
  Requires-Dist: anthropic; extra == "all"
59
59
  Requires-Dist: openai; extra == "all"
60
60
  Requires-Dist: pymupdf; extra == "all"
@@ -81,6 +81,7 @@ Dynamic: license-file
81
81
  <a href="#architecture">Architecture</a> •
82
82
  <a href="#quick-start">Quick Start</a> •
83
83
  <a href="#documentation">Documentation</a> •
84
+ <a href="CHANGELOG.md">Changelog</a> •
84
85
  <a href="#contributing">Contributing</a> •
85
86
  <a href="#comparison">Comparison</a> •
86
87
  <a href="#contact">Contact</a>
@@ -103,28 +104,34 @@ A **Skill** in this framework provides everything an Agent needs to master a dom
103
104
  3. **Governance**: Constitution and safety boundaries.
104
105
  4. **Interface**: Standardized schemas for LLM tool calling.
105
106
 
107
+ ### Skill library
108
+
109
+ Browse capabilities by category in the [Skill library](docs/skills/README.md).
110
+
106
111
  ## Architecture
107
112
 
108
- This repository is organized into a core framework, a registry of skills, and documentation.
113
+ This repository is organized into a core framework, a registry of skills, and
114
+ documentation. Runnable provider scripts are indexed in
115
+ [examples/README.md](examples/README.md).
109
116
 
110
117
  ```text
111
118
  Skillware/
112
- ├── docs/ # Comprehensive Documentation & Usage Guides
113
- ├── examples/ # Reference Implementations
114
- │ └── basic_agent.py # Example showing SkillLoader integration
119
+ ├── docs/ # Introduction, testing, skill catalog, usage guides (docs/usage/)
120
+ ├── examples/ # Provider reference scripts (Gemini, Claude, OpenAI, Ollama, ...)
115
121
  ├── skills/ # Skill Registry
116
122
  │ └── category/ # Domain boundaries (e.g., finance)
117
123
  │ └── skill_name/ # The Skill bundle
118
124
  │ ├── manifest.yaml # Definition, schema, and constitution
119
125
  │ ├── skill.py # Executable Python logic
120
126
  │ ├── instructions.md # Cognitive map for the LLM
121
- └── test_skill.py # Unit tests & schema validation
127
+ ├── card.json # Optional UI presentation metadata
128
+ │ └── test_skill.py # Unit tests and schema validation
122
129
  ├── skillware/ # Core Framework Package
123
130
  │ ├── cli.py # Command-line interface
124
131
  │ └── core/
125
132
  │ ├── base_skill.py # Abstract Base Class for skills
126
133
  │ ├── env.py # Environment Management
127
- │ └── loader.py # Universal Skill Loader & Model Adapter
134
+ │ └── loader.py # Universal Skill Loader and Model Adapter
128
135
  ├── templates/ # Boilerplate templates for new skills
129
136
  │ └── python_skill/ # Standard template with required files
130
137
  └── tests/ # Automated test suite
@@ -157,7 +164,7 @@ pip install "skillware[cli]"
157
164
  skillware list
158
165
  ```
159
166
 
160
- This prints a table of all locally available skills and confirms the install and path resolution are working.
167
+ This prints a table of all locally available skills and confirms the install and path resolution are working. Running `skillware` with no arguments opens the interactive menu.
161
168
 
162
169
  ### 3. Configuration
163
170
 
@@ -169,8 +176,12 @@ GOOGLE_API_KEY="your_key"
169
176
 
170
177
  ### 4. Usage Example (Gemini)
171
178
 
179
+ This example requires the Google SDK optional extra: `pip install "skillware[gemini]"` (local dev: `pip install -e ".[gemini]"`). See the [Gemini usage guide](docs/usage/gemini.md) for setup details.
180
+
172
181
  ```python
173
- import google.generativeai as genai
182
+ import os
183
+ import google.genai as genai
184
+ from google.genai import types
174
185
  from skillware.core.loader import SkillLoader
175
186
  from skillware.core.env import load_env_file
176
187
 
@@ -179,36 +190,64 @@ load_env_file()
179
190
 
180
191
  # 1. Load the Skill from the Registry
181
192
  # The loader reads the code, manifest, and instructions automatically
182
- skill_bundle = SkillLoader.load_skill("category/skill_name") # see docs/usage/README.md for path search order
183
-
184
- # 2. Model & Chat Setup
185
- model = genai.GenerativeModel(
186
- 'gemini-2.5-flash',
187
- tools=[SkillLoader.to_gemini_tool(skill_bundle)], # The "Adapter"
188
- system_instruction=skill_bundle['instructions'] # The "Mind"
193
+ skill_bundle = SkillLoader.load_skill("finance/wallet_screening")
194
+ skill = skill_bundle["module"].WalletScreeningSkill(
195
+ config={"ETHERSCAN_API_KEY": os.environ.get("ETHERSCAN_API_KEY")}
189
196
  )
190
- chat = model.start_chat(enable_automatic_function_calling=True)
197
+
198
+ # 2. Client & Tool Setup
199
+ client = genai.Client()
200
+ tool = SkillLoader.to_gemini_tool(skill_bundle) # The "Adapter"
201
+ system_instruction = skill_bundle['instructions'] # The "Mind"
191
202
 
192
203
  # 3. Agent Loop
193
- # The SDK handles the loop: model -> tool call -> execution -> result -> model reply.
194
- response = chat.send_message("Screen wallet 0xd8dA... for risks.")
195
- print(response.text)
204
+ response = client.models.generate_content(
205
+ model="gemini-2.5-flash",
206
+ contents="Screen wallet 0xd8dA... for risks.",
207
+ config=types.GenerateContentConfig(
208
+ tools=[tool],
209
+ system_instruction=system_instruction,
210
+ ),
211
+ )
212
+
213
+ for part in response.candidates[0].content.parts:
214
+ if part.function_call:
215
+ result = skill.execute(dict(part.function_call.args))
216
+ follow_up = client.models.generate_content(
217
+ model="gemini-2.5-flash",
218
+ contents=[
219
+ "Use this tool result to answer the original request.",
220
+ {
221
+ "function_response": {
222
+ "name": part.function_call.name,
223
+ "response": {"result": result},
224
+ }
225
+ },
226
+ ],
227
+ config=types.GenerateContentConfig(
228
+ tools=[tool],
229
+ system_instruction=system_instruction,
230
+ ),
231
+ )
232
+ print(follow_up.text)
233
+ else:
234
+ print(part.text)
196
235
  ```
197
236
 
237
+ For other providers and shared integration patterns, see the [usage guides index](docs/usage/README.md), [agent loops](docs/usage/agent_loops.md), [Gemini](docs/usage/gemini.md), [Claude](docs/usage/claude.md), [OpenAI](docs/usage/openai.md), [DeepSeek](docs/usage/deepseek.md), [Ollama](docs/usage/ollama.md), [API keys for skills](docs/usage/api_keys.md), and the [skill usage template](docs/usage/skill_usage_template.md) for contributors.
238
+
198
239
  ## Documentation
199
240
 
200
- * **[Core Logic & Philosophy](docs/introduction.md)**: Details on how Skillware decouples Logic, Cognition, and Governance.
201
- * **[Testing Guidelines](docs/TESTING.md)**: Instructions for validating skills and checking local coverage.
202
- * **[Usage guides](docs/usage/README.md)**: Provider adapters and navigation to integration docs.
203
- * **[Agent loops](docs/usage/agent_loops.md)**: Shared load, tool-call, and `execute` pattern across providers.
204
- * **[Usage Guide: Gemini](docs/usage/gemini.md)**: Integration with Google's GenAI SDK.
205
- * **[Usage Guide: Claude](docs/usage/claude.md)**: Integration with Anthropic's SDK.
206
- * **[Usage Guide: OpenAI](docs/usage/openai.md)**: Integration with OpenAI Chat Completions tool calling.
207
- * **[Usage Guide: DeepSeek](docs/usage/deepseek.md)**: Integration with the DeepSeek API via `to_deepseek_tool()`.
208
- * **[Usage Guide: Ollama](docs/usage/ollama.md)**: Native integration for local models via Ollama.
209
- * **[API Keys for Skills](docs/usage/api_keys.md)**: Environment variables, cloud/CI setup, and security for skills that call external APIs.
210
- * **[Skill Library](docs/skills/README.md)**: Available capabilities.
211
- * **[CLI Reference](docs/usage/cli.md)**: Discover and inspect locally installed skills from the terminal.
241
+ | Topic | Link |
242
+ | :--- | :--- |
243
+ | Introduction | [docs/introduction.md](docs/introduction.md) |
244
+ | Changelog | [CHANGELOG.md](CHANGELOG.md) |
245
+ | Testing | [docs/TESTING.md](docs/TESTING.md) |
246
+ | Skill library | [docs/skills/README.md](docs/skills/README.md) |
247
+ | Usage guides | [index](docs/usage/README.md) — [Gemini](docs/usage/gemini.md) · [Claude](docs/usage/claude.md) · [OpenAI](docs/usage/openai.md) · [DeepSeek](docs/usage/deepseek.md) · [Ollama](docs/usage/ollama.md); [agent loops](docs/usage/agent_loops.md); [API keys](docs/usage/api_keys.md) |
248
+ | Examples index | [examples/README.md](examples/README.md) |
249
+ | CLI | [docs/usage/cli.md](docs/usage/cli.md) |
250
+ | Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) · [agent workflow](docs/contributing/ai_native_workflow.md) |
212
251
 
213
252
  ## Contributing
214
253
 
@@ -19,6 +19,7 @@
19
19
  <a href="#architecture">Architecture</a> •
20
20
  <a href="#quick-start">Quick Start</a> •
21
21
  <a href="#documentation">Documentation</a> •
22
+ <a href="CHANGELOG.md">Changelog</a> •
22
23
  <a href="#contributing">Contributing</a> •
23
24
  <a href="#comparison">Comparison</a> •
24
25
  <a href="#contact">Contact</a>
@@ -41,28 +42,34 @@ A **Skill** in this framework provides everything an Agent needs to master a dom
41
42
  3. **Governance**: Constitution and safety boundaries.
42
43
  4. **Interface**: Standardized schemas for LLM tool calling.
43
44
 
45
+ ### Skill library
46
+
47
+ Browse capabilities by category in the [Skill library](docs/skills/README.md).
48
+
44
49
  ## Architecture
45
50
 
46
- This repository is organized into a core framework, a registry of skills, and documentation.
51
+ This repository is organized into a core framework, a registry of skills, and
52
+ documentation. Runnable provider scripts are indexed in
53
+ [examples/README.md](examples/README.md).
47
54
 
48
55
  ```text
49
56
  Skillware/
50
- ├── docs/ # Comprehensive Documentation & Usage Guides
51
- ├── examples/ # Reference Implementations
52
- │ └── basic_agent.py # Example showing SkillLoader integration
57
+ ├── docs/ # Introduction, testing, skill catalog, usage guides (docs/usage/)
58
+ ├── examples/ # Provider reference scripts (Gemini, Claude, OpenAI, Ollama, ...)
53
59
  ├── skills/ # Skill Registry
54
60
  │ └── category/ # Domain boundaries (e.g., finance)
55
61
  │ └── skill_name/ # The Skill bundle
56
62
  │ ├── manifest.yaml # Definition, schema, and constitution
57
63
  │ ├── skill.py # Executable Python logic
58
64
  │ ├── instructions.md # Cognitive map for the LLM
59
- └── test_skill.py # Unit tests & schema validation
65
+ ├── card.json # Optional UI presentation metadata
66
+ │ └── test_skill.py # Unit tests and schema validation
60
67
  ├── skillware/ # Core Framework Package
61
68
  │ ├── cli.py # Command-line interface
62
69
  │ └── core/
63
70
  │ ├── base_skill.py # Abstract Base Class for skills
64
71
  │ ├── env.py # Environment Management
65
- │ └── loader.py # Universal Skill Loader & Model Adapter
72
+ │ └── loader.py # Universal Skill Loader and Model Adapter
66
73
  ├── templates/ # Boilerplate templates for new skills
67
74
  │ └── python_skill/ # Standard template with required files
68
75
  └── tests/ # Automated test suite
@@ -95,7 +102,7 @@ pip install "skillware[cli]"
95
102
  skillware list
96
103
  ```
97
104
 
98
- This prints a table of all locally available skills and confirms the install and path resolution are working.
105
+ This prints a table of all locally available skills and confirms the install and path resolution are working. Running `skillware` with no arguments opens the interactive menu.
99
106
 
100
107
  ### 3. Configuration
101
108
 
@@ -107,8 +114,12 @@ GOOGLE_API_KEY="your_key"
107
114
 
108
115
  ### 4. Usage Example (Gemini)
109
116
 
117
+ This example requires the Google SDK optional extra: `pip install "skillware[gemini]"` (local dev: `pip install -e ".[gemini]"`). See the [Gemini usage guide](docs/usage/gemini.md) for setup details.
118
+
110
119
  ```python
111
- import google.generativeai as genai
120
+ import os
121
+ import google.genai as genai
122
+ from google.genai import types
112
123
  from skillware.core.loader import SkillLoader
113
124
  from skillware.core.env import load_env_file
114
125
 
@@ -117,36 +128,64 @@ load_env_file()
117
128
 
118
129
  # 1. Load the Skill from the Registry
119
130
  # The loader reads the code, manifest, and instructions automatically
120
- skill_bundle = SkillLoader.load_skill("category/skill_name") # see docs/usage/README.md for path search order
121
-
122
- # 2. Model & Chat Setup
123
- model = genai.GenerativeModel(
124
- 'gemini-2.5-flash',
125
- tools=[SkillLoader.to_gemini_tool(skill_bundle)], # The "Adapter"
126
- system_instruction=skill_bundle['instructions'] # The "Mind"
131
+ skill_bundle = SkillLoader.load_skill("finance/wallet_screening")
132
+ skill = skill_bundle["module"].WalletScreeningSkill(
133
+ config={"ETHERSCAN_API_KEY": os.environ.get("ETHERSCAN_API_KEY")}
127
134
  )
128
- chat = model.start_chat(enable_automatic_function_calling=True)
135
+
136
+ # 2. Client & Tool Setup
137
+ client = genai.Client()
138
+ tool = SkillLoader.to_gemini_tool(skill_bundle) # The "Adapter"
139
+ system_instruction = skill_bundle['instructions'] # The "Mind"
129
140
 
130
141
  # 3. Agent Loop
131
- # The SDK handles the loop: model -> tool call -> execution -> result -> model reply.
132
- response = chat.send_message("Screen wallet 0xd8dA... for risks.")
133
- print(response.text)
142
+ response = client.models.generate_content(
143
+ model="gemini-2.5-flash",
144
+ contents="Screen wallet 0xd8dA... for risks.",
145
+ config=types.GenerateContentConfig(
146
+ tools=[tool],
147
+ system_instruction=system_instruction,
148
+ ),
149
+ )
150
+
151
+ for part in response.candidates[0].content.parts:
152
+ if part.function_call:
153
+ result = skill.execute(dict(part.function_call.args))
154
+ follow_up = client.models.generate_content(
155
+ model="gemini-2.5-flash",
156
+ contents=[
157
+ "Use this tool result to answer the original request.",
158
+ {
159
+ "function_response": {
160
+ "name": part.function_call.name,
161
+ "response": {"result": result},
162
+ }
163
+ },
164
+ ],
165
+ config=types.GenerateContentConfig(
166
+ tools=[tool],
167
+ system_instruction=system_instruction,
168
+ ),
169
+ )
170
+ print(follow_up.text)
171
+ else:
172
+ print(part.text)
134
173
  ```
135
174
 
175
+ For other providers and shared integration patterns, see the [usage guides index](docs/usage/README.md), [agent loops](docs/usage/agent_loops.md), [Gemini](docs/usage/gemini.md), [Claude](docs/usage/claude.md), [OpenAI](docs/usage/openai.md), [DeepSeek](docs/usage/deepseek.md), [Ollama](docs/usage/ollama.md), [API keys for skills](docs/usage/api_keys.md), and the [skill usage template](docs/usage/skill_usage_template.md) for contributors.
176
+
136
177
  ## Documentation
137
178
 
138
- * **[Core Logic & Philosophy](docs/introduction.md)**: Details on how Skillware decouples Logic, Cognition, and Governance.
139
- * **[Testing Guidelines](docs/TESTING.md)**: Instructions for validating skills and checking local coverage.
140
- * **[Usage guides](docs/usage/README.md)**: Provider adapters and navigation to integration docs.
141
- * **[Agent loops](docs/usage/agent_loops.md)**: Shared load, tool-call, and `execute` pattern across providers.
142
- * **[Usage Guide: Gemini](docs/usage/gemini.md)**: Integration with Google's GenAI SDK.
143
- * **[Usage Guide: Claude](docs/usage/claude.md)**: Integration with Anthropic's SDK.
144
- * **[Usage Guide: OpenAI](docs/usage/openai.md)**: Integration with OpenAI Chat Completions tool calling.
145
- * **[Usage Guide: DeepSeek](docs/usage/deepseek.md)**: Integration with the DeepSeek API via `to_deepseek_tool()`.
146
- * **[Usage Guide: Ollama](docs/usage/ollama.md)**: Native integration for local models via Ollama.
147
- * **[API Keys for Skills](docs/usage/api_keys.md)**: Environment variables, cloud/CI setup, and security for skills that call external APIs.
148
- * **[Skill Library](docs/skills/README.md)**: Available capabilities.
149
- * **[CLI Reference](docs/usage/cli.md)**: Discover and inspect locally installed skills from the terminal.
179
+ | Topic | Link |
180
+ | :--- | :--- |
181
+ | Introduction | [docs/introduction.md](docs/introduction.md) |
182
+ | Changelog | [CHANGELOG.md](CHANGELOG.md) |
183
+ | Testing | [docs/TESTING.md](docs/TESTING.md) |
184
+ | Skill library | [docs/skills/README.md](docs/skills/README.md) |
185
+ | Usage guides | [index](docs/usage/README.md) — [Gemini](docs/usage/gemini.md) · [Claude](docs/usage/claude.md) · [OpenAI](docs/usage/openai.md) · [DeepSeek](docs/usage/deepseek.md) · [Ollama](docs/usage/ollama.md); [agent loops](docs/usage/agent_loops.md); [API keys](docs/usage/api_keys.md) |
186
+ | Examples index | [examples/README.md](examples/README.md) |
187
+ | CLI | [docs/usage/cli.md](docs/usage/cli.md) |
188
+ | Contributing | [CONTRIBUTING.md](CONTRIBUTING.md) · [agent workflow](docs/contributing/ai_native_workflow.md) |
150
189
 
151
190
  ## Contributing
152
191
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "skillware"
7
- version = "0.2.9"
7
+ version = "0.3.2"
8
8
  description = "A framework for modular, self-contained AI skills."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -39,7 +39,7 @@ cli = [
39
39
  "rich>=13.0",
40
40
  ]
41
41
  gemini = [
42
- "google-generativeai",
42
+ "google-genai",
43
43
  ]
44
44
  claude = [
45
45
  "anthropic",
@@ -52,7 +52,7 @@ office = [
52
52
  ]
53
53
  all = [
54
54
  "rich>=13.0",
55
- "google-generativeai",
55
+ "google-genai",
56
56
  "anthropic",
57
57
  "openai",
58
58
  "pymupdf",
@@ -1,6 +1,7 @@
1
1
  name: compliance/mica_module
2
2
  version: 0.1.0
3
3
  description: A highly specialized, localized RAG and policy enforcement engine for the Markets in Crypto-Assets (MiCA) regulation.
4
+ short_description: "Local RAG and policy enforcement engine for MiCA regulation."
4
5
  issuer:
5
6
  name: Ross Peili
6
7
  email: vpeilivanidis@gmail.com
@@ -21,7 +22,7 @@ parameters:
21
22
  required:
22
23
  - user_prompt
23
24
  requirements:
24
- - google.generativeai
25
+ - google-genai
25
26
  constitution: |
26
27
  1. COMPLIANCE: Do not invent or hallucinate financial regulations. Base all enforcement strictly on the provided MiCA corpus blocks.
27
28
  2. FOCUS: Act exclusively as a compliance firewall and RAG engine; retrieve relevant chunks incrementally.
@@ -1,7 +1,7 @@
1
1
  import json
2
2
  import os
3
3
  from typing import Any, Dict, List
4
- import google.generativeai as genai
4
+
5
5
  from skillware.core.base_skill import BaseSkill
6
6
 
7
7
 
@@ -207,11 +207,43 @@ class MiCAModuleSkill(BaseSkill):
207
207
  """
208
208
 
209
209
  try:
210
- model = genai.GenerativeModel(model_name)
211
- resp = model.generate_content(
212
- prompt_payload,
213
- generation_config=genai.GenerationConfig(
214
- response_mime_type="application/json", temperature=0.0
210
+ import google.genai as genai
211
+ from google.genai import types
212
+ except ImportError:
213
+ return {
214
+ "policy_status": "CAUTION",
215
+ "gemini_evaluator_feedback": {
216
+ "grade": "N/A",
217
+ "holes_found": "google-genai is not installed.",
218
+ "suggestion": "Proceed manually integrating the extracted logic.",
219
+ },
220
+ "final_context_for_agent": (
221
+ f"Output your final answer seamlessly integrating and adhering to these MiCA rules:\n{context}"
222
+ ),
223
+ }
224
+
225
+ api_key = os.environ.get("GOOGLE_API_KEY")
226
+ if not api_key:
227
+ return {
228
+ "policy_status": "CAUTION",
229
+ "gemini_evaluator_feedback": {
230
+ "grade": "N/A",
231
+ "holes_found": "GOOGLE_API_KEY is not configured.",
232
+ "suggestion": "Proceed manually integrating the extracted logic.",
233
+ },
234
+ "final_context_for_agent": (
235
+ f"Output your final answer seamlessly integrating and adhering to these MiCA rules:\n{context}"
236
+ ),
237
+ }
238
+
239
+ try:
240
+ client = genai.Client(api_key=api_key)
241
+ resp = client.models.generate_content(
242
+ model=model_name,
243
+ contents=prompt_payload,
244
+ config=types.GenerateContentConfig(
245
+ response_mime_type="application/json",
246
+ temperature=0.0,
215
247
  ),
216
248
  )
217
249
  return json.loads(resp.text)
@@ -1,6 +1,7 @@
1
1
  name: compliance/pii_masker
2
2
  version: 0.1.0
3
3
  description: High-precision, local PII detection and redaction using the micro-f1-mask model via Ollama.
4
+ short_description: "Detects and redacts PII locally using the micro-f1-mask model."
4
5
  issuer:
5
6
  name: Ross Peili
6
7
  email: vpeilivanidis@gmail.com
@@ -1,6 +1,7 @@
1
1
  name: "compliance/tos_evaluator"
2
2
  version: "0.1.0"
3
3
  description: "Evaluates whether an intended automated website action appears permissible by checking robots.txt, discovered legal pages, and optional low-cost LLM review for ambiguous policy language."
4
+ short_description: "Evaluates whether an automated web action is permitted by site policy."
4
5
  issuer:
5
6
  name: Ross Peili
6
7
  email: vpeilivanidis@gmail.com
@@ -11,9 +11,11 @@ from bs4 import BeautifulSoup
11
11
  from skillware.core.base_skill import BaseSkill
12
12
 
13
13
  try:
14
- import google.generativeai as genai
14
+ import google.genai as genai
15
+ from google.genai import types
15
16
  except ImportError: # pragma: no cover - dependency is optional at runtime
16
17
  genai = None
18
+ types = None
17
19
 
18
20
 
19
21
  class TOSEvaluatorSkill(BaseSkill):
@@ -458,14 +460,13 @@ class TOSEvaluatorSkill(BaseSkill):
458
460
  "status": "skipped",
459
461
  "reason": f"Unsupported llm_provider '{normalized['llm_provider']}'.",
460
462
  }
461
- if genai is None:
462
- return {"status": "skipped", "reason": "google-generativeai is not installed."}
463
+ if genai is None or types is None:
464
+ return {"status": "skipped", "reason": "google-genai is not installed."}
463
465
 
464
466
  api_key = os.environ.get("GOOGLE_API_KEY")
465
467
  if not api_key:
466
468
  return {"status": "skipped", "reason": "GOOGLE_API_KEY is not configured."}
467
469
 
468
- genai.configure(api_key=api_key)
469
470
  prompt = {
470
471
  "target_url": normalized["target_url"],
471
472
  "intended_action": normalized["intended_action"],
@@ -479,11 +480,13 @@ class TOSEvaluatorSkill(BaseSkill):
479
480
  }
480
481
 
481
482
  try:
482
- model = genai.GenerativeModel(normalized["llm_model"])
483
- response = model.generate_content(
484
- json.dumps(prompt, ensure_ascii=True),
485
- generation_config=genai.GenerationConfig(
486
- response_mime_type="application/json", temperature=0.0
483
+ client = genai.Client(api_key=api_key)
484
+ response = client.models.generate_content(
485
+ model=normalized["llm_model"],
486
+ contents=json.dumps(prompt, ensure_ascii=True),
487
+ config=types.GenerateContentConfig(
488
+ response_mime_type="application/json",
489
+ temperature=0.0,
487
490
  ),
488
491
  )
489
492
  parsed = json.loads(response.text)
@@ -0,0 +1,3 @@
1
+ from .skill import NoveltyExtractor
2
+
3
+ __all__ = ["NoveltyExtractor"]
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "Novelty Extractor",
3
+ "description": "Filters a text dataset by semantic novelty, retaining only chunks that carry new information above a configurable threshold.",
4
+ "icon": "filter",
5
+ "ui_schema": {
6
+ "dataset_chunk": {
7
+ "ui:widget": "textarea",
8
+ "ui:placeholder": "Paste your raw text dataset here..."
9
+ },
10
+ "novelty_threshold": {
11
+ "ui:widget": "range",
12
+ "ui:options": {
13
+ "min": 0.0,
14
+ "max": 1.0,
15
+ "step": 0.05
16
+ }
17
+ },
18
+ "baseline_chunks": {
19
+ "ui:widget": "textarea",
20
+ "ui:placeholder": "Optional. Paste distilled_content from a previous call here..."
21
+ },
22
+ "chunk_strategy": {
23
+ "ui:widget": "select",
24
+ "ui:options": {
25
+ "enumOptions": [
26
+ {"value": "paragraph", "label": "Paragraph"},
27
+ {"value": "sentence", "label": "Sentence"}
28
+ ]
29
+ }
30
+ }
31
+ },
32
+ "issuer": {
33
+ "name": "Martin Rizzo Lozano",
34
+ "email": "rizzolozanomartin@gmail.com",
35
+ "github": "rizzoMartin"
36
+ }
37
+ }
@@ -0,0 +1,60 @@
1
+ # Novelty Extractor
2
+
3
+ You are an agent equipped with the Novelty Extractor skill. This skill filters
4
+ large text datasets by semantic similarity, retaining only chunks that carry
5
+ genuinely new information.
6
+
7
+ ## When to invoke this skill
8
+
9
+ Invoke `data_engineering/novelty_extractor` when:
10
+
11
+ - You need to distill a large corpus into high-signal content before passing
12
+ it to a model or storing it.
13
+ - You are processing a dataset in multiple turns and want to avoid redundancy
14
+ across turns by passing prior output as `baseline_chunks`.
15
+ - A user asks you to remove repetitive or redundant content from a document
16
+ or dataset.
17
+
18
+ ## Parameters
19
+
20
+ - `dataset_chunk` (required): The raw text to filter.
21
+ - `novelty_threshold` (required): A float between 0.0 and 1.0. Chunks with
22
+ maximum cosine similarity to already-seen content below this value are kept.
23
+ Lower values mean stricter filtering. A value of 0.85 is a sensible default
24
+ for most corpora.
25
+ - `baseline_chunks` (optional): Text from a previous call's `distilled_content`.
26
+ Pass this to filter consistently across multiple turns.
27
+ - `chunk_strategy` (optional): How to split the input. Use `"paragraph"`
28
+ (default) for documents with clear paragraph breaks, or `"sentence"` for
29
+ denser text.
30
+
31
+ ## Interpreting the output
32
+
33
+ - `distilled_content`: The filtered text. Pass this to downstream tasks or
34
+ store it as the new baseline for the next turn.
35
+ - `compression_ratio`: The percentage of input chunks that were dropped. A
36
+ high ratio (above 80%) may indicate the threshold is too strict or the
37
+ input is highly repetitive.
38
+ - `redundant_chunks_dropped`: The raw count of discarded chunks. Use this
39
+ to audit filtering behavior.
40
+
41
+ ## Handling edge cases
42
+
43
+ - If `distilled_content` is empty and no error is returned, all input chunks
44
+ were too similar to the baseline. Consider lowering `novelty_threshold`.
45
+ - If an `error` key is present in the output, the skill encountered an
46
+ unexpected failure. Inspect the value and retry with sanitized input.
47
+ - The first call without a baseline always keeps the first chunk regardless
48
+ of threshold, since there is nothing to compare against.
49
+
50
+ ## Multi-turn example
51
+
52
+ Turn 1: pass the first batch without baseline.
53
+ Turn 2: pass the next batch with `baseline_chunks` set to the previous
54
+ `distilled_content`.
55
+ Repeat until the full corpus is processed.
56
+
57
+ Note: the skill only filters each batch against the provided baseline. It does
58
+ not accumulate results across turns automatically. The caller is responsible
59
+ for concatenating `distilled_content` from each turn to build the full
60
+ distilled dataset.