You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Skills (`skills/`) or hooks (`hooks/`)|`make build-plugins`, then restart`claude-asta` session |
132
140
133
141
### Run Tests
134
142
@@ -283,6 +291,67 @@ allowed-tools:
283
291
Instructions and examples...
284
292
```
285
293
294
+
#### Skill distribution design
295
+
296
+
All skills live in `skills/` — this is the **single source of truth**. Whether a skill is included in the default install or requires opt-in is determined by its SKILL.md frontmatter:
297
+
298
+
```yaml
299
+
# Default skill — no metadata.internal field
300
+
---
301
+
name: Semantic Scholar Lookup
302
+
---
303
+
304
+
# Preview skill — add metadata.internal: true
305
+
---
306
+
name: Find Literature
307
+
metadata:
308
+
internal: true
309
+
---
310
+
```
311
+
312
+
This one flag drives all distribution behavior — no lists to maintain elsewhere.
| Local dev |`claude --plugin-dir plugins/asta-preview` (all skills) | — |
321
+
322
+
**Why `plugins/` exists:**
323
+
324
+
The npx skills CLI reads `metadata.internal` directly from SKILL.md, so filtering works automatically. Claude Code plugins, however, auto-discover every skill in the `skills/` directory — they have no per-skill filtering mechanism. The only way to ship a subset of skills via Claude Code is to package separate plugin directories with different skill sets.
325
+
326
+
`plugins/` contains these generated packages:
327
+
-`plugins/asta/` — default skills only
328
+
-`plugins/asta-preview/` — all skills (default + preview)
329
+
330
+
**Never edit `plugins/` directly.** It's generated from `skills/` by `scripts/build-plugins.sh`.
331
+
332
+
**Workflow for changing skills:**
333
+
334
+
```bash
335
+
# Edit the canonical source
336
+
vim skills/my-skill/SKILL.md
337
+
338
+
# Regenerate plugin packages
339
+
make build-plugins
340
+
341
+
# Commit both
342
+
git add skills/ plugins/
343
+
git commit -m "Update my-skill"
344
+
```
345
+
346
+
CI enforces that `plugins/` stays in sync — PRs fail if someone edits a skill without rebuilding.
347
+
348
+
**Adding a new skill:**
349
+
350
+
1. Create `skills/<name>/SKILL.md`
351
+
2. Add `metadata.internal: true` if it shouldn't be in the default install yet
352
+
3. Run `make build-plugins`
353
+
4. To promote to default later: remove the `metadata.internal` block and rebuild
354
+
286
355
### Hooks
287
356
288
357
Hooks in `hooks/` are bash scripts that can auto-approve tool usage:
@@ -316,7 +385,7 @@ Register hooks in `hooks/hooks.json`:
316
385
317
386
```bash
318
387
# Run Claude Code with local plugin
319
-
claude --plugin-dir . --debug
388
+
claude --plugin-dir plugins/asta-preview --debug
320
389
321
390
# In Claude, test skills naturally
322
391
# Skills activate automatically based on what you ask
@@ -353,57 +422,62 @@ packages = ["src/asta"]
353
422
354
423
## Release Process
355
424
356
-
The version number is stored in four locations and must be kept in sync:
425
+
The version number is stored in three source locations:
**Note:** Both `.claude-plugin/plugin.json` (individual plugin manifest) and `.claude-plugin/marketplace.json` (marketplace repository listing) are required. The marketplace file allows users to install via `/plugin marketplace add allenai/asta-plugins` in Claude Code.
430
+
`make set-version` updates all three.
363
431
364
432
### Complete Release Workflow
365
433
366
-
1.**Update version in all files:**
434
+
1.**Update version in all source files:**
367
435
```bash
368
436
make set-version VERSION=0.3.0
369
437
```
370
-
This updates all three version locations atomically.
438
+
Updates `src/asta/__init__.py`, `pyproject.toml`, and `.claude-plugin/marketplace.json`.
371
439
372
440
2.**Review changes:**
373
441
```bash
374
442
git diff
375
443
```
376
-
Verify that all three files were updated correctly.
444
+
Verify the version updated correctly.
445
+
446
+
3.**Rebuild generated plugin packages:**
447
+
```bash
448
+
make build-plugins
449
+
```
450
+
Rebuilds `plugins/` from `skills/`, `hooks/`, and `marketplace.json`.
377
451
378
-
3.**Run full test suite:**
452
+
4.**Run full test suite:**
379
453
```bash
380
454
make ci
381
455
```
382
-
Ensures all tests pass, code is formatted, and linting is clean.
456
+
Ensures all tests pass, linting is clean, code is formatted, and generated files are in sync.
383
457
384
-
4.**Commit version bump:**
458
+
5.**Commit version bump:**
385
459
```bash
386
460
git add -A
387
461
git commit -m "chore: bump version to 0.3.0"
388
462
git push
389
463
```
390
464
391
-
5.**Create and push version tag:**
465
+
6.**Create and push version tag:**
392
466
```bash
393
467
make push-version-tag
394
468
```
395
469
This command will:
396
-
- Verify all three version files are in sync (fails if they differ)
470
+
- Verify all version files are in sync (fails if they differ)
397
471
- Check that the git tag doesn't already exist
398
472
- Create and push the git tag (e.g., `0.3.0`)
399
473
- Provide a URL to create the GitHub release
400
474
401
-
6.**Create GitHub release notes:**
475
+
7.**Create GitHub release notes:**
402
476
- Visit the URL provided by `make push-version-tag`
403
477
- Add release notes describing changes
404
478
- Publish the release
405
479
406
-
7.**Publish to PyPI (optional):**
480
+
8.**Publish to PyPI (optional):**
407
481
```bash
408
482
make publish # Production PyPI
409
483
make publish-test # TestPyPI for testing
@@ -420,17 +494,17 @@ make version
420
494
```bash
421
495
make set-version VERSION=x.y.z
422
496
```
423
-
- Updates all four version locations atomically
497
+
- Updates `__init__.py`, `pyproject.toml`, and `marketplace.json`
498
+
- Run `make build-plugins` after to regenerate plugin packages
424
499
- Fails with error if VERSION parameter is not provided
425
500
- Provides suggested commit command after success
426
501
427
502
**Push version tag:**
428
503
```bash
429
504
make push-version-tag
430
505
```
431
-
- Checks version consistency across all four files
432
-
- Fails with clear error if versions don't match
433
-
- Shows current versions in each file when there's a mismatch
506
+
- Checks that `__init__.py`, `pyproject.toml`, and `marketplace.json` versions match
507
+
- Fails with clear error if they differ
434
508
- Creates and pushes git tag if all checks pass
435
509
- Fails if git tag already exists (prevents accidental overwrites)
436
510
@@ -442,10 +516,9 @@ If you try to push a version tag with mismatched versions:
442
516
$ make push-version-tag
443
517
Checking version consistency...
444
518
Error: Version mismatch detected:
445
-
src/asta/__init__.py: 0.3.0
446
-
pyproject.toml: 0.2.0
447
-
.claude-plugin/plugin.json: 0.2.0
448
-
.claude-plugin/marketplace.json: 0.2.0
519
+
src/asta/__init__.py: 0.3.0
520
+
pyproject.toml: 0.2.0
521
+
.claude-plugin/marketplace.json: 0.2.0
449
522
450
523
Run 'make set-version VERSION=x.y.z' to sync versions
0 commit comments