用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/arm2arm/AstroAgentAssistant --skill s3-storage命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | s3-storage |
| description | S3/MinIO operations: connectivity, transfers, read benchmarks, and matplotlib visualization templates. |
| version | 1.0.0 |
mc alias set <alias> <url> <access_key> <secret_key>
mc mb <alias>/<bucket>
mc cp <file> <alias>/<bucket>/
mc ls <alias>/<bucket>/
mc rm <alias>/<bucket>/<file>
mc rb <alias>/<bucket>
Install: pip install boto3
import boto3
from botocore.config import Config
s3 = boto3.client(
's3',
endpoint_url='http://<host>:<port>',
aws_access_key_id='<key>',
aws_secret_access_key='<secret>',
config=Config(retries={'max_attempts': 3}, signature_version='s3v4')
)
# Test: list buckets, create bucket, upload, list objects, download, delete
buckets = s3.list_buckets()['Buckets']
s3.create_bucket(Bucket='test')
s3.put_object(Bucket='test', Key='hello.txt', Body='content')
objs = s3.list_objects_v2(Bucket='test')['Contents']
resp = s3.get_object(Bucket='test', Key='hello.txt')
data = resp['Body'].read().decode()
s3.delete_object(Bucket='test', Key='hello.txt')
s3.delete_bucket(Bucket='test')
Known issues with mc CLI:
https://dl.min.io/client/mc/release/linux-amd64/mc/usr/local/bin/mc may fail due to permissions — use ~/bin/mc-L flagRun the benchmark script at scripts/s3_read_benchmark.py:
python3 ~/.hermes/skills/s3-storage/scripts/s3_read_benchmark.py
The benchmark tests:
Outputs:
results/s3_read_benchmark.png — 2x2 matplotlib dashboard plotresults/s3_read_benchmark.json — raw numeric data for further analysisEdit the ENDPOINTS dict at the top of the script:
ENDPOINTS = {
"endpoint_name": {
"url": "http://host:port",
"key": "access_key",
"secret": "secret_key",
"bucket": "bucket_name",
},
}
REPEATS = 20 # repeats per test
CONCURRENT_LEVELS = [1, 4, 8, 16] # concurrency levels for parallel test
mc mb <alias>/<bucket> --ignore-existing
mc cp -r <local_dir> <alias>/<bucket>/
import boto3, os
from botocore.config import Config
s3 = boto3.client(
's3',
endpoint_url='http://<host>:<port>',
aws_access_key_id='<key>',
aws_secret_access_key='<secret>',
config=Config(retries={'max_attempts': 3}, signature_version='s3v4')
)
base = '/path/to/local/dir'
for root, dirs, files in os.walk(base):
dirs[:] = [d for d in dirs if d != '.git']
for f in files:
fp = os.path.join(root, f)
rel = os.path.relpath(fp, base)
s3.upload_file(fp, 'bucket-name', rel)
The benchmark script uses matplotlib with:
| File | Description |
|---|---|
scripts/s3_read_benchmark.py | Full benchmark runner with matplotlib visualization |
references/endpoints.md | Known S3 endpoint configurations |