Our review
Tails and searches logs across trading platform services, supporting Docker Compose and Kubernetes environments.
Strengths
- Advanced filtering by service, log level, regex pattern, and error-only mode.
- Live follow mode (--follow) for continuous log streaming.
- Error summary with counts and most recent messages.
- Context lines around matches for search results.
Limitations
- Requires services to be deployed with Docker Compose or Kubernetes.
- Recognized log patterns are specific to a trading platform.
- Advanced features (stern, kubectl) depend on target infrastructure.
Use this skill to debug or monitor logs of an application in development or staging environments.
Do not use it for production logs that require a centralized log management solution (ELK, Splunk).
Security analysis
CautionThe skill is designed to access and filter logs via legitimate tools (docker, kubectl, stern). It does not instruct destructive actions, but the use of powerful shell commands with potentially unsanitized user input presents a moderate risk. The skill is inherently meant for debugging, but caution is warranted.
- •Uses docker and kubectl commands with user-supplied arguments, which could allow command injection if the agent does not sanitize inputs (e.g., service name with shell metacharacters).
- •Log output may contain sensitive information (API keys, tokens, PII) depending on the logging practices of the services.
Examples
Show me the last 50 lines of logs from all services.Search logs for 'order.*failed' and show matches with context lines.Show me only error logs from the last 30 minutes across all services.name: logs description: Tail and search service logs with filtering argument-hint: "[service|--search pattern|--errors]"
Log Viewer
Tail and search logs across trading platform services.
Usage
/logs- Tail all services (last 100 lines)/logs api- Tail specific service/logs --errors- Show only errors across all services/logs --search "order.*failed"- Search with regex/logs api --since 1h- Logs from last hour/logs --level error- Filter by log level/logs executor --follow- Live tail (follow mode)
Services
| Service | Container | Log Path | |---------|-----------|----------| | api | trading-api | stdout | | ui | trading-ui | stdout | | executor | trading-executor | stdout | | risk | trading-risk | stdout | | worker | trading-worker | stdout | | ml-server | ml-server | stdout | | market-ingest | market-ingest | stdout | | backtester | backtester | stdout |
Instructions
When this skill is invoked:
-
Parse arguments:
- Service name: Filter to specific service
--errors: Filterlevel=errororlevel=ERROR--search <pattern>: Grep with regex pattern--since <duration>: Time filter (1h, 30m, 1d)--level <level>: Filter by log level--follow/-f: Live tail mode--lines N/-n N: Number of lines (default 100)
-
For Docker Compose (dev):
# Single service docker compose logs $SERVICE --tail $LINES $FOLLOW_FLAG # All services with grep docker compose logs --tail $LINES | grep -E "$PATTERN" # Errors only docker compose logs --tail 500 | grep -iE "error|exception|failed|traceback" -
For Kubernetes (staging/prod):
# Single pod kubectl logs -l app=$SERVICE -n trading --tail=$LINES $FOLLOW_FLAG # With stern for multi-pod stern $SERVICE -n trading --since $SINCE -
Display formatted output:
[09:31:05] api INFO Request: POST /orders [09:31:05] executor INFO Order received: abc123 [09:31:06] executor ERROR Order failed: insufficient margin [09:31:06] risk WARN Margin utilization at 95% -
For
--errors, highlight and summarize:ERROR SUMMARY (last 1h) ───────────────────────────────────────────────────────── executor 12 errors "insufficient margin" (8), "timeout" (4) api 3 errors "validation failed" (3) ml-server 1 error "model not found" (1) Most recent errors: [09:31:06] executor Order failed: insufficient margin for AAPL x100 [09:30:45] executor Connection timeout to broker -
For
--search, show matches with context:- 2 lines before and after each match
- Highlight matching text
- Show total match count
-
Common log patterns to recognize:
- Order lifecycle: submitted → acknowledged → filled/rejected
- Errors: exceptions, tracebacks, failed operations
- Performance: slow queries, timeouts
- Security: auth failures, rate limits
Docker Compose Architect
DevOps
Designs optimized Docker Compose configurations.
Incident Postmortem Writer
DevOps
Writes structured and blameless incident postmortem reports.
Runbook Creator
DevOps
Creates clear operational runbooks for common DevOps procedures.