Borrowing it
Nothing to install: this file belongs to enuno/unifi-mcp-server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/enuno/unifi-mcp-server/main/.claude/commands/unifi-api-docs-update.mdgit clone --depth 1 https://github.com/enuno/unifi-mcp-serverWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/enuno/unifi-mcp-server/unifi-api-docs-update)<a href="https://agentmods.dev/commands/enuno/unifi-mcp-server/unifi-api-docs-update"><img src="https://agentmods.dev/badge/commands/enuno/unifi-mcp-server/unifi-api-docs-update/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/enuno/unifi-mcp-server/unifi-api-docs-update"><img src="https://agentmods.dev/badge/commands/enuno/unifi-mcp-server/unifi-api-docs-update.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00012 | $0.00973 |
| Opus 5 | $0.00006 | $0.00487 |
| Sonnet 5 | $0.00002 | $0.00195 |
| Haiku 4.5 | $0.00001 | $0.00097 |
Grade A, and why
unifi-api-docs-update scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Makes network callslowCapability
Not a fault in itself. Listed so you know the mod talks to something, and to what.
- Code examples (curl commands) What it actually says
Scrape the latest UniFi API documentation from developer.ui.com and update docs/UNIFI_API.md with newly discovered endpoints.
This command runs the scripts/update-api-docs.js Puppeteer-based scraper to fetch API documentation from the official UniFi developer site and compare it against the current documentation.
API Sources:
- Site Manager API (v1.0.0): https://developer.ui.com/site-manager/v1.0.0/gettingstarted
- Network API (v10.1.68): https://developer.ui.com/network/v10.1.68/gettingstarted
- Protect API (v6.2.83): https://developer.ui.com/protect/v6.2.83/gettingstarted
Steps to execute:
-
Verify dependencies are installed:
npm list puppeteerIf not installed, run:
npm install puppeteer -
Run the API documentation updater:
node scripts/update-api-docs.js -
Review the changes:
- Check how many new endpoints were discovered
- Verify the markdown formatting is correct
- Review the extracted examples and descriptions
-
Show summary:
git diff --stat docs/UNIFI_API.md
What the script does:
-
Extracts endpoints from each API source:
- Navigates to the getting started page
- Discovers all endpoint links from the sidebar
- Filters out non-API pages (getting started, guides, etc.)
-
Compares with existing documentation:
- Loads current docs/UNIFI_API.md
- Checks if each endpoint is already documented
- Identifies new endpoints to add
-
Extracts detailed information for new endpoints:
- HTTP method (GET, POST, PUT, PATCH, DELETE)
- Endpoint path
- Description
- Code examples (curl commands)
- Reference link to official docs
-
Updates documentation:
- Generates markdown sections for each API product
- Adds new endpoints with proper formatting
- Appends sections to existing documentation
- Preserves all existing content
Expected output:
🔍 UniFi API Documentation Updater
Loading existing documentation...
✓ Loaded (42243 characters)
Processing Site Manager v1.0.0...
Loading https://developer.ui.com/site-manager/v1.0.0/gettingstarted...
✓ Found 11 endpoints
→ 4 new endpoints found
Extracting: Query ISP Metrics...
Extracting: List SD-WAN Configs...
Extracting: Get SD-WAN Config by ID...
Extracting: Get SD-WAN Config Status...
Processing Network v10.1.68...
Loading https://developer.ui.com/network/v10.1.68/gettingstarted...
✓ Found 74 endpoints
→ 3 new endpoints found
Extracting: Adopt Devices...
Extracting: List DPI Application Categories...
Extracting: Quick Start...
Processing Protect v6.2.83...
Loading https://developer.ui.com/protect/v6.2.83/gettingstarted...
✓ Found 41 endpoints
→ 36 new endpoints found
Extracting: Get application information...
Extracting: Get viewer details...
[... more endpoints ...]
Generating updated documentation...
✓ Updated documentation saved to: docs/UNIFI_API.md
📊 Summary:
Site Manager: +4 new endpoints
Network: +3 new endpoints
Protect: +36 new endpoints
✅ Complete!
Report back with:
- Number of new endpoints discovered per API product
- Total lines added to documentation
- Any errors or warnings during extraction
- Git diff statistics showing the changes
Safety checks:
- Script only adds new endpoints, never removes existing content
- All official API URLs are hardcoded (no user input)
- Runs in headless mode (no manual interaction needed)
- Timeout handling for slow pages
- Error handling to skip problematic endpoints
Notes:
- The script uses Puppeteer to scrape public documentation (no authentication required)
- First run may take 2-3 minutes depending on network speed
- Subsequent runs will be faster as most endpoints are already documented
- Script is safe to run multiple times (idempotent)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 9d ago First seen · 140 lines · 12 tokens per session scan A 2973961c90fe
unifi-api-docs-update is a command published in the GitHub repository enuno/unifi-mcp-server (247 stars, last pushed 2d ago), licensed Apache-2.0. It adds 12 tokens to every session and 973 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.
implement
Execute the implementation plan by processing and executing all tasks defined in tasks.md.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.