cyber-aced 0.3.0
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/.claude-plugin/plugin.json +18 -0
- package/.plugin/pins.json +1 -0
- package/.plugin/plugin.json +18 -0
- package/agents/aced-case-judge.md +165 -0
- package/agents/aced-impl-judge.md +55 -0
- package/agents/aced-scenario-writer.md +76 -0
- package/agents/aced-spec-validator.md +66 -0
- package/governances/README.md +52 -0
- package/governances/agent-tool-output.md +86 -0
- package/governances/cli-resolution.md +102 -0
- package/governances/skill-design.md +258 -0
- package/governances/skill-repo-structure.md +173 -0
- package/package.json +44 -0
- package/readme.md +124 -0
- package/skills/aced-architect-impl/README.md +9 -0
- package/skills/aced-architect-impl/SKILL.md +73 -0
- package/skills/aced-builder-impl/README.md +14 -0
- package/skills/aced-builder-impl/SKILL.md +46 -0
- package/skills/aced-builder-spec/README.md +15 -0
- package/skills/aced-builder-spec/SKILL.md +130 -0
- package/skills/aced-fit/README.md +21 -0
- package/skills/aced-fit/SKILL.md +105 -0
- package/skills/aced-impl-producer/SKILL.md +75 -0
- package/skills/add-scenario/README.md +25 -0
- package/skills/add-scenario/SKILL.md +75 -0
- package/skills/bench/README.md +64 -0
- package/skills/bench/SKILL.md +199 -0
- package/skills/bench/scripts/bench-claude-code.mts +187 -0
- package/skills/bench/scripts/bench-compare.mts +369 -0
- package/skills/bench/scripts/bench-record.mts +133 -0
- package/skills/bench/scripts/bench.mts +930 -0
- package/skills/check-freshness/README.md +57 -0
- package/skills/check-freshness/SKILL.md +76 -0
- package/skills/check-freshness/scripts/check-freshness.mts +399 -0
- package/skills/compare/README.md +25 -0
- package/skills/compare/SKILL.md +87 -0
- package/skills/contribute-skill/README.md +25 -0
- package/skills/contribute-skill/SKILL.md +241 -0
- package/skills/contribute-skill/scripts/source.mts +188 -0
- package/skills/define-agent/README.md +40 -0
- package/skills/define-agent/SKILL.md +279 -0
- package/skills/define-command/README.md +36 -0
- package/skills/define-command/SKILL.md +174 -0
- package/skills/define-governance/SKILL.md +151 -0
- package/skills/define-skill/README.md +37 -0
- package/skills/define-skill/SKILL.md +200 -0
- package/skills/extract-situation/README.md +32 -0
- package/skills/extract-situation/SKILL.md +54 -0
- package/skills/extract-situation/scripts/extract-situation.mts +287 -0
- package/skills/improve/README.md +25 -0
- package/skills/improve/SKILL.md +100 -0
- package/skills/improve-skill/README.md +38 -0
- package/skills/improve-skill/SKILL.md +169 -0
- package/skills/improve-skill/references/check-definitions.md +215 -0
- package/skills/improve-skill/scripts/validate.mts +1033 -0
- package/skills/init-aced/README.md +5 -0
- package/skills/init-aced/SKILL.md +76 -0
- package/skills/init-aced/scripts/ensure-results-ignored.mts +117 -0
- package/skills/list-skills/README.md +19 -0
- package/skills/list-skills/SKILL.md +55 -0
- package/skills/list-skills/scripts/list-skills.mts +210 -0
- package/skills/manage/README.md +35 -0
- package/skills/manage/SKILL.md +65 -0
- package/skills/manage-model-runners/README.md +25 -0
- package/skills/manage-model-runners/SKILL.md +113 -0
- package/skills/manage-skill-dirs/README.md +17 -0
- package/skills/manage-skill-dirs/SKILL.md +54 -0
- package/skills/manage-skill-dirs/scripts/manage-skill-dirs.mts +328 -0
- package/skills/repair-private-skills/README.md +17 -0
- package/skills/repair-private-skills/SKILL.md +59 -0
- package/skills/repair-private-skills/scripts/repair-private-skills.mts +279 -0
- package/skills/report/README.md +25 -0
- package/skills/report/SKILL.md +74 -0
- package/skills/run/README.md +25 -0
- package/skills/run/SKILL.md +220 -0
- package/skills/skillify/README.md +25 -0
- package/skills/skillify/SKILL.md +141 -0
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# CLI Resolution
|
|
2
|
+
|
|
3
|
+
Rules for running a command line tool from a skill. Apply when authoring or auditing a skill that shells out to a script or to a released npm binary.
|
|
4
|
+
|
|
5
|
+
## Classify the call first
|
|
6
|
+
|
|
7
|
+
| What the skill runs | How it runs |
|
|
8
|
+
| --- | --- |
|
|
9
|
+
| A script the skill ships | `node <skill-dir>/scripts/<file>` |
|
|
10
|
+
| A released npm CLI the skill does not ship | Local-first: `upx --local-only <pkg>@^<major>`, pinned `npx` only for a cold machine |
|
|
11
|
+
| A tool assumed present (`git`, `gh`, `node`) | Bare name; probe once, fail loudly when missing |
|
|
12
|
+
|
|
13
|
+
Resolve the runner once at the start of the workflow and reuse it for every later call.
|
|
14
|
+
|
|
15
|
+
## A script the skill ships
|
|
16
|
+
|
|
17
|
+
The script is part of the skill folder, built into it, and run with plain `node`.
|
|
18
|
+
|
|
19
|
+
- Invoke it as `node <skill-dir>/scripts/<file>`. Never through `npx`, `tsx`, a package manager exec, or a global install.
|
|
20
|
+
- Use Node built-ins only, or bundle every dependency into the script. The script must run from an unpacked skill folder with no `node_modules`.
|
|
21
|
+
- Never reference a path outside the skill folder — a sibling skill, a plugin `bin/`, or the package root. Standalone and symlinked installs break such paths silently.
|
|
22
|
+
- A git-sourced install has no built `scripts/`. Document the skill's own pinned fallback for that case: `npx -y <package>@^<version> <command>` with the same arguments.
|
|
23
|
+
|
|
24
|
+
Script placement and bundling are specified in **skill-design**; this document covers only how the script is invoked.
|
|
25
|
+
|
|
26
|
+
## A released CLI the skill does not ship
|
|
27
|
+
|
|
28
|
+
### Preferred — installed copies only
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
upx --local-only <pkg>@^<major> <subcommand>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
- `upx` matches a semver **range** against copies already installed — `node_modules` from the current directory upward, nearest first, then the global root — and spawns that binary directly.
|
|
35
|
+
- Pin a **major** range, never an exact version and never a dist tag. One installed copy then serves every caller on that major.
|
|
36
|
+
- `--local-only` never falls back to `npx`. It exits **127** when nothing installed satisfies the range. Read 127 as "not installed", not as "the command failed".
|
|
37
|
+
- `upx` is `@repobuddy/upx`. It is not ambient: it exists only after a global install, so probe `command -v upx` before using it.
|
|
38
|
+
|
|
39
|
+
### Cold machine — pinned npx
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx -y <pkg>@<exact-version> <subcommand>
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
- Exact version only. Never a range, never a dist tag (`@latest`, `@next`).
|
|
46
|
+
- Read the exact version with `npm view <pkg> version` when authoring, then write it into the skill. Do not resolve it at run time.
|
|
47
|
+
- This is a bootstrap path: it costs a registry lookup on every call and requires network. Use it when `upx` is absent or exited 127 and the call must still succeed.
|
|
48
|
+
|
|
49
|
+
### Pattern
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
# Resolve <pkg> once
|
|
53
|
+
if command -v upx >/dev/null 2>&1 && upx --local-only <pkg>@^<major> --version >/dev/null 2>&1; then
|
|
54
|
+
CLI="upx --local-only <pkg>@^<major>"
|
|
55
|
+
else
|
|
56
|
+
CLI="npx -y <pkg>@<exact-version>"
|
|
57
|
+
fi
|
|
58
|
+
$CLI <subcommand>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Replace `<pkg>` with the npm package name, `<major>` with the major the skill was tested against, and `<exact-version>` with a released version of that major.
|
|
62
|
+
|
|
63
|
+
### An optional lookup never falls back
|
|
64
|
+
|
|
65
|
+
When the call is a lookup that may legitimately find nothing — a governance override, an optional config — stop at the local tier:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
upx --local-only <pkg>@^<major> <subcommand> || true
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Exit 127, or any other non-zero exit, means "no result". The skill continues with its own default and never reaches for `npx`.
|
|
72
|
+
|
|
73
|
+
## Error handling
|
|
74
|
+
|
|
75
|
+
Surface a missing tool; never proceed silently.
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Error: <pkg> not available. Install one of:
|
|
79
|
+
npm install -g <pkg> # global
|
|
80
|
+
pnpm add -D <pkg> # repo-local devDependency
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Distinguish the two failures when reporting: exit 127 from `upx --local-only` means nothing installed satisfies the range; a non-zero exit from the CLI itself means the command ran and failed.
|
|
84
|
+
|
|
85
|
+
## Rules
|
|
86
|
+
|
|
87
|
+
- Never hardcode `node_modules/.bin/<bin>`. The path is implementation-specific and breaks across workspaces and package managers.
|
|
88
|
+
- Never rely on repo-specific package scripts (`pnpm <bin>`, `npm run <bin>`) — local conventions, not portable.
|
|
89
|
+
- Never pass a range or a dist tag to `npx`; never pass an exact version to `upx --local-only`.
|
|
90
|
+
- Never use `npx` for a call the skill makes repeatedly in one run.
|
|
91
|
+
- A skill's own script never depends on a package runner. The pinned `npx` fallback belongs to the skill, not to the script.
|
|
92
|
+
|
|
93
|
+
## References
|
|
94
|
+
|
|
95
|
+
Related governances (load on demand; read stdout as authoritative):
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
governance show skill-design
|
|
99
|
+
governance show agent-tool-output
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
- <https://github.com/repobuddy/upx> — `upx` resolution order and the `--local-only` flag
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Skill Design
|
|
2
|
+
|
|
3
|
+
Rules for authoring SKILL.md files that agents load on demand. Apply when creating, generalizing, or auditing a skill — before adding scripts or CLI instructions.
|
|
4
|
+
|
|
5
|
+
## Structure
|
|
6
|
+
|
|
7
|
+
SKILL.md must be agent-first: dense normative rules the agent executes without opening linked files first.
|
|
8
|
+
|
|
9
|
+
- Do not include `## Why`, `## Rationale`, `## Background`, or `## Context` sections.
|
|
10
|
+
- Do not include causal explanation ("because…") or rationale prose in the body.
|
|
11
|
+
- One-line scope ("Apply when…") is allowed at the top.
|
|
12
|
+
- Put optional depth in `## References` at the end — `governance show` commands, external HTTPS URLs, sibling files in the same skill folder only.
|
|
13
|
+
|
|
14
|
+
**SKILL.md structure:**
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
# Skill Title
|
|
18
|
+
## When to use / Prerequisites # short scope
|
|
19
|
+
## Workflow # numbered steps, decision logic
|
|
20
|
+
## Anti-patterns # optional
|
|
21
|
+
## References # on-demand standards, external URLs, reference.md — no repo file paths
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Do not embed References content or links to sibling files mid-workflow.
|
|
25
|
+
|
|
26
|
+
## Core principles
|
|
27
|
+
|
|
28
|
+
### Decisions over documentation
|
|
29
|
+
|
|
30
|
+
Encode what to decide and how. Do not repeat generic best practices, API docs, or facts the model can derive without the skill.
|
|
31
|
+
|
|
32
|
+
### Narrow and composable
|
|
33
|
+
|
|
34
|
+
One workflow per skill. A skill is selected one of three ways — matched against a situation, named by a caller, or fired by an event. Declare that choice in the `description`; never infer it from a visibility flag.
|
|
35
|
+
|
|
36
|
+
- **Name-only skills** (loaded by name from another skill, never matched to a user situation) set the `description` to exactly `"By name only"` — nothing else. The minimal description is the mechanism, not a label for it: the `description` is the only surface the model matches against, so every word added to it is another handle for a spurious match. Identity — what the skill is, who calls it, what it returns — belongs in the body and README, which the caller reads after loading it by name.
|
|
37
|
+
- **`user-invocable` is a visibility flag only.** It controls whether a skill appears in the user's command list. It never determines how a skill is selected, and must not be read as one: a skill may legitimately be `user-invocable: false` and still situationally triggered.
|
|
38
|
+
- Whether a skill can run standalone is documentation for its README, not a declared kind. A self-contained engine and a fragment of a larger capability are selected the same way and carry the same minimal description.
|
|
39
|
+
- Neither type should be loaded as ambient context.
|
|
40
|
+
|
|
41
|
+
### No baked-in opinions
|
|
42
|
+
|
|
43
|
+
Detect the user's setup (package manager, monorepo shape, editor, OS paths) at runtime rather than assuming a specific stack. If the skill only applies to one stack, say so explicitly in the description.
|
|
44
|
+
|
|
45
|
+
## Placement and scope
|
|
46
|
+
|
|
47
|
+
Where a skill file lives depends on who consumes it. Whole-repo layout (manifests, CI, archetypes) is covered in **skill-repo-structure** — load from References when scaffolding a library repo.
|
|
48
|
+
|
|
49
|
+
### Skill placement
|
|
50
|
+
|
|
51
|
+
Use **placement** for where a skill lives; do not call this axis "type".
|
|
52
|
+
|
|
53
|
+
| Placement | Location | Use case |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| **User** | `~/.agents/skills/<name>/` | Personal skills across all projects |
|
|
56
|
+
| **Project private** | `.agents/skills/<name>/` | Contributor tooling scoped to one repo |
|
|
57
|
+
| **Project public** | `skills/<name>/` | Shipped with a package or installed via `npx skills add` |
|
|
58
|
+
|
|
59
|
+
### Skill patterns
|
|
60
|
+
|
|
61
|
+
Use **pattern** for the workflow shape; do not overload "kind" or "type" here.
|
|
62
|
+
|
|
63
|
+
| Pattern | Use case |
|
|
64
|
+
| --- | --- |
|
|
65
|
+
| **Process** | Multi-step workflows where sequence and decision logic matter |
|
|
66
|
+
| **Tool-based** | Workflows centered on consistent use of tools, systems, or connectors |
|
|
67
|
+
| **Standard** | Workflows that enforce tone, structure, formatting, or quality bars |
|
|
68
|
+
| **Persona** | Loads an expert stance, decision style, and working behavior into the session |
|
|
69
|
+
|
|
70
|
+
Repo-internal skills must include `metadata: internal: true` in frontmatter.
|
|
71
|
+
Persona skills must include `metadata.persona: "true"`.
|
|
72
|
+
|
|
73
|
+
### Patch and local rules
|
|
74
|
+
|
|
75
|
+
- Upstream contributions from a local install map to `skills/<name>/…` in the source repo — never `.agents/skills/` upstream.
|
|
76
|
+
- **`SKILL.local.md`** extends a skill locally; never commit or push it upstream.
|
|
77
|
+
- Include every changed file under the skill folder when patching (not only `SKILL.md`).
|
|
78
|
+
|
|
79
|
+
## Progressive disclosure
|
|
80
|
+
|
|
81
|
+
Keep SKILL.md concise — essential workflow and decision logic only.
|
|
82
|
+
|
|
83
|
+
- Put detailed reference material in sibling files (`reference.md`, `examples.md`) in the same skill folder.
|
|
84
|
+
- Link sibling files **only from References**; agent reads them when stuck, not by default.
|
|
85
|
+
- Link references **one level deep** from SKILL.md; avoid chains of nested files.
|
|
86
|
+
- Aim to keep SKILL.md under ~500 lines; split when a skill grows beyond that.
|
|
87
|
+
|
|
88
|
+
## Extract deterministic logic
|
|
89
|
+
|
|
90
|
+
When a step produces the same output given the same input and needs no judgment, move it out of prose:
|
|
91
|
+
|
|
92
|
+
- Prefer an **existing project CLI** or a small **script** in the skill's `scripts/` directory.
|
|
93
|
+
- The skill retains **when** to invoke the tool; the tool retains **how**.
|
|
94
|
+
- Candidates: text manipulation, file I/O, structured data transforms, validation with fixed rules.
|
|
95
|
+
|
|
96
|
+
Do not re-derive deterministic steps in natural language each run.
|
|
97
|
+
|
|
98
|
+
### Keep scripts inside the skill folder
|
|
99
|
+
|
|
100
|
+
The skill folder is the unit an installer copies (`skills add --skill <name>` takes that folder and nothing else).
|
|
101
|
+
|
|
102
|
+
- Put every script the skill runs in its own `scripts/`, and invoke it as `node <skill-dir>/scripts/<file>`.
|
|
103
|
+
- Never reference a path outside the skill folder: a sibling skill, a plugin's `bin/`, or the package root. Standalone copies and symlinked installs break such paths without an error.
|
|
104
|
+
- Use Node built-ins only, or bundle dependencies into the script. The script itself never depends on `npx`, `tsx`, or a global install; the pinned `npx` fallback below is the skill's, not the script's. For a released CLI the skill depends on but does not ship, follow **cli-resolution**.
|
|
105
|
+
|
|
106
|
+
### Share logic by bundling it into each skill
|
|
107
|
+
|
|
108
|
+
When several skills, or a skill and a package CLI, need the same logic:
|
|
109
|
+
|
|
110
|
+
- Author it once in the package source, typed and tested there.
|
|
111
|
+
- Have the build emit a self-contained bundle into the `scripts/` of each skill that uses it. Start the bundle with a header naming its source file and saying it is generated, then the usage comment an agent reads when stuck. Minify the rest.
|
|
112
|
+
- Do not commit the bundles. Gitignore them, build them in `prepack`, and ship them through the npm package's `files`.
|
|
113
|
+
- Add a CI check that packs the package, unpacks it with no `node_modules`, and runs each bundle from the unpacked skill folder.
|
|
114
|
+
- If the build is cached (for example by Turborepo), list each bundle as a build output by exact path. A glob such as `skills/**` restores cached copies over hand-written scripts.
|
|
115
|
+
- Keep the tests with the source, outside the skill folder, so installs do not copy them.
|
|
116
|
+
- Expose the same commands in the package CLI, and give each such skill a pinned fallback: when `scripts/<file>` is missing or cannot run, call `npx -y <package>@^<version> <command>` with the same arguments. A skill installed from git has no built `scripts/`, and this is how it still works.
|
|
117
|
+
- Distribute the plugin from npm where the harness supports an npm plugin source. Git-sourced installs, including organization-distributed marketplaces that exclude npm sources, use the fallback.
|
|
118
|
+
|
|
119
|
+
When a skill includes `scripts/` or documents CLI commands agents run, load **agent-tool-output** from References for stdout, JSON, non-interactive, and stderr rules.
|
|
120
|
+
|
|
121
|
+
## Description and structure
|
|
122
|
+
|
|
123
|
+
### Frontmatter
|
|
124
|
+
|
|
125
|
+
- `name` must match the parent directory name exactly.
|
|
126
|
+
- `description` must contain `"Use this skill when"` or `"When to use"` trigger language — **unless the skill is name-only**, whose `description` is exactly `"By name only"` and carries no trigger language at all.
|
|
127
|
+
- Keep `description` ≤120 characters — long descriptions are truncated in the agent context window.
|
|
128
|
+
- `compatibility` — optional; declare environment constraints (required tools, network access, OS, runtime version). Include only when the skill has requirements the agent cannot assume.
|
|
129
|
+
|
|
130
|
+
#### Runtime fields
|
|
131
|
+
|
|
132
|
+
Support varies by platform; the notes below are Claude Code's documented behavior. Set none of these unless the skill needs them — each one is a deviation the reader must account for.
|
|
133
|
+
|
|
134
|
+
| Field | Effect |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| `allowed-tools` | **Pre-approves** the listed tools for the invoking turn. It does not restrict the tool pool — every other tool stays callable. The grant clears on the user's next message. |
|
|
137
|
+
| `disallowed-tools` | Removes tools from the pool while the skill is active. This is the field that restricts. Also clears on the next message. |
|
|
138
|
+
| `model` | Model to use while the skill is active. Applies for the rest of the current turn only; the session model resumes on the next prompt. |
|
|
139
|
+
| `effort` | Effort level while the skill is active: `low`, `medium`, `high`, `xhigh`, `max`. Same turn-scoped lifetime as `model`. |
|
|
140
|
+
| `context: fork` | Runs the skill in a subagent, with the skill body as the task prompt. Pair with `agent:` to choose the subagent type. Only meaningful for a skill that states a task — a reference or stance skill forked this way receives no actionable prompt and returns nothing useful. |
|
|
141
|
+
| `paths` | Glob patterns limiting automatic activation to matching files. |
|
|
142
|
+
|
|
143
|
+
A skill cannot express a tool **allowlist** — `allowed-tools` grants and `disallowed-tools` denies, but neither says "only these". A hard allowlist, `permissionMode`, `maxTurns`, persistent `memory`, `mcpServers`, and worktree `isolation` remain agent-definition fields. Reach for an agent definition when one of those is the actual requirement, not for `model` or `effort` alone.
|
|
144
|
+
|
|
145
|
+
### skill.json — install-time metadata
|
|
146
|
+
|
|
147
|
+
`skill.json` is an optional sidecar file in the same directory as `SKILL.md`. It holds install-time metadata that the `skills add` / `skills update` installer reads. It is **not** loaded into agent context, so it costs zero tokens at runtime.
|
|
148
|
+
|
|
149
|
+
Do not put install-time metadata in SKILL.md frontmatter — agents load it unnecessarily.
|
|
150
|
+
|
|
151
|
+
**Supported fields:**
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"distribution": {
|
|
156
|
+
"install_via": "package_manager",
|
|
157
|
+
"package": {
|
|
158
|
+
"name": "cyber-asana",
|
|
159
|
+
"bin": "cyber-asana"
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
**`distribution`** — declare the required install channel.
|
|
166
|
+
|
|
167
|
+
| Field | Required | Description |
|
|
168
|
+
| --- | --- | --- |
|
|
169
|
+
| `install_via` | yes | `"package_manager"` — must be installed via npm, not source control |
|
|
170
|
+
| `package.name` | when `install_via: package_manager` | npm package that ships the skill binary |
|
|
171
|
+
| `package.bin` | no | binary name; defaults to `package.name` |
|
|
172
|
+
|
|
173
|
+
Use `install_via: package_manager` when the skill depends on a released binary from the same repo. Source-based `skills add org/repo` will skip such skills and print an `npm install` hint.
|
|
174
|
+
|
|
175
|
+
### Activation
|
|
176
|
+
|
|
177
|
+
The `activation` field belongs in **SKILL.md frontmatter** as a **top-level field** (not nested under `metadata:`). Agents need this information to know whether a hook is involved; not all agents support hooks, so it must travel with the skill file.
|
|
178
|
+
|
|
179
|
+
```yaml
|
|
180
|
+
---
|
|
181
|
+
name: my-skill
|
|
182
|
+
activation: per-situation
|
|
183
|
+
description: "Use this skill when..."
|
|
184
|
+
---
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
| `activation` | Claude Code | Cursor | Codex |
|
|
188
|
+
| --- | --- | --- | --- |
|
|
189
|
+
| `per-situation` | — | — | — |
|
|
190
|
+
| `session-start` | `SessionStart` | `sessionStart` | `SessionStart` |
|
|
191
|
+
| `session-end` | `SessionEnd` | `sessionEnd` | — |
|
|
192
|
+
| `pre-tool-use` | `PreToolUse` | `preToolUse` | — |
|
|
193
|
+
| `post-tool-use` | `PostToolUse` | `postToolUse` | `PostToolUse` |
|
|
194
|
+
| `post-tool-use-failure` | — | `postToolUseFailure` | — |
|
|
195
|
+
| `before-submit-prompt` | `UserPromptSubmit` | `beforeSubmitPrompt` | — |
|
|
196
|
+
| `before-shell-execution` | — | `beforeShellExecution` | — |
|
|
197
|
+
| `after-shell-execution` | — | `afterShellExecution` | — |
|
|
198
|
+
| `before-mcp-execution` | — | `beforeMCPExecution` | — |
|
|
199
|
+
| `after-mcp-execution` | — | `afterMCPExecution` | — |
|
|
200
|
+
| `before-read-file` | — | `beforeReadFile` | — |
|
|
201
|
+
| `after-file-edit` | — | `afterFileEdit` | — |
|
|
202
|
+
| `subagent-start` | — | `subagentStart` | — |
|
|
203
|
+
| `subagent-stop` | — | `subagentStop` | `SubagentStop` |
|
|
204
|
+
| `pre-compact` | `PreCompact` | `preCompact` | — |
|
|
205
|
+
| `stop` | `Stop` | `stop` | `Stop` |
|
|
206
|
+
| `after-agent-response` | — | `afterAgentResponse` | — |
|
|
207
|
+
| `after-agent-thought` | — | `afterAgentThought` | — |
|
|
208
|
+
| `before-tab-file-read` | — | `beforeTabFileRead` | — |
|
|
209
|
+
| `after-tab-file-edit` | — | `afterTabFileEdit` | — |
|
|
210
|
+
|
|
211
|
+
— = no documented equivalent on that host.
|
|
212
|
+
|
|
213
|
+
**Default:** omit or set `per-situation` — no hook; load via `description` or explicit invoke.
|
|
214
|
+
|
|
215
|
+
**Hook-backed skills:** set `activation` to the normalized event, then register with `hook register --event …` (cyberplace CLI maps `session-start` → `SessionStart` / `sessionStart`, `post-tool-use` → `PostToolUse` / `postToolUse`). CLI today supports `SessionStart` and `PostToolUse` only; other values are portable declarations until hosts implement them.
|
|
216
|
+
|
|
217
|
+
**Defaults by pattern:** persona → `per-situation` (opt-in via `description`); discipline / always-on injection → `session-start`; process / tool-based / standard → `per-situation` or omit.
|
|
218
|
+
|
|
219
|
+
Deprecated: `metadata.activation` in SKILL.md frontmatter. Use top-level `activation:` instead.
|
|
220
|
+
|
|
221
|
+
### Body
|
|
222
|
+
|
|
223
|
+
- Include actionable steps, numbered instructions, or decision logic — not just a restatement of the description.
|
|
224
|
+
- Do not instruct generic behavior the model already follows ("write clean code", "be helpful").
|
|
225
|
+
|
|
226
|
+
## Anti-patterns
|
|
227
|
+
|
|
228
|
+
- Rationale or "because…" prose in the body
|
|
229
|
+
- `## Why`, `## Rationale`, `## Background`, or `## Context` sections
|
|
230
|
+
- Links to other repository files mid-workflow
|
|
231
|
+
- Mid-body links to sibling skill files (use References at end)
|
|
232
|
+
|
|
233
|
+
## Governance lookup order
|
|
234
|
+
|
|
235
|
+
A skill that reads a governance at run time stops at the first hit:
|
|
236
|
+
|
|
237
|
+
1. `.agents/governances/<name>.md` — project override.
|
|
238
|
+
2. Only when an installed copy exists: `upx --local-only buddy-agent-harness@^<major> governance show <name> --overrides-only` when `upx` is on PATH; else `buddy-agent-harness governance show <name> --overrides-only` when `command -v buddy-agent-harness` finds it. Exit 127 from `upx`, or any non-zero exit, means no override. Never through `npx`.
|
|
239
|
+
3. `references/governances/<name>.md` inside the skill — the default copy, committed to git.
|
|
240
|
+
|
|
241
|
+
Copies live at `<skill>/references/governances/<name>.md`, and the files in that folder declare which governances the skill uses. A skill copies every governance a copied governance references, and lists every copy in its SKILL.md References, so each stays one level deep. A pointer inside a copy (`governance show <other>`) is read as "load `references/governances/<other>.md`".
|
|
242
|
+
|
|
243
|
+
`buddy-agent-harness governance` and the copy step in `universal-plugin plugin build` are planned (tracked in https://github.com/repobuddy/buddy-agent-harness/issues/122). Until they ship, a skill uses step 3 only.
|
|
244
|
+
|
|
245
|
+
## References
|
|
246
|
+
|
|
247
|
+
Related governances (load on demand; read stdout as authoritative):
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
npx cyberplace@<version> governance show skill-repo-structure
|
|
251
|
+
npx cyberplace@<version> governance show agent-tool-output
|
|
252
|
+
npx cyberplace@<version> governance show universal-plugin
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
Runtime field reference (re-verify before relying on a version-gated field):
|
|
256
|
+
|
|
257
|
+
- <https://code.claude.com/docs/en/skills> — skill frontmatter, invocation control, `context: fork`
|
|
258
|
+
- <https://code.claude.com/docs/en/sub-agents> — agent-definition frontmatter, `skills:` preloading
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
# Skill Repo Structure
|
|
2
|
+
|
|
3
|
+
Rules for organizing a **repository that ships one or more Agent Skills** — directories, manifests, contributor internals, and CI. Apply when creating a skill library, running `init-skill-repo`, or auditing whether a repo is a well-formed skill collection.
|
|
4
|
+
|
|
5
|
+
This governance covers **repo layout**. Per-skill authoring rules live in **skill-design**; per-skill format baseline is the agentskills.io specification (see References).
|
|
6
|
+
|
|
7
|
+
## Repo archetypes
|
|
8
|
+
|
|
9
|
+
Pick the **primary** archetype. Hybrid repos are fine if each layer is intentional.
|
|
10
|
+
|
|
11
|
+
### Collection
|
|
12
|
+
|
|
13
|
+
Skills only — publish via `npx skills add owner/repo`.
|
|
14
|
+
|
|
15
|
+
**Typical layout:**
|
|
16
|
+
|
|
17
|
+
```text
|
|
18
|
+
LICENSE
|
|
19
|
+
README.md
|
|
20
|
+
skills/
|
|
21
|
+
<skill-name>/
|
|
22
|
+
SKILL.md
|
|
23
|
+
README.md # human-facing usage + install (skills.sh listing hygiene)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**Optional:** `skills.sh.json`, `.claude-plugin/marketplace.json`, `template/`, `spec/` (pointer to agentskills.io).
|
|
27
|
+
|
|
28
|
+
### Maintained library
|
|
29
|
+
|
|
30
|
+
Collection plus validation and install hygiene.
|
|
31
|
+
|
|
32
|
+
**Add:**
|
|
33
|
+
|
|
34
|
+
- `AGENTS.md` (and `CLAUDE.md` → symlink when using Claude Code)
|
|
35
|
+
- CI that runs skill validation on PRs touching `skills/`
|
|
36
|
+
- Documented install commands in README
|
|
37
|
+
- Optional committed `skills-lock.json` when the repo dogfoods `npx skills add`
|
|
38
|
+
|
|
39
|
+
**Validate with:** your skill-validation tool (e.g. the aced `improve-skill` skill's `validate.mts` engine).
|
|
40
|
+
|
|
41
|
+
### Tooling library
|
|
42
|
+
|
|
43
|
+
Maintained library plus npm CLI, governances, or hooks shipped from the same repo.
|
|
44
|
+
|
|
45
|
+
**Add (as needed):**
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
governances/ # version-pinned standards (cyberplace pattern)
|
|
49
|
+
src/ # CLI source
|
|
50
|
+
package.json # publishable bin
|
|
51
|
+
.changeset/ # if npm releases use Changesets
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Require:** a single documented verify command in AGENTS.md (typecheck + lint + test + audit, or equivalent for the stack).
|
|
55
|
+
|
|
56
|
+
### Plugin bundle
|
|
57
|
+
|
|
58
|
+
Skills grouped under named bundles for Claude/plugin marketplaces.
|
|
59
|
+
|
|
60
|
+
**Layout:**
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
plugins/
|
|
64
|
+
<bundle-name>/
|
|
65
|
+
skills/
|
|
66
|
+
<skill-name>/
|
|
67
|
+
SKILL.md
|
|
68
|
+
.claude-plugin/
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Do not treat plugin-bundle layout as the default — most repos use flat `skills/<name>/`.
|
|
72
|
+
|
|
73
|
+
## Required for any public skill repo
|
|
74
|
+
|
|
75
|
+
1. **`LICENSE`** at repo root.
|
|
76
|
+
2. **Public skills under `skills/<name>/SKILL.md`** (or documented bundle path for plugin archetype).
|
|
77
|
+
3. **Each skill complies** with agentskills.io: `name` matches directory; valid frontmatter; optional folders only as `scripts/`, `references/`, `assets/` unless documented otherwise.
|
|
78
|
+
4. **Each public skill includes `README.md`** alongside `SKILL.md` — when to use, what it does, and `npx skills add owner/repo --skill <name>`. Agent instructions stay in `SKILL.md`; README is for humans and skills.sh discovery.
|
|
79
|
+
5. **No loose `SKILL.md`** at repo root or outside a named skill directory.
|
|
80
|
+
6. **Root README** with install instructions (`npx skills add …`) for consumer-facing repos.
|
|
81
|
+
|
|
82
|
+
## Recommended for maintained and tooling libraries
|
|
83
|
+
|
|
84
|
+
| Artifact | Purpose |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| `AGENTS.md` | Agent-facing commands, architecture, pointers to governances |
|
|
87
|
+
| `.agents/skills/` | Repo-internal contributor skills (`metadata: internal: true`) |
|
|
88
|
+
| `skills.sh.json` | skills.sh groupings and install scopes |
|
|
89
|
+
| `.claude-plugin/marketplace.json` | Claude plugin marketplace groupings |
|
|
90
|
+
| CI on `skills/` | Block merges that fail skill validation |
|
|
91
|
+
| `awesome-skills.json` | Curated discovery (cyberplace-specific; optional elsewhere) |
|
|
92
|
+
|
|
93
|
+
## Contributor and patch conventions
|
|
94
|
+
|
|
95
|
+
These extend **skill-design** placement rules for library repos:
|
|
96
|
+
|
|
97
|
+
| Placement | Location | Notes |
|
|
98
|
+
| --- | --- | --- |
|
|
99
|
+
| **User** | `~/.agents/skills/<name>/` | User machine; not in the skill repo |
|
|
100
|
+
| **Project private** | `.agents/skills/<name>/` | `metadata: internal: true`; not shipped in `npx skills add` public tree |
|
|
101
|
+
| **Project public** | `skills/<name>/` | Installed by consumers |
|
|
102
|
+
|
|
103
|
+
**Upstream patches** from a local install always map to `skills/<name>/…` in the source repo — never `.agents/skills/` in upstream.
|
|
104
|
+
|
|
105
|
+
## Discipline sections
|
|
106
|
+
|
|
107
|
+
AGENTS.md **Discipline** sections (for example `## Commit Discipline` injected by SessionStart hooks) are **agent-first**:
|
|
108
|
+
|
|
109
|
+
- **Dense normative rules** in the section body — unit-of-work definition, staging rules, habits.
|
|
110
|
+
- **Self-contained** — no links to other repository files; agent follows discipline without loading governances first.
|
|
111
|
+
- **`### References` at section bottom** — commit-helper skill name, `governance show` one-liners only.
|
|
112
|
+
- **Do not** paste full governance bodies or ecosystem surveys into AGENTS.md.
|
|
113
|
+
|
|
114
|
+
Use **`init-commit-discipline`** to inject commit discipline for this profile.
|
|
115
|
+
|
|
116
|
+
## Optional manifests (do not require all)
|
|
117
|
+
|
|
118
|
+
| File | When |
|
|
119
|
+
| --- | --- |
|
|
120
|
+
| `skills-lock.json` | Repo records installed skills for reproducibility |
|
|
121
|
+
| `skills.sh.json` | Listing on skills.sh with groupings/scopes |
|
|
122
|
+
| `.claude-plugin/marketplace.json` | Claude plugin UX |
|
|
123
|
+
| `governances/` | Repo ships version-pinned standards loadable via `governance show` |
|
|
124
|
+
|
|
125
|
+
Prefer **digest + lockfile** over ad hoc path scraping for reproducible installs.
|
|
126
|
+
|
|
127
|
+
## Anti-patterns
|
|
128
|
+
|
|
129
|
+
- Duplicating the same skill in `skills/` and `.agents/skills/` without a documented reason
|
|
130
|
+
- Bloating AGENTS.md with full governance bodies — use `governance show` pointers in References instead
|
|
131
|
+
- Embedding reference-repo catalogs or surveys in governances — keep those outside agent-loaded standards
|
|
132
|
+
- Rationale or "because…" prose in governances, discipline sections, or public skills
|
|
133
|
+
- `## Why`, `## Rationale`, `## Background`, or `## Context` sections in agent-loaded artifacts
|
|
134
|
+
- Linking to repository files (ADRs, research, other governances as paths) from governances, discipline sections, or public skills
|
|
135
|
+
- Assuming `node_modules` or install paths for loading governances from other repos
|
|
136
|
+
- Running no CI on skill-only repos that accept external PRs
|
|
137
|
+
- Committing `SKILL.local.md` or secrets into public skill trees
|
|
138
|
+
|
|
139
|
+
## Detecting a skill repo
|
|
140
|
+
|
|
141
|
+
Treat a repository as a **skill repo** when any of:
|
|
142
|
+
|
|
143
|
+
- `skills/**/SKILL.md` exists (or `plugins/**/skills/**/SKILL.md` for bundle archetype)
|
|
144
|
+
- README or package scripts document a skill-validation command
|
|
145
|
+
- Primary purpose is distributing Agent Skills (not an application that happens to have one skill)
|
|
146
|
+
|
|
147
|
+
Use **`init-skill-repo`** (when shipped) to scaffold and wire disciplines for this profile.
|
|
148
|
+
|
|
149
|
+
## Verification
|
|
150
|
+
|
|
151
|
+
| Archetype | Minimum check |
|
|
152
|
+
| --- | --- |
|
|
153
|
+
| Collection | Manual or `skills-ref validate` per skill |
|
|
154
|
+
| Maintained / tooling | your skill-validation tool (e.g. the aced `improve-skill` `validate.mts` engine) in CI |
|
|
155
|
+
| Tooling library | Full repo verify command documented in AGENTS.md |
|
|
156
|
+
|
|
157
|
+
Full quality review (Q6–Q13, E3–E8): run the **improve-skill** agent skill after mechanical validation passes.
|
|
158
|
+
|
|
159
|
+
## References
|
|
160
|
+
|
|
161
|
+
**Related governances** (load on demand):
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
npx cyberplace@<version> governance show skill-design
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
| Layer | Source |
|
|
168
|
+
| --- | --- |
|
|
169
|
+
| Single skill format | [agentskills.io specification](https://agentskills.io/specification) |
|
|
170
|
+
| Skill content quality | `governance show skill-design` |
|
|
171
|
+
| Skill security | `governance show skill-security` (when shipped) |
|
|
172
|
+
| Org operational governance | [OWASP AST09](https://owasp.org/www-project-agentic-skills-top-10/) — out of scope for repo layout |
|
|
173
|
+
| Distribution RFCs | [agentskills distribution RFCs](https://github.com/agentskills/agentskills/issues/255) — future `.well-known` manifests |
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cyber-aced",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Agent Config Evaluation & Development. Spec, evaluate, and improve agent configurations: skills, AGENTS.md sections, subagent definitions, and commands.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/cyberuni/cyber-sdd.git",
|
|
8
|
+
"directory": "plugins/aced"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://github.com/cyberuni/cyber-sdd",
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"type": "module",
|
|
13
|
+
"bin": {
|
|
14
|
+
"aced-bench": "./dist/aced-bench.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"skills",
|
|
19
|
+
"agents",
|
|
20
|
+
"governances",
|
|
21
|
+
".plugin",
|
|
22
|
+
".codex-plugin",
|
|
23
|
+
".claude-plugin",
|
|
24
|
+
"!skills/**/*.test.mts"
|
|
25
|
+
],
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@cyberuni/agent-harness": "0.5.0"
|
|
28
|
+
},
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "tsdown",
|
|
31
|
+
"check:spec": "node ../sdd/skills/check-project-specs/scripts/check-project-specs.mts",
|
|
32
|
+
"test": "node --test \"skills/*/scripts/*.test.mts\"",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json"
|
|
34
|
+
},
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"tsdown": "^0.23.0"
|
|
40
|
+
},
|
|
41
|
+
"engines": {
|
|
42
|
+
"node": ">=22.11"
|
|
43
|
+
}
|
|
44
|
+
}
|