Initial claude skill with skills access
This commit is contained in:
106
SKILL.md
Normal file
106
SKILL.md
Normal file
@@ -0,0 +1,106 @@
|
||||
---
|
||||
name: claude
|
||||
description: Claude Code CLI with skills access for self-modification
|
||||
metadata:
|
||||
version: "1.0.0"
|
||||
vibestack:
|
||||
main: false
|
||||
---
|
||||
|
||||
# Claude Skill
|
||||
|
||||
[Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) with full access to the skills directory for autonomous agent capabilities.
|
||||
|
||||
## Features
|
||||
|
||||
- Claude Code CLI installation
|
||||
- HTTP API for chat and execution
|
||||
- Access to `/skills` directory for self-modification
|
||||
- System prompt with skills context
|
||||
- Streaming responses via SSE
|
||||
- Auto-registers with Caddy if present
|
||||
|
||||
## Configuration
|
||||
|
||||
| Variable | Description | Default |
|
||||
|----------|-------------|---------|
|
||||
| `CLAUDE_PORT` | HTTP API port | `8888` |
|
||||
| `CLAUDE_DOMAIN` | Domain for Caddy auto-config | (none) |
|
||||
| `ANTHROPIC_API_KEY` | Anthropic API key | (required) |
|
||||
| `CLAUDE_CODE_OAUTH_TOKEN` | OAuth token (alternative to API key) | (optional) |
|
||||
| `CLAUDE_MODEL` | Model to use | `claude-sonnet-4-20250514` |
|
||||
| `CLAUDE_MAX_TURNS` | Max conversation turns | `10` |
|
||||
| `SKILLS_DIR` | Skills directory | `/skills` |
|
||||
|
||||
## HTTP API
|
||||
|
||||
### Chat (Streaming)
|
||||
|
||||
```bash
|
||||
curl -N http://localhost:8888/chat \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"message": "List all skills and their purpose"}'
|
||||
```
|
||||
|
||||
### Execute (One-shot)
|
||||
|
||||
```bash
|
||||
curl http://localhost:8888/execute \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"prompt": "Create a new skill called hello-world that responds with Hello World"}'
|
||||
```
|
||||
|
||||
### Health Check
|
||||
|
||||
```bash
|
||||
curl http://localhost:8888/health
|
||||
```
|
||||
|
||||
## Capabilities
|
||||
|
||||
Claude has access to:
|
||||
|
||||
1. **Skills Directory** (`/skills/`)
|
||||
- Read all skill configurations
|
||||
- Modify existing skills
|
||||
- Create new skills
|
||||
- Push changes to Git
|
||||
|
||||
2. **System Tools**
|
||||
- Bash commands
|
||||
- File operations
|
||||
- Git operations
|
||||
- Network requests
|
||||
|
||||
3. **Other Skills**
|
||||
- Query DuckDB
|
||||
- Read logs from Loki
|
||||
- Check metrics
|
||||
|
||||
## System Prompt
|
||||
|
||||
Claude receives context about:
|
||||
- Available skills and their structure
|
||||
- How to create/modify skills
|
||||
- Git workflow for pushing changes
|
||||
- API endpoints for other skills
|
||||
|
||||
## Security
|
||||
|
||||
- Claude runs with full system access
|
||||
- Ensure proper authentication on the API endpoint
|
||||
- Use `CLAUDE_DOMAIN` with Caddy for HTTPS
|
||||
- Consider running behind authelia for protected access
|
||||
|
||||
## Self-Modification Example
|
||||
|
||||
```bash
|
||||
curl http://localhost:8888/execute \
|
||||
-d '{"prompt": "Add a /hello endpoint to the caddy skill that returns a greeting"}'
|
||||
```
|
||||
|
||||
Claude will:
|
||||
1. Read the caddy skill files
|
||||
2. Modify the necessary scripts
|
||||
3. Commit and push changes
|
||||
4. Report what was done
|
||||
Reference in New Issue
Block a user