Agent skill

Logging API Requests

by jeremylongshore in jeremylongshore/tons-of-skills-marketplace

Monitor and log API requests with correlation IDs, performance metrics, and security audit trails.

MITAuto-check passedSecurity

Install Logging API Requests

skills CLI
$ npx skills add jeremylongshore/tons-of-skills-marketplace --skill logging-api-requests -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install jeremylongshore/tons-of-skills-marketplace logging-api-requests --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/jeremylongshore/tons-of-skills-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/.curated/logging-api-requests .claude/skills/logging-api-requests && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
logging-api-requests
GitHub stars
2.8k
Token cost
~1.5k tokens
SKILL.md length
623 words
Files
4 (incl. references)
Skills in repo
3,342
Repo updated
First seen
Licence
MIT

At a glance

Monitor and log API requests with correlation IDs, performance metrics, and security audit trails.

  • Works in 9 steps: Examine existing logging configuration… → Implement request logging middleware… → Generate a unique correlation ID… → …
  • Auditing API requests and responses
  • SKILL.md covers Overview, Prerequisites, Instructions and Output, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Logging API Requests is an agent skill from jeremylongshore/tons-of-skills-marketplace. Monitor and log API requests with correlation IDs, performance metrics, and security audit trails. Use when auditing API requests and responses. Trigger with phrases like "log API requests", "add API logging", or "track API calls".

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 4 other files, including reference files (for example `references/errors.md`, `references/examples.md` and `references/implementation.md`). Compatibility notes: Designed for Claude Code

It sits in Security, covering Access reviews and audit trails and OKRs and executive reporting. The repository describes itself as: Model-agnostic agent-skills platform with a harness-free canonical layer, verified adapters, and the ccpi package manager. Explore at tonsofskills.com. The licence is MIT.

When your agent uses it

  • Auditing API requests and responses
  • With phrases like log API requests
  • Add API logging
  • Track API calls

Example prompts

  • “log API requests”
  • “add API logging”
  • “track API calls”
  • “/logging-api-requests”

Requirements

  • Node.js
  • Compatibility (from SKILL.md): Designed for Claude Code
  • Pre-approved tools (allowed-tools): Read, Write, Edit, Grep, Glob, Bash(api:log-*)

Workflow steps

