Skip to content
Development
Skill

/sem-integration

Provides sem semantic-diff detection, install-on-first-use, and fallback patterns. Use when building skills that consume git diff output.

From plugin
claude-night-market
343200 skills60 agents162 commands1 MCP

Claude Code

$ npx -y skills add athola/claude-night-market --skill sem-integration --agent claude-code

SKILL.md

sem-integration.SKILL.md
name: sem-integration
description: Provides sem semantic-diff detection, install-on-first-use, and fallback patterns. Use when building skills that consume git diff output.
alwaysApply: false
category: infrastructure
tags:
- sem
- semantic-diff
- git
- foundation
provides:
  infrastructure:
  - sem-detection
  - sem-fallback
  patterns:
  - install-on-first-use
  - graceful-degradation
estimated_tokens: 400
progressive_loading: true
modules:
- modules/detection.md
- modules/fallback.md

sem Integration

Foundation patterns for using [sem](https://github.com/Ataraxy-Labs/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 <baseline>

Fallback path (sem unavailable):

git diff --name-only --diff-filter=A <baseline>
git diff --name-only --diff-filter=M <baseline>
git diff --name-only --diff-filter=D <baseline>
git diff --name-only --diff-filter=R <baseline>

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 <file-or-entity>

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

Exit Criteria

  • [ ] `_sem_check` result cached per session at

`${CLAUDE_CODE_TMPDIR:-/tmp}/sem-available`; detection command runs at most once per session regardless of how many skills invoke it

  • [ ] When sem is unavailable, install offer presented and fallback

path used automatically (`git diff --name-only --diff-filter=` variants); no silent failure

  • [ ] Fallback output normalized to the same entity schema as sem

JSON output per `modules/fallback.md`; consumers downstream see the same structure from both paths

  • [ ] Skills consuming this integration declare

`dependencies: [leyline:sem-integration]` in frontmatter rather than reimplementing the detection pattern

Read more
@athola
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

343200 skills60 agents1 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
343
Star history of athola/claude-night-market on GitHub, a chart by star-history.com

Other skills on claude-night-market.

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills11d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc13d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2d252k
@facebook@facebookInstall Skill

Questions about sem-integration.

Which coding agents can use sem-integration?
sem-integration installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.