Logo
Section 1 / 3

格式化器与代理技能

学习如何通过自动格式化工具维护代码质量,并通过代理技能教授 OpenCode 专用的工作流程。

导入

格式化器与代理技能

学习如何通过自动格式化工具维护代码质量,并通过代理技能教授 OpenCode 专用的工作流程。

...

No configuration found for ID: cc2b073b4b14cb4f5053fb50caa9dd9dcd1eac3ada08b4a58717debdcd06ea6d

代码示例

1{ 2 "$schema": "https://opencode.ai/config.json", 3 "formatter": false 4}

代码示例

1{ 2 "$schema": "https://opencode.ai/config.json", 3 "formatter": { 4 "prettier": { 5 "disabled": true 6 } 7 } 8}

代码示例

1{ 2 "$schema": "https://opencode.ai/config.json", 3 "formatter": { 4 "prettier": { 5 "command": ["npx", "prettier", "--write", "$FILE"], 6 "environment": { 7 "NODE_ENV": "development" 8 }, 9 "extensions": [".js", ".ts", ".jsx", ".tsx"] 10 }, 11 "custom-markdown-formatter": { 12 "command": ["deno", "fmt", "$FILE"], 13 "extensions": [".md"] 14 } 15 } 16}

代码示例

1--- 2name: api-docs 3description: Generate comprehensive API documentation for REST endpoints 4license: MIT 5compatibility: opencode 6metadata: 7 audience: backend-developers 8 framework: express 9--- 10 11## What I do 12 13I help generate complete API documentation for REST endpoints including: 14- Request/response examples with realistic data 15- Parameter descriptions with types and constraints 16- Error responses with status codes 17- Authentication requirements 18 19## When to use me 20 21Use this skill when documenting new API endpoints or updating existing documentation. 22I follow OpenAPI 3.0 conventions and include code examples in multiple languages. 23 24## Format conventions 25 26- Always include example curl commands 27- Show both success and error responses 28- Document rate limits if applicable 29- Include authentication headers in examples

代码示例

1<available_skills> 2 <skill> 3 <name>api-docs</name> 4 <description>Generate comprehensive API documentation for REST endpoints</description> 5 </skill> 6 <skill> 7 <name>test-coverage</name> 8 <description>Analyze test coverage and suggest missing test cases</description> 9 </skill> 10</available_skills>

代码示例

1skill({ name: "api-docs" })

代码示例

1{ 2 "permission": { 3 "skill": { 4 "*": "allow", 5 "test-coverage": "allow", 6 "internal-*": "deny", 7 "experimental-*": "ask" 8 } 9 } 10}

代码示例

1--- 2name: my-agent 3permission: 4 skill: 5 "documents-*": "allow" 6---

代码示例

1{ 2 "agent": { 3 "plan": { 4 "permission": { 5 "skill": { 6 "internal-*": "allow" 7 } 8 } 9 } 10 } 11}

代码示例

1{ 2 "agent": { 3 "plan": { 4 "tools": { 5 "skill": false 6 } 7 } 8 } 9}

No configuration found for ID: 5a72dedd3fb7b5465f40ee7742ec49403c91a059affec8738fc5f134b313197e

自定义与架构

外部工具集成与 MCP