← Back to Skills Marketplace
142
Downloads
0
Stars
0
Active Installs
3
Versions
Install in OpenClaw
/install daming-core
Description
自动接收微信指令,校验意图并审核政令,调度执行文生图视频任务,管理预算和链路,保障流程安全稳定运行。
README (SKILL.md)
大明朝廷-三省六部中枢(完整档案系统)
概述
基于完整三省六部架构的Skill市场后台预警系统,实现完整的朝廷运作记录、监控预警和反查审计能力。系统巧妙融合古代中国官僚体系与现代软件架构,提供完整的任务管理、资源调度和监控审计功能。
核心功能
🏛️ 三省六部架构
- 中书省:接收"圣旨"(任务指令),创建任务档案
- 门下省:审核任务草案,确保合规性,行使封驳权
- 尚书省:协调六部工作,管理执行流程
- 六部:户部(资源)、工部(调度)、兵部(安全)、刑部(审计)、吏部(人事)、礼部(规范)
📊 完整档案系统
- 任务档案持久化存储
- Token预算管理和账本记录
- 执行统计和性能监控
- 审核日志和操作记录
🔍 监控预警
- 锦衣卫(JinYiWei)实时监控
- 异常行为检测
- 资源使用预警
- 系统健康检查
📈 反查审计
- 完整操作链追溯
- 数据完整性验证
- 合规性审计报告
- 历史记录查询
安装与配置
环境要求
- Python 3.8+
- 文件系统访问权限
- 基本的目录结构
快速开始
- 将技能目录复制到OpenClaw的skills目录
- 确保依赖项已安装
- 运行系统测试验证功能
依赖项
# 查看 requirements.txt
使用方法
基本工作流程
# 1. 中书省创建任务
from skill1.zhongshu.main import create_task_archive
task_id, task_dir = create_task_archive(
emperor_order="生成山水画",
token_budget=500
)
# 2. 户部创建Token账本
from skill1.bu.hu.main import create_token_ledger
ledger = create_token_ledger(task_id, initial_budget=500)
# 3. 门下省审核任务
from skill1.menxia.main import audit_task_draft
audit_result = audit_task_draft(task_id, "审核通过")
# 4. 工部调度执行
from skill1.bu.gong.scheduler import GongBuScheduler
scheduler = GongBuScheduler()
dispatch_result = scheduler.dispatch_with_budget_check(
task_id,
{"action": "generate_image", "estimated_tokens": 100}
)
# 5. 民夫团队执行
from skill2.main import MinFuTeam
team = MinFuTeam(task_id, dispatch_result['execution_id'])
result = team.execute_comfyui({
"action": "generate_image",
"params": {"prompt": "山水画"},
"estimated_tokens": 80
})
命令行界面
# 创建任务
python3 main.py create --order "任务描述" --budget 500
# 审核任务
python3 main.py audit --task-id T20260325-xxxx --notes "审核意见"
# 调度执行
python3 main.py dispatch --task-id T20260325-xxxx --action generate_image --tokens 100
# 查看任务列表
python3 main.py list
# 检查系统状态
python3 main.py status
配置选项
skill.json 配置
{
"skill_name": "skill1_daming_court",
"display_name": "大明朝廷-三省六部中枢(完整档案系统)",
"description": "基于完整三省六部架构的Skill市场后台预警系统",
"version": "2.0.0",
"entry_function": "main.execute",
"support_type": ["text"],
"tags": ["daming", "court", "monitoring", "audit", "archive", "chinese-history"],
"author": "Daming",
"license": "MIT"
}
系统配置
skill1/config.py- 系统全局配置ACTIVE_TASKS_DIR- 活动任务目录- 各部门独立配置模块
数据模型
任务档案 (task_draft.json)
{
"task_id": "T20260325-xxxx",
"emperor_order": "任务描述",
"created_at": "2026-03-25T00:00:00",
"token_budget": 500,
"status": "draft"
}
Token账本 (token_ledger.json)
{
"task_id": "T20260325-xxxx",
"initial_budget": 500,
"current_balance": 420,
"transactions": [...]
}
执行统计 (execution_stats.json)
{
"task_id": "T20260325-xxxx",
"total_executions": 3,
"successful_executions": 3,
"failed_executions": 0,
"total_tokens_used": 80,
"average_tokens_per_execution": 26.67
}
错误处理
系统包含多层错误处理机制:
- 输入验证:参数类型和范围检查
- 预算检查:Token余额验证
- 文件系统:目录和文件权限检查
- 模块依赖:导入错误处理
- 执行异常:任务执行失败恢复
扩展开发
添加新部门
- 在
skill1/下创建新目录 - 实现
main.py入口文件 - 定义部门功能和接口
- 更新系统架构文档
自定义执行器
- 扩展
MinFuTeam类 - 实现新的执行方法
- 更新工部调度逻辑
- 添加相应的测试
测试与验证
运行测试
# 完整流程测试
python3 test_full_flow.py
# 系统健康检查
python3 system_status.py
测试覆盖率
- 正常流程测试
- 异常情况测试
- 边界条件测试
- 性能压力测试
性能特点
- 模块化设计:各部门独立,松耦合
- 数据持久化:所有操作记录到文件系统
- 预算控制:严格的资源管理
- 监控预警:实时异常检测
- 审计追溯:完整操作链记录
安全考虑
- 数据隔离:每个任务独立目录
- 权限控制:文件系统权限管理
- 输入验证:所有输入参数验证
- 错误隔离:异常不会影响其他任务
- 审计日志:所有操作可追溯
许可证
MIT License - 详见 LICENSE 文件
贡献指南
- Fork 项目
- 创建功能分支
- 提交更改
- 运行测试
- 创建 Pull Request
支持与反馈
- 问题报告:GitHub Issues
- 功能请求:GitHub Discussions
- 文档改进:提交 Pull Request
大明永昌! 🏛️
系统设计灵感来源于明代官僚体系,巧妙融合传统智慧与现代技术。
Usage Guidance
Summary of practical checks before installing:
1) Verify claimed integrations: confirm where WeChat commands are received and what credentials (webhook URL, API key) are required. The skill's metadata declares none — ask the author or inspect code for a WeChat connector before enabling it.
2) Inspect comfyui_client and scheduler code (skill1/bu/gong/) for network calls and callback behavior. Ensure COMFYUI base_url is set to a trusted local host/IP and enable SSL/verify SSL if available.
3) Treat examples that POST reports to external-monitor.com as illustrative only; check whether any code will automatically register or call external endpoints. If you do not trust remote endpoints, remove or disable callback registration code.
4) Provide required environment variables explicitly and run the skill in an isolated test environment (container or VM) first. Set PROJECT_ROOT to a dedicated directory and examine logs and active_tasks before granting wider permissions.
5) Review logging/retention and ensure logs do not leak sensitive data. The package writes persistent archives and logs; configure strict filesystem permissions and log rotation.
6) Audit dependencies (requirements.txt) before pip install; run unit/integration tests in an offline environment if possible.
If you need help locating the WeChat handling code or confirming whether the package will call any external endpoint automatically, provide the specific files (e.g., skill1/… files) you want inspected and I can highlight the exact call sites and data flows.
Capability Analysis
Type: OpenClaw Skill
Name: daming-core
Version: 1.0.2
The bundle is a sophisticated task management and workflow system themed after the Ming Dynasty bureaucracy (Three Provinces and Six Ministries). It manages task lifecycles, token budgets, and integrates with external ComfyUI servers for media generation. While it utilizes high-risk capabilities such as network communication (via requests and curl in skill2/main.py) and background service execution (scheduler_service.py), these behaviors are consistent with its stated purpose of scheduling and executing high-compute tasks. The system includes robust internal monitoring (JinYiWei) and auditing (Xingbu) modules, and the provided CLEANUP_REPORT.md demonstrates a conscious effort by the author to remove sensitive local environment data before distribution. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found.
Capability Assessment
Purpose & Capability
The description promises automatic reception of WeChat commands and end-to-end orchestration, but the package metadata lists no required env vars or credentials (no WeChat API token, webhook URL, or similar). The codebase and workflow files clearly implement heavy image/video execution (ComfyUI workflows, comfyui_client, MinFuTeam), which aligns with the 'generate images/video' capability. However the advertised '接收微信指令' capability is not justified by declared requirements — either the WeChat connector is missing/unexposed or required credentials are not declared in skill metadata.
Instruction Scope
SKILL.md and guides instruct the agent to read/write task archives, manage token ledgers on the filesystem, and call external services (ComfyUI servers). The JINYIWEI guide includes an example callback that POSTS patrol reports to an external URL (https://external-monitor.com/api/reports). That means the runtime may transmit structured operational/audit data externally if callbacks are configured. The docs also instruct copying the whole skill tree into OpenClaw's skills directory and running local CLI scripts (access to filesystem). These behaviors are plausible for the stated purpose, but the instructions give broad discretion to contact external endpoints and write persistent logs — and the skill metadata did not transparently declare those outgoing endpoints or required credentials.
Install Mechanism
There is no external download/install spec in the registry entry — this is an instruction-and-code bundle. All code is included in the package (no remote extract/download). That lowers supply-chain risk compared to fetching code at install time. Still review included Python dependencies (requirements files) before pip installing.
Credentials
The skill metadata declares no required env vars or primary credential, but the docs and cleanup report clearly require configuration: PROJECT_ROOT, COMFYUI_SERVER_IP, COMFYUI_SERVER_PORT, VENV_PATH and optional JINYIWEI_PATROL_INTERVAL. The mismatch (declared none vs. runtime needs) is an incoherence. Several config files set verify_ssl: false for ComfyUI and contain placeholders for base URLs — if misconfigured the skill could communicate insecurely or to remote servers. No explicit secrets are required by metadata, but runtime behavior will depend on network addresses and possibly API keys if authentication is enabled later.
Persistence & Privilege
always:false (normal). The skill will persist files to disk (task archives, ledgers, logs) per its design; that is expected for a workflow/audit tool. The default ability for the agent to invoke the skill autonomously (disable-model-invocation:false) is normal for skills, but combined with the ability to call external endpoints and write persistent logs it increases the potential blast radius if misconfigured — a configuration that registers external callbacks or points COMFYUI at an internet-accessible endpoint would widen impact.
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install daming-core - After installation, invoke the skill by name or use
/daming-core - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.2
daming-core 1.0.2
- Added documentation: HYBRID_ARCHITECTURE.md, JINYIWEI_GUIDE.md, and various workflow/configuration guides.
- Introduced extensive config and backup files for external agents and workflows.
- Added new scheduler and image generation workflow files to support advanced features.
- Introduced scheduler service with logging support (logs/scheduler_service.log).
- Removed validate_architecture.py (no longer needed).
- No breaking changes to user-facing APIs or workflow.
v1.0.1
**Version 1.0.1 changelog:**
- Introduced a comprehensive file-based archive and monitoring system, reflecting a complete "三省六部" (Three Ministries & Six Departments) structure.
- Added multiple configuration and code files; major modules are now organized by department with clear separation of responsibilities.
- Switched from ad-hoc task directories to a persistent archive approach, with new audit, monitoring, and ledger configuration files.
- Removed legacy active_tasks and main entrypoint files to align with new modular architecture.
- Greatly expanded system documentation (SKILL.md) for setup, usage, and extensibility.
v1.0.0
Initial release of daming-core skill.
- Supports receiving and processing natural language commands from WeChat.
- Implements a full "Three Departments and Six Ministries" workflow for task handling.
- Automates task delegation to skill2 for text-to-image and text-to-video generation.
- Includes built-in intent validation, policy review, token management, workflow monitoring, audit, and alerting features.
- Designed for OpenClaw LLM integration via main.execute entry point.
Metadata
Frequently Asked Questions
What is 我的大明朝廷?
自动接收微信指令,校验意图并审核政令,调度执行文生图视频任务,管理预算和链路,保障流程安全稳定运行。 It is an AI Agent Skill for Claude Code / OpenClaw, with 142 downloads so far.
How do I install 我的大明朝廷?
Run "/install daming-core" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 我的大明朝廷 free?
Yes, 我的大明朝廷 is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 我的大明朝廷 support?
我的大明朝廷 is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 我的大明朝廷?
It is built and maintained by fenzyh (@fenzyh); the current version is v1.0.2.
More Skills