@kybernesis/arp-adapter-skill 0.1.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/LICENSE +21 -0
- package/README.md +50 -0
- package/SKILL/SKILL.md +138 -0
- package/index.js +14 -0
- package/package.json +27 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Kybernesis AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# @kybernesis/arp-adapter-skill
|
|
2
|
+
|
|
3
|
+
A Claude Code skill for authoring conformance-passing [ARP](https://arp.spec) framework adapters. Drop into any Claude Code install and ask:
|
|
4
|
+
|
|
5
|
+
> "Create an ARP adapter for My Framework."
|
|
6
|
+
|
|
7
|
+
The skill:
|
|
8
|
+
|
|
9
|
+
1. Asks about the framework and its public extension surface
|
|
10
|
+
2. Maps ARP's five integration points onto that surface (refuses to continue if any row has no primitive)
|
|
11
|
+
3. Scaffolds via `@kybernesis/arp-create-adapter`
|
|
12
|
+
4. Wires the hooks per the authoring guide's §12 cheat sheet
|
|
13
|
+
5. Writes the conformance test against `@kybernesis/arp-testkit`
|
|
14
|
+
6. Produces `MIGRATION.md` + `README.md`
|
|
15
|
+
|
|
16
|
+
## Install (user-scoped)
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
cp -r node_modules/@kybernesis/arp-adapter-skill/SKILL ~/.claude/skills/arp-adapter-creator
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Install (project-scoped)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
cp -r node_modules/@kybernesis/arp-adapter-skill/SKILL .claude/skills/arp-adapter-creator
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Claude Code will auto-load any skill under `~/.claude/skills/*/SKILL.md` or `<project>/.claude/skills/*/SKILL.md`. The skill frontmatter's `description` is the trigger — Claude Code routes natural-language requests that match the description into the skill.
|
|
29
|
+
|
|
30
|
+
## What the skill produces
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
adapters/<slug>/
|
|
34
|
+
├── package.json # @kybernesis/arp-adapter-<slug>, correct deps
|
|
35
|
+
├── src/
|
|
36
|
+
│ ├── index.ts # withArp() wiring all 5 integration points
|
|
37
|
+
│ └── types.ts # <Framework>Like structural type
|
|
38
|
+
├── tests/
|
|
39
|
+
│ └── conformance.test.ts # @kybernesis/arp-testkit audit check
|
|
40
|
+
├── README.md
|
|
41
|
+
└── MIGRATION.md
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Authoring guide
|
|
45
|
+
|
|
46
|
+
The skill references `ARP-adapter-authoring-guide.md` and `ARP-installation-and-hosting.md §8` for the contract. Both ship in the ARP spec docs.
|
|
47
|
+
|
|
48
|
+
## License
|
|
49
|
+
|
|
50
|
+
MIT
|
package/SKILL/SKILL.md
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: arp-adapter-creator
|
|
3
|
+
description: Creates a conformance-passing ARP (Agent Relationship Protocol) adapter for any agent framework. Use when the user asks to "create an ARP adapter", "add ARP support to [framework]", "build an adapter for [framework]", "integrate [framework] with ARP", or "my framework doesn't have an ARP adapter." Produces a TypeScript or Python adapter package with the 5 required integration points, a conformance test, a migration guide, and a minimal working example.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ARP Adapter Creator
|
|
7
|
+
|
|
8
|
+
You are an expert in the Agent Relationship Protocol (ARP) and its adapter authoring conventions. Your job is to produce a new framework adapter end-to-end by following the authoring guide.
|
|
9
|
+
|
|
10
|
+
## Sources of truth (read these first)
|
|
11
|
+
|
|
12
|
+
- `ARP-adapter-authoring-guide.md` — the full spec + guide. This is authoritative.
|
|
13
|
+
- `ARP-installation-and-hosting.md §8` — the 5 integration points every adapter must wire.
|
|
14
|
+
- `ARP-phase-6-sdks-adapters.md` — phase-level constraints (size budgets, naming, testing bar).
|
|
15
|
+
- `ARP-policy-examples.md` — how PDP decisions and obligations work.
|
|
16
|
+
|
|
17
|
+
If any of these are missing locally, fetch them from `arp.spec/docs/*` before proceeding.
|
|
18
|
+
|
|
19
|
+
## When triggered
|
|
20
|
+
|
|
21
|
+
Step through this sequence. Do not skip steps.
|
|
22
|
+
|
|
23
|
+
### Step 1 — Establish the target framework
|
|
24
|
+
|
|
25
|
+
Ask if not provided:
|
|
26
|
+
- What framework is this for? (name, version, docs URL)
|
|
27
|
+
- TypeScript or Python?
|
|
28
|
+
- Is this official (ARP team scope) or community (your scope)?
|
|
29
|
+
- Any known framework idioms to prefer (plugins, middleware, hooks, decorators)?
|
|
30
|
+
|
|
31
|
+
If the framework is one of the required five (OpenClaw, Hermes-Agent, NanoClaw, KyberBot, LangGraph), confirm with the user — those have official adapters in the ARP repo and shouldn't be re-created; extend or contribute instead.
|
|
32
|
+
|
|
33
|
+
### Step 2 — Map the 5 integration points
|
|
34
|
+
|
|
35
|
+
Refer to the guide's §3 table. For the target framework, determine:
|
|
36
|
+
|
|
37
|
+
| Integration point | Framework extension surface |
|
|
38
|
+
|---|---|
|
|
39
|
+
| `check()` pre-action | ??? |
|
|
40
|
+
| `egress()` post-action | ??? |
|
|
41
|
+
| `onIncoming()` | ??? |
|
|
42
|
+
| `audit()` | ??? |
|
|
43
|
+
| `on('revocation' \| 'rotation' \| 'pairing')` | ??? |
|
|
44
|
+
|
|
45
|
+
If any row has no viable framework primitive, stop and recommend using `@kybernesis/arp-sdk` directly. Do not proceed with a half-adapter.
|
|
46
|
+
|
|
47
|
+
Present this mapping to the user and get confirmation before writing code.
|
|
48
|
+
|
|
49
|
+
### Step 3 — Scaffold
|
|
50
|
+
|
|
51
|
+
Run the generator:
|
|
52
|
+
```bash
|
|
53
|
+
npx @kybernesis/arp-create-adapter \
|
|
54
|
+
--framework <slug> \
|
|
55
|
+
--language <ts|python> \
|
|
56
|
+
--out ./adapters/<slug>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
If `@kybernesis/arp-create-adapter` isn't available, create the scaffold manually matching the layout in the guide's §5.
|
|
60
|
+
|
|
61
|
+
### Step 4 — Wire the adapter
|
|
62
|
+
|
|
63
|
+
Edit `src/index.ts` (or `arp_adapter_<slug>/__init__.py`) to connect each integration point to the framework extension surface from Step 2. Use the 30-line template in the guide's §12 as the starting shape; expand per framework idioms.
|
|
64
|
+
|
|
65
|
+
Constraints (enforce these):
|
|
66
|
+
- No forking of the framework
|
|
67
|
+
- No monkey-patching of framework internals
|
|
68
|
+
- Only public APIs
|
|
69
|
+
- Size budget: ≤1000 lines source (≤500 for lightweight frameworks)
|
|
70
|
+
- Must not auto-bootstrap on import
|
|
71
|
+
- Must not cache PDP decisions across requests
|
|
72
|
+
- Must fail loudly if ARP is misconfigured; never silently skip checks
|
|
73
|
+
|
|
74
|
+
### Step 5 — Write the conformance test
|
|
75
|
+
|
|
76
|
+
Copy the template in the guide's §8.3. Wire it to a minimal example agent under `examples/minimal-agent/`. The test must:
|
|
77
|
+
- Boot the adapter-backed agent
|
|
78
|
+
- Run `@kybernesis/arp-testkit`'s `runAudit`
|
|
79
|
+
- Assert 8/8 pass (treat `skipped` probes as pass when deliberately skipped)
|
|
80
|
+
|
|
81
|
+
### Step 6 — Write MIGRATION.md
|
|
82
|
+
|
|
83
|
+
Before/after code showing a framework user adding your adapter to an existing agent. Cover the common questions from the guide's §10.
|
|
84
|
+
|
|
85
|
+
### Step 7 — Write the README
|
|
86
|
+
|
|
87
|
+
Cover:
|
|
88
|
+
- Install command
|
|
89
|
+
- Framework version compatibility
|
|
90
|
+
- Usage example (the withArp one-liner)
|
|
91
|
+
- Known caveats for this specific framework
|
|
92
|
+
- Link to MIGRATION.md
|
|
93
|
+
- Link to the authoring guide for contributors
|
|
94
|
+
|
|
95
|
+
### Step 8 — Verify
|
|
96
|
+
|
|
97
|
+
Run locally (or instruct the user to run):
|
|
98
|
+
```bash
|
|
99
|
+
pnpm install
|
|
100
|
+
pnpm test
|
|
101
|
+
pnpm --filter adapters/<slug> test
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
All must be green. If any test fails, debug before handing off.
|
|
105
|
+
|
|
106
|
+
### Step 9 — Size + metadata check
|
|
107
|
+
|
|
108
|
+
- Verify `package.json` has the `arp` metadata block per the guide's §2.5
|
|
109
|
+
- Count source lines: if over budget, either trim or document the overage in README
|
|
110
|
+
- Confirm naming matches the convention: `@kybernesis/arp-adapter-<slug>` for official, scoped otherwise
|
|
111
|
+
|
|
112
|
+
### Step 10 — Hand off
|
|
113
|
+
|
|
114
|
+
Produce a short summary:
|
|
115
|
+
- Files created
|
|
116
|
+
- Integration points wired (and to what framework primitive)
|
|
117
|
+
- Test results
|
|
118
|
+
- Next steps for the user (publish, submit PR to arp.spec/adapters, etc.)
|
|
119
|
+
|
|
120
|
+
## What NOT to do
|
|
121
|
+
|
|
122
|
+
- Don't silently fall back to "just use the SDK" without telling the user why
|
|
123
|
+
- Don't write adapter code without first confirming the Step 2 mapping
|
|
124
|
+
- Don't skip the conformance test — it's the pass/fail bar
|
|
125
|
+
- Don't promise framework support you haven't verified (e.g., "works with all versions")
|
|
126
|
+
- Don't publish on the user's behalf without explicit permission
|
|
127
|
+
|
|
128
|
+
## Quick invocation pattern
|
|
129
|
+
|
|
130
|
+
If the user is in a rush ("just build it"), you may compress Steps 1–2 into a single round-trip question and proceed. Never compress Steps 5–8; those are the correctness gates.
|
|
131
|
+
|
|
132
|
+
## References
|
|
133
|
+
|
|
134
|
+
- Full guide: `ARP-adapter-authoring-guide.md` (§§ 1–13)
|
|
135
|
+
- Cheat sheet: §12 of the guide
|
|
136
|
+
- Quick reference card: §13 of the guide
|
|
137
|
+
- ARP spec home: https://arp.spec
|
|
138
|
+
- ARP repo: https://github.com/KybernesisAI/arp
|
package/index.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// This package ships a Claude Code skill, not a JavaScript runtime library.
|
|
2
|
+
// The `index.js` entry exists so `require('@kybernesis/arp-adapter-skill')`
|
|
3
|
+
// resolves cleanly if anything tries. The real deliverable is SKILL/SKILL.md.
|
|
4
|
+
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import { dirname, join } from 'node:path';
|
|
7
|
+
|
|
8
|
+
const HERE = dirname(fileURLToPath(import.meta.url));
|
|
9
|
+
|
|
10
|
+
/** Absolute path to the bundled skill directory. */
|
|
11
|
+
export const SKILL_DIR = join(HERE, 'SKILL');
|
|
12
|
+
|
|
13
|
+
/** The skill's canonical frontmatter `name`. */
|
|
14
|
+
export const SKILL_NAME = 'arp-adapter-creator';
|
package/package.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kybernesis/arp-adapter-skill",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Claude Code skill for creating conformance-passing ARP framework adapters. Drop into any Claude Code install and ask 'create an ARP adapter for <framework>'.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/KybernesisAI/arp.git",
|
|
9
|
+
"directory": "packages/arp-adapter-skill"
|
|
10
|
+
},
|
|
11
|
+
"publishConfig": {
|
|
12
|
+
"access": "public"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "./index.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"SKILL",
|
|
18
|
+
"index.js",
|
|
19
|
+
"README.md"
|
|
20
|
+
],
|
|
21
|
+
"scripts": {
|
|
22
|
+
"build": "echo 'arp-adapter-skill: no build required' && exit 0",
|
|
23
|
+
"test": "node ./tests/skill.test.mjs",
|
|
24
|
+
"typecheck": "echo 'arp-adapter-skill: no TS sources' && exit 0",
|
|
25
|
+
"lint": "echo 'arp-adapter-skill: no JS sources to lint' && exit 0"
|
|
26
|
+
}
|
|
27
|
+
}
|