Lecture 28: Skill Deployment and Publishing

Master the Skill deployment and publishing process to officially launch your Skill for users.

一、Pre-Deployment Preparation

1.1 Publishing Checklist

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
□ Functionality Completeness
□ Core features implemented
□ Exception handling complete
□ Edge cases covered

□ Code Quality
□ Code review passed
□ Test coverage met
□ No security vulnerabilities

□ Documentation Complete
□ User guide
□ API documentation
□ Changelog

□ Configuration Ready
□ Production environment config
□ Keys and credentials
□ Monitoring alerts configured

1.2 Environment Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# config.py
import os

class Config:
"""Base Configuration"""
DEBUG = False
LOG_LEVEL = 'INFO'

class DevelopmentConfig(Config):
"""Development Environment"""
DEBUG = True
LOG_LEVEL = 'DEBUG'
DATABASE_URL = 'sqlite:///dev.db'

class ProductionConfig(Config):
"""Production Environment"""
LOG_LEVEL = 'WARNING'
DATABASE_URL = os.getenv('DATABASE_URL')
API_KEY = os.getenv('API_KEY')

config = {
'development': DevelopmentConfig,
'production': ProductionConfig,
'default': DevelopmentConfig
}

二、Platform Deployment Process

2.1 Coze Deployment

Steps:

  1. Create Bot

    • Log in to Coze platform
    • Click "Create Bot"
    • Fill in name and description
  2. Configure Prompt

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    # Role
    You are a financial intelligent assistant, specializing in helping finance staff process invoices and reports.

    # Skills
    - Invoice recognition and entry
    - Financial report generation
    - Data statistical analysis

    # Constraints
    - Only process finance-related data
    - Protect user data privacy
  3. Add Plugins

    • Search and add required plugins
    • Configure plugin parameters
  4. Test and Verify

    • Verify functionality in test window
    • Check if responses meet expectations
  5. Publish

    • Click "Publish"
    • Select publishing channels (Discord, Telegram, etc.)

2.2 OpenClaw Deployment

Steps:

  1. Prepare Code

    1
    2
    3
    4
    5
    # Project structure
    my_skill/
    ├── skill.py # Skill main file
    ├── requirements.txt # Dependencies
    └── README.md # Documentation
  2. Write Skill

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    # skill.py
    from openclaw import Skill, Tool

    class MySkill(Skill):
    name = "Financial Intelligent Assistant"
    description = "Automated financial processing"

    @Tool
    def recognize_invoice(self, image: str) -> str:
    """Recognize invoice"""
    # Implementation logic
    return "Recognition result"
  3. Configure Dependencies

    1
    2
    3
    4
    # requirements.txt
    openpyxl>=3.0.0
    pandas>=1.3.0
    paddleocr>=2.6.0
  4. Submit and Deploy

    1
    2
    # Using OpenClaw CLI
    openclaw deploy .

2.3 Feishu CLI Deployment

Steps:

  1. Create App

    • Log in to Feishu Open Platform
    • Create enterprise self-built app
    • Get App ID and App Secret
  2. Configure Permissions

    • Apply for required permissions
    • Configure event subscriptions
  3. Develop Skill

    1
    2
    3
    4
    5
    6
    7
    from lark_cli import Skill, Message

    class FeishuSkill(Skill):
    def on_message(self, message: Message):
    # Process message
    reply = self.process(message.text)
    self.send_message(message.chat_id, reply)
  4. Deploy

    • Configure server address
    • Publish app version
    • Submit for review

三、Version Management

3.1 Version Number Specification

Using Semantic Versioning:

1
2
3
4
5
6
Version format: Major.Minor.Patch
Example: 1.2.3

Major version: Major updates, breaking API changes
Minor version: New features, backward compatible
Patch version: Bug fixes, backward compatible

3.2 Version Release Process

1. Development complete → 2. Tests pass → 3. Update version number
      ↓
4. Update CHANGELOG → 5. Create tag → 6. Deploy
      ↓


## 🎓 AI 编程实战课程

想系统学习 AI 编程?程序员晚枫的 **AI 编程实战课** 帮你从零上手!

- 👉 **课程报名**:[点击这里报名,前3讲免费试听](https://r7up9.xetslk.com/s/1uP5YW)
- 👉 **免费试看**:[B站免费试看前3讲,先看看适不适合自己](https://www.bilibili.com/cheese/play/ss982042944)