Token导航 LogoToken导航TokenDH.com
研究检索只读github未标认证来源可访问许可证需确认审计通过

structured-logging结构化日志记录

Agent Skill

structured-logging 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

303

周安装

13

GitHub Stars

11

下载量

106
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:structured-logging(结构化日志记录)
来源仓库:https://github.com/sjungling/claude-plugins
仓库路径:skills/structured-logging
安装命令:
npx skills add https://github.com/sjungling/claude-plugins --skill structured-logging
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/sjungling/claude-plugins --skill structured-logging

简介

structured-logging 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中快速定位候选结果。

  • 它支持基于关键词、任务场景或来源线索进行信息匹配,适用于研究检索类需求。
  • 通过 npx skills add 命令从指定 GitHub 仓库安装,需结合原始 README 确认具体用法。
  • 安装前建议核实权限范围、维护状态,以及是否涉及联网、命令执行或文件读写操作。
  • 该技能适用于需要高效信息聚合的场景,但需人工核验其实际行为与项目需求是否匹配。

SKILL.md

SQLite for Structured Data

Decision Check

Before writing any data analysis code, evaluate:

  1. Will the data be queried more than once? -> Use SQLite
  2. Are GROUP BY, COUNT, AVG, or JOIN operations needed? -> Use SQLite
  3. Is custom Python/jq parsing code about to be written? -> Use SQLite instead
  4. Is the dataset >100 records? -> Use SQLite

If the answer to any question above is YES, use SQLite. Do not write custom parsing code.

# Custom code for every query:
cat data.json | jq '.[] | select(.status=="failed")' | jq -r '.error_type' | sort | uniq -c

# SQL does the work:
sqlite3 data.db "SELECT error_type, COUNT(*) FROM errors WHERE status='failed' GROUP BY error_type"

Core Principle

SQLite is just a file -- no server, no setup, zero dependencies. Apply it when custom parsing code would otherwise be written or data would be re-processed for each query.

When to Use SQLite

Apply when ANY of these conditions hold:

  • >100 records -- JSON/grep becomes unwieldy
  • Multiple aggregations -- GROUP BY, COUNT, AVG needed
  • Multiple queries -- Follow-up questions about the same data are expected
  • Correlation needed -- Joining data from multiple sources
  • State tracking -- Queryable progress/status over time is needed

When NOT to Use SQLite

Skip SQLite when ALL of these are true:

  • <50 records total
  • Single simple query
  • No aggregations needed
  • No follow-up questions expected

For tiny datasets with simple access, JSON/grep is fine.

Red Flags -- Use SQLite Instead

STOP and use SQLite when about to:

  • Write Python/Node code to parse JSON/CSV for analysis
  • Run the same jq/grep command with slight variations
  • Write custom aggregation logic (COUNT, AVG, GROUP BY in code)
  • Manually correlate data by timestamps or IDs
  • Create temp files to store intermediate results
  • Process the same data multiple times for different questions

All of these mean: Load into SQLite once, query with SQL.

The Threshold

ScenarioToolWhy
50 test results, one-time summaryPython/jqFast, appropriate
200+ test results, find flaky testsSQLiteGROUP BY simpler than code
3 log files, correlate by timeSQLiteJOIN simpler than manual grep
Track 1000+ file processing stateSQLiteQueries beat JSON parsing

Rule of thumb: If parsing code is being written or data is being re-processed, use SQLite instead.

Available Tools

sqlite3 (always available)

sqlite3 ~/.claude-logs/project.db

sqlite-utils (optional, simplifies import)

Check availability before use:

command -v sqlite-utils >/dev/null 2>&1 && echo "available" || echo "not installed"

If sqlite-utils is available:

sqlite-utils insert data.db table_name data.json --pk=id
sqlite-utils query data.db "SELECT * FROM table"

If sqlite-utils is NOT available, fall back to sqlite3 with manual import:

sqlite3 data.db <<EOF
CREATE TABLE IF NOT EXISTS results (status TEXT, error_message TEXT);
.mode json
.import data.json results
EOF

Alternatively, install sqlite-utils: uv tool install sqlite-utils

Quick Start

Store Location

~/.claude-logs/<project-name>.db  # Persists across sessions

Basic Workflow

# 1. Connect
PROJECT=$(basename $(git rev-parse --show-toplevel 2>/dev/null || pwd))
sqlite3 ~/.claude-logs/$PROJECT.db

# 2. Create table (first time)
CREATE TABLE results (
  id INTEGER PRIMARY KEY,
  name TEXT,
  status TEXT,
  duration_ms INTEGER
);

# 3. Load data
INSERT INTO results (name, status, duration_ms)
SELECT json_extract(value, '$.name'),
       json_extract(value, '$.status'),
       json_extract(value, '$.duration_ms')
FROM json_each(readfile('data.json'));

# 4. Query (SQL does the work)
SELECT status, COUNT(*), AVG(duration_ms)
FROM results
GROUP BY status;

Key Mindset Shift

From: "Process data once and done" To: "Make data queryable"

Benefits:

  • Follow-up questions require no re-processing -- data is already loaded
  • Different analyses run instantly against the same dataset
  • State persists across sessions
  • SQL handles complexity -- less custom code needed

Additional Resources

  • ./references/patterns.md -- Python vs SQL side-by-side comparison and real-world examples (test analysis, error correlation, file processing state)

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.47%
按下载量换算38

Claude

27.3%
按下载量换算29

Cursor

18.76%
按下载量换算20

Gemini CLI

9.04%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills