broskill 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.
Files changed (34) hide show
  1. broskill-0.1.0/.github/workflows/publish.yml +39 -0
  2. broskill-0.1.0/.gitignore +218 -0
  3. broskill-0.1.0/.python-version +1 -0
  4. broskill-0.1.0/LICENSE +21 -0
  5. broskill-0.1.0/PKG-INFO +106 -0
  6. broskill-0.1.0/README.md +93 -0
  7. broskill-0.1.0/VERSIONS.md +17 -0
  8. broskill-0.1.0/examples/case1.py +26 -0
  9. broskill-0.1.0/examples/case2.py +30 -0
  10. broskill-0.1.0/notebooks/dev_skills.ipynb +189 -0
  11. broskill-0.1.0/pyproject.toml +38 -0
  12. broskill-0.1.0/skills/create-prompt/SKILL.md +41 -0
  13. broskill-0.1.0/skills/create-skill/SKILL.md +71 -0
  14. broskill-0.1.0/skills/create-skill/references/asset.md +8 -0
  15. broskill-0.1.0/skills/create-skill/references/reference.md +10 -0
  16. broskill-0.1.0/skills/create-skill/references/script.md +38 -0
  17. broskill-0.1.0/skills/read-file/SKILL.md +38 -0
  18. broskill-0.1.0/skills/read-file/scripts/errors.py +49 -0
  19. broskill-0.1.0/skills/read-file/scripts/list_files.py +41 -0
  20. broskill-0.1.0/skills/read-file/scripts/read_file.py +58 -0
  21. broskill-0.1.0/src/broskill/__init__.py +14 -0
  22. broskill-0.1.0/src/broskill/data_specs/__init__.py +0 -0
  23. broskill-0.1.0/src/broskill/data_specs/skill.py +40 -0
  24. broskill-0.1.0/src/broskill/data_specs/tool.py +54 -0
  25. broskill-0.1.0/src/broskill/processing/__init__.py +0 -0
  26. broskill-0.1.0/src/broskill/processing/path.py +38 -0
  27. broskill-0.1.0/src/broskill/processing/skill.py +169 -0
  28. broskill-0.1.0/src/broskill/processing/tool.py +108 -0
  29. broskill-0.1.0/tests/test_data_specs.py +84 -0
  30. broskill-0.1.0/tests/test_frontmatter.py +28 -0
  31. broskill-0.1.0/tests/test_path.py +45 -0
  32. broskill-0.1.0/tests/test_skill_control.py +234 -0
  33. broskill-0.1.0/tests/test_tool_control.py +129 -0
  34. broskill-0.1.0/uv.lock +646 -0
