集成

sem-integration

试用

Provides sem semantic-diff detection, install-on-first-use, and fallback patterns

它能做什么

Provides sem semantic-diff detection, install-on-first-use, and fallback patterns

技能文档

Night Market Skill — ported from claude-night-market/leyline. For the full experience with agents, hooks, and commands, install the Claude Code plugin.

sem Integration

Foundation patterns for using sem semantic diffs in night-market skills.

When To Use

Consult this skill when building or modifying skills that consume git diff output. It provides the detection, installation, and fallback patterns.

When NOT To Use

  • Direct sem CLI usage (just run sem diff yourself)
  • Skills that don't consume diff output

Detection Pattern

Check sem availability once per session:

# Detection (cache per session)
_sem_check() {
  local cache="${CLAUDE_CODE_TMPDIR:-/tmp}/sem-available"
  if [ -f "$cache" ]; then
    cat "$cache"
    return
  fi
  if command -v sem &>/dev/null; then
    echo "1" | tee "$cache"
  else
    echo "0" | tee "$cache"
  fi
}

When _sem_check returns 0, offer installation. See modules/detection.md for install-on-first-use logic and platform-specific commands.

Semantic Diff Pattern

Primary path (sem available):

sem diff --format json 

Fallback path (sem unavailable):

git diff --name-only --diff-filter=A 
git diff --name-only --diff-filter=M 
git diff --name-only --diff-filter=D 
git diff --name-only --diff-filter=R 

See modules/fallback.md for output normalization that produces the same entity schema from both paths.

Impact Analysis Pattern

Primary path (sem available):

sem impact --json 

Fallback path (sem unavailable): use rg/grep to trace callers by filename. See modules/fallback.md.

相关技能

Enforces markdown line-wrap and structure rules for clean git diffs

24 次安装

Audits dependency supply chains for bad versions, lockfile drift, and artifact integrity

22 次安装

Detects shared stack membership and iterates a command across all PRs in base-to-tip order

4 次安装

Analyzes changesets with risk scoring, categorization by type and impact, and release note preparation

20 次安装

Configures pre-commit hooks for linting, type checking, formatting, and testing

25 次安装