用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/different-ai/agent-bank --skill self-improve命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | self-improve |
| description | Update skill documentation and extend OpenCode capabilities based on learnings |
| license | MIT |
| compatibility | opencode |
| metadata | {"audience":"ai-agents","workflow":"meta-learning","trigger":"continuous"} |
I am OpenCode - a powerful AI coding agent built for the terminal by SST. I run as a TUI (Terminal User Interface) and have access to an extensible system of:
.opencode/skill/).opencode/agent/).opencode/plugin/).opencode/tool/)opencode.json)I should use this knowledge to extend my own capabilities when needed.
This repository is designed to be self-bootstrapping. After a fresh git clone, it should guide anyone to a fully working state.
.opencode/ and understand my quirks@bootstrap to set everything up@debug-workspace to diagnoseUpdate documentation immediately when:
Location: .opencode/skill/<name>/SKILL.md
Purpose: Reference docs I read to learn APIs, credentials, workflows
When to use: New service integration, API docs, multi-step workflows
.opencode/skill/
├── chrome-devtools-mcp/ # Browser automation
├── test-staging-branch/ # Vercel preview testing
├── linkedin-post/ # Content creation
├── self-improve/ # This file
└── skill-reinforcement/ # Post-use learning capture
Location: .opencode/agent/<name>.md
Purpose: Focused assistants with custom prompts/models/tools
When to use: Recurring specialized tasks, different model needs
# .opencode/agent/code-reviewer.md
---
description: Review code for best practices and potential issues
mode: subagent
model: anthropic/claude-sonnet-4-20250514
tools:
write: false
edit: false
---
You are a code reviewer. Focus on security, performance, and maintainability.
Existing agents in this project:
safe-infrastructure - Safe wallet operations (uses Claude Opus)setup-workspace - Initialize outreach from Notiondraft-message - Outreach message draftingpull-sales - PULL framework sales analysisnew-vault-implementation - Adding new DeFi vaultsInvoke with: @agent-name in messages, or Tab to switch primary agents
Location: .opencode/plugin/<name>.ts
Purpose: Hook into my events, modify behavior, add tools
When to use: Notifications, protections, custom integrations
// .opencode/plugin/notification.ts
import type { Plugin } from '@opencode-ai/plugin';
export const NotificationPlugin: Plugin = async () => {
return {
event: async ({ event }) => {
if (event.type === 'session.idle') {
await Bun.$`osascript -e 'display notification "Task completed!" with title "OpenCode"'`;
}
},
};
};
Available events:
session.idle, session.created, session.errortool.execute.before, tool.execute.afterfile.edited, message.updatedpermission.repliedLocation: .opencode/tool/<name>.ts
Purpose: New capabilities beyond built-in tools
When to use: External APIs, complex operations, reusable functions
// .opencode/tool/database.ts
import { tool } from '@opencode-ai/plugin';
export default tool({
description: 'Query the project database',
args: {
query: tool.schema.string().describe('SQL query to execute'),
},
async execute(args) {
// Implementation here
return `Executed: ${args.query}`;
},
});
Existing plugin in this project:
browser_control.ts - Local Chrome automation via native messaging bridgeLocation: opencode.json
Purpose: Connect to external tool servers
When to use: Pre-built integrations, complex external services
Current MCP servers configured:
{
"mcp": {
"exa": { "type": "remote", "url": "..." },
"notion": {
"type": "local",
"command": ["npx", "-y", "mcp-remote", "..."]
},
"chrome": {
"type": "local",
"command": ["...", "chrome-devtools-mcp@latest"]
},
"zero-finance": { "type": "remote",
Need to extend my capabilities?
│
├─ Just need to remember docs/commands/workflows?
│ └─ Create a SKILL
│ Examples: API reference, deployment steps, CLI commands
│
├─ Need different AI persona, model, or restricted tools?
│ └─ Create an AGENT
│ Examples: code reviewer, sales drafter, domain expert
│
├─ Need to react to events or modify behavior?
│ └─ Create a PLUGIN
│ Examples: notifications, logging, safety guards
│
├─ Need a new callable function for APIs/scripts?
│ └─ Create a TOOL
│ Examples: database queries, Python scripts, local services
│
└─ Need pre-built complex integration?
└─ Add an MCP SERVER
Examples: GitHub, browser automation, Notion
Every skill should have these sections (add if missing):
---
name: skill-name
description: One-line description
---
## Quick Usage (Already Configured)
# Most common commands - copy/paste ready
## What I Do
[Core purpose]
## Prerequisites
[Requirements]
## Workflow
[Main steps]
## Common Gotchas
# Things that don't work as expected
## Token Saving Tips
[Efficiency patterns]
## Anti-Patterns to Avoid
[What NOT to do]
## Real Examples
[Actual usage examples from this codebase]
## First-Time Setup
# Only needed once, keep at bottom
packages/web/src/mkdir -p .opencode/skill/<skill-name>
Template:
---
name: skill-name
description: One-line description
---
## Quick Usage (Already Configured)
### Action 1
\`\`\`bash
command here
\`\`\`
## Common Gotchas
- Thing that doesn't work as expected
## First-Time Setup (If Not Configured)
### What you need from the user
1. ...
touch .opencode/agent/<agent-name>.md
Template:
---
description: What this agent does
mode: subagent # or "primary"
model: anthropic/claude-sonnet-4-20250514
temperature: 0.3
tools:
write: false
edit: false
bash: false
---
You are a [role]. Focus on:
- Task 1
- Task 2
touch .opencode/tool/<tool-name>.ts
Template:
import { tool } from '@opencode-ai/plugin';
export default tool({
description: 'What this tool does',
args: {
param: tool.schema.string().describe('Parameter description'),
},
async execute(args, context) {
// Implementation
return 'result';
},
});
Edit opencode.json:
{
"mcp": {
"new-server": {
"type": "local",
"command": ["npx", "-y", "@scope/mcp-server-name"]
}
}
}
Context: curl command in skill used wrong flag
Before: curl -d "urls=..."
After: curl -F "urls=..." (multipart/form-data required)
Action: Updated skill with correct flag
Context: Assumed jq was available, command failed
Action: Added to Common Gotchas:
## Common Gotchas
- `jq` is NOT installed - use grep/cut for JSON parsing
Context: Kept doing Safe wallet debugging manually
Action: Created .opencode/agent/safe-infrastructure.md with:
Context: Repeatedly calling browser bridge API
Action: Created .opencode/plugin/browser_control.ts with:
Context: Discovered Safe address must come from DB, not prediction
Action: Added to safe-infrastructure.md:
**CRITICAL RULE: ALWAYS query Safe addresses from the database. NEVER predict or derive addresses.**
Layer 1: Privy Embedded Wallet (EOA) - Signs transactions
Layer 2: Privy Smart Wallet (Safe) - Gas sponsorship via 4337
Layer 3: Primary Safe - User's bank account (WHERE FUNDS ARE)
| Purpose | File |
|---|---|
| Transaction relay | packages/web/src/hooks/use-safe-relay.ts |
| Safe management | packages/web/src/server/earn/multi-chain-safe-manager.ts |
| Chain constants | packages/web/src/lib/constants/chains.ts |
| Design language | packages/web/DESIGN-LANGUAGE.md |
| OpenCode config | opencode.json |
| Source | Tool | When to Use |
|---|---|---|
| Notion | notion_* MCP | Product copy, messaging, specs |
| Exa | exa_* MCP | Technical docs, code examples |
| Chrome DevTools | chrome_* MCP | Browser automation, testing |
| Basescan | exa_crawling_exa | On-chain transaction analysis |
This repo is designed to be fully operational from a fresh git clone:
git clone → @bootstrap → working system
Location: .opencode/agent/bootstrap.md
What it does:
pnpm install.opencode/config/workspace.json.env.local from templateNot everything needs to work for the repo to be useful:
| Component | If Missing | Fallback |
|---|---|---|
| Exa MCP | Web research unavailable | Manual research |
| Notion | CRM/docs unavailable | Local-only development |
| Chrome | Browser automation unavailable | Manual browser testing |
| Database | Can't run full app | Can still do frontend work |
| Privy | Can't test auth | Mock auth in dev mode |
The system should always tell the user what's degraded and how to fix it.
If everything breaks, delete derived files and re-bootstrap:
rm -rf node_modules
rm -rf .opencode/config/workspace.json
rm packages/web/.env.local
# Then run @bootstrap
The only things that can't be reconstructed:
| Skill | Role |
|---|---|
self-improve | HOW to update (templates, structures) |
skill-reinforcement | WHEN to update (post-use triggers) |
@bootstrap | SETUP from scratch (fresh clone) |
@debug-workspace | FIX broken state (diagnose & repair) |
@setup-workspace | CONFIGURE from Notion (load MCP Skills) |
After using any skill, the skill-reinforcement skill should trigger to:
[ ] Something unexpected happened
[ ] Identified the root cause
[ ] Determined which extension type to use:
[ ] Skill - just docs/commands
[ ] Agent - specialized AI persona
[ ] Plugin - event hooks
[ ] Tool - new function
[ ] MCP - external integration
[ ] Created/updated the extension
[ ] Tested the change works
[ ] Validated formatting matches existing style
[ ] Done
This skill should also improve itself. Track:
Context: Created company-admin skill that pulls data from Notion
Pattern: For skills that rely on external data (Notion, databases, etc.), create TWO layers:
.opencode/skill/*/SKILL.md) - OpenCode-specific instructionsWhy both?
Example structure:
Notion MCP Skills page:
## Company Admin
- Trigger keywords
- Key resources table
- Company details table
- How it works
Local .opencode/skill/company-admin/SKILL.md:
- Page IDs for direct fetch
- Code examples
- Security rules
- Anti-patterns
Gotcha: The skill tool's available skills list may be cached. New skills might not appear immediately in the list but will work when loaded by name.