From d442f5c75edc7ee2129107cd4899eadea9848fe0 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sun, 20 Sep 2026 16:22:00 +0000 Subject: [PATCH] fix(ci): skip POSIX $1 assignment in skill host-compat lint Keep ${1} and echo $1 as Claude substitutions. Do not fail VAR=$1 function parameters or Perl/awk $1 compares. Sync catalog counts to 68 agents, 293 skills, and 95 commands after rebase onto main. Co-authored-by: Matt Van Horn --- .claude-plugin/marketplace.json | 2 +- .claude-plugin/plugin.json | 2 +- AGENTS.md | 6 +-- README.md | 6 +-- README.zh-CN.md | 2 +- docs/tr/AGENTS.md | 6 +-- docs/zh-CN/AGENTS.md | 6 +-- docs/zh-CN/README.md | 10 ++--- manifests/install-modules.json | 2 +- scripts/ci/validate-skill-host-compat.js | 28 +++++++++--- tests/ci/validate-skill-host-compat.test.js | 48 +++++++++++++++++++++ tests/scripts/npm-publish-surface.test.js | 2 + 12 files changed, 94 insertions(+), 26 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index b19c87b8d..bf0be321f 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -11,7 +11,7 @@ { "name": "ecc", "source": "./", - "description": "Harness-native ECC operator layer - 68 agents, 292 skills, 94 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses", + "description": "Harness-native ECC operator layer - 68 agents, 293 skills, 95 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses", "version": "2.2.2", "author": { "name": "Affaan Mustafa", diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 072edddfe..297ed9f8e 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "ecc", "version": "2.2.2", - "description": "Harness-native ECC plugin for engineering teams - 68 agents, 292 skills, 94 legacy command shims, reusable hooks, rules, MCP conventions, and operator workflows for Claude Code plus adjacent agent harnesses", + "description": "Harness-native ECC plugin for engineering teams - 68 agents, 293 skills, 95 legacy command shims, reusable hooks, rules, MCP conventions, and operator workflows for Claude Code plus adjacent agent harnesses", "author": { "name": "Affaan Mustafa", "url": "https://x.com/affaanmustafa" diff --git a/AGENTS.md b/AGENTS.md index 17330b848..6943f2083 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,6 +1,6 @@ # Everything Claude Code (ECC) — Agent Instructions -This is a **production-ready AI coding plugin** providing 68 specialized agents, 292 skills, 94 commands, and automated hook workflows for software development. +This is a **production-ready AI coding plugin** providing 68 specialized agents, 293 skills, 95 commands, and automated hook workflows for software development. **Version:** 2.2.2 @@ -154,8 +154,8 @@ Troubleshoot failures: check test isolation → verify mocks → fix implementat ``` agents/ — 68 specialized subagents -skills/ — 292 workflow skills and domain knowledge -commands/ — 94 slash commands +skills/ — 293 workflow skills and domain knowledge +commands/ — 95 slash commands hooks/ — Trigger-based automations rules/ — Always-follow guidelines (common + per-language) scripts/ — Cross-platform Node.js utilities diff --git a/README.md b/README.md index bda9da5f1..ee116f619 100644 --- a/README.md +++ b/README.md @@ -138,13 +138,13 @@ Instead of rebuilding that process in every prompt, you install it once and make ECC is MIT-licensed open source. It works best with Claude Code today, has a supported Codex sync path, and provides capability-limited adapters for Cursor, OpenCode, Gemini, Zed, GitHub Copilot, Antigravity, Qwen, and other harnesses. See the [support status matrix](#platform-support) before assuming feature parity. -Access to 68 agents, 292 skills, and 94 legacy command shims, plus hooks, rules, memory, continuous learning, and AgentShield security scanning. The agents are specialized for planning, review, build repair, security, architecture, and domain work. +Access to 68 agents, 293 skills, and 95 legacy command shims, plus hooks, rules, memory, continuous learning, and AgentShield security scanning. The agents are specialized for planning, review, build repair, security, architecture, and domain work. | Included | Count | What it gives you | | ---------------- | ----------: | ------------------------------------------------------------------------------------ | | Agents | 68 agents | Planning, review, build repair, security, architecture, and domain work | -| Skills | 292 skills | TDD, research, security, docs, frontend, data, ML, operations, and more | -| Commands | 94 commands | Convenient entry points while ECC moves to a skills-first surface | +| Skills | 293 skills | TDD, research, security, docs, frontend, data, ML, operations, and more | +| Commands | 95 commands | Convenient entry points while ECC moves to a skills-first surface | | Hooks and memory | Runtime | Enforcement, session summaries, continuous learning, instincts, and context controls | | Rules | Selective | Always-loaded standards you choose by language or project | | AgentShield | Included | Scanning for prompts, hooks, MCP config, permissions, secrets, and agent files | diff --git a/README.zh-CN.md b/README.zh-CN.md index 552d69b58..577cf32e4 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -196,7 +196,7 @@ Copy-Item -Recurse rules/typescript "$HOME/.claude/rules/" /plugin list ecc@ecc ``` -**完成!** 你现在可以使用 68 个代理、292 个技能和 94 个命令。 +**完成!** 你现在可以使用 68 个代理、293 个技能和 95 个命令。 ### multi-* 命令需要额外配置 diff --git a/docs/tr/AGENTS.md b/docs/tr/AGENTS.md index a67004d7b..381834bd2 100644 --- a/docs/tr/AGENTS.md +++ b/docs/tr/AGENTS.md @@ -1,6 +1,6 @@ # Everything Claude Code (ECC) — Agent Talimatları -Bu, yazılım geliştirme için 68 özel agent, 292 skill, 94 command ve otomatik hook iş akışları sağlayan **üretime hazır bir AI kodlama eklentisidir**. +Bu, yazılım geliştirme için 68 özel agent, 293 skill, 95 command ve otomatik hook iş akışları sağlayan **üretime hazır bir AI kodlama eklentisidir**. **Sürüm:** 2.2.2 @@ -142,8 +142,8 @@ Başarısızlık sorunlarını giderin: test izolasyonunu kontrol edin → mockl ``` agents/ — 68 özel subagent -skills/ — 292 iş akışı skillleri ve alan bilgisi -commands/ — 94 slash command +skills/ — 293 iş akışı skillleri ve alan bilgisi +commands/ — 95 slash command hooks/ — Tetikleyici tabanlı otomasyonlar rules/ — Her zaman uyulması gereken kurallar (ortak + dile özel) scripts/ — Platformlar arası Node.js yardımcı programları diff --git a/docs/zh-CN/AGENTS.md b/docs/zh-CN/AGENTS.md index 31e1a3817..e016eb8fb 100644 --- a/docs/zh-CN/AGENTS.md +++ b/docs/zh-CN/AGENTS.md @@ -1,6 +1,6 @@ # Everything Claude Code (ECC) — 智能体指令 -这是一个**生产就绪的 AI 编码插件**,提供 68 个专业代理、292 项技能、94 条命令以及自动化钩子工作流,用于软件开发。 +这是一个**生产就绪的 AI 编码插件**,提供 68 个专业代理、293 项技能、95 条命令以及自动化钩子工作流,用于软件开发。 **版本:** 2.2.2 @@ -147,8 +147,8 @@ ``` agents/ — 68 个专业子代理 -skills/ — 292 个工作流技能和领域知识 -commands/ — 94 个斜杠命令 +skills/ — 293 个工作流技能和领域知识 +commands/ — 95 个斜杠命令 hooks/ — 基于触发的自动化 rules/ — 始终遵循的指导方针(通用 + 每种语言) scripts/ — 跨平台 Node.js 实用工具 diff --git a/docs/zh-CN/README.md b/docs/zh-CN/README.md index 3228c6159..80520b6c2 100644 --- a/docs/zh-CN/README.md +++ b/docs/zh-CN/README.md @@ -260,7 +260,7 @@ Copy-Item -Recurse rules/typescript "$HOME/.claude/rules/" /plugin list ecc@ecc ``` -**搞定!** 你现在可以使用 68 个智能体、292 项技能和 94 个命令了。 +**搞定!** 你现在可以使用 68 个智能体、293 项技能和 95 个命令了。 *** @@ -1173,8 +1173,8 @@ opencode | 功能特性 | Claude Code | OpenCode | 状态 | |---------|---------------|----------|--------| | 智能体 | PASS: 68 个 | PASS: 12 个 | **Claude Code 领先** | -| 命令 | PASS: 94 个 | PASS: 35 个 | **Claude Code 领先** | -| 技能 | PASS: 292 项 | PASS: 37 项 | **Claude Code 领先** | +| 命令 | PASS: 95 个 | PASS: 35 个 | **Claude Code 领先** | +| 技能 | PASS: 293 项 | PASS: 37 项 | **Claude Code 领先** | | 钩子 | PASS: 8 种事件类型 | PASS: 11 种事件 | **OpenCode 更多!** | | 规则 | PASS: 29 条 | PASS: 13 条指令 | **Claude Code 领先** | | MCP 服务器 | PASS: 14 个 | PASS: 完整 | **完全对等** | @@ -1281,8 +1281,8 @@ ECC 是**第一个最大化利用每个主要 AI 编码工具的插件**。以 | 功能特性 | Claude Code | Cursor IDE | Codex CLI | OpenCode | |---------|-----------------------|------------|-----------|----------| | **智能体** | 68 | 共享 (AGENTS.md) | 共享 (AGENTS.md) | 12 | -| **命令** | 94 | 共享 | 基于指令 | 35 | -| **技能** | 292 | 共享 | 10 (原生格式) | 37 | +| **命令** | 95 | 共享 | 基于指令 | 35 | +| **技能** | 293 | 共享 | 10 (原生格式) | 37 | | **钩子事件** | 8 种类型 | 15 种类型 | SessionStart(1 种类型) | 11 种类型 | | **钩子脚本** | 20+ 个脚本 | 16 个脚本 (DRY 适配器) | 1 个 SessionStart 引导脚本 | 插件钩子 | | **规则** | 34 (通用 + 语言) | 34 (YAML 前页) | 基于指令 | 13 条指令 | diff --git a/manifests/install-modules.json b/manifests/install-modules.json index 2fb600819..fd2390621 100644 --- a/manifests/install-modules.json +++ b/manifests/install-modules.json @@ -335,8 +335,8 @@ "skills/plankton-code-quality", "skills/production-audit", "skills/skill-comply", - "skills/skill-scout", "skills/skill-host-compat", + "skills/skill-scout", "skills/skill-stocktake", "skills/strategic-compact", "skills/tdd-workflow", diff --git a/scripts/ci/validate-skill-host-compat.js b/scripts/ci/validate-skill-host-compat.js index 7da555ace..751b361cc 100644 --- a/scripts/ci/validate-skill-host-compat.js +++ b/scripts/ci/validate-skill-host-compat.js @@ -48,9 +48,9 @@ const CLAUDE_SUBSTITUTION_PATTERNS = [ { token: '${CLAUDE_PLUGIN_ROOT}', regex: /\$\{CLAUDE_PLUGIN_ROOT\}/g }, { token: '$CLAUDE_PLUGIN_ROOT', regex: /\$CLAUDE_PLUGIN_ROOT\b/g }, { token: '$ARGUMENTS', regex: /\$ARGUMENTS\b|\$\{ARGUMENTS\}/g }, - // Bare $1 is a Perl/awk capture in many examples; flag the Claude skill - // form ${1} and $1 used as a shell positional, not `$1 `. - { token: '$1', regex: /\$\{1\}|(?=])/g }, + // Claude skill form ${1}. Bare $1 is handled in findSubstitutionTokens so + // POSIX `VAR=$1` and Perl/awk `$1 < 80` are not treated as Claude args. + { token: '$1', regex: /\$\{1\}|(?=0`. + if (/^\s*[<>=]/.test(after)) return true; + // POSIX assignment of a function positional: `VAR=$1` or `VAR="$1"`. + if (/=\s*["']?$/.test(before)) return true; + return false; +} + function findSubstitutionTokens(fenceContent) { const found = []; for (const pattern of CLAUDE_SUBSTITUTION_PATTERNS) { pattern.regex.lastIndex = 0; - if (pattern.regex.test(fenceContent)) { - found.push(pattern.token); + let match = pattern.regex.exec(fenceContent); + while (match !== null) { + const skipBarePositional = pattern.token === '$1' + && match[0] === '$1' + && isPortableBareDollarOne(fenceContent, match.index); + if (!skipBarePositional) { + found.push(pattern.token); + break; + } + match = pattern.regex.exec(fenceContent); } } return found; diff --git a/tests/ci/validate-skill-host-compat.test.js b/tests/ci/validate-skill-host-compat.test.js index e11cf7101..a97bc766d 100644 --- a/tests/ci/validate-skill-host-compat.test.js +++ b/tests/ci/validate-skill-host-compat.test.js @@ -489,6 +489,54 @@ check('bash fence ${1} is treated as a Claude substitution', () => { } }); +check('POSIX VAR=$1 assignment is not a Claude substitution', () => { + const root = createRoot(); + try { + writeSkill( + root, + 'posix', + `${checklistBody('Posix')}\n## Code Examples\n\n\`\`\`bash\nmove_dir() {\n SOURCE=$1\n DEST=$2\n}\n\`\`\`\n` + ); + const result = runValidator(root); + assert.strictEqual(result.status, 0, result.stderr); + assert.ok(!result.stderr.includes('ERROR:')); + } finally { + cleanup(root); + } +}); + +check('Perl/awk $1 numeric compare is not a Claude substitution', () => { + const root = createRoot(); + try { + writeSkill( + root, + 'cover', + `${checklistBody('Cover')}\n## Code Examples\n\n\`\`\`bash\nperl -ne 'if (/Total.*?(\\d+)/) { exit 1 if $1 < 80 }'\n\`\`\`\n` + ); + const result = runValidator(root); + assert.strictEqual(result.status, 0, result.stderr); + assert.ok(!result.stderr.includes('ERROR:')); + } finally { + cleanup(root); + } +}); + +check('echo $1 in a bash fence is treated as a Claude substitution', () => { + const root = createRoot(); + try { + writeSkill( + root, + 'echoone', + `${checklistBody('Echo')}\n## Code Examples\n\n\`\`\`bash\necho $1\n\`\`\`\n` + ); + const result = runValidator(root); + assert.strictEqual(result.status, 1); + assert.ok(result.stderr.includes('$1')); + } finally { + cleanup(root); + } +}); + console.log(`\nPassed: ${passed}`); console.log(`Failed: ${failed}`); process.exit(failed > 0 ? 1 : 0); diff --git a/tests/scripts/npm-publish-surface.test.js b/tests/scripts/npm-publish-surface.test.js index 3e23d41a4..32b3e523f 100644 --- a/tests/scripts/npm-publish-surface.test.js +++ b/tests/scripts/npm-publish-surface.test.js @@ -187,6 +187,7 @@ function main() { "scripts/ci/scan-supply-chain-iocs.js", "scripts/ci/supply-chain-advisory-sources.js", "scripts/ci/validate-skill-host-compat.js", + "scripts/ci/validate-skills.js", "scripts/consult.js", "scripts/control-pane.js", "scripts/feedback.js", @@ -235,6 +236,7 @@ function main() { "schemas/memory.schema.json", "skills/backend-patterns/SKILL.md", "skills/skill-comply/SKILL.md", + "skills/skill-host-compat/SKILL.md", "skills/unified-memory/SKILL.md", ]) { assert.ok(