9 steps, taken from the first numbered list in SKILL.md.

  1. Examine existing logging configuration using Grep and Read to identify current log format, output destinations, and any structured logging…
  2. Implement request logging middleware that captures: timestamp (ISO 8601), correlation ID, HTTP method, URL path (without query string…
  3. Generate a unique correlation ID (X-Request-ID) for each request if not provided by the caller, and propagate it to all downstream service…
  4. Add PII redaction rules that mask sensitive fields (passwords, tokens, SSNs, email addresses) in logged request/response bodies using…
  5. Implement log levels per context: info for successful requests, warn for 4xx client errors, error for 5xx server errors with stack traces…
  6. Configure response body logging for error responses only (4xx/5xx), capturing the error payload for debugging while skipping successful…
  7. Add security audit logging for sensitive operations: authentication attempts, permission changes, data exports, and admin actions, tagged…
  8. Set up log rotation and retention policies: 30 days for application logs, 90 days for audit logs, with automatic compression of logs older…
  9. Write tests verifying that PII redaction works correctly, correlation IDs propagate through nested calls, and log output matches expected…

What it can do on your machine

Read from SKILL.md and the folder at commit 80f86df. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Write
    • Edit
    • Grep
    • Glob
    • Bash(api:log-*)

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • elastic.co
    • getpino.io

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

  • Compatibility

    Designed for Claude Code

    From compatibility in the SKILL.md frontmatter.

Context cost

Logging API Requests loads about 1.5k tokens when it runs, and up to ~3.3k if it reads all its reference files. Until then it costs about 63 tokens; SKILL.md has 623 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~63
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from jeremylongshore/tons-of-skills-marketplace at commit 80f86df, republished under its MIT licence (© jeremylongshore). 623 words, ~1,462 tokens.

Download SKILL.mdSave it as .claude/skills/logging-api-requests/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
logging-api-requests
description
Monitor and log API requests with correlation IDs, performance metrics, and security audit trails. Use when auditing API requests and responses. Trigger with phrases like "log API requests", "add API logging", or "track API calls".
allowed-tools
Read, Write, Edit, Grep, Glob, Bash(api:log-*)
compatibility
Designed for Claude Code
version
1.24.0
author
Jeremy Longshore <jeremy@intentsolutions.io>
license
MIT
tags
api, security, monitoring, performance

Logging API Requests

Overview

Implement structured API request logging with correlation IDs, performance timing, security audit trails, and PII redaction. Capture request/response metadata in JSON format suitable for aggregation in ELK Stack, Loki, or CloudWatch Logs, enabling debugging, performance analysis, and compliance auditing across distributed services.

Prerequisites

  • Structured logging library: Pino or Winston (Node.js), structlog (Python), Logback with JSON encoder (Java)
  • Log aggregation system: ELK Stack (Elasticsearch, Logstash, Kibana), Grafana Loki, or CloudWatch Logs
  • Correlation ID propagation mechanism (middleware-injected or from incoming X-Request-ID header)
  • PII data classification for the API domain (which fields contain personal data requiring redaction)
  • Log retention and rotation policy defined per compliance requirements

Instructions

  1. Examine existing logging configuration using Grep and Read to identify current log format, output destinations, and any structured logging already in place.
  2. Implement request logging middleware that captures: timestamp (ISO 8601), correlation ID, HTTP method, URL path (without query string PII), status code, response time (ms), request size, response size, and client IP.
  3. Generate a unique correlation ID (X-Request-ID) for each request if not provided by the caller, and propagate it to all downstream service calls and log entries within the request scope.
  4. Add PII redaction rules that mask sensitive fields (passwords, tokens, SSNs, email addresses) in logged request/response bodies using configurable field-path patterns.
  5. Implement log levels per context: info for successful requests, warn for 4xx client errors, error for 5xx server errors with stack traces, and debug for request/response bodies (development only).
  6. Configure response body logging for error responses only (4xx/5xx), capturing the error payload for debugging while skipping successful response bodies to reduce log volume.
  7. Add security audit logging for sensitive operations: authentication attempts, permission changes, data exports, and admin actions, tagged with audit: true for separate indexing.
  8. Set up log rotation and retention policies: 30 days for application logs, 90 days for audit logs, with automatic compression of logs older than 7 days.
  9. Write tests verifying that PII redaction works correctly, correlation IDs propagate through nested calls, and log output matches expected JSON structure.

See ${CLAUDE_SKILL_DIR}/references/implementation.md for the full implementation guide.

Output

  • ${CLAUDE_SKILL_DIR}/src/middleware/request-logger.js - Structured request/response logging middleware
  • ${CLAUDE_SKILL_DIR}/src/middleware/correlation-id.js - Correlation ID generation and propagation
  • ${CLAUDE_SKILL_DIR}/src/utils/pii-redactor.js - Field-level PII redaction with configurable patterns
  • ${CLAUDE_SKILL_DIR}/src/utils/audit-logger.js - Security audit event logger for sensitive operations
  • ${CLAUDE_SKILL_DIR}/src/config/logging.js - Log level, format, and output destination configuration
  • ${CLAUDE_SKILL_DIR}/tests/logging/ - Logging middleware tests including PII redaction verification
Show full SKILL.md (229 more words)Show less

Error Handling

ErrorCauseSolution
Log volume overwhelming storageHigh-traffic endpoint logging full request/response bodiesLog bodies only for errors; sample successful request bodies at configurable rate (1%)
PII leak in logsNew field added to API response containing personal data not covered by redaction rulesMaintain allowlist of loggable fields rather than blocklist; audit log output regularly
Correlation ID missingUpstream service does not propagate X-Request-ID headerGenerate new correlation ID when header is absent; log warning about missing upstream propagation
Log parsing failureLog message contains unescaped characters breaking JSON structureUse structured logging library that handles serialization; never concatenate user input into log strings
Audit log gapAsync logging dropped events during high-load periodUse synchronous logging for audit events; implement write-ahead buffer for audit trail completeness

Refer to ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error patterns.

Examples

Structured JSON log entry: {"timestamp":"2026-03-10T14:30:00Z","correlationId":"abc-123","method":"POST","path":"/api/users","status":201,"durationMs":45,"userId":"usr_456","audit":false} -- every field queryable in log aggregation.

Distributed tracing correlation: Propagate X-Request-ID from API gateway through 3 microservices, enabling a single Kibana query to show the complete request lifecycle across all services.

Compliance audit trail: Tag all data modification operations (POST, PUT, DELETE) with audit: true, capturing the authenticated user, modified resource ID, and change summary for SOC 2 compliance evidence.

See ${CLAUDE_SKILL_DIR}/references/examples.md for additional examples.

Resources

© jeremylongshore, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in skills/.curated/logging-api-requests of jeremylongshore/tons-of-skills-marketplace.

  • SKILL.md
  • references/errors.md
  • references/examples.md
  • references/implementation.md

Open the folder on GitHubat commit 80f86df

Compare with similar skills

Logging API Requests next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Logging API Requests compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Logging API Requests this skilljeremylongshore/tons-of-skills-marketplace2.8k—~1.5kAutomated safety check: PassMIT
Building Soc Metrics And Kpi Trackingmukul975/Anthropic-Cybersecurity-Skills34k—~2.9kAutomated safety check: PassApache-2.0
Implementing Vulnerability Remediation Slamukul975/Anthropic-Cybersecurity-Skills34k—~1.9kAutomated safety check: PassApache-2.0
Nbr Qualitative Casefranklee16/academic-research-skills2231 repos~412Automated safety check: PassNone
Pine BacktesterTradersPost/pinescript-agents1701 repos~3.9kAutomated safety check: PassNone
Google Cloud PAM Helpergoogle/skills21k—~3.2kAutomated safety check: PassApache-2.0

Similar skills

  • Building Soc Metrics And Kpi Tracking

    mukul975/Anthropic-Cybersecurity-Skills

    Builds SOC performance metrics and KPI tracking dashboards measuring Mean Time to Detect (MTTD), Mean Time to Respond (MTTR), alert quality ratios, analyst productivity, and detection coverage using…

    34k GitHub stars~2.9k tokensUpdated 1 mo ago
    SecurityAuto-check passed
  • Implementing Vulnerability Remediation Sla

    mukul975/Anthropic-Cybersecurity-Skills

    Design a vulnerability remediation SLA program covering asset tiering, a severity-based SLA matrix, exception processes, escalation chains, ticketing-system integration, and remediation…

    34k GitHub stars~1.9k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Nbr Qualitative Case

    franklee16/academic-research-skills

    A skill your agent uses for qualitative theory-building submitted to 《南开管理评论》 (Nankai Business Review) — multi-case comparison (replication logic, case selection), grounded-theory coding (open /…

    223 GitHub starsUsed in 1 repo~412 tokens
    DatabasesAuto-check passed
  • Pine Backtester

    TradersPost/pinescript-agents

    Implements comprehensive backtesting and performance metrics.

    170 GitHub starsUsed in 1 repo~3.9k tokens
    Business, Finance & HRAuto-check passed
  • Official

    Manages Google Cloud Privileged Access Manager entitlements and grants: create and edit entitlements, request temporary access, and approve or deny pending grants.

    21k GitHub stars~3.2k tokensUpdated today
    SecurityAuto-check passed
  • Analytics Strategy

    rampstackco/claude-skills

    Design measurement frameworks including event taxonomy, KPI hierarchy, dashboard architecture, attribution models, and analytics implementation strategy.

    941 GitHub stars~2.4k tokensUpdated 2 days ago
    Business, Finance & HRAuto-check passed

More from jeremylongshore/tons-of-skills-marketplace

All 3,342 skills in this repo
  • Performing Security Code Review

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to conduct a security-focused code review using the security-agent plugin.

    2.8k GitHub starsUsed in 2 repos~1.3k tokens
    Auto-check: notes
  • Adapting Transfer Learning Models

    jeremylongshore/tons-of-skills-marketplace

    Build this skill automates the adaptation of pre-trained machine learning models using transfer learning techniques.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Agent Context Loader

    jeremylongshore/tons-of-skills-marketplace

    Execute proactive auto-loading: automatically detects and loads agents.md files.

    2.8k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Aggregating Performance Metrics

    jeremylongshore/tons-of-skills-marketplace

    Aggregate and centralize performance metrics from applications, systems, databases, caches, and services.

    2.8k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • Analyzing Capacity Planning

    jeremylongshore/tons-of-skills-marketplace

    Execute this skill enables AI assistant to analyze capacity requirements and plan for future growth.

    2.8k GitHub stars~947 tokensUpdated today
    Auto-check passed
  • Analyzing Database Indexes

    jeremylongshore/tons-of-skills-marketplace

    Process use when you need to work with database indexing. An agent skill from jeremylongshore/tons-of-skills-marketplace.

    2.8k GitHub stars~2k tokensUpdated today
    Auto-check passed

Questions about Logging API Requests

What does Logging API Requests do?

Monitor and log API requests with correlation IDs, performance metrics, and security audit trails. Logging API Requests is an agent skill from jeremylongshore/tons-of-skills-marketplace. Monitor and log API requests with correlation IDs, performance metrics, and security audit trails.

When should I use Logging API Requests?

Logging API Requests fits situations like: auditing API requests and responses; with phrases like log API requests; add API logging; track API calls.

How do I install Logging API Requests in Claude Code?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill logging-api-requests -a claude-code`. Or copy the skill folder (skills/.curated/logging-api-requests in jeremylongshore/tons-of-skills-marketplace) into .claude/skills/logging-api-requests in your project. Claude Code loads it when a task matches its description.

How do I install Logging API Requests in Codex?

Run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill logging-api-requests -a codex`. Or copy the skill folder (skills/.curated/logging-api-requests in jeremylongshore/tons-of-skills-marketplace) into .agents/skills/logging-api-requests in your project. Codex loads it when a task matches its description.

Can I use Logging API Requests in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add jeremylongshore/tons-of-skills-marketplace --skill logging-api-requests -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/logging-api-requests, .gemini/skills/logging-api-requests, .github/skills/logging-api-requests and .opencode/skills/logging-api-requests in your project.

What does Logging API Requests need to run?

SKILL.md names no scripts, command-line tools or credentials: Logging API Requests is instructions for the agent only. Our summary lists: Node.js. Its frontmatter pre-approves these tools: Read, Write, Edit, Grep, Glob, Bash(api:log-*). Compatibility (from SKILL.md): Designed for Claude Code.

Does Logging API Requests access the network?

SKILL.md names 2 domains. As links in the text: elastic.co and getpino.io. This is read from the text; nothing was executed.

Is Logging API Requests safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Logging API Requests use?

Logging API Requests is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Logging API Requests use?

About 1.5k tokens (SKILL.md is roughly 5.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.9k tokens, read only when the agent opens those files.

What are the alternatives to Logging API Requests?

Skills that share tags, products or a category with Logging API Requests: Building Soc Metrics And Kpi Tracking (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Implementing Vulnerability Remediation Sla (mukul975/Anthropic-Cybersecurity-Skills, 34k stars), Nbr Qualitative Case (franklee16/academic-research-skills, 223 stars) and Pine Backtester (TradersPost/pinescript-agents, 170 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Logging API Requests?

jeremylongshore (a GitHub user) maintains it in jeremylongshore/tons-of-skills-marketplace, which has 2,825 GitHub stars. The repository holds 3,342 skills in this directory. The repository was last updated on October 9, 2026.

Source: jeremylongshore/tons-of-skills-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.