Release set of skills
This commit is contained in:
parent
757d012ab5
commit
740dd928f7
96 changed files with 2040 additions and 5300 deletions
3
skills/autonomous-ai-agents/DESCRIPTION.md
Normal file
3
skills/autonomous-ai-agents/DESCRIPTION.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
description: Skills for spawning and orchestrating autonomous AI coding agents and multi-agent workflows — running independent agent processes, delegating tasks, and coordinating parallel workstreams.
|
||||
---
|
||||
94
skills/autonomous-ai-agents/claude-code/SKILL.md
Normal file
94
skills/autonomous-ai-agents/claude-code/SKILL.md
Normal file
|
|
@ -0,0 +1,94 @@
|
|||
---
|
||||
name: claude-code
|
||||
description: Delegate coding tasks to Claude Code (Anthropic's CLI agent). Use for building features, refactoring, PR reviews, and iterative coding. Requires the claude CLI installed.
|
||||
version: 1.0.0
|
||||
author: Hermes Agent
|
||||
license: MIT
|
||||
metadata:
|
||||
hermes:
|
||||
tags: [Coding-Agent, Claude, Anthropic, Code-Review, Refactoring]
|
||||
related_skills: [codex, hermes-agent]
|
||||
---
|
||||
|
||||
# Claude Code
|
||||
|
||||
Delegate coding tasks to [Claude Code](https://docs.anthropic.com/en/docs/claude-code) via the Hermes terminal. Claude Code is Anthropic's autonomous coding agent CLI.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Claude Code installed: `npm install -g @anthropic-ai/claude-code`
|
||||
- Authenticated: run `claude` once to log in
|
||||
- Use `pty=true` in terminal calls — Claude Code is an interactive terminal app
|
||||
|
||||
## One-Shot Tasks
|
||||
|
||||
```
|
||||
terminal(command="claude 'Add error handling to the API calls'", workdir="/path/to/project", pty=true)
|
||||
```
|
||||
|
||||
For quick scratch work:
|
||||
```
|
||||
terminal(command="cd $(mktemp -d) && git init && claude 'Build a REST API for todos'", pty=true)
|
||||
```
|
||||
|
||||
## Background Mode (Long Tasks)
|
||||
|
||||
For tasks that take minutes, use background mode so you can monitor progress:
|
||||
|
||||
```
|
||||
# Start in background with PTY
|
||||
terminal(command="claude 'Refactor the auth module to use JWT'", workdir="~/project", background=true, pty=true)
|
||||
# Returns session_id
|
||||
|
||||
# Monitor progress
|
||||
process(action="poll", session_id="<id>")
|
||||
process(action="log", session_id="<id>")
|
||||
|
||||
# Send input if Claude asks a question
|
||||
process(action="submit", session_id="<id>", data="yes")
|
||||
|
||||
# Kill if needed
|
||||
process(action="kill", session_id="<id>")
|
||||
```
|
||||
|
||||
## PR Reviews
|
||||
|
||||
Clone to a temp directory to avoid modifying the working tree:
|
||||
|
||||
```
|
||||
terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && claude 'Review this PR against main. Check for bugs, security issues, and style.'", pty=true)
|
||||
```
|
||||
|
||||
Or use git worktrees:
|
||||
```
|
||||
terminal(command="git worktree add /tmp/pr-42 pr-42-branch", workdir="~/project")
|
||||
terminal(command="claude 'Review the changes in this branch vs main'", workdir="/tmp/pr-42", pty=true)
|
||||
```
|
||||
|
||||
## Parallel Work
|
||||
|
||||
Spawn multiple Claude Code instances for independent tasks:
|
||||
|
||||
```
|
||||
terminal(command="claude 'Fix the login bug'", workdir="/tmp/issue-1", background=true, pty=true)
|
||||
terminal(command="claude 'Add unit tests for auth'", workdir="/tmp/issue-2", background=true, pty=true)
|
||||
|
||||
# Monitor all
|
||||
process(action="list")
|
||||
```
|
||||
|
||||
## Key Flags
|
||||
|
||||
| Flag | Effect |
|
||||
|------|--------|
|
||||
| `claude 'prompt'` | One-shot task, exits when done |
|
||||
| `claude --dangerously-skip-permissions` | Auto-approve all file changes |
|
||||
| `claude --model <model>` | Use a specific model |
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Always use `pty=true`** — Claude Code is an interactive terminal app and will hang without a PTY
|
||||
2. **Use `workdir`** — keep the agent focused on the right directory
|
||||
3. **Background for long tasks** — use `background=true` and monitor with `process` tool
|
||||
4. **Don't interfere** — monitor with `poll`/`log`, don't kill sessions because they're slow
|
||||
5. **Report results** — after completion, check what changed and summarize for the user
|
||||
113
skills/autonomous-ai-agents/codex/SKILL.md
Normal file
113
skills/autonomous-ai-agents/codex/SKILL.md
Normal file
|
|
@ -0,0 +1,113 @@
|
|||
---
|
||||
name: codex
|
||||
description: Delegate coding tasks to OpenAI Codex CLI agent. Use for building features, refactoring, PR reviews, and batch issue fixing. Requires the codex CLI and a git repository.
|
||||
version: 1.0.0
|
||||
author: Hermes Agent
|
||||
license: MIT
|
||||
metadata:
|
||||
hermes:
|
||||
tags: [Coding-Agent, Codex, OpenAI, Code-Review, Refactoring]
|
||||
related_skills: [claude-code, hermes-agent]
|
||||
---
|
||||
|
||||
# Codex CLI
|
||||
|
||||
Delegate coding tasks to [Codex](https://github.com/openai/codex) via the Hermes terminal. Codex is OpenAI's autonomous coding agent CLI.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Codex installed: `npm install -g @openai/codex`
|
||||
- OpenAI API key configured
|
||||
- **Must run inside a git repository** — Codex refuses to run outside one
|
||||
- Use `pty=true` in terminal calls — Codex is an interactive terminal app
|
||||
|
||||
## One-Shot Tasks
|
||||
|
||||
```
|
||||
terminal(command="codex exec 'Add dark mode toggle to settings'", workdir="~/project", pty=true)
|
||||
```
|
||||
|
||||
For scratch work (Codex needs a git repo):
|
||||
```
|
||||
terminal(command="cd $(mktemp -d) && git init && codex exec 'Build a snake game in Python'", pty=true)
|
||||
```
|
||||
|
||||
## Background Mode (Long Tasks)
|
||||
|
||||
```
|
||||
# Start in background with PTY
|
||||
terminal(command="codex exec --full-auto 'Refactor the auth module'", workdir="~/project", background=true, pty=true)
|
||||
# Returns session_id
|
||||
|
||||
# Monitor progress
|
||||
process(action="poll", session_id="<id>")
|
||||
process(action="log", session_id="<id>")
|
||||
|
||||
# Send input if Codex asks a question
|
||||
process(action="submit", session_id="<id>", data="yes")
|
||||
|
||||
# Kill if needed
|
||||
process(action="kill", session_id="<id>")
|
||||
```
|
||||
|
||||
## Key Flags
|
||||
|
||||
| Flag | Effect |
|
||||
|------|--------|
|
||||
| `exec "prompt"` | One-shot execution, exits when done |
|
||||
| `--full-auto` | Sandboxed but auto-approves file changes in workspace |
|
||||
| `--yolo` | No sandbox, no approvals (fastest, most dangerous) |
|
||||
|
||||
## PR Reviews
|
||||
|
||||
Clone to a temp directory for safe review:
|
||||
|
||||
```
|
||||
terminal(command="REVIEW=$(mktemp -d) && git clone https://github.com/user/repo.git $REVIEW && cd $REVIEW && gh pr checkout 42 && codex review --base origin/main", pty=true)
|
||||
```
|
||||
|
||||
## Parallel Issue Fixing with Worktrees
|
||||
|
||||
```
|
||||
# Create worktrees
|
||||
terminal(command="git worktree add -b fix/issue-78 /tmp/issue-78 main", workdir="~/project")
|
||||
terminal(command="git worktree add -b fix/issue-99 /tmp/issue-99 main", workdir="~/project")
|
||||
|
||||
# Launch Codex in each
|
||||
terminal(command="codex --yolo exec 'Fix issue #78: <description>. Commit when done.'", workdir="/tmp/issue-78", background=true, pty=true)
|
||||
terminal(command="codex --yolo exec 'Fix issue #99: <description>. Commit when done.'", workdir="/tmp/issue-99", background=true, pty=true)
|
||||
|
||||
# Monitor
|
||||
process(action="list")
|
||||
|
||||
# After completion, push and create PRs
|
||||
terminal(command="cd /tmp/issue-78 && git push -u origin fix/issue-78")
|
||||
terminal(command="gh pr create --repo user/repo --head fix/issue-78 --title 'fix: ...' --body '...'")
|
||||
|
||||
# Cleanup
|
||||
terminal(command="git worktree remove /tmp/issue-78", workdir="~/project")
|
||||
```
|
||||
|
||||
## Batch PR Reviews
|
||||
|
||||
```
|
||||
# Fetch all PR refs
|
||||
terminal(command="git fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'", workdir="~/project")
|
||||
|
||||
# Review multiple PRs in parallel
|
||||
terminal(command="codex exec 'Review PR #86. git diff origin/main...origin/pr/86'", workdir="~/project", background=true, pty=true)
|
||||
terminal(command="codex exec 'Review PR #87. git diff origin/main...origin/pr/87'", workdir="~/project", background=true, pty=true)
|
||||
|
||||
# Post results
|
||||
terminal(command="gh pr comment 86 --body '<review>'", workdir="~/project")
|
||||
```
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Always use `pty=true`** — Codex is an interactive terminal app and hangs without a PTY
|
||||
2. **Git repo required** — Codex won't run outside a git directory. Use `mktemp -d && git init` for scratch
|
||||
3. **Use `exec` for one-shots** — `codex exec "prompt"` runs and exits cleanly
|
||||
4. **`--full-auto` for building** — auto-approves changes within the sandbox
|
||||
5. **Background for long tasks** — use `background=true` and monitor with `process` tool
|
||||
6. **Don't interfere** — monitor with `poll`/`log`, be patient with long-running tasks
|
||||
7. **Parallel is fine** — run multiple Codex processes at once for batch work
|
||||
189
skills/autonomous-ai-agents/hermes-agent/SKILL.md
Normal file
189
skills/autonomous-ai-agents/hermes-agent/SKILL.md
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
---
|
||||
name: hermes-agent-spawning
|
||||
description: Spawn additional Hermes Agent instances as autonomous subprocesses for independent long-running tasks. Supports non-interactive one-shot mode (-q) and interactive PTY mode for multi-turn collaboration. Different from delegate_task — this runs a full separate hermes process.
|
||||
version: 1.1.0
|
||||
author: Hermes Agent
|
||||
license: MIT
|
||||
metadata:
|
||||
hermes:
|
||||
tags: [Agent, Hermes, Multi-Agent, Orchestration, Subprocess, Interactive]
|
||||
homepage: https://github.com/NousResearch/hermes-agent
|
||||
related_skills: [claude-code, codex]
|
||||
---
|
||||
|
||||
# Spawning Hermes Agent Instances
|
||||
|
||||
Run additional Hermes Agent processes as autonomous subprocesses. Unlike `delegate_task` (which spawns lightweight subagents sharing the same process), this launches fully independent `hermes` CLI processes with their own sessions, tools, and terminal environments.
|
||||
|
||||
## When to Use This vs delegate_task
|
||||
|
||||
| Feature | `delegate_task` | Spawning `hermes` process |
|
||||
|---------|-----------------|--------------------------|
|
||||
| Context isolation | Separate conversation, shared process | Fully independent process |
|
||||
| Tool access | Subset of parent's tools | Full tool access (all toolsets) |
|
||||
| Session persistence | Ephemeral (no DB entry) | Full session logging + DB |
|
||||
| Duration | Minutes (bounded by parent's loop) | Hours/days (runs independently) |
|
||||
| Monitoring | Parent waits for result | Background process, monitor via `process` tool |
|
||||
| Interactive | No | Yes (PTY mode supports back-and-forth) |
|
||||
| Use case | Quick parallel subtasks | Long autonomous missions, interactive collaboration |
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- `hermes` CLI installed and on PATH
|
||||
- API key configured in `~/.hermes/.env`
|
||||
|
||||
### Installation
|
||||
|
||||
Requires an interactive shell (the installer runs a setup wizard):
|
||||
|
||||
```
|
||||
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
|
||||
```
|
||||
|
||||
This installs uv, Python 3.11, clones the repo, sets up the venv, and launches an interactive setup wizard to configure your API provider and model. See the [GitHub repo](https://github.com/NousResearch/hermes-agent) for details.
|
||||
|
||||
## Mode 1: One-Shot Query (-q flag)
|
||||
|
||||
Run a single query non-interactively. The agent executes, does its work, and exits:
|
||||
|
||||
```
|
||||
terminal(command="hermes chat -q 'Research the latest GRPO training papers and write a summary to ~/research/grpo.md'", timeout=300)
|
||||
```
|
||||
|
||||
Background for long tasks:
|
||||
```
|
||||
terminal(command="hermes chat -q 'Set up CI/CD for ~/myapp'", background=true)
|
||||
# Returns session_id, monitor with process tool
|
||||
```
|
||||
|
||||
## Mode 2: Interactive PTY Session
|
||||
|
||||
Launch a full interactive Hermes session with PTY for back-and-forth collaboration. You can send messages, review its work, give feedback, and steer it.
|
||||
|
||||
Note: Hermes uses prompt_toolkit for its CLI UI. Through a PTY, this works because ptyprocess provides a real terminal — input sent via `submit` arrives as keystrokes. The output log will contain ANSI escape sequences from the UI rendering — focus on the text content, not the formatting.
|
||||
|
||||
```
|
||||
# Start interactive hermes in background with PTY
|
||||
terminal(command="hermes", workdir="~/project", background=true, pty=true)
|
||||
# Returns session_id
|
||||
|
||||
# Send it a task
|
||||
process(action="submit", session_id="<id>", data="Set up a Python project with FastAPI, add auth endpoints, and write tests")
|
||||
|
||||
# Wait for it to work, then check progress
|
||||
process(action="log", session_id="<id>")
|
||||
|
||||
# Give feedback on what it produced
|
||||
process(action="submit", session_id="<id>", data="The tests look good but add edge cases for invalid tokens")
|
||||
|
||||
# Check its response
|
||||
process(action="log", session_id="<id>")
|
||||
|
||||
# Ask it to iterate
|
||||
process(action="submit", session_id="<id>", data="Now add rate limiting middleware")
|
||||
|
||||
# When done, exit the session
|
||||
process(action="submit", session_id="<id>", data="/exit")
|
||||
```
|
||||
|
||||
### Interactive Collaboration Patterns
|
||||
|
||||
**Code review loop** — spawn hermes, send code for review, iterate on feedback:
|
||||
```
|
||||
terminal(command="hermes", workdir="~/project", background=true, pty=true)
|
||||
process(action="submit", session_id="<id>", data="Review the changes in src/auth.py and suggest improvements")
|
||||
# ... read its review ...
|
||||
process(action="submit", session_id="<id>", data="Good points. Go ahead and implement suggestions 1 and 3")
|
||||
# ... it makes changes ...
|
||||
process(action="submit", session_id="<id>", data="Run the tests to make sure nothing broke")
|
||||
```
|
||||
|
||||
**Research with steering** — start broad, narrow down based on findings:
|
||||
```
|
||||
terminal(command="hermes", background=true, pty=true)
|
||||
process(action="submit", session_id="<id>", data="Search for the latest papers on KV cache compression techniques")
|
||||
# ... read its findings ...
|
||||
process(action="submit", session_id="<id>", data="The MQA approach looks promising. Dig deeper into that one and compare with GQA")
|
||||
# ... more detailed research ...
|
||||
process(action="submit", session_id="<id>", data="Write up everything you found to ~/research/kv-cache-compression.md")
|
||||
```
|
||||
|
||||
**Multi-agent coordination** — spawn two agents working on related tasks, pass context between them:
|
||||
```
|
||||
# Agent A: backend
|
||||
terminal(command="hermes", workdir="~/project/backend", background=true, pty=true)
|
||||
process(action="submit", session_id="<agent-a>", data="Build a REST API for user management with CRUD endpoints")
|
||||
|
||||
# Agent B: frontend
|
||||
terminal(command="hermes", workdir="~/project/frontend", background=true, pty=true)
|
||||
process(action="submit", session_id="<agent-b>", data="Build a React dashboard that will connect to a REST API at localhost:8000/api/users")
|
||||
|
||||
# Check Agent A's progress, relay API schema to Agent B
|
||||
process(action="log", session_id="<agent-a>")
|
||||
process(action="submit", session_id="<agent-b>", data="Here's the API schema Agent A built: GET /api/users, POST /api/users, etc. Update your fetch calls to match.")
|
||||
```
|
||||
|
||||
## Parallel Non-Interactive Instances
|
||||
|
||||
Spawn multiple independent agents for unrelated tasks:
|
||||
|
||||
```
|
||||
terminal(command="hermes chat -q 'Research competitor landing pages and write a report to ~/research/competitors.md'", background=true)
|
||||
terminal(command="hermes chat -q 'Audit security of ~/myapp and write findings to ~/myapp/SECURITY_AUDIT.md'", background=true)
|
||||
process(action="list")
|
||||
```
|
||||
|
||||
## With Custom Model
|
||||
|
||||
```
|
||||
terminal(command="hermes chat -q 'Summarize this codebase' --model google/gemini-2.5-pro", workdir="~/project", background=true)
|
||||
```
|
||||
|
||||
## Gateway Cron Integration
|
||||
|
||||
For scheduled autonomous tasks, use the `schedule_cronjob` tool instead of spawning processes — cron jobs handle delivery, retry, and persistence automatically.
|
||||
|
||||
## Key Differences Between Modes
|
||||
|
||||
| | `-q` (one-shot) | Interactive (PTY) |
|
||||
|---|---|---|
|
||||
| User interaction | None | Full back-and-forth |
|
||||
| PTY required | No | Yes (`pty=true`) |
|
||||
| Multi-turn | Single query | Unlimited turns |
|
||||
| Best for | Fire-and-forget tasks | Iterative work, reviews, steering |
|
||||
| Exit | Automatic after completion | Send `/exit` or kill |
|
||||
|
||||
## Known Issues
|
||||
|
||||
- **Interactive PTY + prompt_toolkit**: The `submit` action sends `\n` (line feed) but prompt_toolkit in raw mode expects `\r` (carriage return) for Enter. Text appears in the prompt but never submits. **Workaround**: Use **tmux** instead of raw PTY mode. tmux's `send-keys Enter` sends the correct `\r`:
|
||||
|
||||
```
|
||||
# Start hermes inside tmux
|
||||
tmux new-session -d -s hermes-session -x 120 -y 40 "hermes"
|
||||
sleep 10 # Wait for banner/startup
|
||||
|
||||
# Send messages
|
||||
tmux send-keys -t hermes-session "your message here" Enter
|
||||
|
||||
# Read output
|
||||
sleep 15 # Wait for LLM response
|
||||
tmux capture-pane -t hermes-session -p
|
||||
|
||||
# Multi-turn: just send more messages and capture again
|
||||
tmux send-keys -t hermes-session "follow-up message" Enter
|
||||
|
||||
# Exit when done
|
||||
tmux send-keys -t hermes-session "/exit" Enter
|
||||
tmux kill-session -t hermes-session
|
||||
```
|
||||
|
||||
## Rules
|
||||
|
||||
1. **Use `-q` for autonomous tasks** — agent works independently and exits
|
||||
2. **Use `pty=true` for interactive sessions** — required for the full CLI UI
|
||||
3. **Use `submit` not `write`** — `submit` adds a newline (Enter), `write` doesn't
|
||||
4. **Read logs before sending more** — check what the agent produced before giving next instruction
|
||||
5. **Set timeouts for `-q` mode** — complex tasks may take 5-10 minutes
|
||||
6. **Prefer `delegate_task` for quick subtasks** — spawning a full process has more overhead
|
||||
7. **Each instance is independent** — they don't share conversation context with the parent
|
||||
8. **Check results** — after completion, read the output files or logs the agent produced
|
||||
Loading…
Add table
Add a link
Reference in a new issue