cnw-stats-local-server

Log CNW/NX telemetry requests to stdout and a log file.

1|Updated Jun 3, 2025
One-click install
npx skills add https://github.com/jaysoo/dot-ai-config --skill cnw-stats-local-server
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cnw-stats-local-server
Source: https://github.com/jaysoo/dot-ai-config/tree/main/dot_gemini/skills/cnw-stats-local-server
Command: npx skills add https://github.com/jaysoo/dot-ai-config --skill cnw-stats-local-server

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Tiny Go HTTP server that intercepts every request CNW (create-nx-workspace) or nx init would send to NX_CLOUD_API. Logs method, URL, headers, and body to stdout and a log file (truncated on startup). Responds 200 to everything so CNW/init proceed normally.

Core Features & Use Cases

  • Local observation of CNW/NX telemetry payloads and analytics during development and testing.
  • Logs requests to stdout and to a dedicated log file for post-run analysis.
  • Easy redirection of CNW/NX traffic to a local server via NX_CLOUD_API for safe experimentation.

Quick Start

Start the local CNW stats server by running go run . -port 8765 -log cnw-log-server.log in the tools/cnw-log-server directory.

Frequently Asked Questions about cnw-stats-local-server

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I capture and log NX telemetry traffic locally during testing?

You can intercept CNW or NX telemetry requests by running a local Go HTTP server that captures all traffic sent to NX_CLOUD_API. It logs the method, URL, headers, and body to stdout and a log file while responding 200 to every request.

What is the best way to inspect create-nx-workspace analytics payloads without affecting production?

Redirecting NX_CLOUD_API to a local capture server is the best way to inspect create-nx-workspace analytics without affecting production. It intercepts telemetry payloads for observation and safely returns a 200 response so CNW proceeds normally.

How do I redirect NX_CLOUD_API to a local server for safe telemetry observation?

You can redirect NX_CLOUD_API to a local server by running the Go HTTP server with `go run . -port 8765 -log cnw-log-server.log` in the tools directory, then pointing your NX_CLOUD_API environment variable to the local server address.

Does intercepting NX init telemetry require any external dependencies or tools?

Intercepting NX init telemetry with this approach requires no external dependencies, only a standard Go environment. The included HTTP server runs standalone to capture requests and log telemetry data locally without needing additional tools.

Can I use a local HTTP server to test CNW telemetry without breaking the workspace creation flow?

Yes, you can use a local HTTP server to test CNW telemetry without breaking the workspace creation flow. The server responds 200 to every intercepted request, ensuring CNW and nx init proceed normally after logging the traffic.