AGENT SKILL

agent-workspace-init

Initialize or extend a tool-agnostic agent workspace at any repository depth. Discovers current layout state, asks which coding agents to configure from a known list, then bootstraps, adopts, migrates, extends clients, or adds a skill/agent/rule/tool/doc under .agents/ with thin client adapters. Use when creating AGENTS.md and .agents/, migrating duplicated client folders, or adding artifacts without copying into .claude or .cursor.

License 许可
Apache-2.0
最近更新
2026-08-24
Stars
★ 0
Forks
0

01 前言 Front Matter

name
agent-workspace-init
description
Initialize or extend a tool-agnostic agent workspace at any repository depth. Discovers current layout state, asks which coding agents to configure from a known list, then bootstraps, adopts, migrates, extends clients, or adds a skill/agent/rule/tool/doc under .agents/ with thin client adapters. Use when creating AGENTS.md and .agents/, migrating duplicated client folders, or adding artifacts without copying into .claude or .cursor.

02 资源文件 4

03 SKILL.md 正文

Agent workspace init

Goal

Make a chosen directory a maintainable tool-agnostic agent workspace (or extend an existing one): one canonical AGENTS.md + .agents/ tree, thin client adapters, no duplicated skill/agent/rule bodies under vendor folders.

Required reading

  1. mapping.md
  2. clients.md
  3. modes.md
  4. templates.md

Checkpoints before writes

  1. Resolve workspace root (user path or ask). Default: git top-level of the current working directory.
  2. Detect git top-level vs workspace root. If nested, note DiscoveryRisk for non-MCP adapters (see clients.md).
  3. Inventory: AGENTS.md, .agents/**, .claude/**, .cursor/**, .codex/**, and sibling workspace candidates under the git root. Also inventory git-root .mcp.json, .cursor/mcp.json, and .codex/config.toml.
  4. Classify state: empty | guidance-only | partial | healthy | conflicted (modes.md).
  5. Ask which clients to configure from the known catalog (multiselect). Default: claude-code, cursor, codex.
  6. Ask whether shared MCP JSON is wanted (mcp.jsonShared). MCP discovery files always land at the git repository root, even when the workspace root is nested.
  7. Select mode: bootstrap | adopt | migrate | extend-clients | add-artifact. Confirm with the user when migrating/adopting or when state is conflicted.
  8. Present a short file plan (create / link / move). Wait for confirmation before destructive moves.
  9. Apply changes. Write .agents/workspace.json for selected clients and MCP flag. Create skills/agents/rules adapters at the workspace root; create or update MCP discovery only under the git repository root.
  10. Copy or refresh .agents/tools/verify-agent-workspace.sh from this plugin’s scripts/verify-agent-workspace.sh.
  11. Run:
bash .agents/tools/verify-agent-workspace.sh .

(from the workspace root). Fix failures before finishing. 12. Hand off: run skill agent-workspace-audit on the same path.

Must refuse

  • Writing skill, agent, or rule bodies into .claude/ or .cursor/ (symlinks and native settings only).
  • Symlinking settings files (for example .claude/settings.json).
  • Placing .mcp.json, .cursor/mcp.json, or .codex/config.toml under a nested workspace root.
  • Claiming Windows symlink support.
  • Inventing undocumented Tier A adapters for Tier B/custom clients.
  • Silent deletes during adopt/migrate.

add-artifact

Ask which kind: skill package, agent role (.md + .toml if codex selected), rule pair, tool script, or doc. Create only under .agents/. Update contributing docs if a new category appears. Refuse if the name already exists unless the user asked to overwrite.

Done when

Verify script passes for the selected clients, workspace.json matches the choice, DiscoveryRisk (if any) is reported, and the user is pointed at agent-workspace-audit.

04 同仓库更多 Skills