[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6DR4HQMMYVM7YMWT3TK22W6":3,"skill-same:01M6DR4HQMMYVM7YMWT3TK22W6":73},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":46,"commitSha":47,"skillDirectory":48,"forksCount":49,"repositoryHtmlUrl":50,"repositoryHomepageUrl":6,"ownerHtmlUrl":51,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6DR4HQMMYVM7YMWT3TK22W6","maintain-cross-platform",null,"Use when preparing releases, validating cross-platform compatibility, or updating installation infrastructure. Meta-skill for maintaining AgentSys's 3-platform architecture.","AntifragileTech\u002Fantifragile-claude-code","AntifragileTech","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F174357194?v=4","01M6DQCYMK4CDSQQAN0ZC72NTV","01M6DQCYS9YPW1WKMQ5TJMPQ43",9,"MIT","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fmaintain-cross-platform\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"cross platform","maintain","platform","maintain cross platform","architecture","infrastructure","Meta","repo","use","releases","compatibility","meta-skill","cross-platform","installation","local","2026-11-10 10:12:30",false,"---\nname: maintain-cross-platform\ndescription: \"Use when preparing releases, validating cross-platform compatibility, or updating installation infrastructure. Meta-skill for maintaining AgentSys's 3-platform architecture.\"\nmetadata:\n  short-description: \"Meta-skill: maintain 3-platform architecture\"\n  scope: local\n  audience: repo-maintainers\n---\n\n# Maintain Cross-Platform Architecture\n\n**Purpose:** Comprehensive knowledge of AgentSys's cross-platform infrastructure for release preparation, validation, and maintenance.\n\n**Scope:** LOCAL skill for this repository only. Contains specific file locations, transformation rules, and automation patterns for maintaining Claude Code + OpenCode + Codex CLI compatibility.\n\n## Critical Rules\n\n1. **3 platforms MUST work** - Claude Code, OpenCode, Codex CLI. No exceptions.\n2. **Validation before every push** - Pre-push hook runs 6 validators automatically.\n3. **All version fields must align** - 11 files total (package.json + 10 plugin.json files).\n4. **Documentation must be accurate** - Counts, paths, and platform references validated by CI.\n5. **Update this skill** - If you find misalignments or automation opportunities, update this file.\n\n---\n\n## Platform Differences (The Complete Matrix)\n\n### Configuration\n\n| Aspect | Claude Code | OpenCode | Codex CLI |\n|--------|-------------|----------|-----------|\n| **Config format** | JSON | JSON\u002FJSONC | TOML |\n| **Config location** | `~\u002F.claude\u002Fsettings.json` | `~\u002F.config\u002Fopencode\u002Fopencode.json` | `~\u002F.codex\u002Fconfig.toml` |\n| **State directory** | `.claude\u002F` | `.opencode\u002F` | `.codex\u002F` |\n| **Command prefix** | `\u002F` | `\u002F` | `$` |\n| **Project instructions** | `CLAUDE.md` | `AGENTS.md` (reads CLAUDE.md) | `AGENTS.md` |\n\n### Component Locations\n\n| Component | Claude Code | OpenCode | Codex CLI |\n|-----------|-------------|----------|-----------|\n| **Commands** | Plugin `commands\u002F` | `~\u002F.config\u002Fopencode\u002Fcommands\u002F` | N\u002FA (use skills) |\n| **Agents** | Plugin `agents\u002F` | `~\u002F.config\u002Fopencode\u002Fagents\u002F` | N\u002FA (use MCP) |\n| **Skills** | Plugin `skills\u002F` | `.opencode\u002Fskills\u002F` (singular) | `~\u002F.codex\u002Fskills\u002F` |\n| **Hooks** | Plugin `hooks\u002F` | Plugin `hooks\u002F` | Plugin `hooks\u002F` |\n\n### Install Locations (This Repo)\n\n| Platform | Package Copy | Commands | Agents | Skills | Config |\n|----------|--------------|----------|--------|--------|--------|\n| Claude Code | Via marketplace | Plugin bundled | Plugin bundled | Plugin bundled | N\u002FA |\n| OpenCode | `~\u002F.agentsys\u002F` | `~\u002F.config\u002Fopencode\u002Fcommands\u002F` | `~\u002F.config\u002Fopencode\u002Fagents\u002F` (29 files) | N\u002FA | `~\u002F.config\u002Fopencode\u002Fopencode.json` |\n| Codex CLI | `~\u002F.agentsys\u002F` | N\u002FA | N\u002FA | `~\u002F.codex\u002Fskills\u002F` (9 directories) | `~\u002F.codex\u002Fconfig.toml` |\n\n### Frontmatter Differences\n\n**Command Frontmatter:**\n\n```yaml\n# Claude Code\n---\ndescription: Task description\nargument-hint: \"[args]\"\nallowed-tools: Bash(git:*), Read, Task\n---\n\n# OpenCode (transformed by installer)\n---\ndescription: Task description\nagent: general\n# model field REMOVED (uses user's default model)\n---\n\n# Codex (skills use different format)\n---\nname: skill-name\ndescription: \"Use when user asks to \\\"trigger\\\". Does X.\"\n---\n```\n\n**Agent Frontmatter:**\n\n```yaml\n# Claude Code\n---\nname: agent-name\ndescription: Agent description\ntools: Bash(git:*), Read, Edit, Task\nmodel: sonnet\n---\n\n# OpenCode (transformed by installer)\n---\nname: agent-name\ndescription: Agent description\nmode: subagent\n# model field REMOVED (OpenCode doesn't support per-agent models yet)\npermission:\n  read: allow\n  edit: allow\n  bash: ask\n  task: allow\n---\n```\n\n**Transformation Rules (bin\u002Fcli.js handles this):**\n\n| Claude Code | OpenCode |\n|-------------|----------|\n| `tools: Bash(git:*)` | `permission: { bash: \"allow\" }` |\n| `tools: Read` | `permission: { read: \"allow\" }` |\n| `tools: Edit, Write` | `permission: { edit: \"allow\" }` |\n| `tools: Task` | `permission: { task: \"allow\" }` |\n| `model: sonnet\u002Fopus\u002Fhaiku` | **REMOVED** (OpenCode uses user default) |\n\n**CRITICAL:** The `--strip-models` flag in `bin\u002Fcli.js` removes model specifications for OpenCode users who don't have access to all three model tiers.\n\n---\n\n## File Locations (This Repository)\n\n### Installation Infrastructure\n\n| File | Purpose |\n|------|---------|\n| `bin\u002Fcli.js` | Main installer (811 lines) - handles all 3 platforms |\n| `scripts\u002Fsetup-hooks.js` | Git hooks installer (pre-commit, pre-push) |\n| `adapters\u002Fopencode-plugin\u002F` | Native OpenCode TypeScript plugin |\n| `adapters\u002Fopencode\u002F` | OpenCode install script (legacy) |\n| `adapters\u002Fcodex\u002F` | Codex install script (legacy) |\n| `mcp-server\u002Findex.js` | Cross-platform MCP server |\n\n### Validation Scripts (All in CI + Pre-Push)\n\n| Script | What It Validates | Exit 1 If |\n|--------|-------------------|-----------|\n| `scripts\u002Fvalidate-plugins.js` | Plugin structure, plugin.json validity | Invalid plugin.json |\n| `scripts\u002Fvalidate-cross-platform.js` | 3-platform compatibility | Platform-specific code |\n| `scripts\u002Fvalidate-repo-consistency.js` | Repo integrity | Inconsistencies |\n| `scripts\u002Fcheck-hardcoded-paths.js` | No hardcoded `.claude\u002F` paths | Hardcoded paths found |\n| `scripts\u002Fvalidate-counts.js` | Doc accuracy (agents, plugins, skills, versions) | Count mismatches |\n| `scripts\u002Fvalidate-cross-platform-docs.js` | Platform docs consistency | Doc conflicts |\n\n### Transformation Mappings (bin\u002Fcli.js)\n\n**Search markers in bin\u002Fcli.js:**\n- `PLUGINS_ARRAY` - Line 138 - Plugins to install for Claude Code\n- `OPENCODE_COMMAND_MAPPINGS` - Line 242 - Commands to copy for OpenCode\n- `CODEX_SKILL_MAPPINGS` - Line ~280 - Skills to create for Codex\n\n**OPENCODE_COMMAND_MAPPINGS format:**\n```javascript\n['dest-file.md', 'plugin-name', 'source-file.md']\n```\n\n**CODEX_SKILL_MAPPINGS format:**\n```javascript\n['skill-name', 'plugin-name', 'source-file.md', 'Trigger description with \"phrases\"']\n```\n\n### Version Fields (11 Files Total)\n\nAll must have SAME version for releases:\n\n1. `package.json` - Line 3\n2. `.claude-plugin\u002Fplugin.json` - Root plugin\n3. `.claude-plugin\u002Fmarketplace.json` - 9 plugin entries\n4. `mcp-server\u002Findex.js` - Search: `MCP_SERVER_VERSION`\n5-13. `plugins\u002F*\u002F. claude-plugin\u002Fplugin.json` - All 9 plugins\n\n**Quick check:**\n```bash\ngrep -r '\"version\"' package.json plugins\u002F*\u002F.claude-plugin\u002Fplugin.json .claude-plugin\u002Fplugin.json\n```\n\n---\n\n## Release Process (RC and Production)\n\n### RC Release (3.X.0-rc.N)\n\n**Step 1: Update Versions**\n```bash\n# Bump to RC version in ALL 11 files\nNEW_VERSION=\"3.6.0-rc.1\"\n\n# package.json\nnpm version $NEW_VERSION --no-git-tag-version\n\n# All plugin.json files (9 plugins + root)\nfind . -name \"plugin.json\" -path \"*\u002F.claude-plugin\u002F*\" -exec sed -i '' \"s\u002F\\\"version\\\": \\\".*\\\"\u002F\\\"version\\\": \\\"$NEW_VERSION\\\"\u002F\" {} \\;\n\n# mcp-server\u002Findex.js\nsed -i '' \"s\u002Fversion: '.*'\u002Fversion: '$NEW_VERSION'\u002F\" mcp-server\u002Findex.js\n```\n\n**Step 2: Update CHANGELOG.md**\n```markdown\n## [3.6.0-rc.1] - 2026-01-30\n\n### Added\n- Feature description\n\n### Changed\n- Change description\n\n### Fixed\n- Bug fix description\n```\n\n**Step 3: Validate**\n```bash\nnpm run validate    # All 6 validators\nnpm test            # All tests\nnpm pack --dry-run  # Package builds\n```\n\n**Step 4: Commit and Tag**\n```bash\ngit add -A\ngit commit -m \"chore: release v3.6.0-rc.1\"\ngit tag v3.6.0-rc.1\ngit push origin main --tags\n```\n\n**Step 5: Verify**\n```bash\n# Wait for GitHub Actions\nnpm view agentsys@rc version  # Should show 3.6.0-rc.1\n```\n\n### Production Release (3.X.0)\n\nSame as RC but:\n- Remove `-rc.N` suffix from version\n- Tag with `v3.X.0` (no suffix)\n- npm publishes to `latest` tag automatically\n\n---\n\n## What Changes Per Release\n\n### Always Update\n\n1. **Version fields (11 files)** - See \"Version Fields\" section above\n2. **CHANGELOG.md** - Add new entry at top\n3. **Run validation** - `npm run validate` (includes all 6 validators)\n4. **Run tests** - `npm test` (1400+ tests)\n5. **Package build** - `npm pack --dry-run`\n\n### If New Command Added\n\n1. **Convention-based discovery** - Plugins auto-discovered from `plugins\u002F*\u002F` with `.claude-plugin\u002Fplugin.json`\n2. **Commands auto-discovered** - From `plugins\u002F*\u002Fcommands\u002F*.md` files\n3. **Codex trigger phrases** - Use `codex-description` frontmatter in command files\n4. **docs\u002FINSTALLATION.md** - Add `\u002Fplugin install \u003Cname>@agentsys` line\n5. **.claude-plugin\u002Fmarketplace.json** - Add plugin entry to `plugins` array\n6. **README.md** - Add to commands table\n7. **Validation will catch** - If counts don't match (plugins count)\n\n### If New Agent Added\n\n1. **No changes needed** - Installer auto-copies agents to OpenCode `~\u002F.config\u002Fopencode\u002Fagents\u002F`\n2. **Codex uses MCP** - Agents not directly supported, use MCP tools instead\n3. **Validation will catch** - If file-based agent count changes\n\n### If New Skill Added\n\n1. **Codex requires trigger phrases** - Description must include \"Use when user asks to...\"\n2. **Validation will catch** - If skill count doesn't match\n\n### If New MCP Tool Added\n\n1. **mcp-server\u002Findex.js** - Add to TOOLS array and toolHandlers\n2. **.claude-plugin\u002Fmarketplace.json** - Add to `mcpServer.tools` array\n3. **bin\u002Fcli.js** - Update MCP tools console output (OpenCode + Codex)\n4. **README.md** - Add to MCP tools table if user-facing\n\n### If Library Module Changed\n\n1. **lib\u002F{module}\u002F** - Make changes\n2. **lib\u002Findex.js** - Export if new module\n3. **Run sync** - `.\u002Fscripts\u002Fsync-lib.sh` (or `agentsys-dev sync-lib`) copies lib\u002F to all 9 plugins\n4. **Commit both** - Source in lib\u002F AND copies in plugins\u002F*\u002Flib\u002F\n\n---\n\n## Platform-Specific Transformations (What bin\u002Fcli.js Does)\n\n### OpenCode Transformations\n\n**1. Remove Model Specifications (if --strip-models)**\n```javascript\n\u002F\u002F Original (Claude Code):\nmodel: sonnet\n\n\u002F\u002F Transformed (OpenCode):\n(field removed entirely)\n```\n\n**Why:** Not all OpenCode users have access to all three model tiers. Uses user's default model instead.\n\n**2. Transform Tools to Permissions**\n```javascript\n\u002F\u002F Original:\ntools: Bash(git:*), Read, Edit, Task\n\n\u002F\u002F Transformed:\npermission:\n  bash: allow\n  read: allow\n  edit: allow\n  task: allow\n```\n\n**3. Replace Environment Variables**\n```javascript\n\u002F\u002F Original:\n${CLAUDE_PLUGIN_ROOT}\n\n\u002F\u002F Transformed:\n${PLUGIN_ROOT}\n```\n\n**4. Normalize Windows Paths in require()**\n```javascript\n\u002F\u002F Original:\nrequire('${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fmodule.js')\n\n\u002F\u002F Transformed:\nrequire('${PLUGIN_ROOT}'.replace(\u002F\\\\\u002Fg, '\u002F') + '\u002Flib\u002Fmodule.js')\n```\n\n**Why:** Windows backslashes (`C:\\Users\\...`) break JavaScript string escaping.\n\n### Codex Transformations\n\n**1. Command → Skill Conversion**\n```javascript\n\u002F\u002F Commands become skills with trigger phrases\n\u002F\u002F Original command: \u002Fnext-task\n\u002F\u002F Becomes: $next-task with SKILL.md\n\n\u002F\u002F SKILL.md requires:\n---\nname: next-task\ndescription: \"Use when user asks to \\\"find next task\\\", \\\"automate workflow\\\". Master orchestrator.\"\n---\n```\n\n**2. Agent Logic → Inline in Skills**\n- Agents not supported directly in Codex\n- Agent workflows embedded in skill instructions\n- Or use MCP tools to invoke agent logic\n\n---\n\n## Validation Suite (Pre-Push + CI)\n\n### validate:plugins\n**File:** `scripts\u002Fvalidate-plugins.js`\n**Checks:**\n- plugin.json structure validity\n- Required fields present\n- Commands\u002Fagents\u002Fskills exist as declared\n\n**Exit 1 if:** Invalid plugin.json\n\n### validate:cross-platform\n**File:** `scripts\u002Fvalidate-cross-platform.js`\n**Checks:**\n- Code works on all 3 platforms\n- No platform-specific assumptions\n- Proper use of AI_STATE_DIR\n\n**Exit 1 if:** Platform-specific code detected\n\n### validate:consistency\n**File:** `scripts\u002Fvalidate-repo-consistency.js`\n**Checks:**\n- Repository integrity\n- File structure consistency\n\n**Exit 1 if:** Inconsistencies found\n\n### validate:paths\n**File:** `scripts\u002Fcheck-hardcoded-paths.js`\n**Checks:**\n- No hardcoded `.claude\u002F` paths in agents\u002Fcommands\u002Fskills\n- Excludes: docs, SKILL.md in enhance\u002F, RESEARCH.md, examples\n\n**Patterns detected:**\n```regex\n\u002F\\.claude\\\u002F(?!.*\\(example\\)|.*Platform|.*State directory)\u002F\n\u002F\\.opencode\\\u002F(?!.*\\(example\\)|.*Platform)\u002F\n\u002F\\.codex\\\u002F(?!.*\\(example\\)|.*Platform)\u002F\n```\n\n**Safe contexts (skipped):**\n- Documentation tables (`| State Dir |`)\n- Platform comparison examples\n- Skill documentation (enhance\u002F* SKILL.md)\n- Checklist references\n\n**Exit 1 if:** Hardcoded paths found outside safe contexts\n\n### validate:counts\n**File:** `scripts\u002Fvalidate-counts.js`\n**Checks:**\n- Plugin count (9) across README, CLAUDE.md, AGENTS.md, package.json, docs\n- Agent count (39 total = 29 file-based + 10 role-based) across all docs\n- Skill count (23) across all docs\n- Version alignment (package.json matches all 10 plugin.json files)\n- CLAUDE.md ↔ AGENTS.md critical rules alignment (>90% similarity)\n\n**Actual counts (filesystem):**\n- Plugins: 9 directories in `plugins\u002F`\n- File-based agents: 29 .md files in `plugins\u002F*\u002Fagents\u002F`\n- Role-based agents: 10 (from audit-project, defined inline)\n- Skills: 23 SKILL.md files in `plugins\u002F*\u002Fskills\u002F*\u002FSKILL.md`\n\n**Smart validation:**\n- Accepts \"39 agents\" or \"39 agents (29 file-based + 10 role-based)\"\n- Skips plugin-specific counts like \"next-task (12 agents)\"\n- Only validates top-level totals\n\n**Exit 1 if:** Count mismatches or version misalignment\n\n### validate:platform-docs\n**File:** `scripts\u002Fvalidate-cross-platform-docs.js`\n**Checks:**\n- Command prefix consistency (\u002F vs $)\n- State directory references platform-appropriate\n- Feature parity (all 9 commands documented for all platforms)\n- Installation instructions consistent\n- MCP server configurations correct\n\n**Smart validation:**\n- Skips comparison tables\n- Skips checklist references\n- Skips skill name mentions (like `enhance-claude-memory`)\n- Skips documentation examples\n\n**Exit 1 if:** Platform conflicts or missing features\n\n---\n\n## Pre-Push Hook (Automatic Enforcement)\n\n**File:** `scripts\u002Fsetup-hooks.js` → Creates `.git\u002Fhooks\u002Fpre-push`\n\n**Phase 1: Validation Suite**\n```bash\nnpm run validate  # Runs all 6 validators\n```\nBlocks if any validator fails.\n\n**Phase 2: Enhanced Content Check**\nDetects modified:\n- `agents\u002F*.md`\n- `skills\u002F*\u002FSKILL.md`\n- `hooks\u002F*.md`\n- `prompts\u002F*.md`\n\nPrompts: \"Have you run \u002Fenhance on these files? (y\u002FN)\"\nBlocks if \"N\" (per CLAUDE.md Critical Rule #7).\n\n**Phase 3: Release Tag Validation**\nIf pushing version tag (v*):\n- Runs `npm test`\n- Runs `npm pack --dry-run`\n- Blocks if either fails\n\n**Skip hook:** `git push --no-verify` (use with caution)\n\n---\n\n## Installer Deep Dive (bin\u002Fcli.js)\n\n### Interactive Flow\n\n1. **Platform Selection** - Multi-select: Claude Code, OpenCode, Codex CLI\n2. **Clean Old Installation** - Removes `~\u002F.agentsys\u002F` if exists\n3. **Copy Package** - From npm global to `~\u002F.agentsys\u002F`\n4. **Install Dependencies** - Runs `npm install --production` in package and mcp-server\n5. **Per-Platform Installation:**\n   - Claude Code: Adds marketplace, installs 9 plugins\n   - OpenCode: Copies commands, agents; updates config; installs native plugin\n   - Codex: Creates skills with trigger phrases; updates config\n\n### Key Functions\n\n**installForClaude()** - Line 116\n- Adds marketplace: `claude plugin marketplace add agent-sh\u002Fagentsys`\n- Installs 9 plugins: `claude plugin install {plugin}@agentsys`\n- Commands: \u002Fnext-task, \u002Fship, \u002Fdeslop, \u002Faudit-project, \u002Fdrift-detect, \u002Fenhance, \u002Fperf, \u002Fsync-docs, \u002Frepo-map\n\n**installForOpenCode(installDir, options)** - Line 165\n- Creates dirs: `~\u002F.config\u002Fopencode\u002Fcommands\u002F`, `~\u002F.config\u002Fopencode\u002Fplugins\u002Fagentsys.ts`\n- Copies native plugin from `adapters\u002Fopencode-plugin\u002F`\n- Transforms commands using `OPENCODE_COMMAND_MAPPINGS`\n- Transforms agents (tools → permissions, strips models if --strip-models)\n- Updates `~\u002F.config\u002Fopencode\u002Fopencode.json` with MCP config\n\n**installForCodex(installDir)** - Line 330+\n- Creates dir: `~\u002F.codex\u002Fskills\u002F`\n- Creates SKILL.md files using `CODEX_SKILL_MAPPINGS`\n- Each skill gets trigger-phrase description\n- Updates `~\u002F.codex\u002Fconfig.toml` with MCP config\n\n### Command Mappings (OpenCode)\n\n**OPENCODE_COMMAND_MAPPINGS** - Line ~242:\n```javascript\nconst commandMappings = [\n  ['deslop.md', 'deslop', 'deslop.md'],\n  ['enhance.md', 'enhance', 'enhance.md'],\n  ['next-task.md', 'next-task', 'next-task.md'],\n  ['delivery-approval.md', 'next-task', 'delivery-approval.md'],\n  ['sync-docs.md', 'sync-docs', 'sync-docs.md'],\n  ['audit-project.md', 'audit-project', 'audit-project.md'],\n  ['drift-detect.md', 'drift-detect', 'drift-detect.md'],\n  ['repo-map.md', 'repo-map', 'repo-map.md'],\n  ['perf.md', 'perf', 'perf.md'],\n  ['ship.md', 'ship', 'ship.md']\n];\n```\n\n### Skill Mappings (Codex)\n\n**CODEX_SKILL_MAPPINGS** - Line ~280+:\n```javascript\nconst skillMappings = [\n  ['next-task', 'next-task', 'next-task.md',\n    'Use when user asks to \"find next task\", \"automate workflow\". Master workflow orchestrator.'],\n  ['ship', 'ship', 'ship.md',\n    'Use when user asks to \"create PR\", \"ship changes\", \"merge PR\". Complete PR workflow.'],\n  \u002F\u002F ... 7 more\n];\n```\n\n---\n\n## Adding New Features (Step-by-Step)\n\n### New Command (e.g., \u002Fmy-command)\n\n**1. Create command file:**\n```bash\nplugins\u002Fmy-plugin\u002Fcommands\u002Fmy-command.md\n```\n\n**2. Update bin\u002Fcli.js - 3 locations:**\n\n**a) PLUGINS_ARRAY (if new plugin):**\n```javascript\n\u002F\u002F Line ~138\nconst plugins = ['next-task', 'ship', ..., 'my-plugin'];\n```\n\n**b) OPENCODE_COMMAND_MAPPINGS:**\n```javascript\n\u002F\u002F Line ~242\n['my-command.md', 'my-plugin', 'my-command.md'],\n```\n\n**c) CODEX_SKILL_MAPPINGS:**\n```javascript\n\u002F\u002F Line ~280\n['my-command', 'my-plugin', 'my-command.md',\n  'Use when user asks to \"trigger phrase\". Description of capability.'],\n```\n\n**3. Update marketplace.json:**\n```json\n\u002F\u002F .claude-plugin\u002Fmarketplace.json - Add to plugins array\n{\n  \"name\": \"my-plugin\",\n  \"version\": \"3.5.0\",\n  \"description\": \"...\",\n  \"path\": \"plugins\u002Fmy-plugin\"\n}\n```\n\n**4. Create plugin.json:**\n```bash\nplugins\u002Fmy-plugin\u002F.claude-plugin\u002Fplugin.json\n```\n\n**5. Update docs:**\n- `docs\u002FINSTALLATION.md` - Add install command\n- `README.md` - Add to commands table\n- CHANGELOG.md - Add under \"Added\"\n\n**6. Validate:**\n```bash\nnpm run validate  # Will catch missing mappings\n```\n\n### New Agent (e.g., my-agent)\n\n**1. Create agent file:**\n```bash\nplugins\u002Fmy-plugin\u002Fagents\u002Fmy-agent.md\n```\n\nWith proper frontmatter:\n```yaml\n---\nname: my-agent\ndescription: Brief description\ntools: Bash(git:*), Read, Edit\nmodel: sonnet\n---\n```\n\n**2. Installer handles automatically:**\n- ✅ Copies to `~\u002F.config\u002Fopencode\u002Fagents\u002Fmy-agent.md`\n- ✅ Transforms frontmatter (tools → permissions)\n- ✅ Strips model if --strip-models flag\n- ✅ Normalizes Windows paths in require()\n\n**3. No Codex changes needed** - Codex uses MCP, not agents\n\n**4. Validate:**\n```bash\nnpm run validate:counts  # Will update agent count if added\n```\n\n### New Skill (e.g., my-skill)\n\n**1. Create skill directory and file:**\n```bash\nplugins\u002Fmy-plugin\u002Fskills\u002Fmy-skill\u002FSKILL.md\n```\n\nWith frontmatter:\n```yaml\n---\nname: my-skill\ndescription: \"Use when user asks to \\\"trigger\\\". Description.\"\nmetadata:\n  short-description: \"Brief\"\n---\n```\n\n**2. If user-invocable (Codex):**\nAdd to CODEX_SKILL_MAPPINGS in bin\u002Fcli.js\n\n**3. Validate:**\n```bash\nnpm run validate:counts  # Will check skill count matches\n```\n\n### New MCP Tool\n\n**1. Add to mcp-server\u002Findex.js:**\n\n**a) TOOLS array:**\n```javascript\nconst TOOLS = [\n  \u002F\u002F ...\n  {\n    name: 'my_tool',\n    description: 'Tool description',\n    inputSchema: {\n      type: 'object',\n      properties: { param: { type: 'string' } },\n      required: ['param']\n    }\n  }\n];\n```\n\n**b) toolHandlers object:**\n```javascript\nconst toolHandlers = {\n  \u002F\u002F ...\n  my_tool: async (params) => {\n    \u002F\u002F Implementation\n    return xplat.successResponse({ result: 'data' });\n  }\n};\n```\n\n**2. Update marketplace.json:**\n```json\n\u002F\u002F .claude-plugin\u002Fmarketplace.json\n\"mcpServer\": {\n  \"tools\": [\"workflow_status\", ..., \"my_tool\"]\n}\n```\n\n**3. Update docs:**\n- `README.md` - Add to features if user-facing\n\n---\n\n## Common Release Pitfalls (And How Validators Catch Them)\n\n### Pitfall 1: Forgot to Update Plugin Version\n```bash\n# Symptoms:\n- package.json says 3.6.0\n- plugins\u002Fnext-task\u002F.claude-plugin\u002Fplugin.json says 3.5.0\n\n# Caught by:\nnpm run validate:counts\n# → [ERROR] Version misalignment\n```\n\n### Pitfall 2: Hardcoded .claude\u002F Path\n```bash\n# Symptoms:\n- Agent contains: `.claude\u002Fflow.json`\n- OpenCode and Codex break\n\n# Caught by:\nnpm run validate:paths\n# → [ERROR] Hardcoded path found in agents\u002Fmy-agent.md:42\n```\n\n### Pitfall 3: Agent Count Mismatch\n```bash\n# Symptoms:\n- Added new agent\n- README still says \"39 agents\"\n- Actually 40 now\n\n# Caught by:\nnpm run validate:counts\n# → [ERROR] README.md agents: Expected 40, Actual 39\n```\n\n### Pitfall 4: Missing Trigger Phrase (Codex)\n```bash\n# Symptoms:\n- Codex skill has: description: \"Master orchestrator\"\n- No trigger phrases\n- Codex doesn't know when to invoke\n\n# Caught by:\n\u002Fenhance --focus=skills\n# → [MEDIUM] Description missing trigger phrases\n```\n\n### Pitfall 5: OpenCode Label Too Long\n```bash\n# Symptoms:\n- AskUserQuestion label: \"#123: Fix authentication timeout in ProfileScreen component\"\n- 65 characters\n- OpenCode throws error\n\n# Prevention:\nUse truncateLabel() function in task-discoverer agent\nMax 30 chars for OpenCode compatibility\n```\n\n### Pitfall 6: Forgot to Run \u002Fenhance\n```bash\n# Symptoms:\n- Modified agents\u002Fskills\n- Didn't run \u002Fenhance\n- Pushed anyway\n\n# Caught by:\nPre-push hook prompts: \"Have you run \u002Fenhance? (y\u002FN)\"\nBlocks push if \"N\"\n```\n\n---\n\n## Automation Opportunities (Always Consider)\n\n### Current Automations\n\n1. ✅ **lib\u002F sync** - Pre-commit hook auto-syncs lib\u002F to plugins\u002F\n2. ✅ **Validation** - Pre-push hook runs 6 validators\n3. ✅ **Agent transformation** - Installer auto-transforms frontmatter\n4. ✅ **Model stripping** - `--strip-models` flag for OpenCode\n5. ✅ **Version checking** - validate:counts catches misalignment\n6. ✅ **Path checking** - validate:paths catches hardcoded paths\n7. ✅ **\u002Fenhance enforcement** - Pre-push hook prompts\n\n### Potential Improvements\n\n**1. Version Bump Automation**\n```bash\n# Current: Manual find\u002Freplace in 11 files\n# Opportunity: Script that updates all version fields atomically\n# Script: scripts\u002Fbump-version.js \u003Cnew-version>\n```\n\n**2. CHANGELOG Entry Generation**\n```bash\n# Current: Manual entry creation\n# Opportunity: Parse git log since last tag, categorize commits\n# Script: scripts\u002Fgenerate-changelog-entry.js\n```\n\n**3. Cross-Platform Install Test**\n```bash\n# Current: Manual testing on each platform\n# Opportunity: Docker containers for each platform, automated smoke tests\n# Script: scripts\u002Ftest-install-all-platforms.sh\n```\n\n**4. Agent Count Auto-Update**\n```bash\n# Current: Manual count updates in docs\n# Opportunity: Extract counts from filesystem, update docs automatically\n# Script: scripts\u002Fupdate-doc-counts.js\n```\n\n**5. Marketplace.json Sync**\n```bash\n# Current: Manual updates to .claude-plugin\u002Fmarketplace.json\n# Opportunity: Generate from plugins\u002F directory structure\n# Script: scripts\u002Fsync-marketplace-manifest.js\n```\n\n**If you identify more automation opportunities, ADD THEM HERE.**\n\n---\n\n## Your Responsibilities (Agent Using This Skill)\n\n### Before Push\n\n1. **Run validations:**\n   ```bash\n   npm run validate\n   ```\n   Fix any issues found.\n\n2. **If modified enhanced content (agents\u002Fskills\u002Fhooks\u002Fprompts):**\n   ```bash\n   \u002Fenhance\n   ```\n   Address HIGH certainty findings.\n\n3. **Check for misalignments in this skill:**\n   - New script added but not documented here?\n   - New platform difference discovered?\n   - New validation pattern needed?\n   - UPDATE THIS FILE if yes\n\n4. **Think about automation:**\n   - Can this manual step be automated?\n   - Is there a pattern we're repeating?\n   - ADD to \"Potential Improvements\" section\n\n### Before Release\n\n1. **Read release checklist:**\n   ```bash\n   cat checklists\u002Frelease.md\n   ```\n\n2. **Update all 11 version fields:**\n   - Use version bump script (if exists) or manual find\u002Freplace\n   - Validate: `npm run validate:counts`\n\n3. **Update CHANGELOG.md:**\n   - Add entry at top with date\n   - Categorize: Added\u002FChanged\u002FFixed\u002FRemoved\n\n4. **Run full validation:**\n   ```bash\n   npm test                  # 1400+ tests\n   npm run validate          # All 6 validators\n   npm pack --dry-run        # Package builds\n   ```\n\n5. **Test cross-platform install:**\n   ```bash\n   npm pack\n   npm install -g .\u002Fagentsys-*.tgz\n   echo \"1 2 3\" | agentsys  # Test installer\n   ```\n\n6. **Commit and tag:**\n   ```bash\n   git add -A\n   git commit -m \"chore: release v3.X.0-rc.N\"\n   git tag v3.X.0-rc.N\n   git push origin main --tags\n   ```\n\n7. **Verify npm publish:**\n   ```bash\n   # Wait for GitHub Actions release workflow\n   npm view agentsys@rc version  # For RC\n   npm view agentsys version     # For production\n   ```\n\n### Update Misalignments\n\nIf you find any of these while working:\n\n**New script not documented here:**\n1. Read the script to understand what it does\n2. Add to relevant section (Validation Suite, Installation, etc.)\n3. Commit: \"docs(maintain-cross-platform): document {script-name}\"\n\n**New platform difference discovered:**\n1. Test on all 3 platforms to confirm\n2. Add to \"Platform Differences\" matrix\n3. Add to \"Common Pitfalls\" if it causes issues\n4. Update relevant validation script if needed\n\n**New validation pattern needed:**\n1. Consider: Can existing validator be extended?\n2. If new validator needed, create in `scripts\u002Fvalidate-{name}.js`\n3. Add to `package.json` validate script\n4. Document in \"Validation Suite\" section\n5. Update \"Pre-Push Hook\" section if relevant\n\n**Automation opportunity identified:**\n1. Add to \"Potential Improvements\" with description\n2. Estimate effort (simple\u002Fmedium\u002Fcomplex)\n3. Note dependencies (tools needed, testing required)\n\n---\n\n## Quick Reference: File Counts\n\n**Plugins:** 9\n1. next-task\n2. enhance\n3. ship\n4. perf\n5. audit-project\n6. deslop\n7. drift-detect\n8. repo-map\n9. sync-docs\n\n**Agents:** 39 total = 29 file-based + 10 role-based\n\n**File-based (29):** Count files in `plugins\u002F*\u002Fagents\u002F*.md`\n- next-task: 12\n- enhance: 9\n- perf: 6\n- drift-detect: 1\n- repo-map: 1\n\n**Role-based (10):** Defined inline in audit-project command\n- code-quality-reviewer, security-expert, performance-engineer, test-quality-guardian\n- architecture-reviewer, database-specialist, api-designer\n- frontend-specialist, backend-specialist, devops-reviewer\n\n**Skills:** 23 - Count SKILL.md in `plugins\u002F*\u002Fskills\u002F*\u002FSKILL.md`\n- next-task: 4 (orchestrate-review, discover-tasks, validate-delivery, update-docs)\n- enhance: 10 (orchestrator, reporter, agent-prompts, claude-memory, docs, plugins, prompts, hooks, skills)\n- perf: 8 (analyzer, baseline, benchmark, code-paths, investigation-logger, profile, theory, theory-tester)\n- drift-detect: 1 (drift-analysis)\n- repo-map: 1 (repo-mapping)\n\n**Version Fields:** 11 files\n- 1x package.json\n- 1x .claude-plugin\u002Fplugin.json\n- 9x plugins\u002F*\u002F.claude-plugin\u002Fplugin.json\n- 1x mcp-server\u002Findex.js (MCP_SERVER_VERSION constant)\n\n---\n\n## Constraints\n\n- **NEVER break existing functionality** - Production project with real users\n- **ALWAYS test on all 3 platforms** - At least smoke test\n- **ALWAYS update this skill** - If you find gaps or improvements\n- **ALWAYS run validation** - Pre-push hook enforces this\n- **Documentation must stay accurate** - Validators enforce this\n\n---\n\n## Output Format\n\nWhen using this skill, output:\n\n```markdown\n## Cross-Platform Compatibility Check\n\n### Validations Run\n- [OK\u002FERROR] validate:plugins\n- [OK\u002FERROR] validate:cross-platform\n- [OK\u002FERROR] validate:consistency\n- [OK\u002FERROR] validate:paths\n- [OK\u002FERROR] validate:counts\n- [OK\u002FERROR] validate:platform-docs\n\n### Issues Found\n[List any issues with file:line references]\n\n### Misalignments in This Skill\n[List any outdated information found in this skill]\n\n### Automation Opportunities\n[List any manual steps that could be automated]\n\n### Actions Taken\n[List files updated\u002Fcreated]\n\n### Next Steps\n[List remaining work]\n```\n\n---\n\n## Version\n\n**Skill Version:** 1.0.0\n**Last Updated:** 2026-01-30\n**Covers:** AgentSys v5.0.0 architecture\n\n**Update this skill when:**\n- New platform added\n- New validation script created\n- Installation process changes\n- New automation implemented\n- Platform differences discovered\n","# Maintain Cross-Platform Architecture\n\n**Purpose:** Comprehensive knowledge of AgentSys's cross-platform infrastructure for release preparation, validation, and maintenance.\n\n**Scope:** LOCAL skill for this repository only. Contains specific file locations, transformation rules, and automation patterns for maintaining Claude Code + OpenCode + Codex CLI compatibility.\n\n## Critical Rules\n\n1. **3 platforms MUST work** - Claude Code, OpenCode, Codex CLI. No exceptions.\n2. **Validation before every push** - Pre-push hook runs 6 validators automatically.\n3. **All version fields must align** - 11 files total (package.json + 10 plugin.json files).\n4. **Documentation must be accurate** - Counts, paths, and platform references validated by CI.\n5. **Update this skill** - If you find misalignments or automation opportunities, update this file.\n\n---\n\n## Platform Differences (The Complete Matrix)\n\n### Configuration\n\n| Aspect | Claude Code | OpenCode | Codex CLI |\n|--------|-------------|----------|-----------|\n| **Config format** | JSON | JSON\u002FJSONC | TOML |\n| **Config location** | `~\u002F.claude\u002Fsettings.json` | `~\u002F.config\u002Fopencode\u002Fopencode.json` | `~\u002F.codex\u002Fconfig.toml` |\n| **State directory** | `.claude\u002F` | `.opencode\u002F` | `.codex\u002F` |\n| **Command prefix** | `\u002F` | `\u002F` | `$` |\n| **Project instructions** | `CLAUDE.md` | `AGENTS.md` (reads CLAUDE.md) | `AGENTS.md` |\n\n### Component Locations\n\n| Component | Claude Code | OpenCode | Codex CLI |\n|-----------|-------------|----------|-----------|\n| **Commands** | Plugin `commands\u002F` | `~\u002F.config\u002Fopencode\u002Fcommands\u002F` | N\u002FA (use skills) |\n| **Agents** | Plugin `agents\u002F` | `~\u002F.config\u002Fopencode\u002Fagents\u002F` | N\u002FA (use MCP) |\n| **Skills** | Plugin `skills\u002F` | `.opencode\u002Fskills\u002F` (singular) | `~\u002F.codex\u002Fskills\u002F` |\n| **Hooks** | Plugin `hooks\u002F` | Plugin `hooks\u002F` | Plugin `hooks\u002F` |\n\n### Install Locations (This Repo)\n\n| Platform | Package Copy | Commands | Agents | Skills | Config |\n|----------|--------------|----------|--------|--------|--------|\n| Claude Code | Via marketplace | Plugin bundled | Plugin bundled | Plugin bundled | N\u002FA |\n| OpenCode | `~\u002F.agentsys\u002F` | `~\u002F.config\u002Fopencode\u002Fcommands\u002F` | `~\u002F.config\u002Fopencode\u002Fagents\u002F` (29 files) | N\u002FA | `~\u002F.config\u002Fopencode\u002Fopencode.json` |\n| Codex CLI | `~\u002F.agentsys\u002F` | N\u002FA | N\u002FA | `~\u002F.codex\u002Fskills\u002F` (9 directories) | `~\u002F.codex\u002Fconfig.toml` |\n\n### Frontmatter Differences\n\n**Command Frontmatter:**\n\n```yaml\n# Claude Code\n---\ndescription: Task description\nargument-hint: \"[args]\"\nallowed-tools: Bash(git:*), Read, Task\n---\n\n# OpenCode (transformed by installer)\n---\ndescription: Task description\nagent: general\n# model field REMOVED (uses user's default model)\n---\n\n# Codex (skills use different format)\n---\nname: skill-name\ndescription: \"Use when user asks to \\\"trigger\\\". Does X.\"\n---\n```\n\n**Agent Frontmatter:**\n\n```yaml\n# Claude Code\n---\nname: agent-name\ndescription: Agent description\ntools: Bash(git:*), Read, Edit, Task\nmodel: sonnet\n---\n\n# OpenCode (transformed by installer)\n---\nname: agent-name\ndescription: Agent description\nmode: subagent\n# model field REMOVED (OpenCode doesn't support per-agent models yet)\npermission:\n  read: allow\n  edit: allow\n  bash: ask\n  task: allow\n---\n```\n\n**Transformation Rules (bin\u002Fcli.js handles this):**\n\n| Claude Code | OpenCode |\n|-------------|----------|\n| `tools: Bash(git:*)` | `permission: { bash: \"allow\" }` |\n| `tools: Read` | `permission: { read: \"allow\" }` |\n| `tools: Edit, Write` | `permission: { edit: \"allow\" }` |\n| `tools: Task` | `permission: { task: \"allow\" }` |\n| `model: sonnet\u002Fopus\u002Fhaiku` | **REMOVED** (OpenCode uses user default) |\n\n**CRITICAL:** The `--strip-models` flag in `bin\u002Fcli.js` removes model specifications for OpenCode users who don't have access to all three model tiers.\n\n---\n\n## File Locations (This Repository)\n\n### Installation Infrastructure\n\n| File | Purpose |\n|------|---------|\n| `bin\u002Fcli.js` | Main installer (811 lines) - handles all 3 platforms |\n| `scripts\u002Fsetup-hooks.js` | Git hooks installer (pre-commit, pre-push) |\n| `adapters\u002Fopencode-plugin\u002F` | Native OpenCode TypeScript plugin |\n| `adapters\u002Fopencode\u002F` | OpenCode install script (legacy) |\n| `adapters\u002Fcodex\u002F` | Codex install script (legacy) |\n| `mcp-server\u002Findex.js` | Cross-platform MCP server |\n\n### Validation Scripts (All in CI + Pre-Push)\n\n| Script | What It Validates | Exit 1 If |\n|--------|-------------------|-----------|\n| `scripts\u002Fvalidate-plugins.js` | Plugin structure, plugin.json validity | Invalid plugin.json |\n| `scripts\u002Fvalidate-cross-platform.js` | 3-platform compatibility | Platform-specific code |\n| `scripts\u002Fvalidate-repo-consistency.js` | Repo integrity | Inconsistencies |\n| `scripts\u002Fcheck-hardcoded-paths.js` | No hardcoded `.claude\u002F` paths | Hardcoded paths found |\n| `scripts\u002Fvalidate-counts.js` | Doc accuracy (agents, plugins, skills, versions) | Count mismatches |\n| `scripts\u002Fvalidate-cross-platform-docs.js` | Platform docs consistency | Doc conflicts |\n\n### Transformation Mappings (bin\u002Fcli.js)\n\n**Search markers in bin\u002Fcli.js:**\n- `PLUGINS_ARRAY` - Line 138 - Plugins to install for Claude Code\n- `OPENCODE_COMMAND_MAPPINGS` - Line 242 - Commands to copy for OpenCode\n- `CODEX_SKILL_MAPPINGS` - Line ~280 - Skills to create for Codex\n\n**OPENCODE_COMMAND_MAPPINGS format:**\n```javascript\n['dest-file.md', 'plugin-name', 'source-file.md']\n```\n\n**CODEX_SKILL_MAPPINGS format:**\n```javascript\n['skill-name', 'plugin-name', 'source-file.md', 'Trigger description with \"phrases\"']\n```\n\n### Version Fields (11 Files Total)\n\nAll must have SAME version for releases:\n\n1. `package.json` - Line 3\n2. `.claude-plugin\u002Fplugin.json` - Root plugin\n3. `.claude-plugin\u002Fmarketplace.json` - 9 plugin entries\n4. `mcp-server\u002Findex.js` - Search: `MCP_SERVER_VERSION`\n5-13. `plugins\u002F*\u002F. claude-plugin\u002Fplugin.json` - All 9 plugins\n\n**Quick check:**\n```bash\ngrep -r '\"version\"' package.json plugins\u002F*\u002F.claude-plugin\u002Fplugin.json .claude-plugin\u002Fplugin.json\n```\n\n---\n\n## Release Process (RC and Production)\n\n### RC Release (3.X.0-rc.N)\n\n**Step 1: Update Versions**\n```bash\n# Bump to RC version in ALL 11 files\nNEW_VERSION=\"3.6.0-rc.1\"\n\n# package.json\nnpm version $NEW_VERSION --no-git-tag-version\n\n# All plugin.json files (9 plugins + root)\nfind . -name \"plugin.json\" -path \"*\u002F.claude-plugin\u002F*\" -exec sed -i '' \"s\u002F\\\"version\\\": \\\".*\\\"\u002F\\\"version\\\": \\\"$NEW_VERSION\\\"\u002F\" {} \\;\n\n# mcp-server\u002Findex.js\nsed -i '' \"s\u002Fversion: '.*'\u002Fversion: '$NEW_VERSION'\u002F\" mcp-server\u002Findex.js\n```\n\n**Step 2: Update CHANGELOG.md**\n```markdown\n## [3.6.0-rc.1] - 2026-01-30\n\n### Added\n- Feature description\n\n### Changed\n- Change description\n\n### Fixed\n- Bug fix description\n```\n\n**Step 3: Validate**\n```bash\nnpm run validate    # All 6 validators\nnpm test            # All tests\nnpm pack --dry-run  # Package builds\n```\n\n**Step 4: Commit and Tag**\n```bash\ngit add -A\ngit commit -m \"chore: release v3.6.0-rc.1\"\ngit tag v3.6.0-rc.1\ngit push origin main --tags\n```\n\n**Step 5: Verify**\n```bash\n# Wait for GitHub Actions\nnpm view agentsys@rc version  # Should show 3.6.0-rc.1\n```\n\n### Production Release (3.X.0)\n\nSame as RC but:\n- Remove `-rc.N` suffix from version\n- Tag with `v3.X.0` (no suffix)\n- npm publishes to `latest` tag automatically\n\n---\n\n## What Changes Per Release\n\n### Always Update\n\n1. **Version fields (11 files)** - See \"Version Fields\" section above\n2. **CHANGELOG.md** - Add new entry at top\n3. **Run validation** - `npm run validate` (includes all 6 validators)\n4. **Run tests** - `npm test` (1400+ tests)\n5. **Package build** - `npm pack --dry-run`\n\n### If New Command Added\n\n1. **Convention-based discovery** - Plugins auto-discovered from `plugins\u002F*\u002F` with `.claude-plugin\u002Fplugin.json`\n2. **Commands auto-discovered** - From `plugins\u002F*\u002Fcommands\u002F*.md` files\n3. **Codex trigger phrases** - Use `codex-description` frontmatter in command files\n4. **docs\u002FINSTALLATION.md** - Add `\u002Fplugin install \u003Cname>@agentsys` line\n5. **.claude-plugin\u002Fmarketplace.json** - Add plugin entry to `plugins` array\n6. **README.md** - Add to commands table\n7. **Validation will catch** - If counts don't match (plugins count)\n\n### If New Agent Added\n\n1. **No changes needed** - Installer auto-copies agents to OpenCode `~\u002F.config\u002Fopencode\u002Fagents\u002F`\n2. **Codex uses MCP** - Agents not directly supported, use MCP tools instead\n3. **Validation will catch** - If file-based agent count changes\n\n### If New Skill Added\n\n1. **Codex requires trigger phrases** - Description must include \"Use when user asks to...\"\n2. **Validation will catch** - If skill count doesn't match\n\n### If New MCP Tool Added\n\n1. **mcp-server\u002Findex.js** - Add to TOOLS array and toolHandlers\n2. **.claude-plugin\u002Fmarketplace.json** - Add to `mcpServer.tools` array\n3. **bin\u002Fcli.js** - Update MCP tools console output (OpenCode + Codex)\n4. **README.md** - Add to MCP tools table if user-facing\n\n### If Library Module Changed\n\n1. **lib\u002F{module}\u002F** - Make changes\n2. **lib\u002Findex.js** - Export if new module\n3. **Run sync** - `.\u002Fscripts\u002Fsync-lib.sh` (or `agentsys-dev sync-lib`) copies lib\u002F to all 9 plugins\n4. **Commit both** - Source in lib\u002F AND copies in plugins\u002F*\u002Flib\u002F\n\n---\n\n## Platform-Specific Transformations (What bin\u002Fcli.js Does)\n\n### OpenCode Transformations\n\n**1. Remove Model Specifications (if --strip-models)**\n```javascript\n\u002F\u002F Original (Claude Code):\nmodel: sonnet\n\n\u002F\u002F Transformed (OpenCode):\n(field removed entirely)\n```\n\n**Why:** Not all OpenCode users have access to all three model tiers. Uses user's default model instead.\n\n**2. Transform Tools to Permissions**\n```javascript\n\u002F\u002F Original:\ntools: Bash(git:*), Read, Edit, Task\n\n\u002F\u002F Transformed:\npermission:\n  bash: allow\n  read: allow\n  edit: allow\n  task: allow\n```\n\n**3. Replace Environment Variables**\n```javascript\n\u002F\u002F Original:\n${CLAUDE_PLUGIN_ROOT}\n\n\u002F\u002F Transformed:\n${PLUGIN_ROOT}\n```\n\n**4. Normalize Windows Paths in require()**\n```javascript\n\u002F\u002F Original:\nrequire('${CLAUDE_PLUGIN_ROOT}\u002Flib\u002Fmodule.js')\n\n\u002F\u002F Transformed:\nrequire('${PLUGIN_ROOT}'.replace(\u002F\\\\\u002Fg, '\u002F') + '\u002Flib\u002Fmodule.js')\n```\n\n**Why:** Windows backslashes (`C:\\Users\\...`) break JavaScript string escaping.\n\n### Codex Transformations\n\n**1. Command → Skill Conversion**\n```javascript\n\u002F\u002F Commands become skills with trigger phrases\n\u002F\u002F Original command: \u002Fnext-task\n\u002F\u002F Becomes: $next-task with SKILL.md\n\n\u002F\u002F SKILL.md requires:\n---\nname: next-task\ndescription: \"Use when user asks to \\\"find next task\\\", \\\"automate workflow\\\". Master orchestrator.\"\n---\n```\n\n**2. Agent Logic → Inline in Skills**\n- Agents not supported directly in Codex\n- Agent workflows embedded in skill instructions\n- Or use MCP tools to invoke agent logic\n\n---\n\n## Validation Suite (Pre-Push + CI)\n\n### validate:plugins\n**File:** `scripts\u002Fvalidate-plugins.js`\n**Checks:**\n- plugin.json structure validity\n- Required fields present\n- Commands\u002Fagents\u002Fskills exist as declared\n\n**Exit 1 if:** Invalid plugin.json\n\n### validate:cross-platform\n**File:** `scripts\u002Fvalidate-cross-platform.js`\n**Checks:**\n- Code works on all 3 platforms\n- No platform-specific assumptions\n- Proper use of AI_STATE_DIR\n\n**Exit 1 if:** Platform-specific code detected\n\n### validate:consistency\n**File:** `scripts\u002Fvalidate-repo-consistency.js`\n**Checks:**\n- Repository integrity\n- File structure consistency\n\n**Exit 1 if:** Inconsistencies found\n\n### validate:paths\n**File:** `scripts\u002Fcheck-hardcoded-paths.js`\n**Checks:**\n- No hardcoded `.claude\u002F` paths in agents\u002Fcommands\u002Fskills\n- Excludes: docs, SKILL.md in enhance\u002F, RESEARCH.md, examples\n\n**Patterns detected:**\n```regex\n\u002F\\.claude\\\u002F(?!.*\\(example\\)|.*Platform|.*State directory)\u002F\n\u002F\\.opencode\\\u002F(?!.*\\(example\\)|.*Platform)\u002F\n\u002F\\.codex\\\u002F(?!.*\\(example\\)|.*Platform)\u002F\n```\n\n**Safe contexts (skipped):**\n- Documentation tables (`| State Dir |`)\n- Platform comparison examples\n- Skill documentation (enhance\u002F* SKILL.md)\n- Checklist references\n\n**Exit 1 if:** Hardcoded paths found outside safe contexts\n\n### validate:counts\n**File:** `scripts\u002Fvalidate-counts.js`\n**Checks:**\n- Plugin count (9) across README, CLAUDE.md, AGENTS.md, package.json, docs\n- Agent count (39 total = 29 file-based + 10 role-based) across all docs\n- Skill count (23) across all docs\n- Version alignment (package.json matches all 10 plugin.json files)\n- CLAUDE.md ↔ AGENTS.md critical rules alignment (>90% similarity)\n\n**Actual counts (filesystem):**\n- Plugins: 9 directories in `plugins\u002F`\n- File-based agents: 29 .md files in `plugins\u002F*\u002Fagents\u002F`\n- Role-based agents: 10 (from audit-project, defined inline)\n- Skills: 23 SKILL.md files in `plugins\u002F*\u002Fskills\u002F*\u002FSKILL.md`\n\n**Smart validation:**\n- Accepts \"39 agents\" or \"39 agents (29 file-based + 10 role-based)\"\n- Skips plugin-specific counts like \"next-task (12 agents)\"\n- Only validates top-level totals\n\n**Exit 1 if:** Count mismatches or version misalignment\n\n### validate:platform-docs\n**File:** `scripts\u002Fvalidate-cross-platform-docs.js`\n**Checks:**\n- Command prefix consistency (\u002F vs $)\n- State directory references platform-appropriate\n- Feature parity (all 9 commands documented for all platforms)\n- Installation instructions consistent\n- MCP server configurations correct\n\n**Smart validation:**\n- Skips comparison tables\n- Skips checklist references\n- Skips skill name mentions (like `enhance-claude-memory`)\n- Skips documentation examples\n\n**Exit 1 if:** Platform conflicts or missing features\n\n---\n\n## Pre-Push Hook (Automatic Enforcement)\n\n**File:** `scripts\u002Fsetup-hooks.js` → Creates `.git\u002Fhooks\u002Fpre-push`\n\n**Phase 1: Validation Suite**\n```bash\nnpm run validate  # Runs all 6 validators\n```\nBlocks if any validator fails.\n\n**Phase 2: Enhanced Content Check**\nDetects modified:\n- `agents\u002F*.md`\n- `skills\u002F*\u002FSKILL.md`\n- `hooks\u002F*.md`\n- `prompts\u002F*.md`\n\nPrompts: \"Have you run \u002Fenhance on these files? (y\u002FN)\"\nBlocks if \"N\" (per CLAUDE.md Critical Rule #7).\n\n**Phase 3: Release Tag Validation**\nIf pushing version tag (v*):\n- Runs `npm test`\n- Runs `npm pack --dry-run`\n- Blocks if either fails\n\n**Skip hook:** `git push --no-verify` (use with caution)\n\n---\n\n## Installer Deep Dive (bin\u002Fcli.js)\n\n### Interactive Flow\n\n1. **Platform Selection** - Multi-select: Claude Code, OpenCode, Codex CLI\n2. **Clean Old Installation** - Removes `~\u002F.agentsys\u002F` if exists\n3. **Copy Package** - From npm global to `~\u002F.agentsys\u002F`\n4. **Install Dependencies** - Runs `npm install --production` in package and mcp-server\n5. **Per-Platform Installation:**\n   - Claude Code: Adds marketplace, installs 9 plugins\n   - OpenCode: Copies commands, agents; updates config; installs native plugin\n   - Codex: Creates skills with trigger phrases; updates config\n\n### Key Functions\n\n**installForClaude()** - Line 116\n- Adds marketplace: `claude plugin marketplace add agent-sh\u002Fagentsys`\n- Installs 9 plugins: `claude plugin install {plugin}@agentsys`\n- Commands: \u002Fnext-task, \u002Fship, \u002Fdeslop, \u002Faudit-project, \u002Fdrift-detect, \u002Fenhance, \u002Fperf, \u002Fsync-docs, \u002Frepo-map\n\n**installForOpenCode(installDir, options)** - Line 165\n- Creates dirs: `~\u002F.config\u002Fopencode\u002Fcommands\u002F`, `~\u002F.config\u002Fopencode\u002Fplugins\u002Fagentsys.ts`\n- Copies native plugin from `adapters\u002Fopencode-plugin\u002F`\n- Transforms commands using `OPENCODE_COMMAND_MAPPINGS`\n- Transforms agents (tools → permissions, strips models if --strip-models)\n- Updates `~\u002F.config\u002Fopencode\u002Fopencode.json` with MCP config\n\n**installForCodex(installDir)** - Line 330+\n- Creates dir: `~\u002F.codex\u002Fskills\u002F`\n- Creates SKILL.md files using `CODEX_SKILL_MAPPINGS`\n- Each skill gets trigger-phrase description\n- Updates `~\u002F.codex\u002Fconfig.toml` with MCP config\n\n### Command Mappings (OpenCode)\n\n**OPENCODE_COMMAND_MAPPINGS** - Line ~242:\n```javascript\nconst commandMappings = [\n  ['deslop.md', 'deslop', 'deslop.md'],\n  ['enhance.md', 'enhance', 'enhance.md'],\n  ['next-task.md', 'next-task', 'next-task.md'],\n  ['delivery-approval.md', 'next-task', 'delivery-approval.md'],\n  ['sync-docs.md', 'sync-docs', 'sync-docs.md'],\n  ['audit-project.md', 'audit-project', 'audit-project.md'],\n  ['drift-detect.md', 'drift-detect', 'drift-detect.md'],\n  ['repo-map.md', 'repo-map', 'repo-map.md'],\n  ['perf.md', 'perf', 'perf.md'],\n  ['ship.md', 'ship', 'ship.md']\n];\n```\n\n### Skill Mappings (Codex)\n\n**CODEX_SKILL_MAPPINGS** - Line ~280+:\n```javascript\nconst skillMappings = [\n  ['next-task', 'next-task', 'next-task.md',\n    'Use when user asks to \"find next task\", \"automate workflow\". Master workflow orchestrator.'],\n  ['ship', 'ship', 'ship.md',\n    'Use when user asks to \"create PR\", \"ship changes\", \"merge PR\". Complete PR workflow.'],\n  \u002F\u002F ... 7 more\n];\n```\n\n---\n\n## Adding New Features (Step-by-Step)\n\n### New Command (e.g., \u002Fmy-command)\n\n**1. Create command file:**\n```bash\nplugins\u002Fmy-plugin\u002Fcommands\u002Fmy-command.md\n```\n\n**2. Update bin\u002Fcli.js - 3 locations:**\n\n**a) PLUGINS_ARRAY (if new plugin):**\n```javascript\n\u002F\u002F Line ~138\nconst plugins = ['next-task', 'ship', ..., 'my-plugin'];\n```\n\n**b) OPENCODE_COMMAND_MAPPINGS:**\n```javascript\n\u002F\u002F Line ~242\n['my-command.md', 'my-plugin', 'my-command.md'],\n```\n\n**c) CODEX_SKILL_MAPPINGS:**\n```javascript\n\u002F\u002F Line ~280\n['my-command', 'my-plugin', 'my-command.md',\n  'Use when user asks to \"trigger phrase\". Description of capability.'],\n```\n\n**3. Update marketplace.json:**\n```json\n\u002F\u002F .claude-plugin\u002Fmarketplace.json - Add to plugins array\n{\n  \"name\": \"my-plugin\",\n  \"version\": \"3.5.0\",\n  \"description\": \"...\",\n  \"path\": \"plugins\u002Fmy-plugin\"\n}\n```\n\n**4. Create plugin.json:**\n```bash\nplugins\u002Fmy-plugin\u002F.claude-plugin\u002Fplugin.json\n```\n\n**5. Update docs:**\n- `docs\u002FINSTALLATION.md` - Add install command\n- `README.md` - Add to commands table\n- CHANGELOG.md - Add under \"Added\"\n\n**6. Validate:**\n```bash\nnpm run validate  # Will catch missing mappings\n```\n\n### New Agent (e.g., my-agent)\n\n**1. Create agent file:**\n```bash\nplugins\u002Fmy-plugin\u002Fagents\u002Fmy-agent.md\n```\n\nWith proper frontmatter:\n```yaml\n---\nname: my-agent\ndescription: Brief description\ntools: Bash(git:*), Read, Edit\nmodel: sonnet\n---\n```\n\n**2. Installer handles automatically:**\n- ✅ Copies to `~\u002F.config\u002Fopencode\u002Fagents\u002Fmy-agent.md`\n- ✅ Transforms frontmatter (tools → permissions)\n- ✅ Strips model if --strip-models flag\n- ✅ Normalizes Windows paths in require()\n\n**3. No Codex changes needed** - Codex uses MCP, not agents\n\n**4. Validate:**\n```bash\nnpm run validate:counts  # Will update agent count if added\n```\n\n### New Skill (e.g., my-skill)\n\n**1. Create skill directory and file:**\n```bash\nplugins\u002Fmy-plugin\u002Fskills\u002Fmy-skill\u002FSKILL.md\n```\n\nWith frontmatter:\n```yaml\n---\nname: my-skill\ndescription: \"Use when user asks to \\\"trigger\\\". Description.\"\nmetadata:\n  short-description: \"Brief\"\n---\n```\n\n**2. If user-invocable (Codex):**\nAdd to CODEX_SKILL_MAPPINGS in bin\u002Fcli.js\n\n**3. Validate:**\n```bash\nnpm run validate:counts  # Will check skill count matches\n```\n\n### New MCP Tool\n\n**1. Add to mcp-server\u002Findex.js:**\n\n**a) TOOLS array:**\n```javascript\nconst TOOLS = [\n  \u002F\u002F ...\n  {\n    name: 'my_tool',\n    description: 'Tool description',\n    inputSchema: {\n      type: 'object',\n      properties: { param: { type: 'string' } },\n      required: ['param']\n    }\n  }\n];\n```\n\n**b) toolHandlers object:**\n```javascript\nconst toolHandlers = {\n  \u002F\u002F ...\n  my_tool: async (params) => {\n    \u002F\u002F Implementation\n    return xplat.successResponse({ result: 'data' });\n  }\n};\n```\n\n**2. Update marketplace.json:**\n```json\n\u002F\u002F .claude-plugin\u002Fmarketplace.json\n\"mcpServer\": {\n  \"tools\": [\"workflow_status\", ..., \"my_tool\"]\n}\n```\n\n**3. Update docs:**\n- `README.md` - Add to features if user-facing\n\n---\n\n## Common Release Pitfalls (And How Validators Catch Them)\n\n### Pitfall 1: Forgot to Update Plugin Version\n```bash\n# Symptoms:\n- package.json says 3.6.0\n- plugins\u002Fnext-task\u002F.claude-plugin\u002Fplugin.json says 3.5.0\n\n# Caught by:\nnpm run validate:counts\n# → [ERROR] Version misalignment\n```\n\n### Pitfall 2: Hardcoded .claude\u002F Path\n```bash\n# Symptoms:\n- Agent contains: `.claude\u002Fflow.json`\n- OpenCode and Codex break\n\n# Caught by:\nnpm run validate:paths\n# → [ERROR] Hardcoded path found in agents\u002Fmy-agent.md:42\n```\n\n### Pitfall 3: Agent Count Mismatch\n```bash\n# Symptoms:\n- Added new agent\n- README still says \"39 agents\"\n- Actually 40 now\n\n# Caught by:\nnpm run validate:counts\n# → [ERROR] README.md agents: Expected 40, Actual 39\n```\n\n### Pitfall 4: Missing Trigger Phrase (Codex)\n```bash\n# Symptoms:\n- Codex skill has: description: \"Master orchestrator\"\n- No trigger phrases\n- Codex doesn't know when to invoke\n\n# Caught by:\n\u002Fenhance --focus=skills\n# → [MEDIUM] Description missing trigger phrases\n```\n\n### Pitfall 5: OpenCode Label Too Long\n```bash\n# Symptoms:\n- AskUserQuestion label: \"#123: Fix authentication timeout in ProfileScreen component\"\n- 65 characters\n- OpenCode throws error\n\n# Prevention:\nUse truncateLabel() function in task-discoverer agent\nMax 30 chars for OpenCode compatibility\n```\n\n### Pitfall 6: Forgot to Run \u002Fenhance\n```bash\n# Symptoms:\n- Modified agents\u002Fskills\n- Didn't run \u002Fenhance\n- Pushed anyway\n\n# Caught by:\nPre-push hook prompts: \"Have you run \u002Fenhance? (y\u002FN)\"\nBlocks push if \"N\"\n```\n\n---\n\n## Automation Opportunities (Always Consider)\n\n### Current Automations\n\n1. ✅ **lib\u002F sync** - Pre-commit hook auto-syncs lib\u002F to plugins\u002F\n2. ✅ **Validation** - Pre-push hook runs 6 validators\n3. ✅ **Agent transformation** - Installer auto-transforms frontmatter\n4. ✅ **Model stripping** - `--strip-models` flag for OpenCode\n5. ✅ **Version checking** - validate:counts catches misalignment\n6. ✅ **Path checking** - validate:paths catches hardcoded paths\n7. ✅ **\u002Fenhance enforcement** - Pre-push hook prompts\n\n### Potential Improvements\n\n**1. Version Bump Automation**\n```bash\n# Current: Manual find\u002Freplace in 11 files\n# Opportunity: Script that updates all version fields atomically\n# Script: scripts\u002Fbump-version.js \u003Cnew-version>\n```\n\n**2. CHANGELOG Entry Generation**\n```bash\n# Current: Manual entry creation\n# Opportunity: Parse git log since last tag, categorize commits\n# Script: scripts\u002Fgenerate-changelog-entry.js\n```\n\n**3. Cross-Platform Install Test**\n```bash\n# Current: Manual testing on each platform\n# Opportunity: Docker containers for each platform, automated smoke tests\n# Script: scripts\u002Ftest-install-all-platforms.sh\n```\n\n**4. Agent Count Auto-Update**\n```bash\n# Current: Manual count updates in docs\n# Opportunity: Extract counts from filesystem, update docs automatically\n# Script: scripts\u002Fupdate-doc-counts.js\n```\n\n**5. Marketplace.json Sync**\n```bash\n# Current: Manual updates to .claude-plugin\u002Fmarketplace.json\n# Opportunity: Generate from plugins\u002F directory structure\n# Script: scripts\u002Fsync-marketplace-manifest.js\n```\n\n**If you identify more automation opportunities, ADD THEM HERE.**\n\n---\n\n## Your Responsibilities (Agent Using This Skill)\n\n### Before Push\n\n1. **Run validations:**\n   ```bash\n   npm run validate\n   ```\n   Fix any issues found.\n\n2. **If modified enhanced content (agents\u002Fskills\u002Fhooks\u002Fprompts):**\n   ```bash\n   \u002Fenhance\n   ```\n   Address HIGH certainty findings.\n\n3. **Check for misalignments in this skill:**\n   - New script added but not documented here?\n   - New platform difference discovered?\n   - New validation pattern needed?\n   - UPDATE THIS FILE if yes\n\n4. **Think about automation:**\n   - Can this manual step be automated?\n   - Is there a pattern we're repeating?\n   - ADD to \"Potential Improvements\" section\n\n### Before Release\n\n1. **Read release checklist:**\n   ```bash\n   cat checklists\u002Frelease.md\n   ```\n\n2. **Update all 11 version fields:**\n   - Use version bump script (if exists) or manual find\u002Freplace\n   - Validate: `npm run validate:counts`\n\n3. **Update CHANGELOG.md:**\n   - Add entry at top with date\n   - Categorize: Added\u002FChanged\u002FFixed\u002FRemoved\n\n4. **Run full validation:**\n   ```bash\n   npm test                  # 1400+ tests\n   npm run validate          # All 6 validators\n   npm pack --dry-run        # Package builds\n   ```\n\n5. **Test cross-platform install:**\n   ```bash\n   npm pack\n   npm install -g .\u002Fagentsys-*.tgz\n   echo \"1 2 3\" | agentsys  # Test installer\n   ```\n\n6. **Commit and tag:**\n   ```bash\n   git add -A\n   git commit -m \"chore: release v3.X.0-rc.N\"\n   git tag v3.X.0-rc.N\n   git push origin main --tags\n   ```\n\n7. **Verify npm publish:**\n   ```bash\n   # Wait for GitHub Actions release workflow\n   npm view agentsys@rc version  # For RC\n   npm view agentsys version     # For production\n   ```\n\n### Update Misalignments\n\nIf you find any of these while working:\n\n**New script not documented here:**\n1. Read the script to understand what it does\n2. Add to relevant section (Validation Suite, Installation, etc.)\n3. Commit: \"docs(maintain-cross-platform): document {script-name}\"\n\n**New platform difference discovered:**\n1. Test on all 3 platforms to confirm\n2. Add to \"Platform Differences\" matrix\n3. Add to \"Common Pitfalls\" if it causes issues\n4. Update relevant validation script if needed\n\n**New validation pattern needed:**\n1. Consider: Can existing validator be extended?\n2. If new validator needed, create in `scripts\u002Fvalidate-{name}.js`\n3. Add to `package.json` validate script\n4. Document in \"Validation Suite\" section\n5. Update \"Pre-Push Hook\" section if relevant\n\n**Automation opportunity identified:**\n1. Add to \"Potential Improvements\" with description\n2. Estimate effort (simple\u002Fmedium\u002Fcomplex)\n3. Note dependencies (tools needed, testing required)\n\n---\n\n## Quick Reference: File Counts\n\n**Plugins:** 9\n1. next-task\n2. enhance\n3. ship\n4. perf\n5. audit-project\n6. deslop\n7. drift-detect\n8. repo-map\n9. sync-docs\n\n**Agents:** 39 total = 29 file-based + 10 role-based\n\n**File-based (29):** Count files in `plugins\u002F*\u002Fagents\u002F*.md`\n- next-task: 12\n- enhance: 9\n- perf: 6\n- drift-detect: 1\n- repo-map: 1\n\n**Role-based (10):** Defined inline in audit-project command\n- code-quality-reviewer, security-expert, performance-engineer, test-quality-guardian\n- architecture-reviewer, database-specialist, api-designer\n- frontend-specialist, backend-specialist, devops-reviewer\n\n**Skills:** 23 - Count SKILL.md in `plugins\u002F*\u002Fskills\u002F*\u002FSKILL.md`\n- next-task: 4 (orchestrate-review, discover-tasks, validate-delivery, update-docs)\n- enhance: 10 (orchestrator, reporter, agent-prompts, claude-memory, docs, plugins, prompts, hooks, skills)\n- perf: 8 (analyzer, baseline, benchmark, code-paths, investigation-logger, profile, theory, theory-tester)\n- drift-detect: 1 (drift-analysis)\n- repo-map: 1 (repo-mapping)\n\n**Version Fields:** 11 files\n- 1x package.json\n- 1x .claude-plugin\u002Fplugin.json\n- 9x plugins\u002F*\u002F.claude-plugin\u002Fplugin.json\n- 1x mcp-server\u002Findex.js (MCP_SERVER_VERSION constant)\n\n---\n\n## Constraints\n\n- **NEVER break existing functionality** - Production project with real users\n- **ALWAYS test on all 3 platforms** - At least smoke test\n- **ALWAYS update this skill** - If you find gaps or improvements\n- **ALWAYS run validation** - Pre-push hook enforces this\n- **Documentation must stay accurate** - Validators enforce this\n\n---\n\n## Output Format\n\nWhen using this skill, output:\n\n```markdown\n## Cross-Platform Compatibility Check\n\n### Validations Run\n- [OK\u002FERROR] validate:plugins\n- [OK\u002FERROR] validate:cross-platform\n- [OK\u002FERROR] validate:consistency\n- [OK\u002FERROR] validate:paths\n- [OK\u002FERROR] validate:counts\n- [OK\u002FERROR] validate:platform-docs\n\n### Issues Found\n[List any issues with file:line references]\n\n### Misalignments in This Skill\n[List any outdated information found in this skill]\n\n### Automation Opportunities\n[List any manual steps that could be automated]\n\n### Actions Taken\n[List files updated\u002Fcreated]\n\n### Next Steps\n[List remaining work]\n```\n\n---\n\n## Version\n\n**Skill Version:** 1.0.0\n**Last Updated:** 2026-01-30\n**Covers:** AgentSys v5.0.0 architecture\n\n**Update this skill when:**\n- New platform added\n- New validation script created\n- Installation process changes\n- New automation implemented\n- Platform differences discovered\n",{"name":5,"metadata":43,"description":7},{"scope":37,"audience":44,"short-description":45},"repo-maintainers","Meta-skill: maintain 3-platform architecture","master","c73386b305dec167db7654e0e6feacb462d4f9dc","assets\u002Fskills\u002Fdev\u002Fmaintain-cross-platform",1,"https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code","https:\u002F\u002Fgithub.com\u002FAntifragileTech","2026-10-02 14:22:14",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add AntifragileTech\u002Fantifragile-claude-code --skill maintain-cross-platform",{"tool":59,"command":60},"bunx","bunx skills add AntifragileTech\u002Fantifragile-claude-code --skill maintain-cross-platform",{"tool":62,"command":63},"pnpm","pnpm dlx skills add AntifragileTech\u002Fantifragile-claude-code --skill maintain-cross-platform","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fdev\u002Fmaintain-cross-platform\u002FSKILL.md",true,[67],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"index.json","REFERENCE","参考文档",695,"https:\u002F\u002Fgithub.com\u002FDCx7C5\u002Fai-marketplace\u002Fblob\u002Fmain\u002Fskills\u002Fintel\u002Fanalysis\u002Factorprofile\u002Fdetect\u002Findex.json",[74,97,112,127,140,153],{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":91,"publishedAt":38},"01M6DT9Q6VYA615SCXR757TZZ7","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-skills\u002FSKILL.md",[80,83,86],{"categoryNo":81,"categoryName":82,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":87,"categoryName":88,"taxonomyType":89,"taxonomyTypeDesc":90},"01JBSEEDCAT000000000000036","内容创作者","PROFESSION","适用职业",[92,93,31,94,95,96],"writing skills","writing","editing","work","deployment",{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":105,"publishedAt":38},"01M6DT9GFHDNY90P41WGAE1TV0","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwriting-plans\u002FSKILL.md",[103,104],{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":87,"categoryName":88,"taxonomyType":89,"taxonomyTypeDesc":90},[106,107,93,108,109,31,110,111],"plans","writing plans","requirements","task","code","spec",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":120,"publishedAt":38},"01M6DT9C6PFGD86WS3HY7YE3XG","docs:write-concisely","Apply writing rules to any documentation that humans will read. Makes your writing clearer, stronger, and more professional.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwrite-concisely\u002FSKILL.md",[118,119],{"categoryNo":84,"categoryName":85,"taxonomyType":20,"taxonomyTypeDesc":21},{"categoryNo":87,"categoryName":88,"taxonomyType":89,"taxonomyTypeDesc":90},[121,122,123,124,125,126,93],"docs:write concisely","write","docs","read","Rules","documentation",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":38},"01M6DT98AWQ27P0N1CG97WAG66","kaizen:why","Iterative Five Whys root cause analysis drilling from symptoms to fundamentals","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fwhy\u002FSKILL.md",[],[129,134,135,136,137,138,139],"why","kaizen","issue","five whys","analysis","root cause analysis",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":38},"01M6DT93EH25NAX19R3WGE1P53","verification-loop","A comprehensive verification system for Claude Code sessions.","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-loop\u002FSKILL.md",[],[147,148,149,150,110,151,152],"verification loop","verification","loop","sessions","claude code sessions","system",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":157,"categories":158,"keywords":159,"publishedAt":38},"01M6DT90GW7Z7VCN98P9DVYSNC","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002FAntifragileTech\u002Fantifragile-claude-code\u002Fblob\u002Fmaster\u002Fassets\u002Fskills\u002Fthinking\u002Fverification-before-completion\u002FSKILL.md",[],[160,148,161,95,31,162,163,164],"verification before completion","commands","evidence","claim","complete"]