source-command-unifi-api-docs-update
Skill294 starsChanged 18 days agoApache-2.0View on GitHub
Update UNIFI_API.md with latest endpoints from developer.ui.com
- Installs packages
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the user asks to run the migrated source command unifi-api-docs-update.
- Distinctive: line 24
Verify dependencies are installed:
- Very specific: line 30
If not installed, run: npm install puppeteer
- Distinctive: line 32
Run the API documentation updater:
- Distinctive: line 39
Check how many new endpoints were discovered
- Distinctive: line 40
Verify the markdown formatting is correct
- Distinctive: line 128
All official API URLs are hardcoded (no user input)
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
source-command-unifi-api-docs-update
Use this skill when the user asks to run the migrated source command unifi-api-docs-update.
Command Template
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 puppeteerRun 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)
In this repository52 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .agents/skills/fastmcp/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- .claude/skills/fastmcp/CLAUDE.mdCLAUDE.md
- .cursor/rules/common-mistakes.mdcCursor rule
- .cursor/rules/core-principles.mdcCursor rule
- .cursor/rules/environment-setup.mdcCursor rule
- .cursor/rules/mcp-tools.mdcCursor rule
- .cursor/rules/project-context.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- .cursor/rules/unifi-api.mdcCursor rule
- .cursor/rules/workflow.mdcCursor rule
- FastMCP DevelopmentSkill
- mcp-builderSkill
- source-command-build-dockerSkill
- source-command-check-depsSkill
- source-command-cleanSkill
- source-command-docsSkill
- source-command-formatSkill
- source-command-lintSkill
- source-command-prSkill
- source-command-securitySkill
- source-command-setupSkill
- source-command-testSkill
- source-command-unifi-api-docs-update-2Skill
- source-command-unifi-mcp-add-toolSkill
- source-command-unifi-mcp-release-prepSkill
- source-command-unifi-mcp-test-coverageSkill
- source-command-unifi-mcp-update-docsSkill
- unifi-cloud-fleet-toolsSkill
- unifi-mcp-tool-builderSkill
- unifi-network-config-toolsSkill
- unifi-protect-toolsSkill
- unifi-security-toolsSkill
- FastMCP DevelopmentSkill
- mcp-builderSkill
- unifi-cloud-fleet-toolsSkill
- unifi-mcp-tool-builderSkill
- unifi-network-config-toolsSkill
- unifi-protect-toolsSkill
- unifi-security-toolsSkill
- unifiSkill
- unifi-channel-planningSkill
- unifi-cloud-fleet-toolsSkill
- unifi-devicesSkill
- unifi-mcp-tool-builderSkill
- unifi-network-config-toolsSkill
- unifi-networkSkill
- unifi-protect-toolsSkill
- unifi-securitySkill
- unifi-security-toolsSkill
- unifi-systemSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

