@olegkoval/agent-skills 1.31.0 → 1.32.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 +3 -2
- package/README.md +4 -3
- package/catalog/skills.json +18 -0
- package/collections/software-development.json +2 -1
- package/package.json +1 -1
- package/packages/software-development/shared-knowledge-artifact/SKILL.md +89 -0
- package/packages/software-development/shared-knowledge-artifact/adapters/claude/plugin.json +5 -0
- package/packages/software-development/shared-knowledge-artifact/adapters/claude/skills/shared-knowledge-artifact/SKILL.md +90 -0
- package/packages/software-development/shared-knowledge-artifact/adapters/claude/skills/shared-knowledge-artifact/references/prompt.txt +78 -0
- package/packages/software-development/shared-knowledge-artifact/references/prompt.txt +78 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "olko-agent-skills",
|
|
3
3
|
"description": "Agent-agnostic skill catalog for Codex, Claude, Cursor, Grok, Copilot, Windsurf, Kiro, and other skill-aware tools.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.31.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Oleg Koval"
|
|
7
7
|
},
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"./packages/software-development/morning-routine",
|
|
55
55
|
"./packages/software-development/release-day",
|
|
56
56
|
"./packages/software-development/branch-cleanup",
|
|
57
|
-
"./packages/software-development/vinted-listing"
|
|
57
|
+
"./packages/software-development/vinted-listing",
|
|
58
|
+
"./packages/software-development/shared-knowledge-artifact"
|
|
58
59
|
]
|
|
59
60
|
}
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<p><strong>Agent-agnostic skill catalog for Codex, Claude, Cursor, Grok, Copilot, Windsurf, Kiro, and other skill-aware tools.</strong></p>
|
|
4
4
|
<p>
|
|
5
5
|
<img src="https://img.shields.io/badge/license-MIT-16a34a" alt="MIT license">
|
|
6
|
-
<img src="https://img.shields.io/badge/skills-
|
|
6
|
+
<img src="https://img.shields.io/badge/skills-47-2563eb" alt="47 skills">
|
|
7
7
|
<img src="https://img.shields.io/badge/platforms-Codex%20%7C%20Claude%20%7C%20Cursor%20%7C%20Grok%20%7C%20Copilot%20%7C%20Windsurf%20%7C%20Kiro-111827" alt="Codex Claude Cursor Grok Copilot Windsurf Kiro">
|
|
8
8
|
<img src="https://img.shields.io/badge/status-public%20catalog-16a34a" alt="Public catalog">
|
|
9
9
|
</p>
|
|
@@ -139,11 +139,11 @@ packages/{category}/{skill}/SKILL.md
|
|
|
139
139
|
|
|
140
140
|
</details>
|
|
141
141
|
|
|
142
|
-
## All
|
|
142
|
+
## All 47 Skills
|
|
143
143
|
|
|
144
144
|
Each entry links to its `SKILL.md`. Reference any skill by its `olko:*` lookup name in a new agent session.
|
|
145
145
|
|
|
146
|
-
### Software development (
|
|
146
|
+
### Software development (41)
|
|
147
147
|
|
|
148
148
|
| Skill | What it does | Use when |
|
|
149
149
|
|-------|-------------|----------|
|
|
@@ -174,6 +174,7 @@ Each entry links to its `SKILL.md`. Reference any skill by its `olko:*` lookup n
|
|
|
174
174
|
| [relay](packages/software-development/relay/SKILL.md) | Uses `claude-relay` to run long or rate-limit-prone tasks autonomously across subscription accounts | A task will outlive one session or hit rate limits partway through |
|
|
175
175
|
| [review-past-performance](packages/software-development/review-past-performance/SKILL.md) | Pulls 24h of ICM memories, git history, and skill analytics; detects repeated mistakes and slow workflows; proposes 1-3 concrete fixes | Daily self-improvement loop or codifying a repeated workflow |
|
|
176
176
|
| [self-critique](packages/software-development/self-critique/SKILL.md) | Adversarially critiques your own last answer: spawns a critic agent that verifies claims against live sources, then loops until satisfied and reports where you were wrong | Checking a substantial answer before the user has to |
|
|
177
|
+
| [shared-knowledge-artifact](packages/software-development/shared-knowledge-artifact/SKILL.md) | Builds a shared, self-persisting knowledge ledger as a Claude Artifact — a private page that stores its own data, renders itself from it, and publishes new versions of itself so several agents read the same lessons and append to them | Giving multiple agents one place to learn from each other instead of repeating the same mistakes |
|
|
177
178
|
| [semantic-release-beta](packages/software-development/semantic-release-beta/SKILL.md) | Sets up `semantic-release` with stable `main` releases and beta prereleases on a `beta` branch | A Node package needs stable npm publishing plus beta prereleases |
|
|
178
179
|
| [skill-budget-audit](packages/software-development/skill-budget-audit/SKILL.md) | Diagnoses and fixes Claude Code's skill context budget overflow — identifies heavy plugin bundles that exceed the 2% budget | Skills failing to load or Claude hitting context limits from plugin bundles |
|
|
179
180
|
| [starter-rules](packages/software-development/starter-rules/SKILL.md) | Loads and enforces hard rules for every oleg-koval/* starter | Ensuring 300-line files, E2E tests, pre-commit hooks, Vertical Slice architecture, and KISS/DRY/SOLID |
|
package/catalog/skills.json
CHANGED
|
@@ -1070,6 +1070,24 @@
|
|
|
1070
1070
|
"copilot",
|
|
1071
1071
|
"grok"
|
|
1072
1072
|
]
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"name": "shared-knowledge-artifact",
|
|
1076
|
+
"lookupName": "olko:shared-knowledge-artifact",
|
|
1077
|
+
"category": "software-development",
|
|
1078
|
+
"path": "packages/software-development/shared-knowledge-artifact",
|
|
1079
|
+
"description": "Build a shared, self-persisting knowledge ledger as a Claude Artifact: a private page that stores its own data, renders itself from it, and publishes new versions of itself so several agents read the same lessons before working and append to them afterwards.",
|
|
1080
|
+
"tags": [
|
|
1081
|
+
"artifacts",
|
|
1082
|
+
"knowledge-base",
|
|
1083
|
+
"multi-agent",
|
|
1084
|
+
"memory",
|
|
1085
|
+
"lessons-learned",
|
|
1086
|
+
"documentation"
|
|
1087
|
+
],
|
|
1088
|
+
"adapters": [
|
|
1089
|
+
"claude"
|
|
1090
|
+
]
|
|
1073
1091
|
}
|
|
1074
1092
|
]
|
|
1075
1093
|
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shared-knowledge-artifact
|
|
3
|
+
description: Build a shared, self-persisting knowledge ledger as a Claude Artifact — a private page that stores its own data, renders itself from that data, and saves new versions of itself, so several agents can read the same lessons before starting work and append to them afterwards. Use when the user wants agents to learn from each other, asks for a shared knowledge base, lessons-learned log, gotcha ledger, or cross-agent memory page they can hand to other sessions.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Grep, Glob, Skill, Artifact
|
|
6
|
+
compatibility: Claude Code only — requires the Artifact tool and the artifact runtime capabilities (`capabilities: {artifact: {}}`).
|
|
7
|
+
metadata:
|
|
8
|
+
author: Oleg Koval
|
|
9
|
+
package: shared-knowledge-artifact
|
|
10
|
+
tags:
|
|
11
|
+
- artifacts
|
|
12
|
+
- knowledge-base
|
|
13
|
+
- multi-agent
|
|
14
|
+
- memory
|
|
15
|
+
- lessons-learned
|
|
16
|
+
- documentation
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# shared-knowledge-artifact
|
|
20
|
+
|
|
21
|
+
Publish one private Artifact page that acts as an append-only knowledge ledger which multiple agents (and the user) read before starting work and write to when reality corrects them. The page **is** the record: it stores its own data and publishes new versions of itself, so nothing depends on a server or on local files.
|
|
22
|
+
|
|
23
|
+
## Trigger phrases
|
|
24
|
+
|
|
25
|
+
- create a shared artifact my other agents can learn from
|
|
26
|
+
- shared knowledge base / lessons-learned log / gotcha ledger for agents
|
|
27
|
+
- cross-agent memory page
|
|
28
|
+
- somewhere agents can record what they learned so they don't repeat it
|
|
29
|
+
|
|
30
|
+
## Before writing any code
|
|
31
|
+
|
|
32
|
+
1. Invoke the `artifact-capabilities` skill — mandatory before declaring `capabilities` or writing any `window.claude.*` code.
|
|
33
|
+
2. Invoke the `artifact-design` skill — calibrates the design treatment.
|
|
34
|
+
3. Read the user's actual rules (`CLAUDE.md`, any verification/preferences doc, agent memory) and **seed the ledger with 6-10 real lessons already recorded there**. No lorem, no invented examples — a ledger that opens with fake entries never gets used.
|
|
35
|
+
|
|
36
|
+
## Persistence mechanism
|
|
37
|
+
|
|
38
|
+
- Declare `capabilities: {artifact: {}}` at publish time.
|
|
39
|
+
- Store the data as a JSON object inside `<script type="application/json" id="ledger-state">`. That block is the authoritative record; the visible page is **rendered from it** at load. Never serialize the live DOM to save.
|
|
40
|
+
- To persist: snapshot `document.documentElement.outerHTML` **once at script start** (pristine source, before any rendering), then on save splice the new JSON into that snapshot's `#ledger-state` block, prepend `<!doctype html>`, and call `artifact.publish(doc)`.
|
|
41
|
+
- Get the namespace with `const artifact = await claude.use("artifact")`; branch on `null` (this view cannot write) and render a read-only state instead of a broken control.
|
|
42
|
+
- Handle publish errors by code: `conflict` means someone published first and every view reloads to the winner — no retry, tell the person to re-add; `not_granted` / `not_writer` means read-only.
|
|
43
|
+
- Publish only after an explicit user action, never on load; batch rapid edits into one publish.
|
|
44
|
+
- Escape `</script` when writing the JSON back, and escape every interpolated note field on render.
|
|
45
|
+
|
|
46
|
+
## Note schema
|
|
47
|
+
|
|
48
|
+
One fact per entry:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
{"id":"n9","kind":"lesson|trap|pref","scope":"shell|review|github|...",
|
|
52
|
+
"title":"the rule in one line",
|
|
53
|
+
"body":"the concrete behaviour, specific enough to act on",
|
|
54
|
+
"why":"the failure that made this a rule",
|
|
55
|
+
"author":"model or agent name","date":"YYYY-MM-DD"}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Kinds: **lesson** = a habit that holds; **trap** = something that silently produces a *wrong* answer; **pref** = how the user wants the work done.
|
|
59
|
+
|
|
60
|
+
## UI the page must have
|
|
61
|
+
|
|
62
|
+
- Header: name, one paragraph on what the ledger is for, and live counts (total, traps, lessons, preferences) in `tabular-nums`.
|
|
63
|
+
- Note list, newest first: kind tag, scope tag, author, date, title, body, and a `Why:` line. Kind tags use semantic colour (trap = critical, pref = warning, lesson = accent), separate from the page accent.
|
|
64
|
+
- Scope filter chips derived from the data, including an `all` chip, with `aria-pressed` state.
|
|
65
|
+
- An "Add a note" form (kind, scope, author, title, body, why) that appends to the JSON and publishes, with an inline status line reporting published / conflict / read-only.
|
|
66
|
+
- A "Protocol for agents" section **on the page itself**: read the page with the Artifact tool `action: "read"` before substantive work; parse the `#ledger-state` JSON, never scrape the DOM; **append, don't rewrite**; re-read before writing because another agent may have published since; one fact per note with the failure that caused it. Include the schema snippet.
|
|
67
|
+
- Gatekeeping copy: only non-obvious, durable, cross-cutting lessons. If a repo's `CLAUDE.md` already says it, or a review bot already catches it, leave it out — a littered ledger is worse than a thin one.
|
|
68
|
+
|
|
69
|
+
## Design constraints
|
|
70
|
+
|
|
71
|
+
- Utilitarian but genuinely polished: this is a reference document, not a landing page. No oversized hero, no emoji section markers, no gradient hero, no everything-centered layout.
|
|
72
|
+
- Avoid the AI-default looks: warm cream + serif + terracotta, near-black + acid green, Inter or Space Grotesk as the "safe" face.
|
|
73
|
+
- Pair a display face, a body face, and a mono utility face from Google Fonts (the only permitted external host), each with a real fallback stack.
|
|
74
|
+
- Theme-aware in all three states: full light palette as tokens on bare `:root`; redefined under `@media (prefers-color-scheme: dark)` guarded as `:root:not([data-theme="light"])`; redefined again under `:root[data-theme="dark"]`. Style everything through tokens and give `body` an explicit token background. No colour whose only definition sits inside a media or `[data-theme]` block.
|
|
75
|
+
- Layout with flex/grid + `gap`, not per-element margins. Wide content in its own `overflow-x: auto` container. Visible focus states. Respect `prefers-reduced-motion`.
|
|
76
|
+
- Title: a short, specific noun-phrase product name (2-4 words), no dash-explainer. Pass a one-sentence `description` and an emoji `favicon`, and keep both stable across redeploys.
|
|
77
|
+
|
|
78
|
+
## Deliverable
|
|
79
|
+
|
|
80
|
+
Write the HTML to a file, publish it with the Artifact tool, then report:
|
|
81
|
+
|
|
82
|
+
- the URL;
|
|
83
|
+
- that it stays private until shared from the page's share menu;
|
|
84
|
+
- the exact instructions another agent needs — read via Artifact `action: "read"` with that URL, and write by appending to `notes` and republishing **with `url` set to that URL** (a publish *without* `url` forks a separate artifact instead of updating this one).
|
|
85
|
+
|
|
86
|
+
## Notes
|
|
87
|
+
|
|
88
|
+
- The full copy-paste prompt version of this workflow lives in `references/prompt.txt` — hand it to another agent or session verbatim.
|
|
89
|
+
- Redeploy by republishing the same file path in the same conversation, or by passing `url` from any other conversation.
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "olko-shared-knowledge-artifact",
|
|
3
|
+
"description": "Build a shared, self-persisting knowledge ledger as a Claude Artifact: a private page that stores its own data, renders itself from it, and publishes new versions of itself so several agents read the same lessons before working and append to them afterwards.",
|
|
4
|
+
"skills": "./skills"
|
|
5
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: shared-knowledge-artifact
|
|
3
|
+
description: Build a shared, self-persisting knowledge ledger as a Claude Artifact — a private page that stores its own data, renders itself from that data, and saves new versions of itself, so several agents can read the same lessons before starting work and append to them afterwards. Use when the user wants agents to learn from each other, asks for a shared knowledge base, lessons-learned log, gotcha ledger, or cross-agent memory page they can hand to other sessions.
|
|
4
|
+
license: MIT
|
|
5
|
+
allowed-tools: Bash, Read, Write, Edit, Grep, Glob, Skill, Artifact
|
|
6
|
+
compatibility: Claude Code only — requires the Artifact tool and the artifact runtime capabilities (`capabilities: {artifact: {}}`).
|
|
7
|
+
metadata:
|
|
8
|
+
author: Oleg Koval
|
|
9
|
+
package: shared-knowledge-artifact
|
|
10
|
+
tags:
|
|
11
|
+
- artifacts
|
|
12
|
+
- knowledge-base
|
|
13
|
+
- multi-agent
|
|
14
|
+
- memory
|
|
15
|
+
- lessons-learned
|
|
16
|
+
- documentation
|
|
17
|
+
---
|
|
18
|
+
<!-- Generated by scripts/build-adapters.sh. Do not edit directly. -->
|
|
19
|
+
|
|
20
|
+
# shared-knowledge-artifact
|
|
21
|
+
|
|
22
|
+
Publish one private Artifact page that acts as an append-only knowledge ledger which multiple agents (and the user) read before starting work and write to when reality corrects them. The page **is** the record: it stores its own data and publishes new versions of itself, so nothing depends on a server or on local files.
|
|
23
|
+
|
|
24
|
+
## Trigger phrases
|
|
25
|
+
|
|
26
|
+
- create a shared artifact my other agents can learn from
|
|
27
|
+
- shared knowledge base / lessons-learned log / gotcha ledger for agents
|
|
28
|
+
- cross-agent memory page
|
|
29
|
+
- somewhere agents can record what they learned so they don't repeat it
|
|
30
|
+
|
|
31
|
+
## Before writing any code
|
|
32
|
+
|
|
33
|
+
1. Invoke the `artifact-capabilities` skill — mandatory before declaring `capabilities` or writing any `window.claude.*` code.
|
|
34
|
+
2. Invoke the `artifact-design` skill — calibrates the design treatment.
|
|
35
|
+
3. Read the user's actual rules (`CLAUDE.md`, any verification/preferences doc, agent memory) and **seed the ledger with 6-10 real lessons already recorded there**. No lorem, no invented examples — a ledger that opens with fake entries never gets used.
|
|
36
|
+
|
|
37
|
+
## Persistence mechanism
|
|
38
|
+
|
|
39
|
+
- Declare `capabilities: {artifact: {}}` at publish time.
|
|
40
|
+
- Store the data as a JSON object inside `<script type="application/json" id="ledger-state">`. That block is the authoritative record; the visible page is **rendered from it** at load. Never serialize the live DOM to save.
|
|
41
|
+
- To persist: snapshot `document.documentElement.outerHTML` **once at script start** (pristine source, before any rendering), then on save splice the new JSON into that snapshot's `#ledger-state` block, prepend `<!doctype html>`, and call `artifact.publish(doc)`.
|
|
42
|
+
- Get the namespace with `const artifact = await claude.use("artifact")`; branch on `null` (this view cannot write) and render a read-only state instead of a broken control.
|
|
43
|
+
- Handle publish errors by code: `conflict` means someone published first and every view reloads to the winner — no retry, tell the person to re-add; `not_granted` / `not_writer` means read-only.
|
|
44
|
+
- Publish only after an explicit user action, never on load; batch rapid edits into one publish.
|
|
45
|
+
- Escape `</script` when writing the JSON back, and escape every interpolated note field on render.
|
|
46
|
+
|
|
47
|
+
## Note schema
|
|
48
|
+
|
|
49
|
+
One fact per entry:
|
|
50
|
+
|
|
51
|
+
```json
|
|
52
|
+
{"id":"n9","kind":"lesson|trap|pref","scope":"shell|review|github|...",
|
|
53
|
+
"title":"the rule in one line",
|
|
54
|
+
"body":"the concrete behaviour, specific enough to act on",
|
|
55
|
+
"why":"the failure that made this a rule",
|
|
56
|
+
"author":"model or agent name","date":"YYYY-MM-DD"}
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Kinds: **lesson** = a habit that holds; **trap** = something that silently produces a *wrong* answer; **pref** = how the user wants the work done.
|
|
60
|
+
|
|
61
|
+
## UI the page must have
|
|
62
|
+
|
|
63
|
+
- Header: name, one paragraph on what the ledger is for, and live counts (total, traps, lessons, preferences) in `tabular-nums`.
|
|
64
|
+
- Note list, newest first: kind tag, scope tag, author, date, title, body, and a `Why:` line. Kind tags use semantic colour (trap = critical, pref = warning, lesson = accent), separate from the page accent.
|
|
65
|
+
- Scope filter chips derived from the data, including an `all` chip, with `aria-pressed` state.
|
|
66
|
+
- An "Add a note" form (kind, scope, author, title, body, why) that appends to the JSON and publishes, with an inline status line reporting published / conflict / read-only.
|
|
67
|
+
- A "Protocol for agents" section **on the page itself**: read the page with the Artifact tool `action: "read"` before substantive work; parse the `#ledger-state` JSON, never scrape the DOM; **append, don't rewrite**; re-read before writing because another agent may have published since; one fact per note with the failure that caused it. Include the schema snippet.
|
|
68
|
+
- Gatekeeping copy: only non-obvious, durable, cross-cutting lessons. If a repo's `CLAUDE.md` already says it, or a review bot already catches it, leave it out — a littered ledger is worse than a thin one.
|
|
69
|
+
|
|
70
|
+
## Design constraints
|
|
71
|
+
|
|
72
|
+
- Utilitarian but genuinely polished: this is a reference document, not a landing page. No oversized hero, no emoji section markers, no gradient hero, no everything-centered layout.
|
|
73
|
+
- Avoid the AI-default looks: warm cream + serif + terracotta, near-black + acid green, Inter or Space Grotesk as the "safe" face.
|
|
74
|
+
- Pair a display face, a body face, and a mono utility face from Google Fonts (the only permitted external host), each with a real fallback stack.
|
|
75
|
+
- Theme-aware in all three states: full light palette as tokens on bare `:root`; redefined under `@media (prefers-color-scheme: dark)` guarded as `:root:not([data-theme="light"])`; redefined again under `:root[data-theme="dark"]`. Style everything through tokens and give `body` an explicit token background. No colour whose only definition sits inside a media or `[data-theme]` block.
|
|
76
|
+
- Layout with flex/grid + `gap`, not per-element margins. Wide content in its own `overflow-x: auto` container. Visible focus states. Respect `prefers-reduced-motion`.
|
|
77
|
+
- Title: a short, specific noun-phrase product name (2-4 words), no dash-explainer. Pass a one-sentence `description` and an emoji `favicon`, and keep both stable across redeploys.
|
|
78
|
+
|
|
79
|
+
## Deliverable
|
|
80
|
+
|
|
81
|
+
Write the HTML to a file, publish it with the Artifact tool, then report:
|
|
82
|
+
|
|
83
|
+
- the URL;
|
|
84
|
+
- that it stays private until shared from the page's share menu;
|
|
85
|
+
- the exact instructions another agent needs — read via Artifact `action: "read"` with that URL, and write by appending to `notes` and republishing **with `url` set to that URL** (a publish *without* `url` forks a separate artifact instead of updating this one).
|
|
86
|
+
|
|
87
|
+
## Notes
|
|
88
|
+
|
|
89
|
+
- The full copy-paste prompt version of this workflow lives in `references/prompt.txt` — hand it to another agent or session verbatim.
|
|
90
|
+
- Redeploy by republishing the same file path in the same conversation, or by passing `url` from any other conversation.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
BUILD A SHARED AGENT-KNOWLEDGE ARTIFACT
|
|
2
|
+
|
|
3
|
+
Goal
|
|
4
|
+
Publish a single private Claude Artifact page that acts as an append-only, self-persisting
|
|
5
|
+
knowledge ledger which multiple agents (and I) read before starting work and write to when
|
|
6
|
+
reality corrects us. The page IS the record: it stores its own data and saves new versions of
|
|
7
|
+
itself, so nothing depends on a server or on my local files.
|
|
8
|
+
|
|
9
|
+
Before writing any code
|
|
10
|
+
1. Load the artifact-capabilities skill (you must, before declaring capabilities or writing any
|
|
11
|
+
window.claude.* code) and the artifact-design skill (calibrates the design treatment).
|
|
12
|
+
2. Read my global rules (CLAUDE.md / VERIFICATION.md / memory) and seed the ledger with 6-10
|
|
13
|
+
REAL lessons already recorded there. No lorem, no invented examples.
|
|
14
|
+
|
|
15
|
+
Required behaviour
|
|
16
|
+
- Declare capabilities: {artifact: {}} so the page can publish new versions of itself.
|
|
17
|
+
- Store the data as a JSON object inside a <script type="application/json" id="ledger-state">
|
|
18
|
+
block. That block is the authoritative record; the visible page is RENDERED from it at load.
|
|
19
|
+
Never serialize the live DOM to save.
|
|
20
|
+
- To persist: snapshot document.documentElement.outerHTML once at script start (pristine source,
|
|
21
|
+
before any rendering), then on save splice the new JSON into the #ledger-state block of that
|
|
22
|
+
snapshot, prepend <!doctype html>, and call artifact.publish(doc).
|
|
23
|
+
- Get the namespace with: const artifact = await claude.use("artifact"); branch on null (view
|
|
24
|
+
cannot write) and render a read-only state instead of a broken control.
|
|
25
|
+
- Handle publish errors by code: "conflict" means someone published first and every view reloads
|
|
26
|
+
to the winner (no retry - tell the person to re-add); "not_granted"/"not_writer" means
|
|
27
|
+
read-only. Publish only after an explicit user action, never on page load, and batch rapid
|
|
28
|
+
edits into one publish.
|
|
29
|
+
|
|
30
|
+
Note schema (one fact per entry)
|
|
31
|
+
{"id":"...", "kind":"lesson|trap|pref", "scope":"shell|review|github|...",
|
|
32
|
+
"title":"the rule in one line", "body":"the concrete behaviour, specific enough to act on",
|
|
33
|
+
"why":"the failure that made this a rule", "author":"model or agent name",
|
|
34
|
+
"date":"YYYY-MM-DD"}
|
|
35
|
+
Kinds: lesson = a habit that holds; trap = something that silently produces a WRONG answer;
|
|
36
|
+
pref = how I want the work done.
|
|
37
|
+
|
|
38
|
+
UI the page must have
|
|
39
|
+
- Header: title, one-paragraph statement of what the ledger is for, and live counts
|
|
40
|
+
(total notes, traps, lessons, preferences) in tabular-nums.
|
|
41
|
+
- Note list, newest first, each note showing kind tag, scope tag, author, date, title, body,
|
|
42
|
+
and a "Why:" line. Kind tags carry semantic colour (trap = critical, pref = warning,
|
|
43
|
+
lesson = accent) separate from the page accent.
|
|
44
|
+
- Scope filter chips derived from the data, including an "all" chip, with aria-pressed state.
|
|
45
|
+
- An "Add a note" form (kind select, scope, author, title, body, why) that appends to the JSON
|
|
46
|
+
and publishes, with an inline status line reporting published / conflict / read-only.
|
|
47
|
+
- A "Protocol for agents" section, on the page itself, stating: read the page with the Artifact
|
|
48
|
+
tool action "read" before substantive work; parse the #ledger-state JSON, never scrape the DOM;
|
|
49
|
+
APPEND, don't rewrite; re-read before writing because another agent may have published since;
|
|
50
|
+
and one fact per note with the failure that caused it. Include a copyable JSON snippet of the
|
|
51
|
+
schema.
|
|
52
|
+
- Gatekeeping copy: only non-obvious, durable, cross-cutting lessons. If a repo's CLAUDE.md
|
|
53
|
+
already says it or a review bot already catches it, leave it out. A littered ledger is worse
|
|
54
|
+
than a thin one.
|
|
55
|
+
|
|
56
|
+
Design constraints
|
|
57
|
+
- Utilitarian but genuinely polished; this is a reference document, not a landing page. No
|
|
58
|
+
oversized hero, no emoji section markers, no gradient hero, no everything-centered layout.
|
|
59
|
+
- Avoid the AI-default looks: warm cream + serif + terracotta, near-black + acid green, Inter or
|
|
60
|
+
Space Grotesk as the safe face.
|
|
61
|
+
- Pair a display face with a body face and a mono utility face from Google Fonts (the only
|
|
62
|
+
permitted external host), each with a real fallback stack.
|
|
63
|
+
- Theme-aware in all three states: full light palette as tokens on bare :root, redefined under
|
|
64
|
+
@media (prefers-color-scheme: dark) guarded as :root:not([data-theme="light"]), and again under
|
|
65
|
+
:root[data-theme="dark"]. Style everything through tokens; body must set an explicit token
|
|
66
|
+
background. No colour whose only definition sits inside a media or [data-theme] block.
|
|
67
|
+
- Layout with flex/grid + gap, not per-element margins. Wide content in its own overflow-x:auto
|
|
68
|
+
container. Visible focus states. Respect prefers-reduced-motion.
|
|
69
|
+
- Escape all interpolated note text on render, and escape "</script" when writing the JSON back.
|
|
70
|
+
- Title: a short, specific noun-phrase product name (2-4 words), no dash-explainer. Pass a
|
|
71
|
+
one-sentence description and an emoji favicon, and keep both stable across redeploys.
|
|
72
|
+
|
|
73
|
+
Deliverable
|
|
74
|
+
Write the HTML to a file, publish it with the Artifact tool, and report back: the URL, the fact
|
|
75
|
+
that it is private until shared from the page's share menu, and the exact instructions another
|
|
76
|
+
agent needs - read via Artifact action "read" with that URL, and write by appending to notes and
|
|
77
|
+
republishing with `url` set to that URL (a publish WITHOUT url forks a separate artifact instead
|
|
78
|
+
of updating this one).
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
BUILD A SHARED AGENT-KNOWLEDGE ARTIFACT
|
|
2
|
+
|
|
3
|
+
Goal
|
|
4
|
+
Publish a single private Claude Artifact page that acts as an append-only, self-persisting
|
|
5
|
+
knowledge ledger which multiple agents (and I) read before starting work and write to when
|
|
6
|
+
reality corrects us. The page IS the record: it stores its own data and saves new versions of
|
|
7
|
+
itself, so nothing depends on a server or on my local files.
|
|
8
|
+
|
|
9
|
+
Before writing any code
|
|
10
|
+
1. Load the artifact-capabilities skill (you must, before declaring capabilities or writing any
|
|
11
|
+
window.claude.* code) and the artifact-design skill (calibrates the design treatment).
|
|
12
|
+
2. Read my global rules (CLAUDE.md / VERIFICATION.md / memory) and seed the ledger with 6-10
|
|
13
|
+
REAL lessons already recorded there. No lorem, no invented examples.
|
|
14
|
+
|
|
15
|
+
Required behaviour
|
|
16
|
+
- Declare capabilities: {artifact: {}} so the page can publish new versions of itself.
|
|
17
|
+
- Store the data as a JSON object inside a <script type="application/json" id="ledger-state">
|
|
18
|
+
block. That block is the authoritative record; the visible page is RENDERED from it at load.
|
|
19
|
+
Never serialize the live DOM to save.
|
|
20
|
+
- To persist: snapshot document.documentElement.outerHTML once at script start (pristine source,
|
|
21
|
+
before any rendering), then on save splice the new JSON into the #ledger-state block of that
|
|
22
|
+
snapshot, prepend <!doctype html>, and call artifact.publish(doc).
|
|
23
|
+
- Get the namespace with: const artifact = await claude.use("artifact"); branch on null (view
|
|
24
|
+
cannot write) and render a read-only state instead of a broken control.
|
|
25
|
+
- Handle publish errors by code: "conflict" means someone published first and every view reloads
|
|
26
|
+
to the winner (no retry - tell the person to re-add); "not_granted"/"not_writer" means
|
|
27
|
+
read-only. Publish only after an explicit user action, never on page load, and batch rapid
|
|
28
|
+
edits into one publish.
|
|
29
|
+
|
|
30
|
+
Note schema (one fact per entry)
|
|
31
|
+
{"id":"...", "kind":"lesson|trap|pref", "scope":"shell|review|github|...",
|
|
32
|
+
"title":"the rule in one line", "body":"the concrete behaviour, specific enough to act on",
|
|
33
|
+
"why":"the failure that made this a rule", "author":"model or agent name",
|
|
34
|
+
"date":"YYYY-MM-DD"}
|
|
35
|
+
Kinds: lesson = a habit that holds; trap = something that silently produces a WRONG answer;
|
|
36
|
+
pref = how I want the work done.
|
|
37
|
+
|
|
38
|
+
UI the page must have
|
|
39
|
+
- Header: title, one-paragraph statement of what the ledger is for, and live counts
|
|
40
|
+
(total notes, traps, lessons, preferences) in tabular-nums.
|
|
41
|
+
- Note list, newest first, each note showing kind tag, scope tag, author, date, title, body,
|
|
42
|
+
and a "Why:" line. Kind tags carry semantic colour (trap = critical, pref = warning,
|
|
43
|
+
lesson = accent) separate from the page accent.
|
|
44
|
+
- Scope filter chips derived from the data, including an "all" chip, with aria-pressed state.
|
|
45
|
+
- An "Add a note" form (kind select, scope, author, title, body, why) that appends to the JSON
|
|
46
|
+
and publishes, with an inline status line reporting published / conflict / read-only.
|
|
47
|
+
- A "Protocol for agents" section, on the page itself, stating: read the page with the Artifact
|
|
48
|
+
tool action "read" before substantive work; parse the #ledger-state JSON, never scrape the DOM;
|
|
49
|
+
APPEND, don't rewrite; re-read before writing because another agent may have published since;
|
|
50
|
+
and one fact per note with the failure that caused it. Include a copyable JSON snippet of the
|
|
51
|
+
schema.
|
|
52
|
+
- Gatekeeping copy: only non-obvious, durable, cross-cutting lessons. If a repo's CLAUDE.md
|
|
53
|
+
already says it or a review bot already catches it, leave it out. A littered ledger is worse
|
|
54
|
+
than a thin one.
|
|
55
|
+
|
|
56
|
+
Design constraints
|
|
57
|
+
- Utilitarian but genuinely polished; this is a reference document, not a landing page. No
|
|
58
|
+
oversized hero, no emoji section markers, no gradient hero, no everything-centered layout.
|
|
59
|
+
- Avoid the AI-default looks: warm cream + serif + terracotta, near-black + acid green, Inter or
|
|
60
|
+
Space Grotesk as the safe face.
|
|
61
|
+
- Pair a display face with a body face and a mono utility face from Google Fonts (the only
|
|
62
|
+
permitted external host), each with a real fallback stack.
|
|
63
|
+
- Theme-aware in all three states: full light palette as tokens on bare :root, redefined under
|
|
64
|
+
@media (prefers-color-scheme: dark) guarded as :root:not([data-theme="light"]), and again under
|
|
65
|
+
:root[data-theme="dark"]. Style everything through tokens; body must set an explicit token
|
|
66
|
+
background. No colour whose only definition sits inside a media or [data-theme] block.
|
|
67
|
+
- Layout with flex/grid + gap, not per-element margins. Wide content in its own overflow-x:auto
|
|
68
|
+
container. Visible focus states. Respect prefers-reduced-motion.
|
|
69
|
+
- Escape all interpolated note text on render, and escape "</script" when writing the JSON back.
|
|
70
|
+
- Title: a short, specific noun-phrase product name (2-4 words), no dash-explainer. Pass a
|
|
71
|
+
one-sentence description and an emoji favicon, and keep both stable across redeploys.
|
|
72
|
+
|
|
73
|
+
Deliverable
|
|
74
|
+
Write the HTML to a file, publish it with the Artifact tool, and report back: the URL, the fact
|
|
75
|
+
that it is private until shared from the page's share menu, and the exact instructions another
|
|
76
|
+
agent needs - read via Artifact action "read" with that URL, and write by appending to notes and
|
|
77
|
+
republishing with `url` set to that URL (a publish WITHOUT url forks a separate artifact instead
|
|
78
|
+
of updating this one).
|