@heihei0299/matt-skills 1.1.0 → 1.1.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.
Files changed (3) hide show
  1. package/README.md +6 -3
  2. package/bin/cli.js +18 -1
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@ template/
9
9
  ├── AGENTS.md 项目级全局配置(行为路由 + 分文件指针)
10
10
  ├── .pi/ pi-agent 项目配置(pi 标准结构:`.pi/skills/` 直放独有技能,自动发现)
11
11
  └── .opencode/ 分发内容(目标仓库的 opencode 项目配置)
12
- ├── skills/ 4 个独有技能(tdd-implement、grill-to-spec、diagnose-fix、commit-check)
12
+ ├── skills/ 5 个独有技能(tdd-implement、grill-to-spec、diagnose-fix、commit-check、instance-test
13
13
  ├── agents/ issue-audit 子代理定义
14
14
  ├── commands/ issue-audit + 9 个显式触发技能命令(grill-to-spec/wayfinder/to-spec/to-tickets/triage/improve-codebase-architecture/teach/handoff/writing-great-skills)
15
15
  ├── docs/agents/ 5 个分文件(运行时纪律 / 技能设计 / issue tracker / triage labels / domain)
@@ -160,8 +160,11 @@ npm publish
160
160
  ## 开发
161
161
 
162
162
  ```sh
163
- npm test
163
+ npm test # 全量测试 122 项
164
+ npm run build:template # 从单源生成 template/.opencode/.pi(config/proprietary.json 为单一事实源)
164
165
  ```
165
166
 
166
- 交互模式依赖 `prompts`(见 `package.json`);测试见 `test/cli.test.js`。
167
+ 交互模式依赖 `prompts`(见 `package.json`);测试见 `test/cli.test.js`、`test/cli-init.test.js`、`test/template-sync.test.js`。
168
+
169
+ 用户手动触发的功能测试:`/instance-test`(见 `.agents/skills/instance-test/SKILL.md`)——在隔离 `temp dir` 跑 prompt 实例验实际功能,`references/instances.md` 为通用模板。
167
170
 
package/bin/cli.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { readdir, readFile, cp, stat } from 'node:fs/promises';
2
+ import { readdir, readFile, cp, stat, writeFile, mkdir } from 'node:fs/promises';
3
3
  import os from 'node:os';
4
4
  import path from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
@@ -88,6 +88,21 @@ async function backupIfExists(p) {
88
88
  return bak;
89
89
  }
90
90
 
91
+ async function ensureSkillsGitignore(skillsDir) {
92
+ try {
93
+ await mkdir(skillsDir, { recursive: true });
94
+ const gi = path.join(skillsDir, '.gitignore');
95
+ const content = '# matt-skills backup — pi skips .bak via explicit filter + this fallback\n*.bak\n*.bak/\n';
96
+ if (await pathExists(gi)) {
97
+ const cur = await readFile(gi, 'utf8');
98
+ if (cur.includes('*.bak')) return;
99
+ await writeFile(gi, cur.endsWith('\n') ? `${cur}${content}` : `${cur}\n${content}`);
100
+ } else {
101
+ await writeFile(gi, content);
102
+ }
103
+ } catch {}
104
+ }
105
+
91
106
  const TOOLS = ['codex', 'pi', 'opencode', 'claude'];
92
107
 
93
108
  const PROJECT_DIRS = {
@@ -219,6 +234,7 @@ async function initCommand({ dest, force }) {
219
234
  } else {
220
235
  process.stdout.write(`上游技能:已装 ${installed}、跳过 ${skipped}\n`);
221
236
  }
237
+ await ensureSkillsGitignore(skillsDir);
222
238
  process.stdout.write(`目标路径:${target}\n`);
223
239
  }
224
240
 
@@ -275,6 +291,7 @@ async function syncCommand({ dest, force }) {
275
291
  } else {
276
292
  process.stdout.write(`上游技能:新增 ${installed}、更新 ${updated}\n`);
277
293
  }
294
+ await ensureSkillsGitignore(skillsDir);
278
295
  process.stdout.write(`目标路径:${target}\n`);
279
296
  }
280
297
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heihei0299/matt-skills",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Agent skills + 项目配置模板:一条命令初始化 opencode / pi-agent 项目(含 mattpocock/skills 上游技能)",
5
5
  "type": "module",
6
6
  "bin": {