@for-yeyu/evm-dapp-skills 0.2.0 → 0.2.1
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 +2 -15
- package/package.json +1 -1
- package/scripts/postinstall.mjs +0 -31
package/README.md
CHANGED
|
@@ -5,25 +5,12 @@ Standard skills package for the EVM DApp layered architecture.
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npx skills add "https://github.com/for-yeyu/evm-dapp-starter-for-yeyu/tree/main/.agents/skills" -y
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
After installation, skills are automatically synced to:
|
|
12
12
|
|
|
13
|
-
- `<your project>/.agents/skills`
|
|
14
|
-
- fallback: `~/.agents/skills`
|
|
15
|
-
|
|
16
|
-
## Disable Auto Sync (Optional)
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
SKILLS_AUTO_INSTALL=0 npm i @for-yeyu/evm-dapp-skills
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Manual Sync (Optional)
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
rsync -a node_modules/@for-yeyu/evm-dapp-skills/skills/ .agents/skills/
|
|
26
|
-
```
|
|
13
|
+
- `<your project>/.agents/skills`
|
|
27
14
|
|
|
28
15
|
## Included Skills
|
|
29
16
|
|
package/package.json
CHANGED
package/scripts/postinstall.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { cp, mkdir, readdir } from 'node:fs/promises'
|
|
2
|
-
import os from 'node:os'
|
|
3
|
-
import path from 'node:path'
|
|
4
|
-
import process from 'node:process'
|
|
5
|
-
|
|
6
|
-
const disable = (process.env.SKILLS_AUTO_INSTALL ?? '').toLowerCase()
|
|
7
|
-
if (disable === '0' || disable === 'false' || disable === 'off') {
|
|
8
|
-
process.exit(0)
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const packageRoot = process.cwd()
|
|
12
|
-
const sourceSkillsDir = path.join(packageRoot, 'skills')
|
|
13
|
-
|
|
14
|
-
const installRoot =
|
|
15
|
-
process.env.INIT_CWD && process.env.INIT_CWD !== ''
|
|
16
|
-
? process.env.INIT_CWD
|
|
17
|
-
: os.homedir()
|
|
18
|
-
|
|
19
|
-
const targetSkillsDir = path.join(installRoot, '.agents', 'skills')
|
|
20
|
-
|
|
21
|
-
await mkdir(targetSkillsDir, { recursive: true })
|
|
22
|
-
|
|
23
|
-
const entries = await readdir(sourceSkillsDir)
|
|
24
|
-
await Promise.all(
|
|
25
|
-
entries.map(entry =>
|
|
26
|
-
cp(path.join(sourceSkillsDir, entry), path.join(targetSkillsDir, entry), {
|
|
27
|
-
recursive: true,
|
|
28
|
-
force: true,
|
|
29
|
-
}),
|
|
30
|
-
),
|
|
31
|
-
)
|