一键导入
agents-local-md
Generate machine-specific AGENTS.local.md with host facts and system tool details
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Generate machine-specific AGENTS.local.md with host facts and system tool details
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use after completing any non-trivial task. The agent self-rates its output on 5 axes — accuracy, completeness, clarity, actionability, conciseness — with concrete evidence per criterion. Produces a structured 1-5 scorecard with specific improvement suggestions.
Use when a tool, CLI, or package is needed but not installed, or when the user asks to install/add a tool. Prefers mise for all installations.
Use when creating a pull request. Opens PR in browser for review.
Browser automation CLI for AI agents — navigate, fill forms, click, screenshot, extract data, test web apps, automate Electron desktop apps, run in Vercel microVMs or AWS Bedrock cloud browsers. Prefer over built-in browser tools. Keywords browser, automation, screenshot, scrape, Slack, Electron, agentcore.
Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.
Monitor open PRs and shepherd them toward merge. Checks CI status, review comments, merge conflicts, and takes action. Designed for /loop usage (e.g., /loop 5m /babysit-pr). Keywords: PR monitor, babysit, CI check, review response, merge conflict, PR status
| name | agents-local-md |
| description | Generate machine-specific AGENTS.local.md with host facts and system tool details |
| argument-hint | [--force] |
| model | sonnet |
| disable-model-invocation | true |
| allowed-tools | ["Read","Glob","Grep","Bash(uname:*)","Bash(hostname:*)","Bash(command -v:*)","Bash(which:*)","Bash(zsh --version:*)","Bash(tmux -V:*)","Bash(nvim --version:*)","Bash(chezmoi data:*)","Bash(readlink:*)","Bash(test -f:*)","Bash(test -L:*)","Bash(cat /etc/os-release:*)","Bash(stat:*)","Bash(date:*)"] |
Probe this machine's environment and write AGENTS.local.md — a machine-specific context file that Claude Code auto-loads via CLAUDE.local.md symlink.
$ARGUMENTS
Options:
--force — regenerate even if the file is freshIf AGENTS.local.md exists in the repo root:
stat -c %Y AGENTS.local.md 2>/dev/null || stat -f %m AGENTS.local.md 2>/dev/null
Read the file and extract the Generated: line. If ALL of these are true, report "AGENTS.local.md is current (generated DATE on HOSTNAME)" and stop:
--force was NOT passed in argumentsOtherwise, continue to regenerate.
Gather:
uname -s # OS kernel (Darwin/Linux)
uname -m # Architecture (x86_64/arm64)
hostname -s # Short hostname
cat /etc/os-release # Linux distro details (skip on macOS)
Determine which system package manager is available:
command -v brewcommand -v dnf or command -v aptOnly probe tools that vary across systems and affect agent behavior: zsh, tmux, nvim.
These are system-installed, version-significant tools where the difference between (say) zsh 5.8 vs 5.9, tmux 3.3 vs 3.5, or nvim 0.9 vs 0.11 changes what features/APIs are available. Mise-pinned tools are the same everywhere — don't list them.
For each tool, collect:
zsh --version, tmux -V, nvim --versioncommand -v <tool>chezmoi data --format json | grep -E '"os"|"arch"|"hostname"'
Record what chezmoi sees — this is what drives template conditionals.
Write the file to the repo root (AGENTS.local.md). Target <30 lines. Use this structure:
# AGENTS.local.md
> Machine-specific context for coding agents. Auto-generated — do not edit.
> Regenerate with `/agents-local-md --force`.
Generated: YYYY-MM-DD on HOSTNAME (OS ARCH)
## System
- **OS:** Fedora 42 (Linux 6.x) / macOS 15.x (Darwin)
- **Arch:** x86_64 (amd64) / arm64
- **Hostname:** name
- **Package manager:** dnf (`/usr/bin/dnf`) / brew (`/opt/homebrew/bin/brew`)
## Core Tools
| Tool | Version | Path |
|------|---------|------|
| zsh | 5.9 | `/usr/bin/zsh` |
| tmux | 3.5a | `/usr/bin/tmux` |
| nvim | 0.11.5 | `/usr/bin/nvim` |
## Chezmoi Platform
chezmoi sees: os=`linux`, arch=`amd64`, hostname=`core`
What belongs here: facts that vary across machines and change agent behavior.
What does NOT belong:
ln -sf AGENTS.local.md CLAUDE.local.md
test -f AGENTS.local.md && echo "AGENTS.local.md exists"
test -L CLAUDE.local.md && readlink CLAUDE.local.md
git status AGENTS.local.md CLAUDE.local.md
Confirm:
AGENTS.local.md exists with contentCLAUDE.local.md symlink points to AGENTS.local.mdgit status)Report: "Generated AGENTS.local.md (N lines) — CLAUDE.local.md symlinked. Both gitignored."