skills/local/cali-agents-md/SKILL.md
--- name: cali-agents-md description: Generate and maintain project AGENTS.md files using semantic analysis. Triggers when: a project has no AGENTS.md, user asks to "create AGENTS.md", "generate agents md", "setup agents md", or when starting work on a project that lacks one. Also triggers when user asks to "check if AGENTS.md is stale", "update agents md", or when evolving an existing AGENTS.md. Covers: initial generation from codebase analysis, sem-based staleness detection, pre-commit hooks,
npx skillsauth add renatocaliari/agent-sync-public-skills skills/local/cali-agents-mdInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Creates and maintains lean, high-signal AGENTS.md files for AI coding agents.
Uses sem (semantic version control) for staleness detection on ongoing commits.
semsem is required for staleness detection. Check if installed:
sem --version
If not installed:
brew install sem-cli
Verify it works in the project:
cd /path/to/project
sem diff --format json # Should return JSON with entity changes
Does the project root have AGENTS.md?
ls AGENTS.md 2>/dev/null
Generate a minimal AGENTS.md using the template from references/agmd-template.md.
Write it to the project root.
Analyze the full codebase to fill in placeholders:
find . -type f -name '*.go' | head -30 (or relevant extensions)main.go, cmd/, index.ts, etc.Makefile, go.mod, package.json, Dockerfilego.mod, package.json, requirements.txtFill every [To be determined] and [Add your ... here] placeholder.
Remove any section that stays empty after investigation.
Target: 20-30 lines max. If over 30 lines, move detailed content to separate docs.
Present the generated AGENTS.md to the user for review. Suggest removing any section the agent can infer from code.
Every time this skill is invoked — whether creating new, reviewing, or evolving — check if the sem pre-commit hook is installed and offer to install it.
Check if hook exists:
test -f .git/hooks/pre-commit && grep -q "sem diff" .git/hooks/pre-commit 2>/dev/null && echo "installed" || echo "not installed"
If not installed, ask the user:
The
sempre-commit hook detects when code entities (functions, classes, methods) change and warns if AGENTS.md may be stale. This keeps your project docs accurate without manual checking.Shall I install the sem staleness hook in
.git/hooks/pre-commit?
If user confirms, install:
# If no existing pre-commit hook:
cp references/pre-commit-hook.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
# If existing hook needs merging: append sem check to end of existing hook
cat references/pre-commit-hook.sh >> .git/hooks/pre-commit
If user declines, skip silently. Don't ask again in this session.
If already installed, confirm silently:
✅ sem staleness hook already installed in .git/hooks/pre-commit
<!-- Do not restructure or delete sections -->The pre-commit hook uses sem diff --format json to detect entity-level changes
(functions, classes, methods, headings) and warns when AGENTS.md may need updating.
What sem provides:
What the hook checks:
For GitHub Actions, add the workflow from references/github-action-guard.yml
to .github/workflows/agents-md-guard.yml. It runs sem diff in CI and
comments on PRs when code entities change without corresponding AGENTS.md updates.
Input: "This project has no AGENTS.md, create one"
Steps:
ls AGENTS.md 2>/dev/null → not foundOutput: "Created AGENTS.md with 24 lines covering: entry point, build, test, conventions. Hook installed."
Input: "Check if our AGENTS.md is still accurate"
Steps:
ls AGENTS.md 2>/dev/null → foundsem diff --format json → shows 5 entity changes since last AGENTS.md updateOutput: "Found 5 entity changes since last update. Updated 2 sections. Hook already installed."
Input: "Install the staleness hook"
Steps:
test -f .git/hooks/pre-commit && grep -q "sem diff" .git/hooks/pre-commit → not foundcp references/pre-commit-hook.sh .git/hooks/pre-commitchmod +x .git/hooks/pre-commitOutput: "✅ Sem staleness hook installed. It will warn when code entities change without AGENTS.md updates."
sem --version → not foundbrew install sem-clireferences/agmd-template.md — Minimal AGENTS.md template (20-30 lines)references/pre-commit-hook.sh — sem-based staleness detection hookreferences/github-action-guard.yml — Optional CI guard workflowdevelopment
PocketBase v0.39+ development - API rules, auth, collections, SDK, realtime, files, Go/JS extending, deployment, production tuning.
tools
Auto-initialize structured documentation for any project using lat.md (knowledge graph of markdown files with [[wiki links]], // @lat: code refs, and semantic search). Detects cali-product-workflow artifacts (spec-product.md, spec-tech.md, critiques) and uses them as seed material. Falls back to extracting business rules, architecture, and design decisions directly from the codebase. Use when a project lacks structured documentation or when lat.md/ is missing. After seeding, lat.md extension hooks keep documentation alive automatically.
testing
[Cali] Server security audit and hardening for private servers behind Tailscale. Use when: auditing server security, hardening SSH/firewall/Docker, checking for vulnerabilities, setting up fail2ban, reviewing port exposure, or responding to security alerts. Covers 6 layers: CloudFlare, UFW, Tailscale, SSH, Docker, Application. Triggers: "server security", "security audit", "harden server", "SSH hardening", "firewall rules", "UFW config", "fail2ban", "port security", "Docker security", "vulnerability check", "security review".
tools
Run supply chain security scans before installing packages or before releases. Triggers when: user installs a package (npm, pip, go get, brew), user asks to 'scan dependencies', 'check vulnerabilities', 'supply chain', 'security audit', 'run trivy', 'run socket', or before any release/deployment. Also triggers on mentions of: socket.dev, trivy, OSV-scanner, dotenvx, CVE, dependency audit. Covers all four tools with concrete commands.