episodely-skillcheck 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.
- episodely_skillcheck-0.1.0/LICENSE +9 -0
- episodely_skillcheck-0.1.0/PKG-INFO +54 -0
- episodely_skillcheck-0.1.0/README.md +38 -0
- episodely_skillcheck-0.1.0/episodely_skillcheck.egg-info/PKG-INFO +54 -0
- episodely_skillcheck-0.1.0/episodely_skillcheck.egg-info/SOURCES.txt +9 -0
- episodely_skillcheck-0.1.0/episodely_skillcheck.egg-info/dependency_links.txt +1 -0
- episodely_skillcheck-0.1.0/episodely_skillcheck.egg-info/entry_points.txt +2 -0
- episodely_skillcheck-0.1.0/episodely_skillcheck.egg-info/top_level.txt +1 -0
- episodely_skillcheck-0.1.0/pyproject.toml +27 -0
- episodely_skillcheck-0.1.0/setup.cfg +4 -0
- episodely_skillcheck-0.1.0/skillcheck.py +86 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 episodely
|
|
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.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: episodely-skillcheck
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Lint agent SKILL.md files: frontmatter, dead links and duplicate names.
|
|
5
|
+
Author: episodely
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/episodely/skillcheck
|
|
8
|
+
Project-URL: Issues, https://github.com/episodely/skillcheck/issues
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# skillcheck
|
|
18
|
+
|
|
19
|
+
Lint agent skills. Agent skill bundles (a folder with a `SKILL.md`) are everywhere now, and a bad `description` or a dead link means the agent never picks the skill up or reads a missing file. `skillcheck` finds those problems before your agent does. Pure Python, no dependencies.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
$ python skillcheck.py ./skills
|
|
23
|
+
./skills/pdf/SKILL.md ok
|
|
24
|
+
./skills/notes/SKILL.md
|
|
25
|
+
[error] dead-link: Link to 'reference.md' does not exist.
|
|
26
|
+
[info] no-trigger: Description never says when to use the skill.
|
|
27
|
+
2 skill(s) checked, 1 error(s).
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
pip install episodely-skillcheck
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or copy `skillcheck.py` into your project, it has no dependencies.
|
|
37
|
+
|
|
38
|
+
## What it checks
|
|
39
|
+
|
|
40
|
+
- frontmatter exists, with `name` and `description`
|
|
41
|
+
- name is lowercase letters, digits, hyphens (max 64)
|
|
42
|
+
- description is not too short or too long, and says when to use the skill
|
|
43
|
+
- body is not empty or huge
|
|
44
|
+
- relative links point to files that exist
|
|
45
|
+
- no two skills share a name
|
|
46
|
+
|
|
47
|
+
Exit code is 1 when there is at least one `error`, so it fits CI. `--json` gives machine-readable output.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
python skillcheck.py . --json
|
|
51
|
+
python -m pytest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The frontmatter parser handles simple `key: value` lines only (no nested YAML). MIT licensed.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# skillcheck
|
|
2
|
+
|
|
3
|
+
Lint agent skills. Agent skill bundles (a folder with a `SKILL.md`) are everywhere now, and a bad `description` or a dead link means the agent never picks the skill up or reads a missing file. `skillcheck` finds those problems before your agent does. Pure Python, no dependencies.
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
$ python skillcheck.py ./skills
|
|
7
|
+
./skills/pdf/SKILL.md ok
|
|
8
|
+
./skills/notes/SKILL.md
|
|
9
|
+
[error] dead-link: Link to 'reference.md' does not exist.
|
|
10
|
+
[info] no-trigger: Description never says when to use the skill.
|
|
11
|
+
2 skill(s) checked, 1 error(s).
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
pip install episodely-skillcheck
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or copy `skillcheck.py` into your project, it has no dependencies.
|
|
21
|
+
|
|
22
|
+
## What it checks
|
|
23
|
+
|
|
24
|
+
- frontmatter exists, with `name` and `description`
|
|
25
|
+
- name is lowercase letters, digits, hyphens (max 64)
|
|
26
|
+
- description is not too short or too long, and says when to use the skill
|
|
27
|
+
- body is not empty or huge
|
|
28
|
+
- relative links point to files that exist
|
|
29
|
+
- no two skills share a name
|
|
30
|
+
|
|
31
|
+
Exit code is 1 when there is at least one `error`, so it fits CI. `--json` gives machine-readable output.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
python skillcheck.py . --json
|
|
35
|
+
python -m pytest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
The frontmatter parser handles simple `key: value` lines only (no nested YAML). MIT licensed.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: episodely-skillcheck
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Lint agent SKILL.md files: frontmatter, dead links and duplicate names.
|
|
5
|
+
Author: episodely
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/episodely/skillcheck
|
|
8
|
+
Project-URL: Issues, https://github.com/episodely/skillcheck/issues
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Operating System :: OS Independent
|
|
12
|
+
Requires-Python: >=3.8
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# skillcheck
|
|
18
|
+
|
|
19
|
+
Lint agent skills. Agent skill bundles (a folder with a `SKILL.md`) are everywhere now, and a bad `description` or a dead link means the agent never picks the skill up or reads a missing file. `skillcheck` finds those problems before your agent does. Pure Python, no dependencies.
|
|
20
|
+
|
|
21
|
+
```
|
|
22
|
+
$ python skillcheck.py ./skills
|
|
23
|
+
./skills/pdf/SKILL.md ok
|
|
24
|
+
./skills/notes/SKILL.md
|
|
25
|
+
[error] dead-link: Link to 'reference.md' does not exist.
|
|
26
|
+
[info] no-trigger: Description never says when to use the skill.
|
|
27
|
+
2 skill(s) checked, 1 error(s).
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Install
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
pip install episodely-skillcheck
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Or copy `skillcheck.py` into your project, it has no dependencies.
|
|
37
|
+
|
|
38
|
+
## What it checks
|
|
39
|
+
|
|
40
|
+
- frontmatter exists, with `name` and `description`
|
|
41
|
+
- name is lowercase letters, digits, hyphens (max 64)
|
|
42
|
+
- description is not too short or too long, and says when to use the skill
|
|
43
|
+
- body is not empty or huge
|
|
44
|
+
- relative links point to files that exist
|
|
45
|
+
- no two skills share a name
|
|
46
|
+
|
|
47
|
+
Exit code is 1 when there is at least one `error`, so it fits CI. `--json` gives machine-readable output.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
python skillcheck.py . --json
|
|
51
|
+
python -m pytest
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The frontmatter parser handles simple `key: value` lines only (no nested YAML). MIT licensed.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
skillcheck.py
|
|
5
|
+
episodely_skillcheck.egg-info/PKG-INFO
|
|
6
|
+
episodely_skillcheck.egg-info/SOURCES.txt
|
|
7
|
+
episodely_skillcheck.egg-info/dependency_links.txt
|
|
8
|
+
episodely_skillcheck.egg-info/entry_points.txt
|
|
9
|
+
episodely_skillcheck.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
skillcheck
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "episodely-skillcheck"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Lint agent SKILL.md files: frontmatter, dead links and duplicate names."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "MIT" }
|
|
11
|
+
requires-python = ">=3.8"
|
|
12
|
+
authors = [{ name = "episodely" }]
|
|
13
|
+
classifiers = [
|
|
14
|
+
"License :: OSI Approved :: MIT License",
|
|
15
|
+
"Programming Language :: Python :: 3",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "https://github.com/episodely/skillcheck"
|
|
21
|
+
Issues = "https://github.com/episodely/skillcheck/issues"
|
|
22
|
+
|
|
23
|
+
[project.scripts]
|
|
24
|
+
skillcheck = "skillcheck:main"
|
|
25
|
+
|
|
26
|
+
[tool.setuptools]
|
|
27
|
+
py-modules = ["skillcheck"]
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"""Lint agent SKILL.md files: frontmatter, description quality, dead links, duplicate names."""
|
|
2
|
+
import os, re, sys, argparse, json
|
|
3
|
+
|
|
4
|
+
def parse_frontmatter(text):
|
|
5
|
+
m = re.match(r"^---\s*\n(.*?)\n---\s*(?:\n|$)", text, re.S)
|
|
6
|
+
if not m:
|
|
7
|
+
return None, text
|
|
8
|
+
meta = {}
|
|
9
|
+
for line in m.group(1).splitlines():
|
|
10
|
+
if ":" in line and not line.startswith((" ", "\t")):
|
|
11
|
+
k, v = line.split(":", 1)
|
|
12
|
+
meta[k.strip()] = v.strip().strip("\"'")
|
|
13
|
+
return meta, text[m.end():]
|
|
14
|
+
|
|
15
|
+
def check_file(path, root=None):
|
|
16
|
+
issues = []
|
|
17
|
+
text = open(path, encoding="utf-8").read()
|
|
18
|
+
meta, body = parse_frontmatter(text)
|
|
19
|
+
if meta is None:
|
|
20
|
+
return [("error", "no-frontmatter", "Missing --- frontmatter block.")], None
|
|
21
|
+
name = meta.get("name", "")
|
|
22
|
+
desc = meta.get("description", "")
|
|
23
|
+
if not name:
|
|
24
|
+
issues.append(("error", "no-name", "Frontmatter has no 'name'."))
|
|
25
|
+
elif not re.fullmatch(r"[a-z0-9][a-z0-9\-]{0,63}", name):
|
|
26
|
+
issues.append(("warn", "bad-name", f"Name '{name}' should be lowercase letters, digits and hyphens (max 64)."))
|
|
27
|
+
if not desc:
|
|
28
|
+
issues.append(("error", "no-description", "Frontmatter has no 'description'."))
|
|
29
|
+
else:
|
|
30
|
+
if len(desc) < 40:
|
|
31
|
+
issues.append(("warn", "short-description", "Description under 40 chars; say what it does AND when to use it."))
|
|
32
|
+
if len(desc) > 1024:
|
|
33
|
+
issues.append(("warn", "long-description", "Description over 1024 chars."))
|
|
34
|
+
if not re.search(r"\b(use when|use this|when the user|when you|trigger)", desc, re.I):
|
|
35
|
+
issues.append(("info", "no-trigger", "Description never says when to use the skill."))
|
|
36
|
+
if len(body.strip()) < 50:
|
|
37
|
+
issues.append(("warn", "empty-body", "Skill body is nearly empty."))
|
|
38
|
+
if len(body.splitlines()) > 500:
|
|
39
|
+
issues.append(("info", "long-body", "Body over 500 lines; move detail into referenced files."))
|
|
40
|
+
base = os.path.dirname(path)
|
|
41
|
+
for label, target in re.findall(r"\[([^\]]*)\]\(([^)\s]+)\)", body):
|
|
42
|
+
if re.match(r"^(https?:|mailto:|#)", target):
|
|
43
|
+
continue
|
|
44
|
+
t = target.split("#")[0]
|
|
45
|
+
if t and not os.path.exists(os.path.join(base, t)):
|
|
46
|
+
issues.append(("error", "dead-link", f"Link to '{target}' does not exist."))
|
|
47
|
+
return issues, name
|
|
48
|
+
|
|
49
|
+
def check_tree(root):
|
|
50
|
+
results, names = {}, {}
|
|
51
|
+
for dp, dn, fn in os.walk(root):
|
|
52
|
+
dn[:] = [d for d in dn if d not in {".git", "node_modules"}]
|
|
53
|
+
for f in fn:
|
|
54
|
+
if f.upper() == "SKILL.MD":
|
|
55
|
+
p = os.path.join(dp, f)
|
|
56
|
+
issues, name = check_file(p, root)
|
|
57
|
+
results[p] = issues
|
|
58
|
+
if name:
|
|
59
|
+
names.setdefault(name, []).append(p)
|
|
60
|
+
for name, paths in names.items():
|
|
61
|
+
if len(paths) > 1:
|
|
62
|
+
for p in paths:
|
|
63
|
+
results[p].append(("error", "duplicate-name", f"Name '{name}' also used in {len(paths) - 1} other skill(s)."))
|
|
64
|
+
return results
|
|
65
|
+
|
|
66
|
+
def main(argv=None):
|
|
67
|
+
ap = argparse.ArgumentParser(prog="skillcheck")
|
|
68
|
+
ap.add_argument("path", nargs="?", default=".")
|
|
69
|
+
ap.add_argument("--json", action="store_true")
|
|
70
|
+
a = ap.parse_args(argv)
|
|
71
|
+
res = check_tree(a.path)
|
|
72
|
+
errors = 0
|
|
73
|
+
if a.json:
|
|
74
|
+
print(json.dumps({p: [dict(level=l, code=c, message=m) for l, c, m in i] for p, i in res.items()}, indent=2))
|
|
75
|
+
for p, issues in sorted(res.items()):
|
|
76
|
+
errors += sum(1 for l, _, _ in issues if l == "error")
|
|
77
|
+
if not a.json:
|
|
78
|
+
print(p if issues else f"{p} ok")
|
|
79
|
+
for l, c, m in issues:
|
|
80
|
+
print(f" [{l}] {c}: {m}")
|
|
81
|
+
if not a.json:
|
|
82
|
+
print(f"{len(res)} skill(s) checked, {errors} error(s).")
|
|
83
|
+
return 1 if errors else 0
|
|
84
|
+
|
|
85
|
+
if __name__ == "__main__":
|
|
86
|
+
sys.exit(main())
|