From 2d0614e020b5d6c37642aab46db3e25cf3ed7997 Mon Sep 17 00:00:00 2001 From: Luke Date: Wed, 11 Feb 2026 20:08:26 +0000 Subject: [PATCH] Restructure docs and simplify README - Rewrite main README as project intro + info pointers - Keep skills table focused on current 2 skills - Add docs/README.md index with links to skill docs - Add detailed docs for gitea-api and web-automation --- README.md | 50 ++++++++++-------------------------------- docs/README.md | 8 +++++++ docs/gitea-api.md | 36 ++++++++++++++++++++++++++++++ docs/web-automation.md | 43 ++++++++++++++++++++++++++++++++++++ 4 files changed, 99 insertions(+), 38 deletions(-) create mode 100644 docs/README.md create mode 100644 docs/gitea-api.md create mode 100644 docs/web-automation.md diff --git a/README.md b/README.md index 7187a67..936a291 100644 --- a/README.md +++ b/README.md @@ -1,51 +1,25 @@ -# Stefano's openclaw Skills +# stef-openclaw-skills -A curated collection of OpenClaw skills by Stefano. +A curated collection of practical OpenClaw skills by Stefano. -This repository is organized so an OpenClaw bot can install one or more skills directly from the repo URL/path. +This repository is intended to be a simple skill source: install the repo (or a single skill path), then use each skill through OpenClaw. -## Repository Layout +## Where to get information -```text -stef-openclaw-skills/ -├── README.md -└── skills/ - └── gitea-api/ - ├── SKILL.md - └── scripts/ - ├── gitea.py - └── gitea.sh -``` +- Skill docs index: [`docs/README.md`](docs/README.md) +- Skill implementation files: `skills//` +- Per-skill runtime instructions: `skills//SKILL.md` ## Skills -| Skill | Purpose | Path | +| Skill | What it does | Path | |---|---|---| -| `gitea-api` | Interact with any Gitea instance via REST API (create repos, issues, PRs, releases, branches, clone) without `tea` CLI. | `skills/gitea-api` | -| `web-automation` | Browse and scrape web pages using Playwright with Camoufox anti-detection browser. For automating web workflows, extracting page content to markdown, handling authenticated sessions, or scraping websites with bot protection. | `skills/web-automation` | +| `gitea-api` | Interact with Gitea via REST API (repos, issues, PRs, releases, branches, user info). | `skills/gitea-api` | +| `web-automation` | Automate browsing/scraping with Playwright + Camoufox (auth flows, extraction, bot-protected sites). | `skills/web-automation` | -## Skill-Specific Requirements - -### web-automation - -The `web-automation` skill requires Node.js packages to be installed. When compiling OpenClaw with support for this skill, add the required system libraries: - -```bash -# For Playwright + Camoufox browser dependencies -export OPENCLAW_DOCKER_APT_PACKAGES="ffmpeg jq curl libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2" -``` - -After installing the skill, run the first-time setup: - -```bash -cd ~/.openclaw/workspace/skills/web-automation/scripts -pnpm install -npx camoufox-js fetch -``` - -## Install Ideas +## Install ideas - Install the whole repo as a skill source. -- Install a single skill by path from this repo (e.g. `skills/gitea-api`). +- Install a single skill by path (example: `skills/gitea-api`). (Exact install command can vary by OpenClaw/ClawHub version.) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..4c7fb56 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,8 @@ +# Skill Documentation Index + +This folder contains detailed docs for each skill in this repository. + +## Skills + +- [`gitea-api`](gitea-api.md) — REST-based Gitea automation (no `tea` CLI required) +- [`web-automation`](web-automation.md) — Playwright + Camoufox browser automation and scraping diff --git a/docs/gitea-api.md b/docs/gitea-api.md new file mode 100644 index 0000000..cd63a10 --- /dev/null +++ b/docs/gitea-api.md @@ -0,0 +1,36 @@ +# gitea-api + +Use Gitea via REST API without relying on the `tea` CLI. + +## What this skill is for + +- Create/list repositories +- Create/list/update issues +- Work with pull requests and releases +- Manage branches and user/repo metadata + +## Setup + +Create: + +`~/.clawdbot/credentials/gitea/config.json` + +```json +{ + "url": "https://git.fiorinis.com", + "token": "your-personal-access-token" +} +``` + +## Wrapper + +You can use the helper script: + +```bash +bash skills/gitea-api/scripts/gitea.sh +``` + +## Notes + +- Works against any Gitea instance with a valid token. +- This skill is API-first and does not require `tea`. diff --git a/docs/web-automation.md b/docs/web-automation.md new file mode 100644 index 0000000..ce887a4 --- /dev/null +++ b/docs/web-automation.md @@ -0,0 +1,43 @@ +# web-automation + +Automated web browsing and scraping using Playwright with Camoufox anti-detection browser. + +## What this skill is for + +- Automating web workflows +- Authenticated session flows (logins/cookies) +- Extracting page content to markdown +- Working with bot-protected or dynamic pages + +## Requirements + +- Node.js 20+ +- `pnpm` +- Network access to download browser binaries + +## First-time setup + +```bash +cd ~/.openclaw/workspace/skills/web-automation/scripts +pnpm install +npx camoufox-js fetch +``` + +## System libraries (for OpenClaw Docker builds) + +```bash +export OPENCLAW_DOCKER_APT_PACKAGES="ffmpeg jq curl libnss3 libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 libxrandr2 libgbm1 libasound2" +``` + +## Common commands + +```bash +# Browse a page +npx tsx browse.ts --url "https://example.com" + +# Scrape markdown +npx tsx scrape.ts --url "https://example.com" --mode main --output page.md + +# Authenticate flow +npx tsx auth.ts --url "https://example.com/login" +```