skillware 0.2.1__tar.gz → 0.2.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.
- {skillware-0.2.1 → skillware-0.2.2}/PKG-INFO +23 -21
- {skillware-0.2.1 → skillware-0.2.2}/README.md +22 -20
- {skillware-0.2.1 → skillware-0.2.2}/pyproject.toml +1 -1
- skillware-0.2.2/skills/data_engineering/synthetic_generator/__init__.py +3 -0
- skillware-0.2.2/skills/data_engineering/synthetic_generator/skill.py +157 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware/core/loader.py +28 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware.egg-info/PKG-INFO +23 -21
- {skillware-0.2.1 → skillware-0.2.2}/skillware.egg-info/SOURCES.txt +4 -1
- skillware-0.2.2/tests/test_loader.py +63 -0
- {skillware-0.2.1 → skillware-0.2.2}/LICENSE +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/setup.cfg +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/finance/wallet_screening/__init__.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/finance/wallet_screening/maintenance/normalization_tool.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/finance/wallet_screening/maintenance/normalize_uniswap_trm.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/finance/wallet_screening/skill.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/office/pdf_form_filler/skill.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/office/pdf_form_filler/utils.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/optimization/prompt_rewriter/__init__.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skills/optimization/prompt_rewriter/skill.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware/__init__.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware/core/__init__.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware/core/base_skill.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware/core/env.py +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware.egg-info/dependency_links.txt +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware.egg-info/requires.txt +0 -0
- {skillware-0.2.1 → skillware-0.2.2}/skillware.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skillware
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A framework for modular, self-contained AI skills.
|
|
5
5
|
Author-email: ARPA Hellenic Logic Systems <skillware-os@arpacorp.net>
|
|
6
6
|
License: MIT License
|
|
@@ -79,7 +79,7 @@ Dynamic: license-file
|
|
|
79
79
|
|
|
80
80
|
## Mission
|
|
81
81
|
|
|
82
|
-
The AI ecosystem is fragmented. Developers often re-invent tool definitions, system prompts, and safety rules for every project. **Skillware** supplies a standard to package capabilities into self-contained units that work across **Gemini**, **Claude**, **GPT**, and **Llama**.
|
|
82
|
+
The AI ecosystem is fragmented. Developers often re-invent tool definitions, system prompts, and safety rules for every project. **Skillware** supplies a standard to package capabilities into self-contained units that work across **Gemini**, **Claude**, **Ollama**, **GPT**, and **Llama**.
|
|
83
83
|
|
|
84
84
|
A **Skill** in this framework provides everything an Agent needs to master a domain:
|
|
85
85
|
|
|
@@ -94,26 +94,23 @@ This repository is organized into a core framework, a registry of skills, and do
|
|
|
94
94
|
|
|
95
95
|
```text
|
|
96
96
|
Skillware/
|
|
97
|
+
├── docs/ # Comprehensive Documentation & Usage Guides
|
|
98
|
+
├── examples/ # Reference Implementations
|
|
99
|
+
│ └── basic_agent.py # Example showing SkillLoader integration
|
|
100
|
+
├── skills/ # Skill Registry
|
|
101
|
+
│ └── category/ # Domain boundaries (e.g., finance)
|
|
102
|
+
│ └── skill_name/ # The Skill bundle
|
|
103
|
+
│ ├── manifest.yaml # Definition, schema, and constitution
|
|
104
|
+
│ ├── skill.py # Executable Python logic
|
|
105
|
+
│ └── instructions.md # Cognitive map for the LLM
|
|
97
106
|
├── skillware/ # Core Framework Package
|
|
98
107
|
│ └── core/
|
|
99
108
|
│ ├── base_skill.py # Abstract Base Class for skills
|
|
100
|
-
│ ├──
|
|
101
|
-
│ └──
|
|
102
|
-
├──
|
|
103
|
-
│
|
|
104
|
-
|
|
105
|
-
├── templates/ # New Skill Templates
|
|
106
|
-
│ └── python_skill/ # Standard Python Skill Template
|
|
107
|
-
├── examples/ # Reference Implementations
|
|
108
|
-
│ ├── gemini_wallet_check.py # Google Gemini Integration
|
|
109
|
-
│ ├── claude_wallet_check.py # Anthropic Claude Integration
|
|
110
|
-
│ ├── gemini_pdf_form_filler.py
|
|
111
|
-
│ └── claude_pdf_form_filler.py
|
|
112
|
-
├── docs/ # Comprehensive Documentation
|
|
113
|
-
│ ├── introduction.md # Philosophy & Design
|
|
114
|
-
│ ├── usage/ # Integration Guides
|
|
115
|
-
│ └── skills/ # Skill Reference Cards
|
|
116
|
-
└── COMPARISON.md # Comparison vs. Anthropic Skills / MCP
|
|
109
|
+
│ ├── env.py # Environment Management
|
|
110
|
+
│ └── loader.py # Universal Skill Loader & Model Adapter
|
|
111
|
+
├── templates/ # Boilerplate templates for new skills
|
|
112
|
+
│ └── python_skill/ # Standard template with required files
|
|
113
|
+
└── tests/ # Automated test suite
|
|
117
114
|
```
|
|
118
115
|
|
|
119
116
|
## Quick Start
|
|
@@ -177,19 +174,24 @@ print(response.text)
|
|
|
177
174
|
* **[Core Logic & Philosophy](docs/introduction.md)**: Details on how Skillware decouples Logic, Cognition, and Governance.
|
|
178
175
|
* **[Usage Guide: Gemini](docs/usage/gemini.md)**: Integration with Google's GenAI SDK.
|
|
179
176
|
* **[Usage Guide: Claude](docs/usage/claude.md)**: Integration with Anthropic's SDK.
|
|
177
|
+
* **[Usage Guide: Ollama](docs/usage/ollama.md)**: Native integration for local models via Ollama.
|
|
180
178
|
* **[Skill Library](docs/skills/README.md)**: Available capabilities.
|
|
181
179
|
|
|
182
180
|
## Contributing
|
|
183
181
|
|
|
184
182
|
We are building the "App Store" for Agents and require professional, robust, and safe skills.
|
|
185
183
|
|
|
186
|
-
|
|
184
|
+
We actively encourage both humans and autonomous agents to contribute to this repository!
|
|
185
|
+
|
|
186
|
+
* Please read our **[Agent Code of Conduct](CODE_OF_CONDUCT.md)** which outlines our strict expectations for deterministic outputs, zero LLM code generation, and safety boundaries.
|
|
187
|
+
* When submitting skills, our new **Agent-Friendly Pull Request Template** provides a checklist to ensure your logic aligns natively with `loader.py` and `base_skill.py`.
|
|
188
|
+
* Please also review **[CONTRIBUTING.md](CONTRIBUTING.md)** for detailed guidelines on folder structure and schema definitions.
|
|
187
189
|
|
|
188
190
|
## Comparison
|
|
189
191
|
|
|
190
192
|
Skillware differs from the Model Context Protocol (MCP) or Anthropic's Skills repository in the following ways:
|
|
191
193
|
|
|
192
|
-
* **Model Agnostic**: Native adapters for Gemini, Claude, and OpenAI.
|
|
194
|
+
* **Model Agnostic**: Native adapters for Gemini, Claude, Ollama, and OpenAI.
|
|
193
195
|
* **Code-First**: Skills are executable Python packages, not just server specs.
|
|
194
196
|
* **Runtime-Focused**: Provides tools for the application, not just recipes for an IDE.
|
|
195
197
|
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
## Mission
|
|
34
34
|
|
|
35
|
-
The AI ecosystem is fragmented. Developers often re-invent tool definitions, system prompts, and safety rules for every project. **Skillware** supplies a standard to package capabilities into self-contained units that work across **Gemini**, **Claude**, **GPT**, and **Llama**.
|
|
35
|
+
The AI ecosystem is fragmented. Developers often re-invent tool definitions, system prompts, and safety rules for every project. **Skillware** supplies a standard to package capabilities into self-contained units that work across **Gemini**, **Claude**, **Ollama**, **GPT**, and **Llama**.
|
|
36
36
|
|
|
37
37
|
A **Skill** in this framework provides everything an Agent needs to master a domain:
|
|
38
38
|
|
|
@@ -47,26 +47,23 @@ This repository is organized into a core framework, a registry of skills, and do
|
|
|
47
47
|
|
|
48
48
|
```text
|
|
49
49
|
Skillware/
|
|
50
|
+
├── docs/ # Comprehensive Documentation & Usage Guides
|
|
51
|
+
├── examples/ # Reference Implementations
|
|
52
|
+
│ └── basic_agent.py # Example showing SkillLoader integration
|
|
53
|
+
├── skills/ # Skill Registry
|
|
54
|
+
│ └── category/ # Domain boundaries (e.g., finance)
|
|
55
|
+
│ └── skill_name/ # The Skill bundle
|
|
56
|
+
│ ├── manifest.yaml # Definition, schema, and constitution
|
|
57
|
+
│ ├── skill.py # Executable Python logic
|
|
58
|
+
│ └── instructions.md # Cognitive map for the LLM
|
|
50
59
|
├── skillware/ # Core Framework Package
|
|
51
60
|
│ └── core/
|
|
52
61
|
│ ├── base_skill.py # Abstract Base Class for skills
|
|
53
|
-
│ ├──
|
|
54
|
-
│ └──
|
|
55
|
-
├──
|
|
56
|
-
│
|
|
57
|
-
|
|
58
|
-
├── templates/ # New Skill Templates
|
|
59
|
-
│ └── python_skill/ # Standard Python Skill Template
|
|
60
|
-
├── examples/ # Reference Implementations
|
|
61
|
-
│ ├── gemini_wallet_check.py # Google Gemini Integration
|
|
62
|
-
│ ├── claude_wallet_check.py # Anthropic Claude Integration
|
|
63
|
-
│ ├── gemini_pdf_form_filler.py
|
|
64
|
-
│ └── claude_pdf_form_filler.py
|
|
65
|
-
├── docs/ # Comprehensive Documentation
|
|
66
|
-
│ ├── introduction.md # Philosophy & Design
|
|
67
|
-
│ ├── usage/ # Integration Guides
|
|
68
|
-
│ └── skills/ # Skill Reference Cards
|
|
69
|
-
└── COMPARISON.md # Comparison vs. Anthropic Skills / MCP
|
|
62
|
+
│ ├── env.py # Environment Management
|
|
63
|
+
│ └── loader.py # Universal Skill Loader & Model Adapter
|
|
64
|
+
├── templates/ # Boilerplate templates for new skills
|
|
65
|
+
│ └── python_skill/ # Standard template with required files
|
|
66
|
+
└── tests/ # Automated test suite
|
|
70
67
|
```
|
|
71
68
|
|
|
72
69
|
## Quick Start
|
|
@@ -130,19 +127,24 @@ print(response.text)
|
|
|
130
127
|
* **[Core Logic & Philosophy](docs/introduction.md)**: Details on how Skillware decouples Logic, Cognition, and Governance.
|
|
131
128
|
* **[Usage Guide: Gemini](docs/usage/gemini.md)**: Integration with Google's GenAI SDK.
|
|
132
129
|
* **[Usage Guide: Claude](docs/usage/claude.md)**: Integration with Anthropic's SDK.
|
|
130
|
+
* **[Usage Guide: Ollama](docs/usage/ollama.md)**: Native integration for local models via Ollama.
|
|
133
131
|
* **[Skill Library](docs/skills/README.md)**: Available capabilities.
|
|
134
132
|
|
|
135
133
|
## Contributing
|
|
136
134
|
|
|
137
135
|
We are building the "App Store" for Agents and require professional, robust, and safe skills.
|
|
138
136
|
|
|
139
|
-
|
|
137
|
+
We actively encourage both humans and autonomous agents to contribute to this repository!
|
|
138
|
+
|
|
139
|
+
* Please read our **[Agent Code of Conduct](CODE_OF_CONDUCT.md)** which outlines our strict expectations for deterministic outputs, zero LLM code generation, and safety boundaries.
|
|
140
|
+
* When submitting skills, our new **Agent-Friendly Pull Request Template** provides a checklist to ensure your logic aligns natively with `loader.py` and `base_skill.py`.
|
|
141
|
+
* Please also review **[CONTRIBUTING.md](CONTRIBUTING.md)** for detailed guidelines on folder structure and schema definitions.
|
|
140
142
|
|
|
141
143
|
## Comparison
|
|
142
144
|
|
|
143
145
|
Skillware differs from the Model Context Protocol (MCP) or Anthropic's Skills repository in the following ways:
|
|
144
146
|
|
|
145
|
-
* **Model Agnostic**: Native adapters for Gemini, Claude, and OpenAI.
|
|
147
|
+
* **Model Agnostic**: Native adapters for Gemini, Claude, Ollama, and OpenAI.
|
|
146
148
|
* **Code-First**: Skills are executable Python packages, not just server specs.
|
|
147
149
|
* **Runtime-Focused**: Provides tools for the application, not just recipes for an IDE.
|
|
148
150
|
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import zlib
|
|
3
|
+
import json
|
|
4
|
+
|
|
5
|
+
from typing import Dict, Any
|
|
6
|
+
|
|
7
|
+
from skillware.core.base_skill import BaseSkill
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SyntheticGeneratorSkill(BaseSkill):
|
|
11
|
+
"""
|
|
12
|
+
A skill that generates high-entropy synthetic data using internal LLMs,
|
|
13
|
+
and validates the generated text with zlib-based entropy scoring.
|
|
14
|
+
"""
|
|
15
|
+
|
|
16
|
+
@property
|
|
17
|
+
def manifest(self) -> Dict[str, Any]:
|
|
18
|
+
manifest_path = os.path.join(os.path.dirname(__file__), "manifest.yaml")
|
|
19
|
+
if os.path.exists(manifest_path):
|
|
20
|
+
import yaml
|
|
21
|
+
with open(manifest_path, "r", encoding="utf-8") as f:
|
|
22
|
+
return yaml.safe_load(f)
|
|
23
|
+
return {}
|
|
24
|
+
|
|
25
|
+
def _calculate_entropy_score(self, text: str) -> float:
|
|
26
|
+
"""
|
|
27
|
+
Calculates a heuristic entropy score using zlib compression ratio.
|
|
28
|
+
Higher score = less compressible = higher entropy.
|
|
29
|
+
"""
|
|
30
|
+
if not text:
|
|
31
|
+
return 0.0
|
|
32
|
+
encoded = text.encode("utf-8")
|
|
33
|
+
compressed = zlib.compress(encoded)
|
|
34
|
+
ratio = len(compressed) / len(encoded)
|
|
35
|
+
# Scaled for readability
|
|
36
|
+
return round(min(ratio * 1.5, 1.0), 3)
|
|
37
|
+
|
|
38
|
+
def _call_gemini(
|
|
39
|
+
self, prompt: str, temperature: float, model_name: str
|
|
40
|
+
) -> str:
|
|
41
|
+
import google.generativeai as genai
|
|
42
|
+
api_key = (
|
|
43
|
+
self.config.get("GOOGLE_API_KEY")
|
|
44
|
+
or os.environ.get("GOOGLE_API_KEY")
|
|
45
|
+
)
|
|
46
|
+
if api_key:
|
|
47
|
+
genai.configure(api_key=api_key)
|
|
48
|
+
model = genai.GenerativeModel(model_name)
|
|
49
|
+
response = model.generate_content(
|
|
50
|
+
prompt,
|
|
51
|
+
generation_config=genai.types.GenerationConfig(
|
|
52
|
+
temperature=temperature
|
|
53
|
+
)
|
|
54
|
+
)
|
|
55
|
+
return response.text
|
|
56
|
+
|
|
57
|
+
def _call_anthropic(
|
|
58
|
+
self, prompt: str, temperature: float, model_name: str
|
|
59
|
+
) -> str:
|
|
60
|
+
import anthropic
|
|
61
|
+
api_key = (
|
|
62
|
+
self.config.get("ANTHROPIC_API_KEY")
|
|
63
|
+
or os.environ.get("ANTHROPIC_API_KEY")
|
|
64
|
+
)
|
|
65
|
+
client = anthropic.Anthropic(api_key=api_key)
|
|
66
|
+
message = client.messages.create(
|
|
67
|
+
model=model_name,
|
|
68
|
+
max_tokens=4096,
|
|
69
|
+
temperature=temperature,
|
|
70
|
+
messages=[{"role": "user", "content": prompt}]
|
|
71
|
+
)
|
|
72
|
+
return message.content[0].text
|
|
73
|
+
|
|
74
|
+
def _call_ollama(
|
|
75
|
+
self, prompt: str, temperature: float, model_name: str
|
|
76
|
+
) -> str:
|
|
77
|
+
import ollama
|
|
78
|
+
response = ollama.chat(
|
|
79
|
+
model=model_name,
|
|
80
|
+
messages=[{"role": "user", "content": prompt}],
|
|
81
|
+
options={"temperature": temperature}
|
|
82
|
+
)
|
|
83
|
+
return response.get("message", {}).get("content", "")
|
|
84
|
+
|
|
85
|
+
def execute(self, params: Dict[str, Any]) -> Any:
|
|
86
|
+
domain = params.get("domain")
|
|
87
|
+
num_samples = params.get("num_samples")
|
|
88
|
+
temperature = float(params.get("entropy_temperature", 0.8))
|
|
89
|
+
diversity_prompt = params.get("diversity_prompt")
|
|
90
|
+
|
|
91
|
+
provider = params.get("model_provider", "ollama").lower()
|
|
92
|
+
model_name = params.get("model_name")
|
|
93
|
+
|
|
94
|
+
if not model_name:
|
|
95
|
+
if provider == "ollama":
|
|
96
|
+
model_name = "llama3"
|
|
97
|
+
elif provider == "gemini":
|
|
98
|
+
model_name = "gemini-1.5-flash"
|
|
99
|
+
elif provider == "anthropic":
|
|
100
|
+
model_name = "claude-3-haiku-20240307"
|
|
101
|
+
|
|
102
|
+
system_prompt = (
|
|
103
|
+
f"You are a generator for domain: '{domain}'.\n"
|
|
104
|
+
f"Output exactly {num_samples} samples in a JSON array.\n"
|
|
105
|
+
f"Constraint: {diversity_prompt}\n"
|
|
106
|
+
"Return valid JSON array. Keys: instruction, input, output."
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
try:
|
|
110
|
+
if provider == "gemini":
|
|
111
|
+
raw_text = self._call_gemini(
|
|
112
|
+
system_prompt, temperature, model_name
|
|
113
|
+
)
|
|
114
|
+
elif provider == "anthropic":
|
|
115
|
+
raw_text = self._call_anthropic(
|
|
116
|
+
system_prompt, temperature, model_name
|
|
117
|
+
)
|
|
118
|
+
else:
|
|
119
|
+
raw_text = self._call_ollama(
|
|
120
|
+
system_prompt, temperature, model_name
|
|
121
|
+
)
|
|
122
|
+
except Exception as e:
|
|
123
|
+
return {
|
|
124
|
+
"status": "error",
|
|
125
|
+
"message": f"LLM Call Failed via {provider}: {str(e)}"
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
samples = []
|
|
129
|
+
try:
|
|
130
|
+
cleaned = raw_text.strip()
|
|
131
|
+
if "```json" in cleaned:
|
|
132
|
+
cleaned = cleaned.split("```json")[-1].split("```")[0].strip()
|
|
133
|
+
elif "```" in cleaned:
|
|
134
|
+
cleaned = cleaned.split("```")[-1].split("```")[0].strip()
|
|
135
|
+
|
|
136
|
+
parsed = json.loads(cleaned)
|
|
137
|
+
if isinstance(parsed, list):
|
|
138
|
+
samples = parsed
|
|
139
|
+
else:
|
|
140
|
+
samples = [parsed]
|
|
141
|
+
except Exception as e:
|
|
142
|
+
return {
|
|
143
|
+
"status": "error",
|
|
144
|
+
"message": f"Parsing failed: {e}",
|
|
145
|
+
"raw_output": raw_text
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
all_text = " ".join([str(s) for s in samples])
|
|
149
|
+
score = self._calculate_entropy_score(all_text)
|
|
150
|
+
|
|
151
|
+
return {
|
|
152
|
+
"samples": samples,
|
|
153
|
+
"entropy_score": score,
|
|
154
|
+
"status": "success",
|
|
155
|
+
"provider_used": provider,
|
|
156
|
+
"samples_generated": len(samples)
|
|
157
|
+
}
|
|
@@ -125,3 +125,31 @@ class SkillLoader:
|
|
|
125
125
|
parameters = manifest.get("parameters", {})
|
|
126
126
|
|
|
127
127
|
return {"name": name, "description": description, "input_schema": parameters}
|
|
128
|
+
|
|
129
|
+
@staticmethod
|
|
130
|
+
def to_ollama_prompt(skill_bundle: Dict[str, Any]) -> str:
|
|
131
|
+
"""
|
|
132
|
+
Converts a skill manifest to a textual description suitable for a system prompt.
|
|
133
|
+
This allows older models (like Llama 3) running via Ollama without native tool-calling
|
|
134
|
+
API support to understand and utilize the skill via text generation.
|
|
135
|
+
"""
|
|
136
|
+
manifest = skill_bundle.get("manifest", {})
|
|
137
|
+
name = manifest.get("name", "unknown_tool")
|
|
138
|
+
description = manifest.get("description", "").strip()
|
|
139
|
+
parameters = manifest.get("parameters", {})
|
|
140
|
+
|
|
141
|
+
prompt = f"### Tool: `{name}`\n"
|
|
142
|
+
prompt += f"**Description:** {description}\n"
|
|
143
|
+
prompt += "**Parameters:**\n"
|
|
144
|
+
|
|
145
|
+
props = parameters.get("properties", {})
|
|
146
|
+
required = parameters.get("required", [])
|
|
147
|
+
|
|
148
|
+
if not props:
|
|
149
|
+
prompt += "- None\n"
|
|
150
|
+
else:
|
|
151
|
+
for k, v in props.items():
|
|
152
|
+
req_str = "Required" if k in required else "Optional"
|
|
153
|
+
prompt += f"- `{k}` ({v.get('type', 'any')}): {v.get('description', '')} [{req_str}]\n"
|
|
154
|
+
|
|
155
|
+
return prompt
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skillware
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: A framework for modular, self-contained AI skills.
|
|
5
5
|
Author-email: ARPA Hellenic Logic Systems <skillware-os@arpacorp.net>
|
|
6
6
|
License: MIT License
|
|
@@ -79,7 +79,7 @@ Dynamic: license-file
|
|
|
79
79
|
|
|
80
80
|
## Mission
|
|
81
81
|
|
|
82
|
-
The AI ecosystem is fragmented. Developers often re-invent tool definitions, system prompts, and safety rules for every project. **Skillware** supplies a standard to package capabilities into self-contained units that work across **Gemini**, **Claude**, **GPT**, and **Llama**.
|
|
82
|
+
The AI ecosystem is fragmented. Developers often re-invent tool definitions, system prompts, and safety rules for every project. **Skillware** supplies a standard to package capabilities into self-contained units that work across **Gemini**, **Claude**, **Ollama**, **GPT**, and **Llama**.
|
|
83
83
|
|
|
84
84
|
A **Skill** in this framework provides everything an Agent needs to master a domain:
|
|
85
85
|
|
|
@@ -94,26 +94,23 @@ This repository is organized into a core framework, a registry of skills, and do
|
|
|
94
94
|
|
|
95
95
|
```text
|
|
96
96
|
Skillware/
|
|
97
|
+
├── docs/ # Comprehensive Documentation & Usage Guides
|
|
98
|
+
├── examples/ # Reference Implementations
|
|
99
|
+
│ └── basic_agent.py # Example showing SkillLoader integration
|
|
100
|
+
├── skills/ # Skill Registry
|
|
101
|
+
│ └── category/ # Domain boundaries (e.g., finance)
|
|
102
|
+
│ └── skill_name/ # The Skill bundle
|
|
103
|
+
│ ├── manifest.yaml # Definition, schema, and constitution
|
|
104
|
+
│ ├── skill.py # Executable Python logic
|
|
105
|
+
│ └── instructions.md # Cognitive map for the LLM
|
|
97
106
|
├── skillware/ # Core Framework Package
|
|
98
107
|
│ └── core/
|
|
99
108
|
│ ├── base_skill.py # Abstract Base Class for skills
|
|
100
|
-
│ ├──
|
|
101
|
-
│ └──
|
|
102
|
-
├──
|
|
103
|
-
│
|
|
104
|
-
|
|
105
|
-
├── templates/ # New Skill Templates
|
|
106
|
-
│ └── python_skill/ # Standard Python Skill Template
|
|
107
|
-
├── examples/ # Reference Implementations
|
|
108
|
-
│ ├── gemini_wallet_check.py # Google Gemini Integration
|
|
109
|
-
│ ├── claude_wallet_check.py # Anthropic Claude Integration
|
|
110
|
-
│ ├── gemini_pdf_form_filler.py
|
|
111
|
-
│ └── claude_pdf_form_filler.py
|
|
112
|
-
├── docs/ # Comprehensive Documentation
|
|
113
|
-
│ ├── introduction.md # Philosophy & Design
|
|
114
|
-
│ ├── usage/ # Integration Guides
|
|
115
|
-
│ └── skills/ # Skill Reference Cards
|
|
116
|
-
└── COMPARISON.md # Comparison vs. Anthropic Skills / MCP
|
|
109
|
+
│ ├── env.py # Environment Management
|
|
110
|
+
│ └── loader.py # Universal Skill Loader & Model Adapter
|
|
111
|
+
├── templates/ # Boilerplate templates for new skills
|
|
112
|
+
│ └── python_skill/ # Standard template with required files
|
|
113
|
+
└── tests/ # Automated test suite
|
|
117
114
|
```
|
|
118
115
|
|
|
119
116
|
## Quick Start
|
|
@@ -177,19 +174,24 @@ print(response.text)
|
|
|
177
174
|
* **[Core Logic & Philosophy](docs/introduction.md)**: Details on how Skillware decouples Logic, Cognition, and Governance.
|
|
178
175
|
* **[Usage Guide: Gemini](docs/usage/gemini.md)**: Integration with Google's GenAI SDK.
|
|
179
176
|
* **[Usage Guide: Claude](docs/usage/claude.md)**: Integration with Anthropic's SDK.
|
|
177
|
+
* **[Usage Guide: Ollama](docs/usage/ollama.md)**: Native integration for local models via Ollama.
|
|
180
178
|
* **[Skill Library](docs/skills/README.md)**: Available capabilities.
|
|
181
179
|
|
|
182
180
|
## Contributing
|
|
183
181
|
|
|
184
182
|
We are building the "App Store" for Agents and require professional, robust, and safe skills.
|
|
185
183
|
|
|
186
|
-
|
|
184
|
+
We actively encourage both humans and autonomous agents to contribute to this repository!
|
|
185
|
+
|
|
186
|
+
* Please read our **[Agent Code of Conduct](CODE_OF_CONDUCT.md)** which outlines our strict expectations for deterministic outputs, zero LLM code generation, and safety boundaries.
|
|
187
|
+
* When submitting skills, our new **Agent-Friendly Pull Request Template** provides a checklist to ensure your logic aligns natively with `loader.py` and `base_skill.py`.
|
|
188
|
+
* Please also review **[CONTRIBUTING.md](CONTRIBUTING.md)** for detailed guidelines on folder structure and schema definitions.
|
|
187
189
|
|
|
188
190
|
## Comparison
|
|
189
191
|
|
|
190
192
|
Skillware differs from the Model Context Protocol (MCP) or Anthropic's Skills repository in the following ways:
|
|
191
193
|
|
|
192
|
-
* **Model Agnostic**: Native adapters for Gemini, Claude, and OpenAI.
|
|
194
|
+
* **Model Agnostic**: Native adapters for Gemini, Claude, Ollama, and OpenAI.
|
|
193
195
|
* **Code-First**: Skills are executable Python packages, not just server specs.
|
|
194
196
|
* **Runtime-Focused**: Provides tools for the application, not just recipes for an IDE.
|
|
195
197
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
LICENSE
|
|
2
2
|
README.md
|
|
3
3
|
pyproject.toml
|
|
4
|
+
skills/data_engineering/synthetic_generator/__init__.py
|
|
5
|
+
skills/data_engineering/synthetic_generator/skill.py
|
|
4
6
|
skills/finance/wallet_screening/__init__.py
|
|
5
7
|
skills/finance/wallet_screening/skill.py
|
|
6
8
|
skills/finance/wallet_screening/maintenance/normalization_tool.py
|
|
@@ -18,4 +20,5 @@ skillware.egg-info/top_level.txt
|
|
|
18
20
|
skillware/core/__init__.py
|
|
19
21
|
skillware/core/base_skill.py
|
|
20
22
|
skillware/core/env.py
|
|
21
|
-
skillware/core/loader.py
|
|
23
|
+
skillware/core/loader.py
|
|
24
|
+
tests/test_loader.py
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import pytest
|
|
2
|
+
from skillware.core.loader import SkillLoader
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def test_load_skill_not_found():
|
|
6
|
+
with pytest.raises(FileNotFoundError):
|
|
7
|
+
SkillLoader.load_skill("nonexistent_skill_path_12345")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def test_to_ollama_prompt():
|
|
11
|
+
dummy_bundle = {
|
|
12
|
+
"manifest": {
|
|
13
|
+
"name": "test_ollama_skill",
|
|
14
|
+
"description": "A very useful test skill.",
|
|
15
|
+
"parameters": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"properties": {
|
|
18
|
+
"arg1": {"type": "string", "description": "The first arg"}
|
|
19
|
+
},
|
|
20
|
+
"required": ["arg1"]
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
prompt = SkillLoader.to_ollama_prompt(dummy_bundle)
|
|
26
|
+
assert "### Tool: `test_ollama_skill`" in prompt
|
|
27
|
+
assert "**Description:** A very useful test skill." in prompt
|
|
28
|
+
assert "- `arg1` (string): The first arg [Required]" in prompt
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
def test_to_gemini_tool():
|
|
32
|
+
dummy_bundle = {
|
|
33
|
+
"manifest": {
|
|
34
|
+
"name": "test_gemini_skill",
|
|
35
|
+
"parameters": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"param1": {"type": "string"}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
tool = SkillLoader.to_gemini_tool(dummy_bundle)
|
|
44
|
+
assert tool["name"] == "test_gemini_skill"
|
|
45
|
+
# Gemini requires UPPERCASE types for Protobufs
|
|
46
|
+
assert tool["parameters"]["type"] == "OBJECT"
|
|
47
|
+
assert tool["parameters"]["properties"]["param1"]["type"] == "STRING"
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def test_to_claude_tool():
|
|
51
|
+
dummy_bundle = {
|
|
52
|
+
"manifest": {
|
|
53
|
+
"name": "test_claude_skill",
|
|
54
|
+
"description": "desc",
|
|
55
|
+
"parameters": {
|
|
56
|
+
"type": "object",
|
|
57
|
+
"properties": {"arg_claude": {"type": "string"}}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
tool = SkillLoader.to_claude_tool(dummy_bundle)
|
|
62
|
+
assert tool["name"] == "test_claude_skill"
|
|
63
|
+
assert tool["input_schema"]["type"] == "object"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|