@samline/skills 0.4.0 → 0.4.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/bin/skills.mjs
CHANGED
|
@@ -327,6 +327,25 @@ const check = (opts) => {
|
|
|
327
327
|
if (state !== "ok") drift++;
|
|
328
328
|
console.log(`${state.padEnd(28)} ${name}`);
|
|
329
329
|
}
|
|
330
|
+
// Tool folders must only point into .agents; a real copy is a fork.
|
|
331
|
+
for (const tool of [".claude", ".codex"]) {
|
|
332
|
+
const folder = join(opts.dir, tool);
|
|
333
|
+
if (!existsSync(folder)) continue;
|
|
334
|
+
const walk = (dir) => {
|
|
335
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
336
|
+
const path = join(dir, entry.name);
|
|
337
|
+
if (entry.isSymbolicLink()) continue;
|
|
338
|
+
if (entry.isDirectory()) walk(path);
|
|
339
|
+
else if (!["settings.local.json", "launch.json"].includes(entry.name)) {
|
|
340
|
+
drift++;
|
|
341
|
+
console.log(
|
|
342
|
+
`${"real file in tool folder".padEnd(28)} ${relative(opts.dir, path)} (move it into .agents and link it)`,
|
|
343
|
+
);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
};
|
|
347
|
+
walk(folder);
|
|
348
|
+
}
|
|
330
349
|
process.exitCode = drift ? 1 : 0;
|
|
331
350
|
};
|
|
332
351
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samline/skills",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Agent skills that work the way samline works: workflow, kickoff, frontend, components, QA and more, for any project and stack.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Samuel Olvera (samline)",
|
|
@@ -92,7 +92,8 @@ Do these from the first commit; a late setup never happens:
|
|
|
92
92
|
real values never enter Git or any evidence file.
|
|
93
93
|
2. `.agents/` as the owner of agent files: `AGENTS.md`, memory with the
|
|
94
94
|
**current contracts** (rules and decisions, not history or run logs), and
|
|
95
|
-
skills. `CLAUDE.md` contains only `@AGENTS.md`; `.claude/`
|
|
95
|
+
skills. `CLAUDE.md` contains only `@AGENTS.md`; `.claude/`, `.codex/` and other
|
|
96
|
+
tool folders hold only symlinks into `.agents/` (see `samline-workflow`).
|
|
96
97
|
3. Skills: `npx @samline/skills add --profile site`, plus the stack skills the
|
|
97
98
|
starter ships. Run the project's own refresh commands for third-party skills.
|
|
98
99
|
4. **One check command** (the project's check or verify script, lint, format,
|
|
@@ -72,6 +72,19 @@ them. On a conflict follow them, then ask the maintainer.
|
|
|
72
72
|
consumers upgrade. Retire a package with `npm deprecate`, never
|
|
73
73
|
`npm unpublish`: published projects still install it.
|
|
74
74
|
|
|
75
|
+
## Agent files: one source
|
|
76
|
+
|
|
77
|
+
- `.agents/` owns every agent file: instructions, memory, skills
|
|
78
|
+
(`.agents/skills/<name>`) and subagents per tool (`.agents/claude/`,
|
|
79
|
+
`.agents/codex/`). `CLAUDE.md` contains only `@AGENTS.md`.
|
|
80
|
+
- Tool folders (`.claude/`, `.codex/` and any other) hold only relative,
|
|
81
|
+
tracked symlinks into `.agents/` plus local, ignored settings. A real file
|
|
82
|
+
there is a fork that one tool sees and the others miss: move it into
|
|
83
|
+
`.agents/` and replace it with a link, merging first if both copies differ.
|
|
84
|
+
- Install, write and edit skills only in `.agents/skills/`, never in a tool
|
|
85
|
+
folder. See [agent-folders.md](references/agent-folders.md) for the layout
|
|
86
|
+
and the check commands.
|
|
87
|
+
|
|
75
88
|
## Explore before editing
|
|
76
89
|
|
|
77
90
|
1. Read the project's `AGENTS.md`, README and the files of record it names.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# One source for agent files
|
|
2
|
+
|
|
3
|
+
Every agent tool reads the same instructions, skills and subagents, so no tool
|
|
4
|
+
sees a rule or skill that another misses. `.agents/` owns the real files; each
|
|
5
|
+
tool's folder holds only relative symlinks and that tool's local settings.
|
|
6
|
+
|
|
7
|
+
## Layout
|
|
8
|
+
|
|
9
|
+
```text
|
|
10
|
+
AGENTS.md project entry point (Codex and others read it natively)
|
|
11
|
+
CLAUDE.md one line: @AGENTS.md
|
|
12
|
+
.agents/
|
|
13
|
+
README.md index: where each kind of knowledge goes
|
|
14
|
+
AGENTS.md, memory/, lessons.md, todos.md
|
|
15
|
+
skills/<name>/SKILL.md every skill, flat (tools only look one level deep)
|
|
16
|
+
claude/<agent>.md Claude Code subagents
|
|
17
|
+
codex/config.toml Codex configuration
|
|
18
|
+
codex/agents/<agent>.toml Codex roles
|
|
19
|
+
skills-lock.json provenance and hashes of installed skills
|
|
20
|
+
.claude/
|
|
21
|
+
skills -> ../.agents/skills symlink
|
|
22
|
+
agents -> ../.agents/claude symlink
|
|
23
|
+
settings.local.json, launch.json local only, never committed
|
|
24
|
+
.codex/
|
|
25
|
+
config.toml -> ../.agents/codex/config.toml
|
|
26
|
+
agents -> ../.agents/codex/agents
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Another tool follows the same pattern: its entry file is a pointer to
|
|
30
|
+
`AGENTS.md` (an import or a one-line include), and its skills or agents folder is
|
|
31
|
+
a relative symlink into `.agents/`. If a tool cannot follow symlinks, generate
|
|
32
|
+
its copy from `.agents/` with a script and never edit the copy by hand.
|
|
33
|
+
|
|
34
|
+
## Rules
|
|
35
|
+
|
|
36
|
+
- Write and edit only inside `.agents/` and `AGENTS.md`. A real file inside
|
|
37
|
+
`.claude/`, `.codex/` or another tool folder is a fork: one tool reads it and
|
|
38
|
+
the others never do.
|
|
39
|
+
- Symlinks are relative (`../.agents/skills`) and tracked in Git, so they work
|
|
40
|
+
in every clone and machine.
|
|
41
|
+
- When an installer writes real folders into a tool folder (some create
|
|
42
|
+
`.claude/skills/<name>` per skill), move the content into `.agents/skills/`,
|
|
43
|
+
then replace the folder with a link. If both copies differ, merge first: never
|
|
44
|
+
delete the only copy of a local edit.
|
|
45
|
+
- Settings that hold personal paths, permissions or machine state
|
|
46
|
+
(`settings.local.json`, `launch.json`) stay local and ignored.
|
|
47
|
+
- Personal global files (`~/.claude/CLAUDE.md`, global skills) are never copied
|
|
48
|
+
into a repository; the project carries its own rules in `.agents/`.
|
|
49
|
+
|
|
50
|
+
## Check
|
|
51
|
+
|
|
52
|
+
```sh
|
|
53
|
+
# Real files under tool folders, other than local settings, mean a fork.
|
|
54
|
+
find .claude .codex -not -type d -not -type l \
|
|
55
|
+
-not -name settings.local.json -not -name launch.json 2>/dev/null
|
|
56
|
+
|
|
57
|
+
# Every link must resolve into .agents.
|
|
58
|
+
find .claude .codex -type l -exec sh -c 'printf "%s -> %s\n" "$1" "$(readlink "$1")"' _ {} \; 2>/dev/null
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
The first command prints nothing in a correct project. `npx @samline/skills check`
|
|
62
|
+
also warns when `.claude/skills` holds real copies.
|
package/skills-index.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.4.
|
|
2
|
+
"version": "0.4.1",
|
|
3
3
|
"skills": {
|
|
4
4
|
"samline-catalog": {
|
|
5
5
|
"files": [
|
|
@@ -51,9 +51,9 @@
|
|
|
51
51
|
"SKILL.md"
|
|
52
52
|
],
|
|
53
53
|
"sha256": {
|
|
54
|
-
"SKILL.md": "
|
|
54
|
+
"SKILL.md": "a120da9a8c4ffe3afca33f0305985a957fa31449490e6069c0ecfc179f278f4e"
|
|
55
55
|
},
|
|
56
|
-
"bundleHash": "
|
|
56
|
+
"bundleHash": "5f20bf07c234b8e77544ca73158ae54795d381e24039dc0308f75d8c8c958a43"
|
|
57
57
|
},
|
|
58
58
|
"samline-library": {
|
|
59
59
|
"files": [
|
|
@@ -107,17 +107,19 @@
|
|
|
107
107
|
"samline-workflow": {
|
|
108
108
|
"files": [
|
|
109
109
|
"SKILL.md",
|
|
110
|
+
"references/agent-folders.md",
|
|
110
111
|
"references/evidence-and-qa.md",
|
|
111
112
|
"references/lessons-and-memory.md",
|
|
112
113
|
"references/web-traps.md"
|
|
113
114
|
],
|
|
114
115
|
"sha256": {
|
|
115
|
-
"SKILL.md": "
|
|
116
|
+
"SKILL.md": "1d058c4b98508ba5b663ddebf6f7c599491ad8a878f9787994cf68ed5094e252",
|
|
117
|
+
"references/agent-folders.md": "160ec2fc218137472363c2d331234e0073a0f9fca55f6df75351a486f7894250",
|
|
116
118
|
"references/evidence-and-qa.md": "283da834caff062e94c046d6c609e1888568537aaf250bd3bd4e91ec00276f19",
|
|
117
119
|
"references/lessons-and-memory.md": "df9e7165e11211fa24709e3f07c922b70c6a05bb7c8e331fbf0be3fb859bb9f8",
|
|
118
120
|
"references/web-traps.md": "7293f3c2d5434bc38b5a708ec7a43192521e0a4b4cdcac870c865ccf0deacd52"
|
|
119
121
|
},
|
|
120
|
-
"bundleHash": "
|
|
122
|
+
"bundleHash": "296e15b9b21fbc24ec5767bf014e8339510d29c43b42f50f64f256418e28fa8d"
|
|
121
123
|
},
|
|
122
124
|
"silence": {
|
|
123
125
|
"files": [
|
package/skills.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$comment": "Registry of @samline/skills: generic skills that work the way samline works, in any project and stack. Stack skills ship with their starter (@samline/astro, later @samline/next, @samline/laravel); package skills ship with each package. Every skill is written in English. status: stable or opt-in.",
|
|
3
3
|
"name": "@samline/skills",
|
|
4
|
-
"version": "0.4.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"source": "samline/skills",
|
|
6
6
|
"profiles": {
|
|
7
7
|
"core": {
|