日志

数据 社区

技能解读

当前原文的自动摘译,尚未人工审校。

论点

$ARGUMENTS 可能包含: 用于过滤的插件名称(例如,“代理”、“终端”) 要显示的行数(默认值:50) “全部”显示更多行 “错误”或“错误”仅过滤错误/警告

日志文件位置

每行都是 JSON,包含字段:time、level、prefix、msg 和可选数据字段。

命令

最近的日志(最后 50 行): 按插件过滤(前缀字段包含插件名称): 仅错误: 解析和格式化以提高可读性 - 提取时间、前缀、级别、消息:

输出

以可读的格式呈现日志。对于 JSON 行,提取关键字段(时间戳、前缀、级别、消息)。突出显示您的回复中的错误。如果日志文件不存在,则告诉用户守护进程尚未运行或日志为空。

流狐档案 运行与权限由流狐静态检查推断,不代表作者声明或实际测试结果。
领域
数据
作者声明的智能体
未找到明确声明;不据此推断已兼容或已测试
静态检查
94 / 100 · 启发式扫描,不代表运行安全
运行环境证据
未执行;当前没有隔离运行测试证据
作者 / 版本 / 许可证
@majiayu000 · MIT
上下文用量评级
低消耗
接入复杂程度
需简单配置
是否需要外部接口密钥
不需要
兼容的系统
未声明(默认跨平台)
运行环境要求
未检出明确要求
检测到的文件与系统行为
  • 只读
  • 命令执行
网络行为
仅限本地
安装命令数
无(仅作为资料)

需要注意: 未声明工具权限范围;实际权限由运行环境决定。

作者说明文件(原文) SKILL.md

# Shella Logs

View daemon and plugin logs from `~/.local/state/shella/dev.log`.

## Arguments

- `$ARGUMENTS` may contain:
  - A plugin name to filter by (e.g., "agent", "terminal")
  - A number of lines to show (default: 50)
  - "all" to show more lines
  - "errors" or "error" to filter to errors/warnings only

## Log File Location

```
~/.local/state/shella/dev.log
```

Each line is JSON with fields: `time`, `level`, `prefix`, `msg`, and optional data fields.

## Commands

**Recent logs (last 50 lines)**:
```bash
tail -50 ~/.local/state/shella/dev.log
```

**Filter by plugin** (prefix field contains plugin name):
```bash
grep '"prefix":"agent' ~/.local/state/shella/dev.log | tail -50
```

**Errors only**:
```bash
grep '"level":"error"' ~/.local/state/shella/dev.log | tail -50
```

**Parse and format** for readability - extract time, prefix, level, msg:
```bash
tail -50 ~/.local/state/shella/dev.log | while read line; do
  echo "$line" | python3 -c "import sys,json; d=json.loads(sys.stdin.read()); print(f'{d.get(\"prefix\",\"daemon\"):20} {d.get(\"level\",\"info\"):5} {d.get(\"msg\",\"\")}')" 2>/dev/null || echo "$line"
done
```

## Output

Present logs in a readable format. For JSON lines, extract the key fields (timestamp, prefix, level, message). Highlight errors in your response.

If the log file doesn't exist, tell the user the daemon hasn't been run yet or logs are empty.

讨论

基于 GitHub Discussions。登录 GitHub 即可参与讨论、点赞、订阅更新。