agentleFS
pproencapproenca/unifi-mcp/AGENTS.md

unifi-mcp

AGENTS.md2 starsChanged 7 months agoMITView on GitHub

Guide for contributors working on the UniFi MCP server — a local MCP server for the UniFi Network API. This repository provides an MCP (Model Context Protocol) server that wraps the UniFi Network API. It runs locally via npx unifi-mcp or bunx unifi-mcp and exposes UniFi management operations as MCP tools for use with Claude and other MCP-compatible hosts. Run before marking work complete when changes affect src/, tests, or build config. Use before editing code when the task changes…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 31,700 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repository6 other files it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 2 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run before marking work complete when changes affect src/, tests, or build config.

    line 26
  2. Distinctive:

    Use before editing code when the task changes MCP tool definitions, runtime behavior, or configuration.

    line 34
  3. Distinctive:

    When a task finishes with moderate-or-larger code changes, invoke to generate a PR summary block, branch suggestion, title, and draft …

    line 38
  4. Very specific:

    Create a feature branch: git checkout -b feat/<description>

    line 50
  5. Very specific:

    Run $code-change-verification before marking complete

    line 53
  6. Very specific:

    Use $pr-draft-summary for the final handoff

    line 54

≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Contributor Guide

Guide for contributors working on the UniFi MCP server — a local MCP server for the UniFi Network API.

Project Overview

This repository provides an MCP (Model Context Protocol) server that wraps the UniFi Network API. It runs locally via npx unifi-mcp or bunx unifi-mcp and exposes UniFi management operations as MCP tools for use with Claude and other MCP-compatible hosts.

Repo Structure

  • src/ — Server implementation (TypeScript)
  • docs/ref/ — Scraped UniFi API reference docs
  • docs/ref/unifi-openapi.json — Full OpenAPI 3.1.0 spec for the UniFi Network API
  • docs/ref/index.md — Table of contents for all API endpoints
  • scripts/ — Utility scripts
    • scrape-docs.mjs — Scrapes UniFi docs from developer.ui.com
    • sync-skills.sh — Syncs .agents/skills/ as symlinks into .claude/skills/
  • .agents/skills/ — Agent skills (shared across Claude Code, Codex, etc.)
  • .claude/skills/ — Symlinks to .agents/skills/ (managed by sync-skills.sh)
  • package.json — Node.js project config

Skills

$code-change-verification

Run before marking work complete when changes affect src/, tests, or build config.

bash .agents/skills/code-change-verification/scripts/run.sh

$implementation-strategy

Use before editing code when the task changes MCP tool definitions, runtime behavior, or configuration. Determines the compatibility boundary and implementation shape.

$pr-draft-summary

When a task finishes with moderate-or-larger code changes, invoke to generate a PR summary block, branch suggestion, title, and draft description.

$docs-sync

Audit documentation coverage by comparing the implementation against docs/. Use after significant API surface changes.

$build-mcp-server

Reference skill for MCP server design and scaffolding patterns.

Development Workflow

  1. Create a feature branch: git checkout -b feat/<description>
  2. Install dependencies: npm install
  3. Implement changes with tests
  4. Run $code-change-verification before marking complete
  5. Use $pr-draft-summary for the final handoff

Scripts

# Scrape UniFi API docs (re-run when targeting a new API version)
npm run scrape-docs

# Sync agent skills → .claude/ symlinks
npm run sync-skills

API Reference

The UniFi Network API OpenAPI spec is at docs/ref/unifi-openapi.json. The scraper extracts it directly from the RSC payload on developer.ui.com — no page-by-page crawling needed. Run npm run scrape-docs -- --version vX.Y.Z to target a different API version.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.