plugin-cross-port-install-hook

plugin-cross-port-install-hook is a skill for Claude Code from IvanLutsenko/awac-ai-agent-plugins. It costs 29 tokens per session (1,778 once invoked), scanned A, original, MIT.

A skill that installs a plugin-cross-port pre-commit hook in a Git repository. A pre-commit hook is an automatic check that runs before Git records a commit.

In plain words
What is it for?
Use it to install the conversion hook in a chosen repository or in the current repository when no path is given.
Why use it?
It avoids manually creating the hook and checks whether an existing hook would be overwritten.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions .claude-plugin; positional $N argument; mentions Claude Code.

Part of the plugin-cross-port plugin — 4 skills, 1 command shipped together

Good fit Use it to install the conversion hook in a chosen repository or in the current repository when no path is given.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ivanlutsenko/awac-ai-agent-plugins/install-hook
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add IvanLutsenko/awac-ai-agent-plugins --skill install-hook
Clone the repo
git clone --depth 1 https://github.com/IvanLutsenko/awac-ai-agent-plugins

Made for: Claude Code.

Or install plugin-cross-port, the plugin that ships this one along with the rest of its 4 skills, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for plugin-cross-port-install-hook

README.md
[![agentmods](https://agentmods.dev/badge/skills/ivanlutsenko/awac-ai-agent-plugins/install-hook/github.svg)](https://agentmods.dev/skills/ivanlutsenko/awac-ai-agent-plugins/install-hook)
Your own site
<a href="https://agentmods.dev/skills/ivanlutsenko/awac-ai-agent-plugins/install-hook"><img src="https://agentmods.dev/badge/skills/ivanlutsenko/awac-ai-agent-plugins/install-hook/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for plugin-cross-port-install-hook

Your own site · 80×15
<a href="https://agentmods.dev/skills/ivanlutsenko/awac-ai-agent-plugins/install-hook"><img src="https://agentmods.dev/badge/skills/ivanlutsenko/awac-ai-agent-plugins/install-hook.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 29 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,778 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00029 $0.01778
Opus 5.5 $0.00012 $0.00711
Sonnet 5.5 $0.00006 $0.00356
Haiku 4.5 $0.00003 $0.00178

Measured 9d ago against content hash 7ab8028cafe9, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

plugin-cross-port-install-hook scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

The scan reads SKILL.md. This mod also ships 8 executable files (scripts/adaptation_state.py, scripts/adaptation.py, scripts/convert_cc_to_codex.py, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/plugin-cross-port/skills/generated-from-commands/install-hook/SKILL.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Converted from Claude Code command /install-hook. Review and adapt: hooks and MCP tool IDs may need manual mapping for Codex. Helper scripts ship in this skill's own scripts/ directory. Replace <this skill directory> with the path Codex reported when it loaded this skill — a bare relative path would resolve against the repository under review instead.

Install Hook

Installs the bidirectional plugin-cross-port pre-commit hook into a target git repository.

Arguments

  • /path/to/target-repo (optional) — defaults to current working directory

Steps

Step 1 — Resolve target repo

Use the argument if provided, otherwise use cwd.

Verify it's a git repo:

git -C <target> rev-parse --show-toplevel

If this fails: stop with "Not a git repository: ".

Step 2 — Get scripts path

Run to get the absolute path to the converter scripts:

echo "<this skill directory>/scripts"

Store the result as SCRIPTS_DIR. This is the path that will be embedded in the generated hook.

Step 3 — Check for existing pre-commit hook

ls <target>/.githooks/pre-commit 2>/dev/null

If it exists: show the user the first 5 lines and ask:

".githooks/pre-commit already exists in target repo. Overwrite?"

If they say no: stop.

Step 4 — Create .githooks dir

mkdir -p <target>/.githooks

Step 5 — Write hook

Write <target>/.githooks/pre-commit using the Write tool. Replace __SCRIPTS_DIR__ with the value from Step 2.

Hook content (substitute __SCRIPTS_DIR__ literally):

#!/bin/bash
# plugin-cross-port pre-commit hook
# Installed by /cross-port:install-hook — re-run after plugin updates

CC_TO_CODEX="__SCRIPTS_DIR__/convert_cc_to_codex.py"
CODEX_TO_CC="__SCRIPTS_DIR__/convert_codex_to_cc.py"

if [ ! -f "$CC_TO_CODEX" ] || [ ! -f "$CODEX_TO_CC" ]; then
  echo "⚠️  plugin-cross-port: scripts not found. Re-run /cross-port:install-hook"
  exit 0
fi

REPO_ROOT="$(git rev-parse --show-toplevel)"
CONFIG_FILE="$REPO_ROOT/.plugin-cross-port.config.yaml"
PLUGINS_DIR="plugins"
CODEX_MARKETPLACE=".agents/plugins/marketplace.json"
DEFAULT_SOT="claude-code"

if [ -f "$CONFIG_FILE" ]; then
  val=$(grep '^plugins_dir:' "$CONFIG_FILE" | awk '{print $2}' | tr -d "'\"")
  [ -n "$val" ] && PLUGINS_DIR="$val"
  val=$(grep '^codex_marketplace:' "$CONFIG_FILE" | awk '{print $2}' | tr -d "'\"")
  [ -n "$val" ] && CODEX_MARKETPLACE="$val"
  val=$(grep '^default_source_of_truth:' "$CONFIG_FILE" | awk '{print $2}' | tr -d "'\"")
  [ -n "$val" ] && DEFAULT_SOT="$val"
fi

CHANGED_PLUGINS=$(git diff --cached --name-only | grep "^$PLUGINS_DIR/" | cut -d/ -f1,2 | sort -u)
if [ -z "$CHANGED_PLUGINS" ]; then exit 0; fi

get_source_of_truth() {
  local plugin="$1"; local sot=""
  local df="$REPO_ROOT/$plugin/.plugin-cross-port.json"
  [ -f "$df" ] && sot=$(grep '^source_of_truth:' "$df" | awk '{print $2}' | tr -d "'\"")
  if [ -z "$sot" ]; then
    local hc="$REPO_ROOT/$plugin/.claude-plugin/plugin.json"
    local hd="$REPO_ROOT/$plugin/.codex-plugin/plugin.json"
    if [ -f "$hc" ] && [ ! -f "$hd" ]; then sot="claude-code"
    elif [ -f "$hd" ] && [ ! -f "$hc" ]; then sot="codex"
    else sot="$DEFAULT_SOT"; fi
  fi
  echo "$sot"
}

run_cc_to_codex() {
  local plugin="$1"
  echo "plugin-cross-port: CC→Codex syncing $plugin"
  python3 "$CC_TO_CODEX" "$plugin" --repo-root "$REPO_ROOT" --force || { echo "❌ CC→Codex failed for $plugin. Commit aborted."; exit 1; }
  git add "$REPO_ROOT/$plugin/.codex-plugin/" "$REPO_ROOT/$plugin/skills/generated-from-commands/" "$REPO_ROOT/$plugin/.plugin-cross-port.json" "$REPO_ROOT/$CODEX_MARKETPLACE" 2>/dev/null || true
}

run_codex_to_cc() {
  local plugin="$1"
  echo "plugin-cross-port: Codex→CC syncing $plugin"
  python3 "$CODEX_TO_CC" "$plugin" --repo-root "$REPO_ROOT" --force || { echo "❌ Codex→CC failed for $plugin. Commit aborted."; exit 1; }
  git add "$REPO_ROOT/$plugin/.claude-plugin/" "$REPO_ROOT/$plugin/commands/generated-from-codex-"*.md "$REPO_ROOT/$plugin/.plugin-cross-port.json" 2>/dev/null || true
}

SYNCED=0
for PLUGIN in $CHANGED_PLUGINS; do
  STAGED=$(git diff --cached --name-only | grep "^$PLUGIN/")
  CC_CHANGED=$(echo "$STAGED" | grep -E "^$PLUGIN/(commands/[^/]+\.md|\.claude-plugin/)" | grep -v "generated-from-codex")
  CODEX_CHANGED=$(echo "$STAGED" | grep "^$PLUGIN/\.codex-plugin/")
  if [ -n "$CC_CHANGED" ] && [ -n "$CODEX_CHANGED" ]; then
    SOT=$(get_source_of_truth "$PLUGIN")
    echo "⚠️  plugin-cross-port: both sides staged in $PLUGIN — using source_of_truth=$SOT"
    [ "$SOT" = "codex" ] && run_codex_to_cc "$PLUGIN" || run_cc_to_codex "$PLUGIN"
    SYNCED=$((SYNCED + 1))
  elif [ -n "$CC_CHANGED" ]; then
    run_cc_to_codex "$PLUGIN"; SYNCED=$((SYNCED + 1))
  elif [ -n "$CODEX_CHANGED" ]; then
    run_codex_to_cc "$PLUGIN"; SYNCED=$((SYNCED + 1))
  fi
done
[ $SYNCED -gt 0 ] && echo "✅ plugin-cross-port: $SYNCED plugin(s) synced"
exit 0

Read the full file on GitHub · 180 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago Changed · +3 lines 7ab8028cafe9
  2. 1mo ago First seen · 177 lines · 29 tokens per session scan A c65fd98d1c03

Subscribe to this mod's changes

plugin-cross-port-install-hook is a skill published in the GitHub repository IvanLutsenko/awac-ai-agent-plugins (3 stars, last pushed 5d ago), licensed MIT. It adds 29 tokens to every session and 1,778 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.