@@ -0,0 +1,39 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - "v*.*.*"
7
+
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+
14
+ - name: Install uv
15
+ uses: astral-sh/setup-uv@v3
16
+
17
+ - name: Build sdist and wheel
18
+ run: uv build
19
+
20
+ - name: Upload build artifacts
21
+ uses: actions/upload-artifact@v4
22
+ with:
23
+ name: dist
24
+ path: dist/
25
+
26
+ publish:
27
+ needs: build
28
+ runs-on: ubuntu-latest
29
+ permissions:
30
+ id-token: write # required for PyPI trusted publishing
31
+ steps:
32
+ - name: Download build artifacts
33
+ uses: actions/download-artifact@v4
34
+ with:
35
+ name: dist
36
+ path: dist/
37
+
38
+ - name: Publish to PyPI
39
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,218 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[codz]
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
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py.cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ # Pipfile.lock
96
+
97
+ # UV
98
+ # Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # uv.lock
102
+
103
+ # poetry
104
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
106
+ # commonly ignored for libraries.
107
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108
+ # poetry.lock
109
+ # poetry.toml
110
+
111
+ # pdm
112
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
113
+ # pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
114
+ # https://pdm-project.org/en/latest/usage/project/#working-with-version-control
115
+ # pdm.lock
116
+ # pdm.toml
117
+ .pdm-python
118
+ .pdm-build/
119
+
120
+ # pixi
121
+ # Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
122
+ # pixi.lock
123
+ # Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
124
+ # in the .venv directory. It is recommended not to include this directory in version control.
125
+ .pixi
126
+
127
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
128
+ __pypackages__/
129
+
130
+ # Celery stuff
131
+ celerybeat-schedule
132
+ celerybeat.pid
133
+
134
+ # Redis
135
+ *.rdb
136
+ *.aof
137
+ *.pid
138
+
139
+ # RabbitMQ
140
+ mnesia/
141
+ rabbitmq/
142
+ rabbitmq-data/
143
+
144
+ # ActiveMQ
145
+ activemq-data/
146
+
147
+ # SageMath parsed files
148
+ *.sage.py
149
+
150
+ # Environments
151
+ .env
152
+ .envrc
153
+ .venv
154
+ env/
155
+ venv/
156
+ ENV/
157
+ env.bak/
158
+ venv.bak/
159
+
160
+ # Spyder project settings
161
+ .spyderproject
162
+ .spyproject
163
+
164
+ # Rope project settings
165
+ .ropeproject
166
+
167
+ # mkdocs documentation
168
+ /site
169
+
170
+ # mypy
171
+ .mypy_cache/
172
+ .dmypy.json
173
+ dmypy.json
174
+
175
+ # Pyre type checker
176
+ .pyre/
177
+
178
+ # pytype static type analyzer
179
+ .pytype/
180
+
181
+ # Cython debug symbols
182
+ cython_debug/
183
+
184
+ # PyCharm
185
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
186
+ # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
187
+ # and can be added to the global gitignore or merged into this file. For a more nuclear
188
+ # option (not recommended) you can uncomment the following to ignore the entire idea folder.
189
+ # .idea/
190
+
191
+ # Abstra
192
+ # Abstra is an AI-powered process automation framework.
193
+ # Ignore directories containing user credentials, local state, and settings.
194
+ # Learn more at https://abstra.io/docs
195
+ .abstra/
196
+
197
+ # Visual Studio Code
198
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # you could uncomment the following to ignore the entire vscode folder
202
+ # .vscode/
203
+ # Temporary file for partial code execution
204
+ tempCodeRunnerFile.py
205
+
206
+ # Ruff stuff:
207
+ .ruff_cache/
208
+
209
+ # PyPI configuration file
210
+ .pypirc
211
+
212
+ # Marimo
213
+ marimo/_static/
214
+ marimo/_lsp/
215
+ __marimo__/
216
+
217
+ # Streamlit
218
+ .streamlit/secrets.toml
@@ -0,0 +1 @@
1
+ 3.12
broskill-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 doublebank
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.5
2
+ Name: broskill
3
+ Version: 0.1.0
4
+ Summary: Lightweight, quick-loading skill loader for agentic projects — discovers skills (SKILL.md + references/scripts/assets), loads their instructions, and turns their scripts into callable tools.
5
+ Project-URL: Repository, https://github.com/datanooblol/broskill
6
+ Project-URL: Changelog, https://github.com/datanooblol/broskill/blob/main/VERSIONS.md
7
+ Author: datanooblol
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Requires-Python: >=3.12
11
+ Requires-Dist: pyyaml>=6.0.3
12
+ Description-Content-Type: text/markdown
13
+
14
+ # broskill
15
+
16
+ yo. **broskill** is a lightweight, quick-loading skill loader for agentic projects — a "skill" being a folder with instructions (`SKILL.md`) plus optional reference docs, python scripts as tools, and static assets. broskill's whole job is finding those folders, loading them, and turning their scripts into callable tools. That's it. That's the lib.
17
+
18
+ part of the **bro lib family** — small, opinionated, do-one-thing tools built to stop us from writing the same glue code every time we spin up a new agentic project.
19
+
20
+ ## why this exists
21
+
22
+ every time you start a new agent project you end up rebuilding the same boring plumbing: some way to discover "skills," some way to load their instructions, some way to turn a script into a tool the model can call. broskill is that plumbing, ripped out of real projects where we got tired of writing it again and again.
23
+
24
+ **heads up:** this is an opinionated lib. it works one way — SKILL.md + `references/` + `scripts/` + `assets/`, discovered off a `skills/` folder. if that convention fits your project, great, you just saved yourself a bunch of setup. if it doesn't, this probably isn't your lib, and that's fine — go build your own, that's basically how broskill got made in the first place. inspired by real work and real struggle. voilà, here it is.
25
+
26
+ ## install
27
+
28
+ ```bash
29
+ uv pip install -e .
30
+ ```
31
+
32
+ ## the shape of a skill
33
+
34
+ ```
35
+ skills/
36
+ read-file/
37
+ SKILL.md # frontmatter (name, description, version, ...) + instructions
38
+ references/
39
+ script.md # optional deep-dive docs, loaded on demand
40
+ scripts/
41
+ read_file.py # a get_args()-based python script -> becomes a callable tool
42
+ assets/
43
+ template.md # optional static files a skill hands out
44
+ ```
45
+
46
+ `SKILL.md`'s frontmatter has to match the [`Skill`](src/broskill/data_specs/skill.py) dataclass field-for-field (`name`, `description`, `version` required; `tags`, `keywords`, `default`, `status` optional). Want to build one from scratch? There's a skill for that: [`skills/create-skill`](skills/create-skill/SKILL.md).
47
+
48
+ ## quick start
49
+
50
+ ### load skills — `SkillControl`
51
+
52
+ ```python
53
+ from broskill.processing.path import find_root
54
+ from broskill.processing.skill import SkillControl
55
+
56
+ root = find_root() # walks up 'til it finds a skills/ folder
57
+ sc = SkillControl(root=root / "skills")
58
+
59
+ for skill in sc.list_skills():
60
+ print(skill.name, "-", skill.description)
61
+
62
+ body = sc.load_skill("read-file") # -> SKILL.md's instructions, as a str
63
+ ref = sc.load_skill_extension("read-file", "references/script.md")
64
+ ```
65
+
66
+ Full runnable version: [`examples/case1.py`](examples/case1.py).
67
+
68
+ ### turn a script into a tool — `ToolControl`
69
+
70
+ ```python
71
+ from broskill.processing.skill import SkillControl
72
+ from broskill.processing.tool import ToolControl, to_args
73
+ import subprocess, sys
74
+
75
+ sc = SkillControl(root=root / "skills")
76
+ sc.load_skill("read-file")
77
+
78
+ tc = ToolControl(sc)
79
+ tool = tc.load_tool("read-file", "scripts/list_files.py")
80
+ # tool.name, tool.description, tool.args -> ready to hand to an LLM's tool schema
81
+
82
+ result = subprocess.run(
83
+ [sys.executable, str(tool.path), *to_args({"path": "skills/**/*.md"})],
84
+ capture_output=True, text=True,
85
+ )
86
+ ```
87
+
88
+ A script only needs one thing to become a tool: a module-level `get_args()` returning an `argparse.ArgumentParser`. broskill reads that parser and builds the schema for you — no separate tool-definition file to keep in sync. See [`skills/create-skill/references/script.md`](skills/create-skill/references/script.md) for the full contract.
89
+
90
+ Full runnable version: [`examples/case2.py`](examples/case2.py).
91
+
92
+ ## running the tests
93
+
94
+ ```bash
95
+ uv run pytest
96
+ uv run ruff check
97
+ ```
98
+
99
+ ## more
100
+
101
+ - [`VERSIONS.md`](VERSIONS.md) — changelog
102
+ - [`LICENSE`](LICENSE) — MIT
103
+ - [`skills/create-skill`](skills/create-skill/SKILL.md) — a skill that helps you build more skills
104
+ - [`skills/read-file`](skills/read-file/SKILL.md) — the skill used in both examples above, a decent reference for what a real skill looks like
105
+
106
+ stay chill, ship skills. 🤙
@@ -0,0 +1,93 @@
1
+ # broskill
2
+
3
+ yo. **broskill** is a lightweight, quick-loading skill loader for agentic projects — a "skill" being a folder with instructions (`SKILL.md`) plus optional reference docs, python scripts as tools, and static assets. broskill's whole job is finding those folders, loading them, and turning their scripts into callable tools. That's it. That's the lib.
4
+
5
+ part of the **bro lib family** — small, opinionated, do-one-thing tools built to stop us from writing the same glue code every time we spin up a new agentic project.
6
+
7
+ ## why this exists
8
+
9
+ every time you start a new agent project you end up rebuilding the same boring plumbing: some way to discover "skills," some way to load their instructions, some way to turn a script into a tool the model can call. broskill is that plumbing, ripped out of real projects where we got tired of writing it again and again.
10
+
11
+ **heads up:** this is an opinionated lib. it works one way — SKILL.md + `references/` + `scripts/` + `assets/`, discovered off a `skills/` folder. if that convention fits your project, great, you just saved yourself a bunch of setup. if it doesn't, this probably isn't your lib, and that's fine — go build your own, that's basically how broskill got made in the first place. inspired by real work and real struggle. voilà, here it is.
12
+
13
+ ## install
14
+
15
+ ```bash
16
+ uv pip install -e .
17
+ ```
18
+
19
+ ## the shape of a skill
20
+
21
+ ```
22
+ skills/
23
+ read-file/
24
+ SKILL.md # frontmatter (name, description, version, ...) + instructions
25
+ references/
26
+ script.md # optional deep-dive docs, loaded on demand
27
+ scripts/
28
+ read_file.py # a get_args()-based python script -> becomes a callable tool
29
+ assets/
30
+ template.md # optional static files a skill hands out
31
+ ```
32
+
33
+ `SKILL.md`'s frontmatter has to match the [`Skill`](src/broskill/data_specs/skill.py) dataclass field-for-field (`name`, `description`, `version` required; `tags`, `keywords`, `default`, `status` optional). Want to build one from scratch? There's a skill for that: [`skills/create-skill`](skills/create-skill/SKILL.md).
34
+
35
+ ## quick start
36
+
37
+ ### load skills — `SkillControl`
38
+
39
+ ```python
40
+ from broskill.processing.path import find_root
41
+ from broskill.processing.skill import SkillControl
42
+
43
+ root = find_root() # walks up 'til it finds a skills/ folder
44
+ sc = SkillControl(root=root / "skills")
45
+
46
+ for skill in sc.list_skills():
47
+ print(skill.name, "-", skill.description)
48
+
49
+ body = sc.load_skill("read-file") # -> SKILL.md's instructions, as a str
50
+ ref = sc.load_skill_extension("read-file", "references/script.md")
51
+ ```
52
+
53
+ Full runnable version: [`examples/case1.py`](examples/case1.py).
54
+
55
+ ### turn a script into a tool — `ToolControl`
56
+
57
+ ```python
58
+ from broskill.processing.skill import SkillControl
59
+ from broskill.processing.tool import ToolControl, to_args
60
+ import subprocess, sys
61
+
62
+ sc = SkillControl(root=root / "skills")
63
+ sc.load_skill("read-file")
64
+
65
+ tc = ToolControl(sc)
66
+ tool = tc.load_tool("read-file", "scripts/list_files.py")
67
+ # tool.name, tool.description, tool.args -> ready to hand to an LLM's tool schema
68
+
69
+ result = subprocess.run(
70
+ [sys.executable, str(tool.path), *to_args({"path": "skills/**/*.md"})],
71
+ capture_output=True, text=True,
72
+ )
73
+ ```
74
+
75
+ A script only needs one thing to become a tool: a module-level `get_args()` returning an `argparse.ArgumentParser`. broskill reads that parser and builds the schema for you — no separate tool-definition file to keep in sync. See [`skills/create-skill/references/script.md`](skills/create-skill/references/script.md) for the full contract.
76
+
77
+ Full runnable version: [`examples/case2.py`](examples/case2.py).
78
+
79
+ ## running the tests
80
+
81
+ ```bash
82
+ uv run pytest
83
+ uv run ruff check
84
+ ```
85
+
86
+ ## more
87
+
88
+ - [`VERSIONS.md`](VERSIONS.md) — changelog
89
+ - [`LICENSE`](LICENSE) — MIT
90
+ - [`skills/create-skill`](skills/create-skill/SKILL.md) — a skill that helps you build more skills
91
+ - [`skills/read-file`](skills/read-file/SKILL.md) — the skill used in both examples above, a decent reference for what a real skill looks like
92
+
93
+ stay chill, ship skills. 🤙
@@ -0,0 +1,17 @@
1
+ # VERSIONS
2
+
3
+ Changelog for broskill. Newest first.
4
+
5
+ ## v0.1.0
6
+
7
+ First real drop. This is where broskill stopped being a notebook full of scratch code and became an actual lib.
8
+
9
+ - **`SkillControl`** — discovers skills under a `skills/` dir, loads a skill's `SKILL.md` (frontmatter → `Skill`, body returned to you), and reads any `references/`, `scripts/`, or `assets/` file a skill points to. Caches what it loads so you're not re-walking the filesystem every call.
10
+ - **`ToolControl`** — turns a skill's `scripts/*.py` into a callable `Tool` schema by reading its `get_args()` (yep, plain `argparse`). Composes with `SkillControl` instead of re-solving "where's this skill" itself. Caches too.
11
+ - **`Skill` / `Tool` / `Arg`** — the dataclasses everything above hands you back. Fields carry their own `description` in `metadata`, so the schema is self-documenting.
12
+ - **`processing.path`** — `find_root()` (walk up 'til you hit a `skills/` folder, git-style) and `strip_path()` (clean up glob-y path fragments).
13
+ - Real error handling everywhere that matters — no bare `raise`, no silent `IndexError`s. Every failure mode tells you what to do next.
14
+ - Full test suite (`tests/`) covering all of the above.
15
+ - Two runnable examples: [`examples/case1.py`](examples/case1.py) (SkillControl) and [`examples/case2.py`](examples/case2.py) (ToolControl).
16
+
17
+ See [README.md](README.md) for the how/why.
@@ -0,0 +1,26 @@
1
+ """SkillControl 101 — discover, load, and read a skill's parts.
2
+
3
+ Run from anywhere in the project:
4
+ uv run python examples/case1.py
5
+ """
6
+ import sys
7
+
8
+ from broskill.processing.path import find_root
9
+ from broskill.processing.skill import SkillControl
10
+
11
+ sys.stdout.reconfigure(encoding="utf-8")
12
+
13
+ root = find_root()
14
+ sc = SkillControl(root=root / "skills")
15
+
16
+ print("skills we've got:")
17
+ for skill in sc.list_skills():
18
+ print(f" - {skill.name}: {skill.description}")
19
+
20
+ body = sc.load_skill("read-file")
21
+ print("\nread-file's SKILL.md body:\n")
22
+ print(body)
23
+
24
+ script = sc.load_skill_extension("read-file", "scripts/read_file.py")
25
+ print("\nread-file's read_file.py:\n")
26
+ print(script)
@@ -0,0 +1,30 @@
1
+ """ToolControl 101 — turn a skill's script into a callable tool schema, then run it.
2
+
3
+ Run from anywhere in the project:
4
+ uv run python examples/case2.py
5
+ """
6
+ import subprocess
7
+ import sys
8
+
9
+ from broskill.processing.path import find_root
10
+ from broskill.processing.skill import SkillControl
11
+ from broskill.processing.tool import ToolControl, to_args
12
+
13
+ root = find_root()
14
+ sc = SkillControl(root=root / "skills")
15
+ sc.load_skill("read-file")
16
+
17
+ tc = ToolControl(sc)
18
+ tool = tc.load_tool("read-file", "scripts/list_files.py")
19
+
20
+ print(f"tool: {tool.name}")
21
+ print(f"description: {tool.description}")
22
+ for arg in tool.args:
23
+ print(f" - {arg.name} ({arg.type}, required={arg.required}): {arg.description}")
24
+
25
+ result = subprocess.run(
26
+ [sys.executable, str(tool.path), *to_args({"path": "skills/**/*.md"})],
27
+ capture_output=True, text=True, cwd=root,
28
+ )
29
+ print("\noutput:\n")
30
+ print(result.stdout)