360 Secure SkillHub
360 安全技能中心

agent-runlog

agent-runlog是一款CLI工具,核心功能为包裹Shell命令,生成含Git状态的精简脱敏运行日志,存储于本地.agent-runs目录。典型场景包括长时/不稳定测试构建、CI故障本地复现、工作交接前捕获证据、诊断重复错误。支持指定输出目录、工作路径,可生成markdown报告或JSON结果;默认脱敏,执行破坏性命令需获用户批准。

builtbyecho
builtbyecho
热度 60.42
最近更新 2026-05-28 07:46:47
分类:开发依赖:代码执行 / 读写文件应用场景:调试排错 / DevOps / 自动化脚本 / 报告撰写

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add agent-runlog
Metadata
name
agent-runlog
description
Wrap shell commands with the agent-runlog CLI to capture concise, redacted run logs for debugging, CI reproduction, long-running agent commands, repeated failures, test/lint/build evidence, and handoffs where stdout/stderr plus git state should be preserved without flooding chat.

Agent Runlog Skill

Use agent-runlog when command output needs to be preserved and summarized for debugging or handoff. It writes a small local ledger under .agent-runs/<timestamp>/.

Default workflow

From the project root:

npx @builtbyecho/agent-runlog -- npm test
npx @builtbyecho/agent-runlog -- npm run lint
npx @builtbyecho/agent-runlog -- npm run build

Then inspect:

cat .agent-runs/*/report.md | tail -n 120

For automation:

npx @builtbyecho/agent-runlog --json -- npm test > run.json

When to use

  • Long or flaky test/build/lint runs.
  • Reproducing CI failures locally.
  • Capturing evidence before handing work to another agent.
  • Diagnosing repeated error loops or noisy logs.

Safety

  • Redaction is on by default. Avoid --no-redact unless the user explicitly needs raw local logs.
  • Do not wrap destructive commands without user approval.
  • If logs may include private data, keep .agent-runs/ local and summarize instead of posting full logs.

Useful commands

npx @builtbyecho/agent-runlog -- <command> [args...]
npx @builtbyecho/agent-runlog -o .agent-runs/lint -- npm run lint
npx @builtbyecho/agent-runlog --cwd ./subproject -- npm test
npx @builtbyecho/agent-runlog --quiet -- npm test