{
  "markdown": "# Agent Scripts\n\nShared agent instructions, skills, and small portable helpers for Peter's local workspaces.\n\nThis repo is the canonical place for:\n- `AGENTS.MD`: shared hard rules for Codex/Claude-style agents\n- `skills/`: reusable workflow skills, including repo-owned skills exposed by symlink\n- `scripts/`: dependency-light helpers used across projects\n- `hooks/`: local guardrails such as skill validation\n\n## Skills\n\nSkills are the main routing layer. Each `skills/<name>/SKILL.md` has YAML front matter:\n\n```yaml\n---\nname: skill-name\ndescription: \"Short generic trigger phrase.\"\n---\n```\n\nRules:\n- Keep descriptions short and generic; optimize for routing, not documentation.\n- Keep skill bodies terse and operational.\n- Prefer helper scripts under `skills/<name>/scripts/` when a workflow has repeatable commands.\n- Validate after edits: `scripts/validate-skills`.\n- Quote `description` in front matter.\n\nGlobal discovery is built by `scripts/sync-skills` (idempotent; run on every Mac after cloning or adding skills):\n- Codex scans nested dirs, so it gets whole-root links: `~/.codex/skills/agent-scripts -> ~/Projects/agent-scripts/skills`, `~/.codex/skills/manager -> ~/Projects/manager/skills`.\n- Claude Code loads only `~/.claude/skills/<name>/SKILL.md` (exactly one level deep; per-entry symlinks are followed, category subfolders are not scanned — verified on 2.1.197). It gets a flat per-skill link mirror covering both repos plus machine-local `~/.codex/skills/<name>` extras.\n- Name collisions resolve agent-scripts > manager > codex-local; the script prints skipped duplicates and prunes broken/stale managed links.\n- Real destination files and directories are preserved. A real Claude skill directory with a Codex backlink to that same directory satisfies local ownership; other real destination conflicts are reported and make sync fail.\n\nFor the specific legacy topology `~/.claude/skills/NAME/NAME -> ~/.codex/skills/NAME -> ~/.claude/skills/NAME`, invoke the sync owner directly with an explicit allowlist:\n\n```bash\n/absolute/path/to/agent-scripts/scripts/sync-skills --repair-nested-self-links --dry-run -- boxd-cli boxd-setup-deploy\n```\n\n```bash\n/absolute/path/to/agent-scripts/scripts/sync-skills --repair-nested-self-links -- boxd-cli boxd-setup-deploy\n```\n\nThis 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.\n\nThe 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.\n\nShared 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:\n\n```text\nskills/autoreview -> ../../agent-skills/skills/autoreview\nskills/discrawl -> ../../discrawl/.agents/skills/discrawl\n```\n\nCurrent symlinked repo-owned skills include `birdclaw`, `discrawl`, `gog`, `imsg`, `slacrawl`, `wacli`, and `wacrawl`.\n\n## Agent Instructions\n\nShared hard rules live in `AGENTS.MD`.\n\nGlobal setup (also maintained by `scripts/sync-skills`; Claude Code reads `CLAUDE.md` only, so it links to the shared `AGENTS.MD`):\n- `~/.codex/AGENTS.md -> ~/Projects/agent-scripts/AGENTS.MD`\n- `~/.claude/CLAUDE.md -> ~/Projects/agent-scripts/AGENTS.MD`\n- `~/.claude/AGENTS.md -> ~/Projects/agent-scripts/AGENTS.MD`\n\nDownstream repos should use a pointer-style `AGENTS.MD`:\n\n```text\nREAD ~/Projects/agent-scripts/AGENTS.MD BEFORE ANYTHING (skip if missing).\n```\n\nRepo-specific rules go below that pointer. Do not copy the shared blocks into downstream repos.\n\n## Helpers\n\n`scripts/sync-skills`\n- Builds the per-machine skill mirror: Codex whole-root links, Claude flat per-skill links, shared `AGENTS.MD` pointers.\n- Idempotent; prints changes only, prunes broken/stale managed links, never clobbers real files.\n- No arguments runs ordinary sync; `--help` prints usage. Only the scoped `--repair-nested-self-links` mode accepts `--dry-run`.\n\n`scripts/validate-skills`\n- Checks every `skills/*/SKILL.md`.\n- Verifies YAML front matter plus required `name` and `description`.\n- Enable as a local hook with `git config core.hooksPath hooks`.\n\n`scripts/docs-list.ts`\n- Walks `docs/`.\n- Enforces `summary` and `read_when` front matter.\n- Prints onboarding summaries for repos that wire it in.\n\n`scripts/browser-tools.ts`\n- Standalone Chrome DevTools helper.\n- Common commands: `start --profile`, `nav <url>`, `eval '<js>'`, `screenshot`, `console`, `network`, `search --content \"<query>\"`, `content <url>`, `inspect`, `kill --all --force`.\n- Build optional binary with `bun build scripts/browser-tools.ts --compile --target bun --outfile bin/browser-tools`.\n\n## Syncing\n\nTreat this repo as canonical for shared agent rules and portable helper scripts.\n\nWhen syncing downstream repos:\n- Pull latest here first.\n- Ensure each target repo starts with the pointer-style `AGENTS.MD`.\n- Preserve repo-local rules below the pointer.\n- Copy helper changes both directions only when the helper is meant to stay byte-identical.\n- Keep scripts dependency-free and portable; no repo-specific imports or path aliases.\n\nFor submodules, repeat the pointer check inside each subrepo, push those changes, then bump submodule SHAs in the parent repo.\n",
  "bytes": 6404,
  "sha": "c001e64a72e3083b864ed03550ff1058322c9d040720e4b277e08c00c730f5f5",
  "repo_slug": "steipete/agent-scripts",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/skl_steipete_agent_scripts_video_transcript__015ef441/readme"
}