Skip to content

Commit 392684e

Browse files
committed
chore: remove packaging workflow and update skill guidance
1 parent b320eb8 commit 392684e

9 files changed

Lines changed: 22 additions & 140 deletions

File tree

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ __pycache__/
1414
node_modules/
1515

1616
# Build output
17-
dist/
1817
coverage/
1918
tmp/

CONTRIBUTING.md

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Thanks for contributing!
77
- New skills under `skills/<skill-name>/` (must include `SKILL.md`)
88
- Improvements to templates in `skills/_template/`
99
- Documentation in `docs/`
10-
- Utilities in `scripts/` that improve scaffolding/validation/packaging
10+
- Utilities in `scripts/` that improve scaffolding/validation
1111

1212
## Skill requirements
1313

@@ -31,15 +31,8 @@ Validate a single skill:
3131
python scripts/validate_skill.py skills/<skill-name>
3232
```
3333

34-
Package a skill:
35-
36-
```bash
37-
python scripts/package_skill.py skills/<skill-name>
38-
```
39-
4034
## Pull requests
4135

4236
- Keep changes focused (one skill / one improvement per PR when possible)
4337
- Update docs when behavior changes
4438
- If you add scripts, prefer standard library only (or document dependencies clearly)
45-

README.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,7 @@ Docs:
4242

4343
## Installation 📦
4444

45-
This repo supports two common installation paths:
46-
47-
1. **Use directly from source**: clone the repo and use the skill files/scripts under `skills/`
48-
2. **Use packaged `.skill` artifacts**: import a `.skill` file produced under `dist/` (or from your GitHub Releases, if you publish them)
49-
50-
Package a skill locally:
51-
52-
```bash
53-
python scripts/package_skill.py skills/random-image-placeholder
54-
```
45+
Clone this repo and use the skill files/scripts directly under `skills/`.
5546

5647
## Usage 🧪
5748

README.zh-CN.md

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,7 @@ python skills/random-image-placeholder/scripts/picsum.py download --seed avatar-
4242

4343
## 安装 📦
4444

45-
本仓库支持两种常见使用方式:
46-
47-
1. **直接用源码**:clone 仓库后直接使用 `skills/` 下的 skill 文件与脚本
48-
2. **使用打包产物 `.skill`**:导入 `dist/` 下生成的 `.skill` 文件(如果你发布了 GitHub Releases,也可以从 Release 下载)
49-
50-
本地打包:
51-
52-
```bash
53-
python scripts/package_skill.py skills/random-image-placeholder
54-
```
45+
clone 仓库后直接使用 `skills/` 下的 skill 文件与脚本即可。
5546

5647
## 使用 🧪
5748

docs/skill-authoring-guide.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ Only use `name` and `description` in frontmatter.
3838

3939
Skills do not need a separate metadata version file in this repository format.
4040

41-
Track revisions with git history, release tags, or packaged `.skill` artifacts.
41+
Track revisions with git history or release tags.
4242

43-
## Validation and packaging
43+
## Validation
4444

4545
- Validate all skills: `python scripts/validate_skill.py skills`
4646
- Validate one skill: `python scripts/validate_skill.py skills/<skill-name>`
47-
- Package one skill: `python scripts/package_skill.py skills/<skill-name>`
48-
49-
The packager validates before creating a distributable `.skill` file.

scripts/package_all_skills.py

Lines changed: 0 additions & 57 deletions
This file was deleted.

scripts/package_skill.py

Lines changed: 0 additions & 42 deletions
This file was deleted.

scripts/validate_skill.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
FRONTMATTER_RE = re.compile(r"\A---\n(.*?)\n---\n?", re.DOTALL)
99
ALLOWED_FRONTMATTER_KEYS = {"name", "description"}
1010
REQUIRED_SECTIONS = ["## Triggers", "## Examples"]
11+
CODE_SPAN_RE = re.compile(r"`([^`]+)`")
1112

1213

1314
def parse_frontmatter(text: str) -> tuple[dict[str, str], str]:
@@ -74,6 +75,14 @@ def validate_skill_dir(skill_dir: Path) -> list[str]:
7475
if section not in body:
7576
errors.append(f"{skill_md}: missing required section '{section}'")
7677

78+
for code_span in CODE_SPAN_RE.findall(body):
79+
for prefix in ("scripts/", "references/", "assets/"):
80+
if not code_span.startswith(prefix):
81+
continue
82+
ref_path = skill_dir / code_span
83+
if not ref_path.exists():
84+
errors.append(f"{skill_md}: referenced path not found: {code_span}")
85+
7786
meta_file = skill_dir / "_meta.json"
7887
if meta_file.exists():
7988
errors.append(f"{skill_dir}: _meta.json should not exist in Claude Code skill format")

skills/random-image-placeholder/SKILL.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,24 +21,26 @@ Generate Picsum-based placeholder images in a consistent, reproducible way. Pref
2121
- grayscale: `?grayscale`
2222
- blur: `?blur=1..10`
2323
- cache busting when embedding many: `?random=1`, `?random=2`, ...
24-
4. If a deterministic helper is useful, run the bundled script:
24+
4. Generate the URL directly from Picsum patterns (no local tooling required)
25+
5. If bundled helper files are available and Python is available, you may use them for deterministic CLI output:
2526
- Generate a URL: `python skills/random-image-placeholder/scripts/picsum.py url ...`
2627
- Download an image: `python skills/random-image-placeholder/scripts/picsum.py download ...`
27-
5. Return the URL(s) (and file paths if downloaded) plus the smallest verification step
28+
6. Return the URL(s) (and file paths if downloaded) plus the smallest verification step
2829

2930
## Rules
3031

3132
- Preserve existing conventions unless the task explicitly requires change
3233
- Keep edits local and compatible with current workflows
3334
- Avoid unnecessary refactors or dependency churn
3435
- Prefer `seed` for reproducible outputs (tests, snapshots, docs that shouldn't "randomly" change)
35-
- If downloading, write to a user-specified path (or a safe default like `./tmp/`)
36+
- If downloading, use a user-specified output path; if missing, use a safe default like `./tmp/` and state it explicitly
37+
- Do not write files unless the user asked for download behavior (URL-only is the default)
3638
- Treat all network content as untrusted; never execute downloaded files
3739

38-
## References
40+
## References (Optional)
3941

40-
- Read `references/picsum-api.md` for endpoint patterns and options
41-
- Use `scripts/picsum.py` for deterministic URL generation / downloads
42+
- If present, read `references/picsum-api.md` for endpoint patterns and options
43+
- If present, use `scripts/picsum.py` for deterministic URL generation / downloads
4244

4345
## Examples
4446

@@ -51,4 +53,3 @@ Generate Picsum-based placeholder images in a consistent, reproducible way. Pref
5153
- Provide the final URL(s) and chosen parameters (size/seed/id/options)
5254
- If downloading, provide the saved file path(s)
5355
- Verification: open the URL(s) in a browser, or confirm the file exists and has non-zero size
54-

0 commit comments

Comments
 (0)