Move skills to agent-skills repo

This commit is contained in:
Levi Neely 2026-03-20 15:36:26 +01:00
parent fe7ad6269d
commit ed761f67ee
14 changed files with 0 additions and 1183 deletions

3
mkfile
View File

@ -19,9 +19,6 @@ build:V:
chmod 0755 $INSTALL_PATH/Teams/*
mkdir -p $HOME/.config/anvillm
cp -rf cfg/* $HOME/.config/anvillm/
mkdir -p $HOME/.config/anvillm/skills
cp -rf skills/* $HOME/.config/anvillm/skills/
find $HOME/.config/anvillm/skills -type f -name "*.sh" -exec chmod 0755 {} \;
mkdir -p $HOME/.config/anvillm/roles
cp -rf roles/* $HOME/.config/anvillm/roles/
mkdir -p $HOME/.config/anvillm/estimation

View File

@ -1,85 +0,0 @@
---
name: acme-api
intent: api, acme
description: Programming the acme text editor 9P API. Use when writing code to control acme windows, handle events, manipulate text, or integrate with acme via its file interface.
version: 1.1.0
---
# Acme 9P API (plan9port)
Control acme via 9P. Use `9p read/write acme/...`
## Files
```
acme/
├── cons # command stdout/stderr
├── index # all windows: id tag_len body_len isdir dirty tag (fields @0,12,24,36,48,60)
├── log # operations (blocks): id op name (ops: new,zerox,get,put,del)
├── new/ctl # read returns new window id
└── $id/
├── addr # set/query addresses (write addr, read #m,#n char offsets)
├── body # content (read any offset, write appends)
├── ctl # read: 10 fields (id tag_len body_len isdir dirty width font tabwidth undo redo)
│ # write: commands (see below)
├── data # read/write at addr, advances to end
├── errors # append to dir/+Errors
├── event # event stream (see protocol)
├── tag # tag content (read any offset, write appends)
└── xdata # like data but stops at end, no advance
```
## ctl Commands
`addr=dot` `clean` `dirty` `cleartag` `del` `delete` `dot=addr` `dump cmd` `dumpdir /path` `get` `put` `font /path` `limit=addr` `mark` `nomark` `name /path` `show`
## addr Syntax
`0` `$` `0,$` `123` `123,456` `/regex/` `-/regex/` `.,+#10` `.+/regex/`
## Event Protocol
Format: `origin type q0 q1 flag nr [text]\n`
**Origin:** `E`=file write `F`=other file `K`=keyboard `M`=mouse
**Type:** `D`/`d`=delete body/tag, `I`/`i`=insert body/tag, `L`/`l`=button3 body/tag, `R`/`r`=shift-button3 body/tag, `X`/`x`=button2 body/tag
**flag (bitwise OR):**
- X/x: 1=builtin, 2=expansion follows, 8=chorded (2 msgs follow: arg, origin)
- L/l: 1=acme handles, 2=expansion follows, 4=file/window name
**nr:** char count (0 if text >256, read from data)
**Acknowledge:** flag&1 events write back `origin type q0 q1\n`
## Patterns
**Create:**
```bash
id=$(9p read acme/new/ctl | awk '{print $1}')
echo "name /path" | 9p write acme/$id/ctl
echo "content" | 9p write acme/$id/body
echo "show" | 9p write acme/$id/ctl
```
**Event loop:**
```
read acme/$id/event → parse → handle → ack if flag&1 → repeat (EOF=closed)
```
**Text:**
```bash
echo '0,$' | 9p write acme/$id/addr
9p read acme/$id/data
echo "new" | 9p write acme/$id/data
```
## Key Points
- addr: char offsets (not bytes)
- body/tag: write appends (offset ignored)
- data: uses addr, advances
- xdata: stops at end
- Events: ack flag&1, text >256 elided (nr=0)
- Unread events block acme

View File

@ -1,70 +0,0 @@
---
name: agent-kb
intent: knowledge, learning
description: Query and maintain a local knowledge base of code insights and architecture notes. Use when encountering unfamiliar code, needing context beyond training, or when asked to save/update learned knowledge.
---
# Agent Knowledge Base
**Location:** `~/doc/agent-kb/`
**File format:** Follows **denote** skill conventions (load denote skill for naming/frontmatter rules).
## Usage
**Search before answering:**
```bash
grep -il "keyword" ~/doc/agent-kb/*.md
ls -1 ~/doc/agent-kb/
```
**Read relevant entries before researching code.**
## Creating Entries
1. Use denote naming: `date +%Y%m%dT%H%M%S` → `{timestamp}--{title}__{tags}.md`
2. Add frontmatter (see denote skill): `title`, `date`, `tags`, `identifier`, `verified`, `source`
3. One topic per file
4. Link to other entries: `denote:{identifier}` (e.g., `denote:20260130T171856`)
5. Don't auto-follow cross-references unless directly relevant
## Updating Entries
1. Read existing entry
2. Update content
3. Preserve identifier and filename
4. Update `verified` date in frontmatter
5. Add note on last line: `Updated YYYY-MM-DD: <what changed>`
## Staleness
| Age | Action |
|-----|--------|
| ≤30 days | Trust, use directly |
| 31-90 days | Use with caution, flag as potentially stale |
| 90+ days | Verify against code before using |
When confirmed accurate: update `verified` date.
## What Belongs
**YES:**
- Code patterns, architecture, service behavior
- API contracts, data schemas, integration points
- Non-obvious implementation details
- Verified facts from code/docs
**NO:**
- Speculation or design proposals
- "We could do X" alternatives
- Unverified assumptions
- Temporary workarounds
## Feedback Loop
After code exploration:
- New knowledge → offer to create entry
- KB contradicts code → stop, report discrepancy, ask to update
- KB confirmed → optionally note verification
**If KB contradicts code:** Stop and report. Don't silently ignore KB errors.

View File

@ -1,84 +0,0 @@
---
name: anvillm-sessions
intent: agents, sessions
description: Manage agent sessions (create, list, control). Use when spawning new agents, checking agent status, or controlling agent lifecycle.
---
# Anvillm Session Management
Create and control agent sessions.
## Commands
List sessions:
```
Tool: execute_code
tool: list_sessions.sh
```
Create session:
```
Tool: execute_code
tool: create_session.sh
args: ["--backend", "<backend>", "--cwd", "<cwd>", "--sandbox", "<sandbox>", "--model", "<model>"]
```
Control session:
```
Tool: execute_code
tool: control_session.sh
args: ["--session-id", "<session-id>", "--command", "<stop|restart|kill|refresh>"]
```
Spawn agent (requires default sandbox):
```
Tool: execute_code
tool: spawn_agent.sh
args: ["--agent-id", "<agent-id>", "--cwd", "<cwd-path>", "--prompt", "<initial-context>"]
sandbox: default
```
`--cwd` defaults to `$PWD`. `--prompt` is optional.
Kill agent:
```
Tool: execute_code
tool: kill_agent.sh
args: ["--agent-id", "<agent-id>"]
```
## Backends
- `kiro-cli` - Kiro CLI agent
- `claude` - Claude CLI agent
- `ollama` - Ollama agent
## Session Lifecycle
1. Create: `create_session.sh --backend kiro-cli --cwd /path/to/project --sandbox default`
2. Monitor: `list_sessions.sh` (check state field)
3. Control: `control_session.sh --session-id <id> --command stop|restart|kill|refresh`
## Session States
- `starting` - Initializing
- `idle` - Ready for work
- `running` - Processing task
- `stopped` - Paused
- `error` - Failed
- `exited` - Terminated
## When to Use
- User asks to spawn/create a new agent
- Need to check agent status
- Need to stop/restart/kill an agent
- Coordinating multi-agent workflows
## Session Handoff Pattern
Agent A dies. Orphan cron detects dead assignee, calls `unclaim`. `BeadReady` fires on the event bus with full bead JSON including comments. Any waiting bot receives it via `wait_for_bead.sh`, claims the bead, and resumes — no bootstrap step, no agent-written snapshot. State lives in beads + git.
## When NOT to Use
- Sending messages to agents (use built-in communication tools: `send_message.sh`, `check_inbox.sh`)
- Managing tasks (use beads skill)

View File

@ -1,250 +0,0 @@
---
name: beads
intent: tasks, workflow
description: Manage tasks using the beads 9P interface. Use when creating, updating, listing, or deleting tasks/beads, or managing task dependencies.
---
# Beads Skill
## Project Mount Discovery
Find your project's beads mount:
```
Tool: execute_code
tool: list_mounts.sh
```
Then find the entry matching your cwd and extract the mount name.
If no mount exists, create one (substitute actual path):
```
Tool: execute_code
tool: mount_beads.sh
args: ["--cwd", "/path/to/project"]
```
Initialize beads in a mount (creates .beads/):
```
Tool: execute_code
tool: init_beads.sh
args: ["--mount", "<mount>", "--prefix", "<prefix>"]
```
## Tools
All tools require `--mount <mount>`. Exceptions: `list_mounts.sh`, `mount_beads.sh`, `umount_beads.sh`.
**CRITICAL:** Always use `sandbox: default` with beads tools. The tools derive scope from cwd, which must match the project directory.
List mounts:
```
Tool: execute_code
tool: list_mounts.sh
sandbox: default
```
Wait for a bead on your mount (blocks until one is ready, returns full bead JSON including comments, then exits — bot decides whether to claim):
```
Tool: execute_code
tool: wait_for_bead.sh
args: ["--mount", "<mount>"]
sandbox: default
```
List ready beads (open, unblocked):
```
Tool: execute_code
tool: list_ready_beads.sh
args: ["--mount", "<mount>"]
sandbox: default
```
List all open beads (excludes closed):
```
Tool: execute_code
tool: list_beads.sh
args: ["--mount", "<mount>"]
sandbox: default
```
Search beads by id, title, or description (includes closed):
```
Tool: execute_code
tool: search_beads.sh
args: ["--mount", "<mount>", "--query", "<query>"]
```
Lookup bead by ID:
```
Tool: execute_code
tool: search_beads.sh
args: ["--mount", "<mount>", "--id", "<id>"]
```
**Note:** `list_beads.sh` and `list_ready_beads.sh` only return open beads. To find closed beads, use `search_beads.sh`.
Read bead JSON:
```
Tool: execute_code
tool: read_bead.sh
args: ["--mount", "<mount>", "--id", "<id>", "--property", "json"]
sandbox: default
```
Read bead comments:
```
Tool: execute_code
tool: read_bead_comments.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
**IMPORTANT:** When working on a bead, always check `comment_count` in the JSON output. If > 0, read comments for additional context, decisions, or blockers.
Claim bead:
```
Tool: execute_code
tool: claim_bead.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
Complete bead:
```
Tool: execute_code
tool: complete_bead.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
Fail bead:
```
Tool: execute_code
tool: fail_bead.sh
args: ["--mount", "<mount>", "--id", "<id>", "--reason", "<reason>"]
sandbox: default
```
Create bead (starts deferred — use open_bead.sh when ready):
```
Tool: execute_code
tool: create_bead.sh
args: ["--mount", "<mount>", "--title", "<title>", "--desc", "<desc>", "--parent", "<id>"]
sandbox: default
```
`--desc`, `--parent`, `--no-lint`, `--capability low|standard|high` are all optional.
Update bead field:
```
Tool: execute_code
tool: update_bead.sh
args: ["--mount", "<mount>", "--id", "<id>", "--field", "<field>", "--value", "<value>"]
sandbox: default
```
Valid fields: `title`, `description`, `design`, `acceptance_criteria`, `notes`, `issue_type`, `estimated_minutes`, `external_ref`, `spec_id`, `priority`, `due_at`, `work_type`. Status and assignee are managed by atomic operations only.
Open (promote deferred to ready):
```
Tool: execute_code
tool: open_bead.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
Defer bead:
```
Tool: execute_code
tool: defer_bead.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
Optional: append `"--until", "<RFC3339-time>"` to defer until a specific time.
Reopen closed bead:
```
Tool: execute_code
tool: reopen_bead.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
Relate two beads (soft link, no blocking):
```
Tool: execute_code
tool: relate_beads.sh
args: ["--mount", "<mount>", "--bead1", "<id-1>", "--bead2", "<id-2>"]
sandbox: default
```
Add dependency (child blocked by parent):
```
Tool: execute_code
tool: add_dependency.sh
args: ["--mount", "<mount>", "--child", "<child>", "--parent", "<parent>"]
sandbox: default
```
Comment on bead:
```
Tool: execute_code
tool: comment_bead.sh
args: ["--mount", "<mount>", "--id", "<id>", "--text", "<text>"]
sandbox: default
```
Label bead:
```
Tool: execute_code
tool: label_bead.sh
args: ["--mount", "<mount>", "--id", "<id>", "--label", "<label>"]
sandbox: default
```
Delete bead:
```
Tool: execute_code
tool: delete_bead.sh
args: ["--mount", "<mount>", "--id", "<id>"]
sandbox: default
```
**Note:** Delete does not cascade. To delete a parent and all children, delete children first, then parent.
Unmount project:
```
Tool: execute_code
tool: umount_beads.sh
args: ["--mount", "<mount>"]
sandbox: default
```
**Note:** Unmounting is an emergency stop. The orphan recovery cron will not spawn agents for unmounted projects. Remount to resume recovery.
Sync project:
```
Tool: execute_code
tool: sync_beads.sh
args: ["--mount", "<mount>"]
sandbox: default
```
## Rules
- Discover your mount first using mtab
- Claim before working
- Complete children before parent, if present
- Only parse JSON output
- Never access `.beads/` directly
- When creating, updating, or commenting on a bead, always escape JSON properly for bash
- Comment during work (decisions, dead ends, discoveries)
- Search past beads before starting
- Always favor atomic actions
- Good: `complete_bead.sh --mount myproj --id bd-123`
- Bad: `update_bead.sh --mount myproj --id bd-123 --field status --value closed`
## Description Quality
- The goal is to enable cold completion of the task, without additional research or code exploration
- Imperative verb + file path + `` `funcName()` `` or Acme file address (`/path/to/file:123,125` not `/path/to/file:123-125`)
- "How" signal (following X, same as Y) + acceptance criterion (must/should/returns)
- Backticked identifiers + cross-ref for >150 chars
Bypass lint: title has `IDEA:` prefix.

View File

@ -1,76 +0,0 @@
---
name: denote
intent: notes, documentation, knowledge
description: Denote file format conventions for timestamped notes. Use when creating, naming, or linking structured note files in the ~/doc/ hierarchy.
---
# Denote File Format
Denote is an Emacs structured note-taking system by Protesilaos Stavrou. It uses a strict filename convention to encode metadata.
## File Naming Convention
```
YYYYMMDDThhmmss--title-in-lowercase-alphanumeric__tag1_tag2_tagN.ext
```
Components:
- **Timestamp**: `date +%Y%m%dT%H%M%S` — ISO 8601 compact, seconds precision
- **Title**: lowercase, alphanumeric characters and hyphens only (no spaces, no underscores)
- **Tags**: lowercase alphanumeric, underscore-separated, after double-underscore. **CRITICAL**: Never use hyphens, underscores, or special characters in tag frontmatter!
Examples:
- `20260128T133522--example-flow__ref.md`
- `20260126T144226--architecture-notes__component1_component2_tag3.md`
## Frontmatter Format
Every Denote file begins with YAML frontmatter that mirrors the filename:
```markdown
---
title: Title In Title Case
date: YYYY-MM-DD Day HH:MM
tags: [tag1, tag2]
identifier: YYYYMMDDThhmmss
verified: YYYY-MM-DD
source: code-inspection | documentation | online | verbal | inferred
---
# Title
Content here.
```
**Provenance fields** (for agent-kb entries):
- `verified`: Date last confirmed against code (update on confirmation)
- `source`: How the knowledge was obtained
- `code-inspection` — directly verified in source code
- `documentation` — from internal docs
- `online` — from external online documentation
- `verbal` — expert opinion, discussion, tacit knowledge
- `inferred` — derived from training data (lowest priority)
If a source has a URL, add a `## Sources` section at the bottom.
## Cross-References
Link to other Denote entries using the identifier:
```
See denote:20260130T171856 for query details.
```
**Do not automatically follow cross-references.** Only load referenced documents if directly relevant to the current question.
## Looking Up an Entry by Identifier
```bash
grep -r "20260130T171856" ~/doc/agent-kb/
```
Or search by keyword:
```bash
grep -il "keyword" ~/doc/agent-kb/*.md
```

View File

@ -1,57 +0,0 @@
---
name: duckduckgo-search
intent: search, web
description: Use the `ddgr` CLI to search DuckDuckGo and return a small set of relevant, linkable sources.
---
# DuckDuckGo Search (ddgr)
## Purpose
When this skill is active, you use the `ddgr` command-line tool to search DuckDuckGo from the terminal and return credible, relevant sources.
This is a *search* skill. If you need to read/summarize a specific page after finding it, switch to a page-fetching/reader skill.
## Non-interactive usage (important)
`ddgr` is interactive by default. For agent use, you should run it non-interactively:
- Use `--np` / `--noprompt` to “perform search and exit, do not prompt”.
- Prefer `--json` for structured output (it also implies `--np`).
## Common patterns
### Minimal JSON search (recommended)
```bash
ddgr --json "<query>"
```
### Limit result count
```bash
ddgr --np -n 5 "<query>"
ddgr --json -n 5 "<query>"
```
### Narrow by recency / region / site
```bash
ddgr --json -t w "<query>" # last week
ddgr --json -r us-en "<query>" # US region
ddgr --json -w example.com "<query>" # site:example.com
```
## Output requirements
- Return a short list of results (usually 3–7) with:
- title
- URL
- a 1-sentence reason it’s relevant
- Prefer primary sources (official docs, vendor pages, standards bodies) over reposts.
- If results look low-quality, refine the query (add vendor name, add a site filter, or add a time window).
## Execution configuration
- Preferred tool: `ddgr`
- Non-interactive flags: `--json` (preferred) or `--np`

View File

@ -1,76 +0,0 @@
---
name: github-cli
intent: github, vcs
description: Interact with GitHub repositories, issues, PRs, workflows, and more using the gh CLI. Use for GitHub operations like creating issues/PRs, managing repos, checking workflow runs, and browsing GitHub resources.
---
# GitHub CLI (gh)
**CRITICAL:** Run `gh` commands from within the git repository directory. Use `--repo owner/name` only when operating on a different repo.
## Commands
**Repository:**
- Create repo: `gh repo create <name>`
- Clone repo: `gh repo clone <repo>`
- View repo: `gh repo view [repo]`
- Fork repo: `gh repo fork [repo]`
**Issues:**
- Create: `gh issue create --title "..." --body "..."`
- List: `gh issue list`
- View: `gh issue view <number>`
- Close: `gh issue close <number>`
**Pull Requests:**
- Create: `gh pr create`
- List: `gh pr list`
- View: `gh pr view <number>`
- Checkout: `gh pr checkout <number>`
- Merge: `gh pr merge <number>`
- Status: `gh pr status`
**Actions:**
- List runs: `gh run list`
- View run: `gh run view <run-id>`
- Watch run: `gh run watch <run-id>`
- List workflows: `gh workflow list`
- View workflow: `gh workflow view <workflow>`
**Releases:**
- Create: `gh release create <tag>`
- List: `gh release list`
- View: `gh release view <tag>`
**Search:**
- Repos: `gh search repos <query>`
- Issues: `gh search issues <query>`
- PRs: `gh search prs <query>`
**Browse:**
- Open repo: `gh browse`
- Open issue/PR: `gh browse <number>`
**API:**
- Call endpoint: `gh api <endpoint>`
- Example: `gh api repos/:owner/:repo/issues`
## Common Flags
`--repo owner/repo` `--json` `--jq <query>` `--web` `--help`
## Auth
- Check: `gh auth status`
- Login: `gh auth login`
## Examples
```bash
gh issue create --title "Bug" --body "Description"
gh pr list --state open --json number,title,author
gh run view 12345
gh repo clone owner/repo
gh search repos --language rust --sort stars
gh api graphql -f query='query { viewer { login } }'
```

View File

@ -1,51 +0,0 @@
---
name: github-to-beads
intent: tasks, github
description: Import GitHub issues and PRs into beads task tracking. Use when user asks to pull GitHub issue info, define work from an issue, or create tasks from GitHub.
---
# GitHub to Beads
Import GitHub issues into beads.
## Usage
```
Tool: execute_code
tool: github_to_beads.sh
args: ["--mount", "<mount>", "--repo", "<owner/repo>", "--issue", "<issue_number>"]
```
**What it does:**
1. Fetches issue data via `gh` CLI
2. Creates bead: `#NUMBER: title` → title, body → description
3. Maps labels to issue_type (bug label → bug type)
4. Sets status (closed issues → closed status)
5. Parses task list (`- [ ]` items) as child beads
6. Skips if already imported
## When to Use
- User asks to "pull" or "import" a GitHub issue
- User wants to define work based on a GitHub issue
- User asks to create beads/tasks from GitHub
## When NOT to Use
- Just viewing issue info (use `gh issue view`)
- Modifying GitHub issues (this is pull-only)
- General bead management (use `beads` skill)
## Manual GitHub Commands
```bash
gh issue view 123 --repo owner/repo # human readable
gh issue view 123 --repo owner/repo --json number,title,body # JSON
```
## After Import
Review and adjust:
- Remove beads bot doesn't need
- Refine descriptions
- Add context

View File

@ -1,148 +0,0 @@
---
name: pcloudcc-testing
intent: testing, pcloudcc
description: Test pcloudcc daemon and CLI tools. Use when verifying fixes, testing features, or smoke testing pcloudcc functionality.
---
# pCloudcc Testing
Test the pCloud console client daemon and CLI tools. Requires `$PCLOUD_USER` environment variable. If not set, instruct user to set it.
**Start daemon**: `./pcloudcc -d`
**Stop daemon**: `echo "finalize" | ./pcloudcc -k`
**Non-Interactive CLI**: Use stdin for non-interactive commands: `echo "<command>" | ./pcloudcc -k`
**Get command list**: `echo "help" | ./pcloudcc -k`
Common commands:
- `status` - Show sync state (use this instead of `pending` for upload/download checks)
- `sync list` - List sync folders
- `sync add <localpath> <remotepath>` - Add sync folder
- `sync remove <folderid>` - Remove sync folder
- `sync pause` - Pause syncing
- `sync resume` - Resume syncing
- `pending` - Check pending transfers (NOTE: output goes to daemon stdout, not client - use `status` instead)
- `crypto start <pass>` - Unlock crypto folder
- `crypto stop` - Lock crypto folder
- `finalize` - Kill daemon and quit
## Sandbox Escape (FUSE / daemon)
The pcloudcc daemon requires FUSE (mount syscall), which is blocked inside the sandbox. Use the `execute_elevated_bash` tool (provided by the `superpowerd` MCP server) to run commands outside the sandbox.
**Load the tool first** (deferred tool — must be discovered before use):
```
ToolSearch: select:mcp__superpowers-mcp-server__execute_elevated_bash
```
**Start daemon outside sandbox** (always use `-d` — never start without it):
```
Tool: mcp__superpowers-mcp-server__execute_elevated_bash
command: "cd <cwd> && ./pcloudcc -d"
summary: "Start pcloudcc daemon for FUSE testing"
```
**Send CLI commands** (these are lightweight and can run inside sandbox):
```
Tool: execute_code
code: echo "<command>" | ./pcloudcc -k
```
**Stop daemon**:
```
Tool: mcp__superpowers-mcp-server__execute_elevated_bash
command: "cd <cwd> && echo 'finalize' | ./pcloudcc -k"
summary: "Stop pcloudcc daemon"
```
Mount point: `~/pCloudDrive`
## Testing Workflow
### Testing Agent System Prompt
```
Load pcloudcc-testing skill. Test the affected code path with unit tests, fault injection, or smoke tests. Design tests that reproduce the bug scenario. Verify old code fails, new code passes. Report with evidence.
```
### Development Agent Workflow
**Prerequisites**: Load `anvillm-sessions` skill
Spawn testing agent:
```
Tool: execute_code
tool: spawn_agent.sh
args: ["<your-id>", "<cwd>", "<system-prompt-above>"]
sandbox: default
```
Send test request:
```
Tool: execute_code
tool: send_message.sh
args: ["<your-id>", "<testing-agent-id>", "PROMPT_REQUEST", "Validate fix", "Bug: <desc>\nFix: <changes>\nFiles: <list>\nBranch: <name>"]
```
Read response (user notifies when ready):
```
Tool: execute_code
tool: check_inbox.sh
args: ["<your-id>"]
```
Kill testing agent:
```
Tool: execute_code
tool: kill_agent.sh
args: ["<testing-agent-id>"]
```
### Testing Agent Workflow
1. Load pcloudcc-testing skill
2. Analyze bug and fix (read code, understand failure mode)
3. Design targeted test (reproduce bug scenario)
4. Execute test (unit/fault-inject/smoke)
5. Verify fix (old fails, new passes)
6. Report:
```
Tool: execute_code
tool: send_message.sh
args: ["<your-id>", "<requester-id>", "PROMPT_RESPONSE", "Validation complete", "Status: completed|failed\n<evidence>"]
```
**FUSE testing**: Use `execute_elevated_bash` to start the daemon outside the sandbox (see Sandbox Escape section above). No user intervention required.
### Manual Testing Workflow
1. Build: `make -j$(nproc)`
2. Start daemon (outside sandbox): `mcp__superpowers-mcp-server__execute_elevated_bash` → `cd <cwd> && ./pcloudcc -d`
3. Wait for initialization: `sleep 2`
4. Test commands (inside sandbox): `echo "<command>" | ./pcloudcc -k`
5. Stop daemon: `mcp__superpowers-mcp-server__execute_elevated_bash` → `cd <cwd> && echo 'finalize' | ./pcloudcc -k`
## Test Design
**CRITICAL**: Test the affected code path, not just "it compiles". Use unit tests or fault injection when normal usage doesn't exercise the bug.
**Test directories**:
- `./tests/unit-tests/` - Isolated components
- `./tests/fault-inject/` - Force failure scenarios
- `./tests/smoke-tests/` - End-to-end integration
**Test design**: Understand bug → reproduce scenario → verify old fails, new passes → provide evidence
**FUSE testing**: Use `execute_elevated_bash` to run the daemon outside the sandbox. Mount point: `~/pCloudDrive`
**Fault Injection Pattern**: `#define _GNU_SOURCE` + `#include <dlfcn.h>` to override functions. Compile: `gcc -shared -fPIC -o inject.so inject.c -ldl`. Run: `LD_PRELOAD=./inject.so ./pcloudcc -d`
## Notes
- **Always start the daemon with `-d`** — never invoke `./pcloudcc` as daemon without this flag
- Daemon must be running before using `-k` commands
- Each `-k` invocation creates new connection to daemon
- Daemon closes socket after each response
- Always finalize to cleanly stop daemon
- Use `status` instead of `pending` for checking upload/download state
- Kill daemon: use the PID shown at startup (e.g., `kill -9 12345`)
- `execute_elevated_bash` requires user approval per invocation — requests should be clearly summarized

View File

@ -1,77 +0,0 @@
---
name: pcloudcc-testing
intent: testing, pcloudcc
description: Test pcloudcc daemon and CLI tools. Use when verifying fixes, testing features, or smoke testing pcloudcc functionality.
---
# pCloudcc Testing
Test the pCloud console client daemon and CLI tools.
## Daemon Management
Start daemon:
```bash
./pcloudcc -d
```
Requires `$PCLOUD_USER` environment variable. If not set, instruct user to set it.
Stop daemon:
```bash
echo "finalize" | ./pcloudcc -k
```
## Non-Interactive CLI
Use stdin for non-interactive commands:
```bash
echo "<command>" | ./pcloudcc -k
```
## Available Commands
Get command list:
```bash
echo "help" | ./pcloudcc -k
```
Common commands:
- `status` - Show sync state
- `sync list` - List sync folders
- `sync add <localpath> <remotepath>` - Add sync folder
- `sync remove <folderid>` - Remove sync folder
- `sync pause` - Pause syncing
- `sync resume` - Resume syncing
- `pending` - Check pending transfers
- `crypto start <pass>` - Unlock crypto folder
- `crypto stop` - Lock crypto folder
- `finalize` - Kill daemon and quit
## Testing Workflow
1. Build: `make -j$(nproc)`
2. Start daemon: `./pcloudcc -d`
3. Test commands: `echo "<command>" | ./pcloudcc -k`
4. Stop daemon: `echo "finalize" | ./pcloudcc -k`
## Smoke Tests
Basic functionality:
```bash
echo "status" | ./pcloudcc -k
echo "sync list" | ./pcloudcc -k
```
Invalid input (should not crash):
```bash
echo "sync remove invalid" | ./pcloudcc -k
echo "sync remove 999999999999999999999" | ./pcloudcc -k
```
## Notes
- Daemon must be running before using `-k` commands
- Each `-k` invocation creates new connection to daemon
- Daemon closes socket after each response
- Always finalize to cleanly stop daemon

View File

@ -1,98 +0,0 @@
---
name: rc-shell
intent: scripting, shell
description: Plan 9 rc shell scripting syntax and conventions. Use when writing .rc shell scripts or working with Plan 9 rc syntax.
user-invocable: false
---
# Plan 9 rc Shell Syntax
Shebang: `#!/usr/bin/env rc` Extension: `.rc`
## Variables
```
name=value # NO spaces around =
files=(a b c) # lists in parens
$name $files(1) $files(2-) # substitute, 1st element, from 2nd onward
$files(2-4) # range
$#files # count
$"files # join with spaces
$^files # concat (no spaces)
```
## Command Substitution
```
result=`{command} # backticks, NOT $()
result=`split{command} # split using 'split' instead of $ifs
```
## Control Flow
```
if(test -f file) {
echo exists
}
if not { # separate statement, new line
echo missing
}
for(i in 1 2 3) { echo $i }
for(i) { echo $i } # iterates over $* if no list
while(test $n -lt 10) { n=`{echo $n + 1 | bc} }
switch($file) {
case *.txt
echo text
case *
echo other
}
```
## Functions & Pattern Matching
```
fn name { echo $* $1 } # define (all args, first arg)
fn name # remove definition
~ $file *.txt # pattern match (sets $status)
if(~ $#list 0) { echo empty }
```
## Redirection & Pipes
```
>out >>out <in <<EOF # stdout, append, stdin, here doc
>[2]err >[2=1] >[2=] # fd 2 to file, fd 2 to fd 1, close fd 2
<[0=3] # fd 0 from fd 3
<{cmd} >{cmd} <>{cmd} # process substitution
cmd1 | cmd2 # pipe
|[2] |[1=2] # pipe fd 2, pipe fd 2 to fd 1
```
## Operators
`; & && || ! @` - sequence, async, and, or, invert, subshell
`^` - concatenate (auto-inserted without whitespace)
## Special Variables
`$*` `$status` `$apid` `$pid` `$ifs` `$path` `$home`
## Built-ins
`. file` `cd` `eval` `exec` `exit` `shift` `wait` `whatis`
## Key Differences from Bash
- Backticks `{cmd}`, not `$(cmd)`
- Lists `(a b c)`, 1-indexed
- `if not` on new line
- `test` or `~`, not `[[ ]]`
- `$#var` not `${#var}`, `$"var` not `"$*"`
- `>[2=1]` not `2>&1`
- No `${var:-default}`
- `fn name` not `function name`
- Single quotes only (double quotes not special)
- Free carets: `$x.c` → `$x^.c`

View File

@ -1,37 +0,0 @@
---
name: web-dev-browser-screencapture
intent: web, debugging
description: Capture screenshots of browser windows for visual feedback during web development. Use when verifying UI changes, checking dev server output, or documenting web application state.
---
# Web Dev Browser Screencapture
Capture browser window showing a specific URL.
## Commands
- Capture localhost: `capture_browser.sh /tmp/capture.png localhost:<port>`
- Capture custom URL: `capture_browser.sh /tmp/app.png <url_pattern>`
- Capture default (localhost): `capture_browser.sh /tmp/capture.png`
## Reading Captured Image
```json
{"operations": [{"mode": "Image", "image_paths": ["<path_from_output>"]}]}
```
## Platform Support
- **macOS**: Chrome + `osascript` + `screencapture`
- **Linux**: `brotab` + `wmctrl` + `import` (ImageMagick)
## When to Use
- Verify UI changes
- Check dev server output
- Document application state
## When NOT to Use
- Browser not running
- Target page not open

View File

@ -1,71 +0,0 @@
---
name: write-skills
intent: meta, skills
description: Guide for authoring new Agent Skills. Use when creating, updating, or reviewing skills / SKILL.md files.
---
# Write Skills
## Structure
```
skill-name/
├── SKILL.md # required: frontmatter + instructions
├── reference.md # optional: detailed docs
└── examples.md # optional: usage examples
```
## SKILL.md Format
```yaml
---
name: skill-name # lowercase, hyphens, match directory
intent: category, subcategory # for discovery
description: What it does and when to use it (max 1024 chars)
---
# Skill Name
Brief, actionable instructions.
```
## Frontmatter
- `name` - `[a-z0-9-]`, max 64 chars, match directory
- `intent` - comma-separated categories (tasks, workflow, editor, messaging, etc.)
- `description` - what + when, max 1024 chars
## Writing Guidelines
**Description:** Include capability and trigger conditions.
- Good: "Manage tasks using beads 9P interface. Use when creating, updating, listing, or deleting tasks/beads."
- Bad: "A useful skill" (vague, no trigger)
**Instructions:**
- Imperative voice ("Do X" not "You should")
- Single responsibility
- Clear boundaries (when to use / not use)
- Concrete examples
- Reference companion files: `[reference.md](reference.md)`
## Creating Skills
```bash
# Find skills directory
9p ls anvillm/skills
# Create
mkdir -p ./skills/skill-name
# Write SKILL.md with frontmatter
# Verify
9p ls anvillm/skills | grep skill-name
```
## Validation
- [ ] Directory = `name` field
- [ ] `name` matches `[a-z0-9-]`, ≤64 chars
- [ ] `intent` present
- [ ] `description` present, ≤1024 chars, includes what + when
- [ ] Instructions clear and actionable