@doki-land/nifty-skills 0.0.5 → 0.0.6
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.
- package/README.md +10 -8
- package/package.json +4 -4
- package/skills/nifty/SKILL.md +26 -22
- package/skills/nifty-commit/SKILL.md +22 -15
- package/skills/nifty-git-history/SKILL.md +23 -13
- package/skills/nifty-release/SKILL.md +11 -4
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# `@doki-land/nifty-skills`
|
|
2
2
|
|
|
3
|
-
[Agent Skills](https://agentskills.io/specification) for [**Nifty**](https://www.npmjs.com/package/@doki-land/nifty) —
|
|
3
|
+
[Agent Skills](https://agentskills.io/specification) for [**Nifty**](https://www.npmjs.com/package/@doki-land/nifty) —
|
|
4
|
+
gitmoji commit conventions, hybrid Cargo + npm release workflows, and gix-backed git history tools.
|
|
4
5
|
|
|
5
|
-
This package is **docs-only**. It teaches agents how to invoke the published `nifty` CLI. It does not replace
|
|
6
|
+
This package is **docs-only**. It teaches agents how to invoke the published `nifty` CLI. It does not replace
|
|
7
|
+
`@doki-land/nifty` or its native bindings.
|
|
6
8
|
|
|
7
9
|
## Install
|
|
8
10
|
|
|
@@ -21,12 +23,12 @@ npx skills add @doki-land/nifty-skills --skill nifty-release -y -g
|
|
|
21
23
|
|
|
22
24
|
## Skills
|
|
23
25
|
|
|
24
|
-
| Skill
|
|
25
|
-
|
|
26
|
-
| `nifty`
|
|
27
|
-
| `nifty-commit`
|
|
28
|
-
| `nifty-release`
|
|
29
|
-
| `nifty-git-history` | `nifty
|
|
26
|
+
| Skill | Load when |
|
|
27
|
+
|---------------------|----------------------------------------------------------------------------|
|
|
28
|
+
| `nifty` | User mentions Nifty tooling, hybrid monorepos, or you need the command map |
|
|
29
|
+
| `nifty-commit` | Gitmoji commit lint, subject format, `nifty lint` / `nifty check` |
|
|
30
|
+
| `nifty-release` | `nifty bump`, `publish`, `trust`, `upload`, `change-logs`, CI release |
|
|
31
|
+
| `nifty-git-history` | `nifty commit`, `nifty retime`, object-layer history apply |
|
|
30
32
|
|
|
31
33
|
## Prerequisites
|
|
32
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@doki-land/nifty-skills",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "Agent Skills for Nifty gitmoji commits, npm release, and git history tooling",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"typecheck": "node -e \"console.log('docs-only skill package')\""
|
|
25
25
|
},
|
|
26
26
|
"optionalDependencies": {
|
|
27
|
-
"@doki-land/nifty-win32-x64": "0.0.
|
|
28
|
-
"@doki-land/nifty-linux-x64": "0.0.
|
|
29
|
-
"@doki-land/nifty-darwin-arm64": "0.0.
|
|
27
|
+
"@doki-land/nifty-win32-x64": "0.0.6",
|
|
28
|
+
"@doki-land/nifty-linux-x64": "0.0.6",
|
|
29
|
+
"@doki-land/nifty-darwin-arm64": "0.0.6"
|
|
30
30
|
}
|
|
31
31
|
}
|
package/skills/nifty/SKILL.md
CHANGED
|
@@ -8,7 +8,8 @@ description: >-
|
|
|
8
8
|
|
|
9
9
|
# Nifty
|
|
10
10
|
|
|
11
|
-
[Nifty](https://www.npmjs.com/package/@doki-land/nifty) is gitmoji-first release tooling for hybrid **Cargo + npm**
|
|
11
|
+
[Nifty](https://www.npmjs.com/package/@doki-land/nifty) is gitmoji-first release tooling for hybrid **Cargo + npm**
|
|
12
|
+
workspaces. Native git work uses **gix** (Rust). Changelog tag ranges use the `git` CLI.
|
|
12
13
|
|
|
13
14
|
## Before you act
|
|
14
15
|
|
|
@@ -18,27 +19,28 @@ description: >-
|
|
|
18
19
|
|
|
19
20
|
## Sub-skills
|
|
20
21
|
|
|
21
|
-
| Task
|
|
22
|
-
|
|
23
|
-
| Commit subject lint, gitmoji rules
|
|
24
|
-
| Version bump, npm publish/trust, GitHub upload, reference changelogs | `nifty-release`
|
|
25
|
-
| Object-layer
|
|
22
|
+
| Task | Skill |
|
|
23
|
+
|----------------------------------------------------------------------|---------------------|
|
|
24
|
+
| Commit subject lint, gitmoji rules | `nifty-commit` |
|
|
25
|
+
| Version bump, npm publish/trust, GitHub upload, reference changelogs | `nifty-release` |
|
|
26
|
+
| Object-layer commit apply/retime | `nifty-git-history` |
|
|
26
27
|
|
|
27
28
|
## Command map
|
|
28
29
|
|
|
29
|
-
| Command
|
|
30
|
-
|
|
31
|
-
| `nifty lint` / `nifty check`
|
|
32
|
-
| `nifty
|
|
33
|
-
| `nifty
|
|
34
|
-
| `nifty
|
|
35
|
-
| `nifty
|
|
36
|
-
| `nifty
|
|
37
|
-
| `nifty
|
|
38
|
-
| `nifty
|
|
39
|
-
| `nifty
|
|
40
|
-
| `nifty
|
|
41
|
-
| `nifty
|
|
30
|
+
| Command | Purpose |
|
|
31
|
+
|----------------------------------------------|----------------------------------------------------------------|
|
|
32
|
+
| `nifty lint` / `nifty check` | Workspace gitmoji + cargo hygiene |
|
|
33
|
+
| `nifty commit scan` / `nifty commit audit` | Commit-only gitmoji + message hygiene |
|
|
34
|
+
| `nifty commit export` / `nifty commit apply` | Export/apply commit message maps at the object layer |
|
|
35
|
+
| `nifty bump` | Align crate + package versions |
|
|
36
|
+
| `nifty publish` | Publish workspace npm packages (OIDC or token + TOTP) |
|
|
37
|
+
| `nifty trust` | Configure npm Trusted Publisher |
|
|
38
|
+
| `nifty update` | Bump Cargo and npm dependencies |
|
|
39
|
+
| `nifty format` | Format Rust via `cargo fmt` and JS/TS/JSON via `oxc_formatter` |
|
|
40
|
+
| `nifty upload` | GitHub Release assets or GitHub Pages |
|
|
41
|
+
| `nifty install-native` | Stage CI `.node` artifacts into platform packages |
|
|
42
|
+
| `nifty retime` | Spread timestamps on a new branch |
|
|
43
|
+
| `nifty change-logs` | Draft release reference changelogs from tags |
|
|
42
44
|
|
|
43
45
|
Global flag: `-C, --cwd <dir>`.
|
|
44
46
|
|
|
@@ -55,6 +57,8 @@ Do **not** confuse npm-tools `legion` / Valkyrie with Nifty. Nifty is independen
|
|
|
55
57
|
## Agent discipline
|
|
56
58
|
|
|
57
59
|
- Prefer **`nifty` CLI** over reimplementing git/npm steps in ad-hoc scripts.
|
|
58
|
-
- Run **`nifty
|
|
59
|
-
- For publish/trust, follow **`nifty-release`**: `nifty publish` skips registry versions that already exist. Run
|
|
60
|
-
|
|
60
|
+
- Run **`nifty commit audit`** or **`nifty check --from … --to …`** before claiming commit history is clean.
|
|
61
|
+
- For publish/trust, follow **`nifty-release`**: `nifty publish` skips registry versions that already exist. Run **
|
|
62
|
+
`nifty trust`** after the first publish of any new package name.
|
|
63
|
+
- Object-layer history (**commit apply** / **retime**) rewrites refs — warn the user and require explicit `--dry-run`
|
|
64
|
+
first when appropriate.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: nifty-commit
|
|
3
3
|
description: >-
|
|
4
|
-
Lint and enforce Nifty gitmoji commit conventions with nifty lint and nifty
|
|
4
|
+
Lint and enforce Nifty gitmoji commit conventions with nifty lint, nifty check, and nifty commit scan/audit.
|
|
5
5
|
Load when fixing commit subjects, gitmoji format, or pre-release commit hygiene.
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -24,24 +24,30 @@ Known gitmojis (Nifty default set):
|
|
|
24
24
|
## Commands
|
|
25
25
|
|
|
26
26
|
```bash
|
|
27
|
-
#
|
|
27
|
+
# Workspace lint (commits + optional cargo hygiene)
|
|
28
28
|
nifty lint --from v0.0.1 --to HEAD
|
|
29
|
+
nifty check --from origin/dev..HEAD
|
|
30
|
+
|
|
31
|
+
# Commit-only scan/audit (gitmoji + semver/semicolon/backtick hygiene)
|
|
32
|
+
nifty commit scan --from d25daeba^ --to HEAD
|
|
33
|
+
nifty commit audit --from d25daeba^ --to HEAD
|
|
29
34
|
|
|
30
35
|
# Lint explicit strings
|
|
31
36
|
nifty lint --subject "✨ Add feature"
|
|
32
|
-
|
|
33
|
-
# Fail on errors (CI gate)
|
|
34
|
-
nifty check --from origin/dev..HEAD
|
|
35
37
|
```
|
|
36
38
|
|
|
37
39
|
## Rules (nifty-linter)
|
|
38
40
|
|
|
39
|
-
| Rule
|
|
40
|
-
|
|
41
|
-
| `gitmoji/subject`
|
|
42
|
-
| `gitmoji/known`
|
|
43
|
-
| `gitmoji/body`
|
|
44
|
-
| `gitmoji/format`
|
|
41
|
+
| Rule | Default | Meaning |
|
|
42
|
+
|-----------------------|---------|-------------------------------------------|
|
|
43
|
+
| `gitmoji/subject` | error | Subject must start with gitmoji + space |
|
|
44
|
+
| `gitmoji/known` | error | Gitmoji must be in the known list |
|
|
45
|
+
| `gitmoji/body` | warning | Text after gitmoji must not be empty |
|
|
46
|
+
| `gitmoji/format` | warning | Subject should match canonical formatting |
|
|
47
|
+
| `commit/semver` | error | Semver must not appear in subject/body |
|
|
48
|
+
| `commit/semicolon` | error | Message must not contain `;` or `;` |
|
|
49
|
+
| `commit/bare-package` | error | Scoped npm names must use backticks |
|
|
50
|
+
| `commit/bare-symbol` | warning | Common identifiers should use backticks |
|
|
45
51
|
|
|
46
52
|
## Commit message style (when you write commits)
|
|
47
53
|
|
|
@@ -56,8 +62,9 @@ Align with Nifty/npm-tools git policy when the user asks you to commit:
|
|
|
56
62
|
|
|
57
63
|
## Workflow
|
|
58
64
|
|
|
59
|
-
1. Run `nifty
|
|
60
|
-
2. Fix subjects locally or plan a **`nifty
|
|
61
|
-
|
|
65
|
+
1. Run `nifty commit scan` on the range about to merge or release.
|
|
66
|
+
2. Fix subjects locally or plan a **`nifty commit export` / `nifty commit apply`** pass (see `nifty-git-history`) for
|
|
67
|
+
history already pushed.
|
|
68
|
+
3. Re-run `nifty commit audit` until exit code is 0.
|
|
62
69
|
|
|
63
|
-
Do not bypass lint with custom regex when `nifty
|
|
70
|
+
Do not bypass lint with custom regex when `nifty commit scan` is available.
|
|
@@ -1,24 +1,32 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: nifty-git-history
|
|
3
3
|
description: >-
|
|
4
|
-
Object-layer git history tools: nifty
|
|
4
|
+
Object-layer git history tools: nifty commit apply/export and nifty retime without interactive rebase.
|
|
5
5
|
Load when rewriting commit messages or timestamps while preserving author identity.
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Nifty git history
|
|
9
9
|
|
|
10
|
-
Implemented in `nifty-history` (gix). **Author and committer name/email are never replaced** with local `user.name` /
|
|
10
|
+
Implemented in `nifty-history` (gix). **Author and committer name/email are never replaced** with local `user.name` /
|
|
11
|
+
`user.email` — only messages or timestamps change (plus parent relinking when ancestors rewrite).
|
|
11
12
|
|
|
12
13
|
Warn the user before rewriting shared branches. Prefer `--dry-run` first.
|
|
13
14
|
|
|
14
|
-
##
|
|
15
|
+
## Commit message map
|
|
15
16
|
|
|
16
17
|
Export JSON map, preview, apply:
|
|
17
18
|
|
|
18
19
|
```bash
|
|
19
|
-
nifty
|
|
20
|
-
nifty
|
|
21
|
-
nifty
|
|
20
|
+
nifty commit export --base 34e1e665^ --ref dev --path commit.pending.json
|
|
21
|
+
nifty commit apply --base 34e1e665^ --ref dev --path commit.pending.json --dry-run
|
|
22
|
+
nifty commit apply --base 34e1e665^ --ref dev --path commit.pending.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Scan or audit the same commit range before editing:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
nifty commit scan --from 34e1e665^ --to dev
|
|
29
|
+
nifty commit audit --from 34e1e665^ --to dev
|
|
22
30
|
```
|
|
23
31
|
|
|
24
32
|
### Map format
|
|
@@ -40,7 +48,8 @@ Hash prefixes must be **unique** within the rewrite range.
|
|
|
40
48
|
|
|
41
49
|
## Retime
|
|
42
50
|
|
|
43
|
-
Spread author and committer timestamps across a window. Writes a **new branch** (default `time-travel`); current branch
|
|
51
|
+
Spread author and committer timestamps across a window. Writes a **new branch** (default `time-travel`); current branch
|
|
52
|
+
unchanged.
|
|
44
53
|
|
|
45
54
|
Range mode — commits in `(commit..tip]`:
|
|
46
55
|
|
|
@@ -61,14 +70,15 @@ Datetime: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SS`. End defaults to `start + N days
|
|
|
61
70
|
|
|
62
71
|
## Change logs (tag ranges)
|
|
63
72
|
|
|
64
|
-
For release reference drafts, use **`nifty-release`** (`nifty change-logs`). That command uses `git log` for tag ranges;
|
|
73
|
+
For release reference drafts, use **`nifty-release`** (`nifty change-logs`). That command uses `git log` for tag ranges;
|
|
74
|
+
commit apply/retime use gix object writes.
|
|
65
75
|
|
|
66
76
|
## Safety
|
|
67
77
|
|
|
68
|
-
| Do
|
|
69
|
-
|
|
70
|
-
| `--dry-run` before `
|
|
71
|
-
| Explicit `--ref` when HEAD is detached
|
|
78
|
+
| Do | Do not |
|
|
79
|
+
|--------------------------------------------|----------------------------------------------------------------|
|
|
80
|
+
| `--dry-run` before `commit apply` | Force-push without user consent |
|
|
81
|
+
| Explicit `--ref` when HEAD is detached | Use `git rebase -i` when user asked for Nifty tools |
|
|
72
82
|
| Explain parent relink-only rows in dry-run | Amend commits with `git commit --amend` for bulk history fixes |
|
|
73
83
|
|
|
74
|
-
After
|
|
84
|
+
After apply, the user must force-update the target ref if it was already published.
|
|
@@ -41,7 +41,9 @@ Aligns all `projects/crates/*/Cargo.toml` and `projects/packages/*/package.json`
|
|
|
41
41
|
|
|
42
42
|
## npm publish and trust
|
|
43
43
|
|
|
44
|
-
**Default: publish the whole workspace.** Nifty walks packages in dependency order and **skips versions already on the
|
|
44
|
+
**Default: publish the whole workspace.** Nifty walks packages in dependency order and **skips versions already on the
|
|
45
|
+
registry** (cache + `npm view`). After a release you can run plain `nifty publish` again — only new or bumped packages
|
|
46
|
+
are uploaded.
|
|
45
47
|
|
|
46
48
|
```bash
|
|
47
49
|
nifty publish --dry-run
|
|
@@ -57,11 +59,16 @@ nifty publish --package @doki-land/nifty-skills
|
|
|
57
59
|
nifty trust --only @doki-land/nifty-skills
|
|
58
60
|
```
|
|
59
61
|
|
|
60
|
-
**First publish of a new package name** (e.g. `@doki-land/nifty-skills`): run **`nifty trust`** after `nifty publish` so
|
|
62
|
+
**First publish of a new package name** (e.g. `@doki-land/nifty-skills`): run **`nifty trust`** after `nifty publish` so
|
|
63
|
+
GitHub Actions OIDC can publish on the next tag. `nifty trust` uses `publish.packages` from `nifty.config.ts` when set,
|
|
64
|
+
otherwise all non-private workspace packages.
|
|
61
65
|
|
|
62
|
-
Local auth: `NPM_TOKEN`, `--npm-token`, `--otp`, or `--totp-secret` (see `nifty publish --help`). Trust live
|
|
66
|
+
Local auth: `NPM_TOKEN`, `--npm-token`, `--otp`, or `--totp-secret` (see `nifty publish --help`). Trust live
|
|
67
|
+
configuration requires OTP/TOTP.
|
|
63
68
|
|
|
64
|
-
**npm-tools CI**: tag `vX.Y.Z` triggers `.github/workflows/publish-npm.yml` → `scripts/ci/publish-npm.mjs` (OIDC, no
|
|
69
|
+
**npm-tools CI**: tag `vX.Y.Z` triggers `.github/workflows/publish-npm.yml` → `scripts/ci/publish-npm.mjs` (OIDC, no
|
|
70
|
+
long-lived token in YAML). Native `.node` files ship as `@doki-land/nifty-*` optional packages, not GitHub Release
|
|
71
|
+
assets.
|
|
65
72
|
|
|
66
73
|
## Reference changelogs
|
|
67
74
|
|