sutras 0.1.0__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.
- sutras-0.1.0/.gitignore +143 -0
- sutras-0.1.0/LICENSE +9 -0
- sutras-0.1.0/PKG-INFO +287 -0
- sutras-0.1.0/README.md +258 -0
- sutras-0.1.0/examples/README.md +106 -0
- sutras-0.1.0/examples/skills/hello-claude/SKILL.md +48 -0
- sutras-0.1.0/examples/skills/hello-claude/examples.md +104 -0
- sutras-0.1.0/examples/skills/hello-claude/sutras.yaml +18 -0
- sutras-0.1.0/pyproject.toml +100 -0
- sutras-0.1.0/src/sutras/__init__.py +27 -0
- sutras-0.1.0/src/sutras/cli/__init__.py +5 -0
- sutras-0.1.0/src/sutras/cli/main.py +283 -0
- sutras-0.1.0/src/sutras/core/__init__.py +12 -0
- sutras-0.1.0/src/sutras/core/abi.py +117 -0
- sutras-0.1.0/src/sutras/core/loader.py +162 -0
- sutras-0.1.0/src/sutras/core/skill.py +193 -0
- sutras-0.1.0/tests/__init__.py +1 -0
- sutras-0.1.0/tests/test_skill.py +127 -0
- sutras-0.1.0/tests/test_version.py +19 -0
sutras-0.1.0/.gitignore
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
pip-wheel-metadata/
|
|
24
|
+
share/python-wheels/
|
|
25
|
+
*.egg-info/
|
|
26
|
+
.installed.cfg
|
|
27
|
+
*.egg
|
|
28
|
+
MANIFEST
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.nox/
|
|
42
|
+
.coverage
|
|
43
|
+
.coverage.*
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
*.cover
|
|
48
|
+
*.py,cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Django stuff:
|
|
57
|
+
*.log
|
|
58
|
+
local_settings.py
|
|
59
|
+
db.sqlite3
|
|
60
|
+
db.sqlite3-journal
|
|
61
|
+
|
|
62
|
+
# Flask stuff:
|
|
63
|
+
instance/
|
|
64
|
+
.webassets-cache
|
|
65
|
+
|
|
66
|
+
# Scrapy stuff:
|
|
67
|
+
.scrapy
|
|
68
|
+
|
|
69
|
+
# Sphinx documentation
|
|
70
|
+
docs/_build/
|
|
71
|
+
|
|
72
|
+
# PyBuilder
|
|
73
|
+
target/
|
|
74
|
+
|
|
75
|
+
# Jupyter Notebook
|
|
76
|
+
.ipynb_checkpoints
|
|
77
|
+
|
|
78
|
+
# IPython
|
|
79
|
+
profile_default/
|
|
80
|
+
ipython_config.py
|
|
81
|
+
|
|
82
|
+
# pyenv
|
|
83
|
+
.python-version
|
|
84
|
+
|
|
85
|
+
# pipenv
|
|
86
|
+
Pipfile.lock
|
|
87
|
+
|
|
88
|
+
# PEP 582
|
|
89
|
+
__pypackages__/
|
|
90
|
+
|
|
91
|
+
# Celery stuff
|
|
92
|
+
celerybeat-schedule
|
|
93
|
+
celerybeat.pid
|
|
94
|
+
|
|
95
|
+
# SageMath parsed files
|
|
96
|
+
*.sage.py
|
|
97
|
+
|
|
98
|
+
# Environments
|
|
99
|
+
.env
|
|
100
|
+
.venv
|
|
101
|
+
env/
|
|
102
|
+
venv/
|
|
103
|
+
ENV/
|
|
104
|
+
env.bak/
|
|
105
|
+
venv.bak/
|
|
106
|
+
|
|
107
|
+
# uv
|
|
108
|
+
# Note: uv.lock should be committed to ensure reproducible builds
|
|
109
|
+
|
|
110
|
+
# User skills directory (skills created with sutras new)
|
|
111
|
+
.claude/
|
|
112
|
+
|
|
113
|
+
# Project
|
|
114
|
+
plan.md
|
|
115
|
+
|
|
116
|
+
# Spyder project settings
|
|
117
|
+
.spyderproject
|
|
118
|
+
.spyproject
|
|
119
|
+
|
|
120
|
+
# Rope project settings
|
|
121
|
+
.ropeproject
|
|
122
|
+
|
|
123
|
+
# mkdocs documentation
|
|
124
|
+
/site
|
|
125
|
+
|
|
126
|
+
# mypy
|
|
127
|
+
.mypy_cache/
|
|
128
|
+
.dmypy.json
|
|
129
|
+
dmypy.json
|
|
130
|
+
|
|
131
|
+
# Pyre type checker
|
|
132
|
+
.pyre/
|
|
133
|
+
|
|
134
|
+
# IDEs
|
|
135
|
+
.vscode/
|
|
136
|
+
.idea/
|
|
137
|
+
*.swp
|
|
138
|
+
*.swo
|
|
139
|
+
*~
|
|
140
|
+
|
|
141
|
+
# OS
|
|
142
|
+
.DS_Store
|
|
143
|
+
Thumbs.db
|
sutras-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Kumar Anirudha
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
sutras-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sutras
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Devtool for creating, testing, and distributing Anthropic Agent Skills with lifecycle management and Skill ABI
|
|
5
|
+
Project-URL: Homepage, https://github.com/anistark/sutras
|
|
6
|
+
Project-URL: Documentation, https://github.com/anistark/sutras#readme
|
|
7
|
+
Project-URL: Repository, https://github.com/anistark/sutras
|
|
8
|
+
Author-email: Kumar Anirudha <oss@anirudha.dev>
|
|
9
|
+
License: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Keywords: agent,ai,anthropic,cli,devtools,skills
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
21
|
+
Requires-Python: >=3.11
|
|
22
|
+
Requires-Dist: click>=8.0.0
|
|
23
|
+
Requires-Dist: jinja2>=3.0.0
|
|
24
|
+
Requires-Dist: pydantic>=2.0.0
|
|
25
|
+
Requires-Dist: pyyaml>=6.0
|
|
26
|
+
Provides-Extra: eval
|
|
27
|
+
Requires-Dist: ragas>=0.1.0; extra == 'eval'
|
|
28
|
+
Description-Content-Type: text/markdown
|
|
29
|
+
|
|
30
|
+
# Sutras
|
|
31
|
+
|
|
32
|
+
**Devtool for creating, testing, and distributing Anthropic Agent Skills with lifecycle management.**
|
|
33
|
+
|
|
34
|
+
## What is Sutras?
|
|
35
|
+
|
|
36
|
+
**Sutras** is a comprehensive CLI and library built on top of the [Anthropic Agent Skills framework](https://platform.claude.com/docs/en/agent-sdk/skills). It provides tooling for the complete skill lifecycle — from scaffolding to distribution — with a standardized Skill ABI (Application Binary Interface) for testing, evaluation, and metadata management.
|
|
37
|
+
|
|
38
|
+
### Key Features
|
|
39
|
+
|
|
40
|
+
- **Create**: Scaffold new skills with best-practice templates and Skill ABI compliance
|
|
41
|
+
- **Evaluate**: Test skills with eval frameworks (Ragas, custom evaluators)
|
|
42
|
+
- **Test**: Run skills in isolation with mock inputs and validate outputs
|
|
43
|
+
- **Distribute**: Package and share skills as reusable modules
|
|
44
|
+
- **Discover**: Browse, search, and import skills from local and remote registries
|
|
45
|
+
- **Import**: Easy integration of skills into agent systems
|
|
46
|
+
|
|
47
|
+
## Why Sutras?
|
|
48
|
+
|
|
49
|
+
Working with Anthropic Skills manually involves:
|
|
50
|
+
- Creating SKILL.md files with proper YAML frontmatter
|
|
51
|
+
- Managing skill metadata and descriptions
|
|
52
|
+
- Testing skills across different scenarios
|
|
53
|
+
- Sharing skills with teams
|
|
54
|
+
- Ensuring skill quality and consistency
|
|
55
|
+
|
|
56
|
+
Sutras automates all of this with a unified devtool experience.
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
Using pip:
|
|
61
|
+
|
|
62
|
+
```sh
|
|
63
|
+
pip install sutras
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or using uv (recommended):
|
|
67
|
+
|
|
68
|
+
```sh
|
|
69
|
+
uv pip install sutras
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Quick Start
|
|
73
|
+
|
|
74
|
+
### Creating a New Skill
|
|
75
|
+
|
|
76
|
+
Use the CLI to scaffold a new skill:
|
|
77
|
+
|
|
78
|
+
```sh
|
|
79
|
+
sutras new pdf-form-filler --description "Fill PDF forms automatically"
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
This creates a skill with proper Anthropic Skills structure:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
.claude/skills/pdf-form-filler/
|
|
86
|
+
├── SKILL.md # Main skill definition with YAML frontmatter
|
|
87
|
+
├── sutras.yaml # Sutras ABI metadata (eval, tests, distribution)
|
|
88
|
+
└── examples.md # Usage examples
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Skill Structure (SKILL.md)
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
---
|
|
95
|
+
name: pdf-form-filler
|
|
96
|
+
description: Fill PDF forms automatically. Use when user needs to populate PDF forms with data from JSON, CSV, or manual input.
|
|
97
|
+
allowed-tools: Read, Write, Bash
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
# PDF Form Filler
|
|
101
|
+
|
|
102
|
+
This skill helps fill PDF forms programmatically.
|
|
103
|
+
|
|
104
|
+
## Instructions
|
|
105
|
+
|
|
106
|
+
1. Read the PDF form to identify fields
|
|
107
|
+
2. Map input data to form fields
|
|
108
|
+
3. Fill the form using appropriate tools
|
|
109
|
+
4. Save the completed PDF
|
|
110
|
+
|
|
111
|
+
## Examples
|
|
112
|
+
|
|
113
|
+
[See examples.md](examples.md) for detailed use cases.
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Using Skills with Claude
|
|
117
|
+
|
|
118
|
+
Skills are automatically discovered by Claude when using the Agent SDK:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
from claude_agent_sdk import query, ClaudeAgentOptions
|
|
122
|
+
|
|
123
|
+
async for message in query(
|
|
124
|
+
prompt="Fill out form.pdf with data from data.json",
|
|
125
|
+
options=ClaudeAgentOptions(
|
|
126
|
+
cwd=".claude/skills",
|
|
127
|
+
setting_sources=["project"],
|
|
128
|
+
allowed_tools=["Skill", "Read", "Write", "Bash"]
|
|
129
|
+
)
|
|
130
|
+
):
|
|
131
|
+
print(message)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### CLI Commands
|
|
135
|
+
|
|
136
|
+
```sh
|
|
137
|
+
# Scaffold new skill
|
|
138
|
+
sutras new <name> [--description DESC] [--author AUTHOR]
|
|
139
|
+
|
|
140
|
+
# List available skills
|
|
141
|
+
sutras list [--local | --global]
|
|
142
|
+
|
|
143
|
+
# Show skill information
|
|
144
|
+
sutras info <name>
|
|
145
|
+
|
|
146
|
+
# Validate skill structure
|
|
147
|
+
sutras validate <name>
|
|
148
|
+
|
|
149
|
+
# Test skill (coming soon)
|
|
150
|
+
sutras test <name> [--input ...]
|
|
151
|
+
|
|
152
|
+
# Evaluate skill (coming soon)
|
|
153
|
+
sutras eval <name> [--framework ragas]
|
|
154
|
+
|
|
155
|
+
# Build skill package (coming soon)
|
|
156
|
+
sutras build <name>
|
|
157
|
+
|
|
158
|
+
# Publish to registry (coming soon)
|
|
159
|
+
sutras publish <name>
|
|
160
|
+
|
|
161
|
+
# Discover skills (coming soon)
|
|
162
|
+
sutras discover [--search QUERY]
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Core Concepts
|
|
166
|
+
|
|
167
|
+
### Skill Structure
|
|
168
|
+
|
|
169
|
+
Every Sutras-managed skill consists of:
|
|
170
|
+
|
|
171
|
+
1. **SKILL.md** - Anthropic Skills format with YAML frontmatter (required)
|
|
172
|
+
- `name`: Skill identifier (lowercase, hyphens)
|
|
173
|
+
- `description`: What it does and when to use it (critical for Claude discovery)
|
|
174
|
+
- `allowed-tools`: Optional tool restrictions
|
|
175
|
+
|
|
176
|
+
2. **sutras.yaml** - Sutras ABI metadata (optional but recommended)
|
|
177
|
+
- `version`: Semantic version
|
|
178
|
+
- `author`: Skill author
|
|
179
|
+
- `license`: Distribution license
|
|
180
|
+
- `repository`: Source repository
|
|
181
|
+
- `tests`: Test specifications
|
|
182
|
+
- `eval`: Evaluation configuration
|
|
183
|
+
|
|
184
|
+
3. **Supporting files** (optional)
|
|
185
|
+
- `examples.md`: Usage examples
|
|
186
|
+
- `reference.md`: Detailed documentation
|
|
187
|
+
- `scripts/`: Utility scripts
|
|
188
|
+
- `templates/`: Reusable templates
|
|
189
|
+
|
|
190
|
+
### Skill ABI (sutras.yaml)
|
|
191
|
+
|
|
192
|
+
The `sutras.yaml` file extends Anthropic Skills with lifecycle metadata:
|
|
193
|
+
|
|
194
|
+
```yaml
|
|
195
|
+
version: "1.0.0"
|
|
196
|
+
author: "Your Name"
|
|
197
|
+
license: "MIT"
|
|
198
|
+
repository: "https://github.com/user/skill"
|
|
199
|
+
|
|
200
|
+
# Capability declarations
|
|
201
|
+
capabilities:
|
|
202
|
+
tools: [Read, Write, Bash]
|
|
203
|
+
dependencies: []
|
|
204
|
+
constraints: {}
|
|
205
|
+
|
|
206
|
+
# Test configuration (optional)
|
|
207
|
+
tests:
|
|
208
|
+
cases:
|
|
209
|
+
- name: "basic-fill-test"
|
|
210
|
+
inputs:
|
|
211
|
+
form: "tests/fixtures/form.pdf"
|
|
212
|
+
data: "tests/fixtures/data.json"
|
|
213
|
+
expected:
|
|
214
|
+
output_file: "tests/fixtures/expected.pdf"
|
|
215
|
+
|
|
216
|
+
# Evaluation configuration (optional)
|
|
217
|
+
eval:
|
|
218
|
+
framework: "ragas"
|
|
219
|
+
metrics: ["correctness", "completeness"]
|
|
220
|
+
dataset: "tests/eval/dataset.json"
|
|
221
|
+
|
|
222
|
+
# Distribution metadata
|
|
223
|
+
distribution:
|
|
224
|
+
tags: ["pdf", "forms", "automation"]
|
|
225
|
+
category: "document-processing"
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Skill Lifecycle
|
|
229
|
+
|
|
230
|
+
Sutras supports the complete skill lifecycle:
|
|
231
|
+
|
|
232
|
+
1. **Create**: `sutras new` scaffolds with templates
|
|
233
|
+
2. **Develop**: Edit SKILL.md and supporting files
|
|
234
|
+
3. **Validate**: `sutras validate` checks ABI compliance
|
|
235
|
+
4. **Test**: `sutras test` runs unit tests (coming soon)
|
|
236
|
+
5. **Evaluate**: `sutras eval` measures quality (coming soon)
|
|
237
|
+
6. **Build**: `sutras build` packages for distribution (coming soon)
|
|
238
|
+
7. **Publish**: `sutras publish` shares to registry (coming soon)
|
|
239
|
+
8. **Discover**: `sutras discover` finds published skills (coming soon)
|
|
240
|
+
|
|
241
|
+
### Skills Directory
|
|
242
|
+
|
|
243
|
+
When you create skills with `sutras new`, they're placed in:
|
|
244
|
+
- **Project skills**: `.claude/skills/` (shared with team via git)
|
|
245
|
+
- **Global skills**: `~/.claude/skills/` (personal, not committed)
|
|
246
|
+
|
|
247
|
+
These follow the Anthropic Skills directory convention.
|
|
248
|
+
|
|
249
|
+
## Library Usage
|
|
250
|
+
|
|
251
|
+
Use Sutras as a library to integrate skill management into your applications:
|
|
252
|
+
|
|
253
|
+
```python
|
|
254
|
+
from sutras import SkillLoader
|
|
255
|
+
|
|
256
|
+
# Load and inspect skills
|
|
257
|
+
loader = SkillLoader()
|
|
258
|
+
skills = loader.discover() # Find available skills
|
|
259
|
+
skill = loader.load("pdf-processor") # Load specific skill
|
|
260
|
+
|
|
261
|
+
print(f"Skill: {skill.name}")
|
|
262
|
+
print(f"Description: {skill.description}")
|
|
263
|
+
print(f"Allowed tools: {skill.allowed_tools}")
|
|
264
|
+
print(f"Path: {skill.path}")
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## Examples
|
|
268
|
+
|
|
269
|
+
Check out the [examples/](./examples/) directory for sample skills demonstrating best practices.
|
|
270
|
+
|
|
271
|
+
## Contributing
|
|
272
|
+
|
|
273
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup, guidelines, and workflow.
|
|
274
|
+
|
|
275
|
+
Quick development commands (requires [just](https://github.com/casey/just)):
|
|
276
|
+
|
|
277
|
+
```sh
|
|
278
|
+
just format # Format code
|
|
279
|
+
just lint # Lint code
|
|
280
|
+
just check # Type check
|
|
281
|
+
just test # Run tests
|
|
282
|
+
just pre-commit # Run all checks
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## License
|
|
286
|
+
|
|
287
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
sutras-0.1.0/README.md
ADDED
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Sutras
|
|
2
|
+
|
|
3
|
+
**Devtool for creating, testing, and distributing Anthropic Agent Skills with lifecycle management.**
|
|
4
|
+
|
|
5
|
+
## What is Sutras?
|
|
6
|
+
|
|
7
|
+
**Sutras** is a comprehensive CLI and library built on top of the [Anthropic Agent Skills framework](https://platform.claude.com/docs/en/agent-sdk/skills). It provides tooling for the complete skill lifecycle — from scaffolding to distribution — with a standardized Skill ABI (Application Binary Interface) for testing, evaluation, and metadata management.
|
|
8
|
+
|
|
9
|
+
### Key Features
|
|
10
|
+
|
|
11
|
+
- **Create**: Scaffold new skills with best-practice templates and Skill ABI compliance
|
|
12
|
+
- **Evaluate**: Test skills with eval frameworks (Ragas, custom evaluators)
|
|
13
|
+
- **Test**: Run skills in isolation with mock inputs and validate outputs
|
|
14
|
+
- **Distribute**: Package and share skills as reusable modules
|
|
15
|
+
- **Discover**: Browse, search, and import skills from local and remote registries
|
|
16
|
+
- **Import**: Easy integration of skills into agent systems
|
|
17
|
+
|
|
18
|
+
## Why Sutras?
|
|
19
|
+
|
|
20
|
+
Working with Anthropic Skills manually involves:
|
|
21
|
+
- Creating SKILL.md files with proper YAML frontmatter
|
|
22
|
+
- Managing skill metadata and descriptions
|
|
23
|
+
- Testing skills across different scenarios
|
|
24
|
+
- Sharing skills with teams
|
|
25
|
+
- Ensuring skill quality and consistency
|
|
26
|
+
|
|
27
|
+
Sutras automates all of this with a unified devtool experience.
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
Using pip:
|
|
32
|
+
|
|
33
|
+
```sh
|
|
34
|
+
pip install sutras
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Or using uv (recommended):
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
uv pip install sutras
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
### Creating a New Skill
|
|
46
|
+
|
|
47
|
+
Use the CLI to scaffold a new skill:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
sutras new pdf-form-filler --description "Fill PDF forms automatically"
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
This creates a skill with proper Anthropic Skills structure:
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
.claude/skills/pdf-form-filler/
|
|
57
|
+
├── SKILL.md # Main skill definition with YAML frontmatter
|
|
58
|
+
├── sutras.yaml # Sutras ABI metadata (eval, tests, distribution)
|
|
59
|
+
└── examples.md # Usage examples
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Skill Structure (SKILL.md)
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
---
|
|
66
|
+
name: pdf-form-filler
|
|
67
|
+
description: Fill PDF forms automatically. Use when user needs to populate PDF forms with data from JSON, CSV, or manual input.
|
|
68
|
+
allowed-tools: Read, Write, Bash
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
# PDF Form Filler
|
|
72
|
+
|
|
73
|
+
This skill helps fill PDF forms programmatically.
|
|
74
|
+
|
|
75
|
+
## Instructions
|
|
76
|
+
|
|
77
|
+
1. Read the PDF form to identify fields
|
|
78
|
+
2. Map input data to form fields
|
|
79
|
+
3. Fill the form using appropriate tools
|
|
80
|
+
4. Save the completed PDF
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
[See examples.md](examples.md) for detailed use cases.
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Using Skills with Claude
|
|
88
|
+
|
|
89
|
+
Skills are automatically discovered by Claude when using the Agent SDK:
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from claude_agent_sdk import query, ClaudeAgentOptions
|
|
93
|
+
|
|
94
|
+
async for message in query(
|
|
95
|
+
prompt="Fill out form.pdf with data from data.json",
|
|
96
|
+
options=ClaudeAgentOptions(
|
|
97
|
+
cwd=".claude/skills",
|
|
98
|
+
setting_sources=["project"],
|
|
99
|
+
allowed_tools=["Skill", "Read", "Write", "Bash"]
|
|
100
|
+
)
|
|
101
|
+
):
|
|
102
|
+
print(message)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### CLI Commands
|
|
106
|
+
|
|
107
|
+
```sh
|
|
108
|
+
# Scaffold new skill
|
|
109
|
+
sutras new <name> [--description DESC] [--author AUTHOR]
|
|
110
|
+
|
|
111
|
+
# List available skills
|
|
112
|
+
sutras list [--local | --global]
|
|
113
|
+
|
|
114
|
+
# Show skill information
|
|
115
|
+
sutras info <name>
|
|
116
|
+
|
|
117
|
+
# Validate skill structure
|
|
118
|
+
sutras validate <name>
|
|
119
|
+
|
|
120
|
+
# Test skill (coming soon)
|
|
121
|
+
sutras test <name> [--input ...]
|
|
122
|
+
|
|
123
|
+
# Evaluate skill (coming soon)
|
|
124
|
+
sutras eval <name> [--framework ragas]
|
|
125
|
+
|
|
126
|
+
# Build skill package (coming soon)
|
|
127
|
+
sutras build <name>
|
|
128
|
+
|
|
129
|
+
# Publish to registry (coming soon)
|
|
130
|
+
sutras publish <name>
|
|
131
|
+
|
|
132
|
+
# Discover skills (coming soon)
|
|
133
|
+
sutras discover [--search QUERY]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Core Concepts
|
|
137
|
+
|
|
138
|
+
### Skill Structure
|
|
139
|
+
|
|
140
|
+
Every Sutras-managed skill consists of:
|
|
141
|
+
|
|
142
|
+
1. **SKILL.md** - Anthropic Skills format with YAML frontmatter (required)
|
|
143
|
+
- `name`: Skill identifier (lowercase, hyphens)
|
|
144
|
+
- `description`: What it does and when to use it (critical for Claude discovery)
|
|
145
|
+
- `allowed-tools`: Optional tool restrictions
|
|
146
|
+
|
|
147
|
+
2. **sutras.yaml** - Sutras ABI metadata (optional but recommended)
|
|
148
|
+
- `version`: Semantic version
|
|
149
|
+
- `author`: Skill author
|
|
150
|
+
- `license`: Distribution license
|
|
151
|
+
- `repository`: Source repository
|
|
152
|
+
- `tests`: Test specifications
|
|
153
|
+
- `eval`: Evaluation configuration
|
|
154
|
+
|
|
155
|
+
3. **Supporting files** (optional)
|
|
156
|
+
- `examples.md`: Usage examples
|
|
157
|
+
- `reference.md`: Detailed documentation
|
|
158
|
+
- `scripts/`: Utility scripts
|
|
159
|
+
- `templates/`: Reusable templates
|
|
160
|
+
|
|
161
|
+
### Skill ABI (sutras.yaml)
|
|
162
|
+
|
|
163
|
+
The `sutras.yaml` file extends Anthropic Skills with lifecycle metadata:
|
|
164
|
+
|
|
165
|
+
```yaml
|
|
166
|
+
version: "1.0.0"
|
|
167
|
+
author: "Your Name"
|
|
168
|
+
license: "MIT"
|
|
169
|
+
repository: "https://github.com/user/skill"
|
|
170
|
+
|
|
171
|
+
# Capability declarations
|
|
172
|
+
capabilities:
|
|
173
|
+
tools: [Read, Write, Bash]
|
|
174
|
+
dependencies: []
|
|
175
|
+
constraints: {}
|
|
176
|
+
|
|
177
|
+
# Test configuration (optional)
|
|
178
|
+
tests:
|
|
179
|
+
cases:
|
|
180
|
+
- name: "basic-fill-test"
|
|
181
|
+
inputs:
|
|
182
|
+
form: "tests/fixtures/form.pdf"
|
|
183
|
+
data: "tests/fixtures/data.json"
|
|
184
|
+
expected:
|
|
185
|
+
output_file: "tests/fixtures/expected.pdf"
|
|
186
|
+
|
|
187
|
+
# Evaluation configuration (optional)
|
|
188
|
+
eval:
|
|
189
|
+
framework: "ragas"
|
|
190
|
+
metrics: ["correctness", "completeness"]
|
|
191
|
+
dataset: "tests/eval/dataset.json"
|
|
192
|
+
|
|
193
|
+
# Distribution metadata
|
|
194
|
+
distribution:
|
|
195
|
+
tags: ["pdf", "forms", "automation"]
|
|
196
|
+
category: "document-processing"
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### Skill Lifecycle
|
|
200
|
+
|
|
201
|
+
Sutras supports the complete skill lifecycle:
|
|
202
|
+
|
|
203
|
+
1. **Create**: `sutras new` scaffolds with templates
|
|
204
|
+
2. **Develop**: Edit SKILL.md and supporting files
|
|
205
|
+
3. **Validate**: `sutras validate` checks ABI compliance
|
|
206
|
+
4. **Test**: `sutras test` runs unit tests (coming soon)
|
|
207
|
+
5. **Evaluate**: `sutras eval` measures quality (coming soon)
|
|
208
|
+
6. **Build**: `sutras build` packages for distribution (coming soon)
|
|
209
|
+
7. **Publish**: `sutras publish` shares to registry (coming soon)
|
|
210
|
+
8. **Discover**: `sutras discover` finds published skills (coming soon)
|
|
211
|
+
|
|
212
|
+
### Skills Directory
|
|
213
|
+
|
|
214
|
+
When you create skills with `sutras new`, they're placed in:
|
|
215
|
+
- **Project skills**: `.claude/skills/` (shared with team via git)
|
|
216
|
+
- **Global skills**: `~/.claude/skills/` (personal, not committed)
|
|
217
|
+
|
|
218
|
+
These follow the Anthropic Skills directory convention.
|
|
219
|
+
|
|
220
|
+
## Library Usage
|
|
221
|
+
|
|
222
|
+
Use Sutras as a library to integrate skill management into your applications:
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
from sutras import SkillLoader
|
|
226
|
+
|
|
227
|
+
# Load and inspect skills
|
|
228
|
+
loader = SkillLoader()
|
|
229
|
+
skills = loader.discover() # Find available skills
|
|
230
|
+
skill = loader.load("pdf-processor") # Load specific skill
|
|
231
|
+
|
|
232
|
+
print(f"Skill: {skill.name}")
|
|
233
|
+
print(f"Description: {skill.description}")
|
|
234
|
+
print(f"Allowed tools: {skill.allowed_tools}")
|
|
235
|
+
print(f"Path: {skill.path}")
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
## Examples
|
|
239
|
+
|
|
240
|
+
Check out the [examples/](./examples/) directory for sample skills demonstrating best practices.
|
|
241
|
+
|
|
242
|
+
## Contributing
|
|
243
|
+
|
|
244
|
+
Contributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup, guidelines, and workflow.
|
|
245
|
+
|
|
246
|
+
Quick development commands (requires [just](https://github.com/casey/just)):
|
|
247
|
+
|
|
248
|
+
```sh
|
|
249
|
+
just format # Format code
|
|
250
|
+
just lint # Lint code
|
|
251
|
+
just check # Type check
|
|
252
|
+
just test # Run tests
|
|
253
|
+
just pre-commit # Run all checks
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## License
|
|
257
|
+
|
|
258
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|