agent-scripts README

The project's README from github.com/steipete/agent-scripts. As one markdown file: README.md.

Agent Scripts

Shared agent instructions, skills, and small portable helpers for Peter's local workspaces.

This repo is the canonical place for:

Skills

Skills are the main routing layer. Each skills/<name>/SKILL.md has YAML front matter:

---
name: skill-name
description: "Short generic trigger phrase."
---

Rules:

Global discovery is built by scripts/sync-skills (idempotent; run on every Mac after cloning or adding skills):

For the specific legacy topology ~/.claude/skills/NAME/NAME -> ~/.codex/skills/NAME -> ~/.claude/skills/NAME, invoke the sync owner directly with an explicit allowlist:

/absolute/path/to/agent-scripts/scripts/sync-skills --repair-nested-self-links --dry-run -- boxd-cli boxd-setup-deploy
/absolute/path/to/agent-scripts/scripts/sync-skills --repair-nested-self-links -- boxd-cli boxd-setup-deploy

This mode validates every candidate before unlinking only the extra nested leaves. It preserves the real skill directories, assets, and valid Codex backlinks, and exits before creating roots, building mirrors, pruning, or touching instruction pointers. Names must start with an ASCII letter or digit and contain only letters, digits, ., _, or -; duplicates, missing names, and unknown arguments are rejected. A missing nested leaf is a no-op only with the expected surrounding topology. Redirected/inaccessible roots, unexpected objects or literal targets, and changed directory/link identities cause refusal. Rechecks before each unlink are not atomic concurrency protection; a later error stops the batch and reports removals already completed, without rollback.

The read-only skills/fleet-maintenance/scripts/agent-skill-links-audit.sh reports same-name nested ancestor loops as reason=nested-self-link. This is narrow detection, not an exhaustive graph validator. Its --repair remains a broad sync through ~/Projects/agent-scripts/scripts/sync-skills; it is not the scoped repair above. Run scripts/test-sync-skills for isolated fixture coverage; scripts/test-sync-skills --recurrence-only /absolute/path/to/old-sync-skills runs the unchanged recurrence assertion against an original helper.

Shared personal skills live as real folders in skills/. Public OpenClaw shared skills live in ../agent-skills and are exposed here with tracked relative symlinks. Repo-owned skills stay canonical in their repo and are exposed here the same way, for example:

skills/autoreview -> ../../agent-skills/skills/autoreview
skills/discrawl -> ../../discrawl/.agents/skills/discrawl

Current symlinked repo-owned skills include birdclaw, discrawl, gog, imsg, slacrawl, wacli, and wacrawl.

Agent Instructions

Shared hard rules live in AGENTS.MD.

Global setup (also maintained by scripts/sync-skills; Claude Code reads CLAUDE.md only, so it links to the shared AGENTS.MD):

Downstream repos should use a pointer-style AGENTS.MD:

READ ~/Projects/agent-scripts/AGENTS.MD BEFORE ANYTHING (skip if missing).

Repo-specific rules go below that pointer. Do not copy the shared blocks into downstream repos.

Helpers

scripts/sync-skills

scripts/validate-skills

scripts/docs-list.ts

scripts/browser-tools.ts

Syncing

Treat this repo as canonical for shared agent rules and portable helper scripts.

When syncing downstream repos:

For submodules, repeat the pointer check inside each subrepo, push those changes, then bump submodule SHAs in the parent repo.

agent-scripts (steipete/agent-scripts)

Searching Database…

这是什么东西?一个面向 AI 编程助手的个人工具箱:把共享的助手指令、可复用的工作流技能和一些小巧的便携脚本集中放在一个主仓库里,再同步到作者的 Codex 和 Claude Code 配置中。
那这是一个安装就能用的工具,还是一个需要克隆并接入我自己助手的仓库?不是应用程序——它是一个需要克隆并手动接入的仓库。scripts/sync-skills 会为每台机器建立符号链接,让两个助手都能从这份主副本里发现技能和共享的 AGENTS.MD。
在我的电脑上要怎么安装?克隆它,然后在每台 Mac 上运行 scripts/sync-skills(克隆之后或新增技能之后都要跑一次)。它会把技能链接进每个助手的技能目录,并让两个助手都指向共享的 AGENTS.MD;脚本可以重复运行,只打印有变化的部分。
它实际支持哪些编程助手?Codex 和 Claude Code。Codex 会扫描嵌套目录,所以给它的是整棵根目录的链接;Claude Code 只读取 ~/.claude/skills 这一层的目录,所以同步脚本会为它另外生成一套扁平的按技能一一对应的镜像。
如果我自己已有同名技能或文件,和它的名字冲突了会怎样?同步绝不会覆盖真实文件,而是报告冲突。名字冲突时按 agent-scripts > manager > codex-local 的优先级解决,并且作者提醒:unlink 时的复查并不是原子性的并发保护。
它有好几千颗星——是给别人用的,还是只是作者的个人配置?它主要是 Peter 为自己的仓库搭建的配置,但这些组件都是可移植的:指针式的 AGENTS.MD、按助手区分的技能镜像和校验钩子,都设计成可以复制到任何工作区使用。
这里的“技能”具体指什么?一个包含 SKILL.md 的文件夹,SKILL.md 带 YAML front matter,必须有一个 name 字段和一段简短的用途描述。技能放在 skills/ 目录里(部分仓库自带的技能通过纳入版本控制的符号链接暴露出来),scripts/validate-skills 会逐个校验。
技能检查能自动运行吗?可以。用 git config core.hooksPath hooks 启用自带的 git 钩子,之后 scripts/validate-skills 就会检查每个 SKILL.md 的 YAML front matter 是否有效,以及必需的 name 和 description 字段。
browser-tools 这个辅助脚本是干什么的?scripts/browser-tools.ts 是一个独立的 Chrome DevTools 辅助工具:可以带配置启动、导航、执行 JS、截图、读取控制台和网络请求、检查页面元素、结束浏览器实例。还能用 bun build 把它编译成单个二进制文件。
下游仓库怎么和这些规则保持同步?它们保留一个指针式的 AGENTS.MD,链接回这个仓库,把仓库自己的规则写在指针下方,绝不复制共享内容块。只有当辅助脚本必须逐字节完全一致时,才会在仓库之间复制改动。
Creator
steipete
Size
2.4 MB
Stars
7.4K
Age
11mo
Commits · 90 Days