chore: initialize account-manager skill repository
This commit is contained in:
11
.github/workflows/release_skill.yaml
vendored
Normal file
11
.github/workflows/release_skill.yaml
vendored
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
name: 技能自动化发布
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags: ["v*"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
uses: admin/jiangchang-platform-kit/.github/workflows/reusable-release-skill.yaml@main
|
||||||
|
with:
|
||||||
|
artifact_platform: windows
|
||||||
|
pyarmor_platform: windows.x86_64
|
||||||
53
SKILL.md
Normal file
53
SKILL.md
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
name: 账号管理
|
||||||
|
description: 多平台多账号管理。管理各平台账号与Chrome Profile的对应关系,供publisher类Skill调用获取账号信息。
|
||||||
|
version: 1.0.4
|
||||||
|
author: 深圳匠厂科技有限公司
|
||||||
|
metadata:
|
||||||
|
openclaw:
|
||||||
|
slug: account-manager
|
||||||
|
emoji: "👤"
|
||||||
|
category: "通用"
|
||||||
|
allowed-tools:
|
||||||
|
- bash
|
||||||
|
---
|
||||||
|
|
||||||
|
# 账号管理
|
||||||
|
|
||||||
|
## 使用时机
|
||||||
|
|
||||||
|
当用户发送以下内容的时候触发本Skill:
|
||||||
|
- 说"初始化账号登录"、"登录搜狐账号"、"帮我登录账号"
|
||||||
|
- 说"列出账号"、"查看所有账号"、"有哪些账号"
|
||||||
|
- 说"添加账号"、"删除账号"、"获取账号信息"
|
||||||
|
|
||||||
|
## 执行步骤
|
||||||
|
|
||||||
|
### 添加账号(平台用中文名;须填合法中国大陆 11 位手机号;同平台下同手机号不可重复;ID 自增,名称如「搜狐1号」)
|
||||||
|
```bash
|
||||||
|
python3 {baseDir}/scripts/main.py add 搜狐号 189xxxxxxxx
|
||||||
|
python3 {baseDir}/scripts/main.py add 知乎 13800138000
|
||||||
|
```
|
||||||
|
支持的平台称呼示例:搜狐号、头条号、知乎、微信公众号、Kimi、DeepSeek、豆包、通义千问、文心一言、腾讯元宝(亦支持英文键如 sohu、toutiao)。
|
||||||
|
|
||||||
|
### 仅打开浏览器核对是否已登录(不写数据库)
|
||||||
|
```bash
|
||||||
|
python3 {baseDir}/scripts/main.py open <id>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 登录并自动检测、写入数据库
|
||||||
|
```bash
|
||||||
|
python3 {baseDir}/scripts/main.py login <id>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 删除账号(同时删库里的记录与 profile 用户数据目录)
|
||||||
|
```bash
|
||||||
|
python3 {baseDir}/scripts/main.py delete id <id>
|
||||||
|
python3 {baseDir}/scripts/main.py delete platform <平台>
|
||||||
|
python3 {baseDir}/scripts/main.py delete platform <平台> <手机号>
|
||||||
|
```
|
||||||
|
|
||||||
|
### 列出某平台所有账号(platform 可为中文名、all 或 全部)
|
||||||
|
```bash
|
||||||
|
python3 {baseDir}/scripts/main.py list all
|
||||||
|
python3 {baseDir}/scripts/main.py list 搜狐号
|
||||||
23
release.ps1
Normal file
23
release.ps1
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
[CmdletBinding()]
|
||||||
|
param(
|
||||||
|
[string]$Prefix = "v",
|
||||||
|
[string]$Message = "正式发布",
|
||||||
|
[switch]$AutoCommit,
|
||||||
|
[switch]$RequireClean,
|
||||||
|
[string]$CommitMessage,
|
||||||
|
[switch]$DryRun
|
||||||
|
)
|
||||||
|
|
||||||
|
Set-StrictMode -Version Latest
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||||
|
$sharedScript = Join-Path $scriptDir "..\jiangchang-platform-kit\tools\release.ps1"
|
||||||
|
$sharedScript = [System.IO.Path]::GetFullPath($sharedScript)
|
||||||
|
|
||||||
|
if (-not (Test-Path $sharedScript)) {
|
||||||
|
throw "Shared release script not found: $sharedScript"
|
||||||
|
}
|
||||||
|
|
||||||
|
& $sharedScript @PSBoundParameters
|
||||||
|
exit $LASTEXITCODE
|
||||||
BIN
scripts/__pycache__/account.cpython-312.pyc
Normal file
BIN
scripts/__pycache__/account.cpython-312.pyc
Normal file
Binary file not shown.
BIN
scripts/__pycache__/main.cpython-312.pyc
Normal file
BIN
scripts/__pycache__/main.cpython-312.pyc
Normal file
Binary file not shown.
1654
scripts/main.py
Normal file
1654
scripts/main.py
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user