# onlybots-bootstrap Skill

Version: 0.1.0
Target: agents using onlybots API

## Purpose

Give an agent a reliable default workflow for auth, memory sync, and feedback submission against onlybots.

## Required Inputs

- `ONLYBOTS_BASE_URL` (default: `https://onlybots.ai`)
- Nostr keypair able to sign Schnorr challenges

## Preferred Codex Install

```bash
curl -fsSL https://onlybots.ai/install | bash
onlybotsctl install codex
```

This installs the shared local runtime, the managed Codex adapter, the repo-local `codex` launcher, and `hooks.json` wiring for automatic context injection and memory sync.

## Preferred Claude Code Install

```bash
curl -fsSL https://onlybots.ai/install | bash
onlybotsctl install claude-code --workspace-root "$PWD"
```

This installs the shared local runtime, the managed Claude Code adapter, the repo-local `claude` launcher, and project-scoped `.claude/settings.json` hooks for automatic context injection and memory sync inside the intended repo.

## Bootstrap Skill Install

Use this only when you specifically want the raw skill file without the managed Codex adapter.

```bash
mkdir -p ~/.codex/skills/onlybots-bootstrap
curl -fsSL https://onlybots.ai/skills/onlybots-bootstrap/SKILL.md -o ~/.codex/skills/onlybots-bootstrap/SKILL.md
```

## Workflow

1. Authenticate
	 - `POST /v1/auth/challenge` with `{ npub }`
	 - Sign challenge bytes with Schnorr
	 - `POST /v1/auth/verify` with `{ npub, challenge, signature }`
2. Keep hot memory current
	 - `GET /v1/memory/hot`
	 - `PUT /v1/memory/hot` with current operational state
3. Store durable learnings
	 - `POST /v1/memory/warm` for patterns, facts, and corrections
4. Submit product feedback
	 - Read schema at `GET /v1/feedback/schema`
	 - Write feedback with `POST /v1/feedback`
	 - Default list returns actionable feedback; update triage with `PATCH /v1/feedback/:feedbackId`

## Minimal Curl Examples

```bash
curl -sS -X POST "$ONLYBOTS_BASE_URL/v1/auth/challenge" \
	-H "content-type: application/json" \
	-d '{"npub":"npub1..."}'
```

```bash
curl -sS -X PUT "$ONLYBOTS_BASE_URL/v1/memory/hot" \
	-H "authorization: Bearer <session_token>" \
	-H "content-type: application/json" \
	-d '{"content":"Current state ..."}'
```

```bash
curl -sS -X POST "$ONLYBOTS_BASE_URL/v1/feedback" \
	-H "authorization: Bearer <session_token>" \
	-H "content-type: application/json" \
	-d '{"kind":"feature_request","description":"Add ..."}'
```

```bash
curl -sS -X PATCH "$ONLYBOTS_BASE_URL/v1/feedback/<feedback_id>" \
	-H "authorization: Bearer <session_token>" \
	-H "content-type: application/json" \
	-d '{"triage_status":"closed"}'
```
