본문으로 건너뛰기
Skillpedia
배포 및 클라우드 (DevOps)280k · #409

skill-host-compat

하는 일

Claude에서만 작동하는 명령을 제거해서, '스킬'(AI 지침)이 다른 환경(Codex와 Cursor)에서 안전하게 쓸 수 있는지 확인합니다.

사용하는 경우

  • ✓'스킬'을 추가하거나 수정할 때.
  • ✓다른 환경을 위해 '스킬'을 특정 폴더에 복사할 때.
  • ✓리뷰가 Codex나 Cursor에서 '스킬'이 안전한지 확인해 달라고 할 때.

스킬 링크

https://github.com/affaan-m/ECC/blob/main/skills/skill-host-compat/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/affaan-m/ECC/blob/main/skills/skill-host-compat/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“이 스킬이 Codex와 Cursor에서 안전한지 확인해 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

이 스크립트는 '스킬'을 분석하고, Claude 전용 변수를 사용하는 명령을 제거하거나 맞춥니다. 그래서 Codex와 Cursor 같은 다른 시스템에서도 올바르게 작동하도록 합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Skill Host Compatibility

Run the same host-compat gate CI uses on skills/ before opening a skill PR. The check is for Codex and Cursor copies, not Claude-only runtime quality.

When to Activate

  • Adding or editing a skill under skills/
  • Copying a skill into .agents/skills/ or .cursor/skills/
  • A review asks whether a skill is safe to install into Codex or Cursor
  • CI reports validate-skill-host-compat.js findings

Core Concepts

Canonical skills live in skills/. Codex loads .agents/skills/. Cursor loads a smaller .cursor/skills/ subset. CONTRIBUTING documents that sync as manual.

validate-skills.js only checks that SKILL.md exists and that name / description are usable YAML. tests/ci/codex-skill-surface.test.js only sees .agents/skills/. This script is the cross-tree gate:

  1. Claude-only substitutions in executable bash / sh / zsh fences in Codex/Cursor projections (${CLAUDE_SESSION_ID}, ${CLAUDE_SKILL_DIR}, ${CLAUDE_PLUGIN_ROOT}, ${CLAUDE_PROJECT_DIR}, $ARGUMENTS) fail. Codex leaves those tokens as literal text. In a Codex copy, rewrite ${CLAUDE_PROJECT_DIR} to $(pwd) or an explicit path.
  2. A Codex copy may only use name, description, metadata, license, and allowed-tools. origin: ECC may stay on the canonical skills/ copy and must be stripped on the Codex copy.
  3. A skill listed in agents/openai.yaml that has a skills/ directory must have .agents/skills/<name>/. Cursor copies are optional; when present, name: must match the directory.
  4. CONTRIBUTING checklist items (When to Activate, Anti-Patterns, name matches directory, 500/800 line caps) warn. They fail only with --strict-checklist.

validate-skills.js frontmatter WARN default is unchanged (#1663).

Code Examples

From the repo root:

node scripts/ci/validate-skill-host-compat.js

Print counts without failing:

node scripts/ci/validate-skill-host-compat.js --inventory

Promote checklist warnings:

node scripts/ci/validate-skill-host-compat.js --strict-checklist

Slash command:

/skill-host-compat
/skill-host-compat --inventory

Anti-Patterns

Codex and Cursor projections must resolve Claude-only substitutions in executable blocks. Canonical Claude-scoped examples remain valid. POSIX $1 and ${1} parameters are ambiguous and require review rather than failing this gate. This fence is the forbidden pattern:

echo "${CLAUDE_SESSION_ID}"
ls "${CLAUDE_SKILL_DIR}"
node "${CLAUDE_PLUGIN_ROOT}/scripts/setup.js" $ARGUMENTS
cd "${CLAUDE_PROJECT_DIR}"

Do not add version: or origin: to a Codex copy under .agents/skills/. Do not treat a passing validate-skills.js run as Codex-safe. Do not require every skills/ entry to have a Cursor copy.

Best Practices

  • Keep canonical origin: ECC if the CONTRIBUTING template calls for it.
  • Drop origin, version, and argument-hint on the Codex copy.
  • Show host-portable commands in bash fences (npx, ecc, or a resolved root). Rewrite ${CLAUDE_PROJECT_DIR} in Codex copies to $(pwd) or an explicit path. Keep valid Claude-scoped forms in canonical instructions; resolve host variables in the target projection.
  • Run this script before npm test when the change is a new skill.
  • Use --inventory to see checklist warning volume without failing the tree.

Related Skills

  • skill-comply — runtime behavioral traces, not host-portability
  • skill-stocktake — holistic audit of installed ~/.claude/skills
  • skill-scout — search existing skills before creating a new one
자주 묻는 질문

Codex와 Cursor는 무엇인가요?

'스킬'을 실행할 수 있는 환경이나 시스템입니다. 이 스크립트는 스킬이 둘 다에서 잘 작동하도록 보장합니다.

왜 Claude 전용 명령을 제거해야 하나요?

Claude 전용 명령은 Codex나 Cursor 같은 다른 환경에서 작동하지 않습니다. 스킬이 호환되려면 이를 맞추거나 제거해야 합니다.

이 스크립트를 쓰지 않으면 어떻게 되나요?

호환되지 않는 명령이 들어 있어서, Codex나 Cursor 같은 환경에서 스킬이 제대로 작동하지 않거나 오류를 보일 수 있습니다.

상세 정보

작성자의 원본 설명

Lint ECC skills for Codex/Cursor-safe frontmatter and Claude-only substitutions before a skill PR.

repo: affaan-m/ECC

인기도

GitHub 스타
280k
순위
#409
라이선스
MIT
업데이트
2026. 10. 15.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