mirror of
https://github.com/awesome-opencode/awesome-opencode.git
synced 2026-04-29 12:59:28 +00:00
feat(schema): refine and expand extension metadata schema
- Introduce `scope`, `tags`, `min_version`, `homepage`, and `installation` fields for enhanced discoverability and guidance. - Remove `install` and `compatibility` objects, replacing them with a simplified `installation` string field. - Add `examples/` directory with full exemplar files for each extension type. - Update `schema-design.md` to reflect new schema, clarify field definitions, and improve documentation structure.
This commit is contained in:
parent
8f1acd2c7c
commit
a806755d0f
9 changed files with 697 additions and 559 deletions
89
examples/agent.yaml
Normal file
89
examples/agent.yaml
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
# Example Agent Entry
|
||||
# Agents are custom AI configurations and skills for specialized tasks.
|
||||
# This category includes both agent configs and reusable skills.
|
||||
# Place actual entries in: data/agents/your-agent-name.yaml
|
||||
|
||||
# ============================================================================
|
||||
# REQUIRED FIELDS
|
||||
# ============================================================================
|
||||
|
||||
name: Example Security Reviewer
|
||||
repo: https://github.com/example/opencode-security-agent
|
||||
tagline: AI agent specialized in security code review
|
||||
description: |
|
||||
A custom agent configuration for security-focused code review.
|
||||
Includes:
|
||||
- Custom system prompts for security analysis
|
||||
- Predefined tools for vulnerability scanning
|
||||
- Skills for OWASP Top 10 detection
|
||||
|
||||
# ============================================================================
|
||||
# OPTIONAL FIELDS
|
||||
# ============================================================================
|
||||
|
||||
# Scope defines where the extension can be installed (defaults to [global])
|
||||
# Agents can be installed globally or per-project
|
||||
scope:
|
||||
- global # ~/.config/opencode/agent/
|
||||
- project # .opencode/agent/
|
||||
|
||||
tags:
|
||||
- security
|
||||
- code-review
|
||||
- agent
|
||||
- skill
|
||||
|
||||
min_version: "1.0.0"
|
||||
|
||||
homepage: https://example.com/docs/security-agent
|
||||
|
||||
installation: |
|
||||
## Prerequisites
|
||||
- OpenCode 1.0.0 or later
|
||||
|
||||
## Installation
|
||||
|
||||
### Global (all projects)
|
||||
```bash
|
||||
# Copy agent configuration
|
||||
mkdir -p ~/.config/opencode/agent/security-reviewer
|
||||
curl -o ~/.config/opencode/agent/security-reviewer/agent.json \
|
||||
https://raw.githubusercontent.com/example/opencode-security-agent/main/agent.json
|
||||
```
|
||||
|
||||
### Project-only
|
||||
```bash
|
||||
# Copy to project agent directory
|
||||
mkdir -p .opencode/agent/security-reviewer
|
||||
curl -o .opencode/agent/security-reviewer/agent.json \
|
||||
https://raw.githubusercontent.com/example/opencode-security-agent/main/agent.json
|
||||
```
|
||||
|
||||
## Installing Skills
|
||||
If this agent includes skills:
|
||||
```bash
|
||||
# Global skill
|
||||
mkdir -p ~/.config/opencode/skill/security-review
|
||||
curl -o ~/.config/opencode/skill/security-review/SKILL.md \
|
||||
https://raw.githubusercontent.com/example/opencode-security-agent/main/SKILL.md
|
||||
```
|
||||
|
||||
## Configuration
|
||||
Add to your `opencode.json`:
|
||||
```json
|
||||
{
|
||||
"agents": {
|
||||
"security-reviewer": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Files Modified
|
||||
- `~/.config/opencode/agent/security-reviewer/agent.json`
|
||||
- `~/.config/opencode/skill/security-review/SKILL.md` (if using skills)
|
||||
|
||||
## Removal
|
||||
1. Delete the agent directory
|
||||
2. Remove config entry from `opencode.json`
|
||||
Loading…
Add table
Add a link
Reference in a new issue