Add 39 shared skills from local agent inventory

Sources: ~/.openclaw/skills, ~/.agents/skills, workshop-skills, workspace/skills
This commit is contained in:
2026-09-10 16:54:57 +08:00
parent f3388c50e2
commit 3d3dd79df0
110 changed files with 18722 additions and 0 deletions
@@ -0,0 +1,49 @@
#!/usr/bin/env python3
"""删除知识库节点(移到回收站)"""
import json, sys, os, argparse
import subprocess
SPACE_ID = os.environ.get('FEISHU_SPACE_ID', '7664817589230570761')
def get_token():
r = subprocess.run(['python3', os.path.join(os.path.dirname(__file__), 'init_token.py')],
capture_output=True, text=True)
return json.loads(r.stdout)['token']
def delete_node(node_token):
import requests
token = get_token()
h = {'Authorization': 'Bearer ' + token, 'Content-Type': 'application/json'}
# Get obj_token
r = requests.get(
'https://open.feishu.cn/open-apis/wiki/v2/spaces/get_node',
params={'token': node_token}, headers=h
)
nd = r.json()
if nd.get('code') != 0:
raise Exception(f"Get node failed: {nd.get('msg')}")
obj_token = nd['data']['node']['obj_token']
obj_type = nd['data']['node'].get('obj_type', 'docx')
# Delete via drive API(type 参数需与节点实际类型一致:docx/bitable/sheet 等)
r = requests.delete(
f'https://open.feishu.cn/open-apis/drive/v1/files/{obj_token}?type={obj_type}',
headers=h
)
data = r.json()
if data.get('code') != 0:
raise Exception(f"Delete failed: {data.get('msg')}")
return True
if __name__ == '__main__':
p = argparse.ArgumentParser()
p.add_argument('--node', required=True, help='Node token to delete')
args = p.parse_args()
try:
delete_node(args.node)
print('Deleted')
except Exception as e:
print(f'Error: {e}', file=sys.stderr)
sys.exit(1)