Skip to content

Commit 6f15cad

Browse files
NagyViktNagyViktOmX
authored
Ship repo skills through the npm package (#541)
The documented npx skills installer path needs the published package to include the repo-root skills catalog, not only the in-repo templates. Constraint: Keep the install surface package-owned and avoid copying runtime scripts. Rejected: Add a new gx skill install command | the existing npx skills add recodee/gitguardex path already owns this flow. Confidence: high Scope-risk: narrow Directive: Keep package.json files explicit so future npm packs continue to include skills/. Tested: node --test --test-name-pattern 'package manifest ships repo skills|README advertises the repo skills' test/metadata.test.js Tested: npm pack --dry-run --json confirmed skills/gitguardex/SKILL.md and skills/guardex-merge-skills-to-dev/SKILL.md Tested: openspec validate agent-codex-codex-task-2026-05-08-12-32 --type change --strict Tested: openspec validate --specs Not-tested: Full test/metadata.test.js remains blocked by pre-existing cosign-installer v4.1.2 vs v4.1.1 pin assertion. Co-authored-by: NagyVikt <nagy.viktordp@gmail.com> Co-authored-by: OmX <omx@oh-my-codex.dev>
1 parent 7f2b3c9 commit 6f15cad

7 files changed

Lines changed: 75 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ All optional — but if you're running many agents, you probably want them.
377377
`gx status` auto-detects each one and reports it in the `Global services`
378378
block.
379379

380-
Install repo skills with `npx skills add recodee/gitguardex`; `npx skills add recodee/` opens the recodee namespace. `gx setup` does not auto-run `npx skills add ...`. If the picker does not show a separate `guardex` skill, that is expected.
380+
Install repo skills with `npx skills add recodee/gitguardex`; the npm package also ships the root `skills/` catalog so the npx installer can read the GitGuardex skill from the published tarball. `npx skills add recodee/` opens the recodee namespace. `gx setup` does not auto-run `npx skills add ...`. If the picker does not show a separate `guardex` skill, that is expected.
381381

382382
| Tool | What it does | Stars |
383383
| --- | --- | --- |
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
schema: spec-driven
2+
created: 2026-05-08
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
## Why
2+
3+
- Users should be able to install the GitGuardex repo skill through the existing `npx skills add recodee/gitguardex` path without depending on repository-only files that are absent from the published npm tarball.
4+
5+
## What Changes
6+
7+
- Ship the repo-root `skills/` catalog as an explicit npm package asset.
8+
- Document that the published package includes the skill catalog for the npx skill installer.
9+
- Add metadata coverage so the package manifest keeps shipping the root skill catalog.
10+
11+
## Impact
12+
13+
- Affects package metadata, README install guidance, and metadata tests only.
14+
- The tarball gains two small `skills/**/SKILL.md` files; no runtime CLI command behavior changes.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## ADDED Requirements
2+
3+
### Requirement: Published Skill Catalog
4+
The npm package manifest SHALL include the repo-root `skills/` catalog so skill installers can access the GitGuardex skill from the published package.
5+
6+
#### Scenario: Package tarball includes repo skills
7+
- **WHEN** the package is packed for publication
8+
- **THEN** `skills/gitguardex/SKILL.md` is included
9+
- **AND** `skills/guardex-merge-skills-to-dev/SKILL.md` is included.
10+
11+
### Requirement: Skill Install Documentation
12+
The README SHALL document the `npx skills add recodee/gitguardex` repo skill install path and explain that the npm package ships the root `skills/` catalog.
13+
14+
#### Scenario: User finds npx skill install path
15+
- **WHEN** a user reads the companion tools section
16+
- **THEN** the `npx skills add recodee/gitguardex` install command is visible
17+
- **AND** the package-backed skill catalog behavior is described.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
## Definition of Done
2+
3+
This change is complete only when **all** of the following are true:
4+
5+
- Every checkbox below is checked.
6+
- The agent branch reaches `MERGED` state on `origin` and the PR URL + state are recorded in the completion handoff.
7+
- If any step blocks (test failure, conflict, ambiguous result), append a `BLOCKED:` line under section 4 explaining the blocker and **STOP**. Do not tick remaining cleanup boxes; do not silently skip the cleanup pipeline.
8+
9+
## Handoff
10+
11+
- Handoff: change=`agent-codex-codex-task-2026-05-08-12-32`; branch=`agent/codex/codex-task-2026-05-08-12-32`; scope=`TODO`; action=`continue this sandbox or finish cleanup after a usage-limit/manual takeover`.
12+
- Copy prompt: Continue `agent-codex-codex-task-2026-05-08-12-32` on branch `agent/codex/codex-task-2026-05-08-12-32`. Work inside the existing sandbox, review `openspec/changes/agent-codex-codex-task-2026-05-08-12-32/tasks.md`, continue from the current state instead of creating a new sandbox, and when the work is done run `gx branch finish --branch agent/codex/codex-task-2026-05-08-12-32 --base main --via-pr --wait-for-merge --cleanup`.
13+
14+
## 1. Specification
15+
16+
- [x] 1.1 Finalize proposal scope and acceptance criteria for `agent-codex-codex-task-2026-05-08-12-32`.
17+
- [x] 1.2 Define normative requirements in `specs/agent-codex-codex-task-2026-05-08-12-32/spec.md`.
18+
19+
## 2. Implementation
20+
21+
- [x] 2.1 Implement scoped behavior changes.
22+
- [x] 2.2 Add/update focused regression coverage.
23+
24+
## 3. Verification
25+
26+
- [x] 3.1 Run targeted project verification commands.
27+
- [x] 3.2 Run `openspec validate agent-codex-codex-task-2026-05-08-12-32 --type change --strict`.
28+
- [x] 3.3 Run `openspec validate --specs`.
29+
30+
## 4. Cleanup (mandatory; run before claiming completion)
31+
32+
- [ ] 4.1 Run the cleanup pipeline: `gx branch finish --branch agent/codex/codex-task-2026-05-08-12-32 --base main --via-pr --wait-for-merge --cleanup`. This handles commit -> push -> PR create -> merge wait -> worktree prune in one invocation.
33+
- [ ] 4.2 Record the PR URL and final merge state (`MERGED`) in the completion handoff.
34+
- [ ] 4.3 Confirm the sandbox worktree is gone (`git worktree list` no longer shows the agent path; `git branch -a` shows no surviving local/remote refs for the branch).

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"files": [
4040
"bin",
4141
"src",
42+
"skills",
4243
"templates",
4344
"README.md",
4445
"LICENSE",

test/metadata.test.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ test('package manifest ships the extracted src runtime', () => {
268268
assert.match(pkg.files.join('\n'), /^src$/m);
269269
});
270270

271+
test('package manifest ships repo skills for npx skills installer', () => {
272+
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
273+
assert.ok(Array.isArray(pkg.files), 'package.json files must stay explicit');
274+
assert.match(pkg.files.join('\n'), /^skills$/m);
275+
});
276+
271277
test('doctor CLI parser stays in src/cli args while the main doctor command stays routable and dead legacy audit stubs stay removed', () => {
272278
const argsSource = fs.readFileSync(path.join(repoRoot, 'src', 'cli', 'args.js'), 'utf8');
273279
const cliSource = fs.readFileSync(path.join(repoRoot, 'src', 'cli', 'main.js'), 'utf8');

0 commit comments

Comments
 (0)