Usage instructions
Core usage
The npm-proxy skill realizes automated management of reverse proxy configuration by calling the REST API of Nginx Proxy Manager (NPM). User needs to configureNPM_URL、、NPM_EMAILexampleNPM_PASSWORD`Three environment variables complete identity authentication. The skill supports core operations such as listing all proxy hosts, viewing specific host details, enabling/disabling hosts, deleting hosts, and managing SSL certificates. When adding a new host, you need to call the API directly. It supports configuring domain name forwarding, SSL enforcement, WebSocket upgrade, HTTP/2 support and other advanced options, and enables Let's Encrypt automatic certificate with one click.
Significant advantages
This skill converts NPM's web interface operations into command line tools, greatly improving operation and maintenance efficiency. For scenarios that require frequent changes to agent configurations (such as CI/CD pipelines, multi-environment deployment), automated scripts instead of manual clicks can significantly reduce human errors. Pure Python standard library implementation (no third-party dependencies) reduces deployment complexity, and the local caching mechanism of JWT token (stored in/root/.npm-token.json) avoids the overhead of repeated authentication. Supported advanced functions such as HSTS, cache control, vulnerability interception, etc. meet the security needs of the production environment.
Potential Disadvantages and Limitations
There are obvious functional gaps in the current implementation: adding a new host requires using curl directly instead of encapsulated commands, the scripting function is described as "minimal", and the user experience is incomplete. The file name contains an unexpected newline character (scripts\nnpm_client.py) implies developing normative issues. Token file permissions are not set compulsorily, and there is a risk of sensitive information being leaked. Error handling is rough, printing directly to stderr and then exiting, which is not conducive to integration into more complex automated processes. In addition, skills only support NPM administrator accounts and lack role-based permission breakdown.
Suitable target group
It is mainly intended for DevOps engineers, system administrators and operation and maintenance developers, especially technical teams that have deployed NPM as a unified entry gateway. It is suitable for organizations that need to manage dozens of proxy hosts in batches, automate SSL certificate renewal, or incorporate proxy configuration into Infrastructure as Code practice. For individual developers or small-scale projects, it may be more intuitive to use NPM's web interface directly.
Risks of use
security risk: There is a risk of log leakage when passing passwords through environment variables; token files can be read by other processes if permissions are set improperly; abnormal file names may evade certain security scans.Operation and maintenance risks: Directly operating the NPM configuration of the production environment may cause service interruption; there is a lack of operation confirmation mechanism, and it is difficult to recover if the host is accidentally deleted.Dependence risk: Skills are bound to a specific NPM version, and API changes may cause function failure; a stable network connection to the NPM instance is required.Compliance risk: Let's Encrypt certificate applications are subject to rate limits, and batch operations may trigger bans.