Agent skill

Ad Hooks

by CorridorTech in CorridorTech/PoseCap

Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration).

Apache-2.0Auto-check passedTesting & QA

Install Ad Hooks

skills CLI
$ npx skills add CorridorTech/PoseCap --skill ad-hooks -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install CorridorTech/PoseCap ad-hooks --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/CorridorTech/PoseCap.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/ad-hooks .claude/skills/ad-hooks && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
ad-hooks
GitHub stars
220
Token cost
~1.7k tokens
SKILL.md length
812 words
Files
2
Skills in repo
15
Repo updated
First seen
Licence
Apache-2.0

At a glance

Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration).

  • Works in 3 steps: Existing runner. .husky/ → Husky.… → Stack signals (if no runner present).… → No signals. Recommend native .git/hooks/…
  • The user wants to wire hooks
  • Calls npm, gitleaks and cargo
  • Configure pre-commit / pre-push

What it does

Ad Hooks is an agent skill from CorridorTech/PoseCap. Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration). Detects the project's stack and recommends a hook runner (Husky / lefthook / pre-commit / native), scaffolds the runner config, and updates AGENTS.md Quality Gates. Use when the user wants to wire hooks, configure pre-commit / pre-push, set up quality gates, prevent --no-verify bypass, or close the WORKFLOW §11 advisory-vs-deterministic gap. Opt-in skill; not auto-installed.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `agents/openai.yaml`).

It sits in Testing & QA, covering Quality gates, Project scaffolding and Linting and formatting. It works with npm. The licence is Apache-2.0.

When your agent uses it

  • The user wants to wire hooks
  • Configure pre-commit / pre-push
  • Set up quality gates
  • Prevent --no-verify bypass

Example prompts

  • “/ad-hooks”

Requirements

  • Node.js

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Existing runner. .husky/ → Husky. lefthook.yml or .lefthook.yml → lefthook. .pre-commit-config.yaml → pre-commit. .git/hooks/ with…
  2. Stack signals (if no runner present). package.json → recommend Husky or lefthook. pyproject.toml → recommend pre-commit. go.mod →…
  3. No signals. Recommend native .git/hooks/ only as fallback. Warn the user that native hooks are not portable across clones.

What it can do on your machine

Read from SKILL.md and the folder at commit 626701b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • npm
    • gitleaks
    • cargo
    • npx
    • ruff
    • go
    • black
    • pytest

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use npm and npx, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Ad Hooks loads about 1.7k tokens when it runs. Until then it costs about 131 tokens; SKILL.md has 812 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~131
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from CorridorTech/PoseCap at commit 626701b, republished under its Apache-2.0 licence (© CorridorTech). 812 words, ~1,682 tokens.

Download SKILL.mdSave it as .claude/skills/ad-hooks/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
ad-hooks
description
Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration). Detects the project's stack and recommends a hook runner (Husky / lefthook / pre-commit / native), scaffolds the runner config, and updates AGENTS.md Quality Gates. Use when the user wants to wire hooks, configure pre-commit / pre-push, set up quality gates, prevent --no-verify bypass, or close the WORKFLOW §11 advisory-vs-deterministic gap. Opt-in skill; not auto-installed.
summary
Scaffold deterministic quality gates per WORKFLOW §11 — pre-commit + pre-push, runner detected from stack signals.

<background_information> Scaffolds the deterministic gates WORKFLOW.md §11 names. The skill writes config files for a hook runner and updates AGENTS.md Quality Gates; it does not execute install scripts. The user runs the runner's one-time bootstrap (npx husky init, lefthook install, pre-commit install) — the skill names the exact command.

Codex auto-trigger on description keywords is less mature than Claude Code's. If auto-invocation does not fire when the user asks about hooks, pre-commit, or quality gates, invoke the skill manually. </background_information>

<instructions>
Step 0 — confirm the gates the user wants. WORKFLOW §11 names two tiers:
- Pre-commit (fast): lint, format, secret-scan. Runs on every commit. Keep under ~5s; slow pre-commits push devs to `--no-verify`.
- Pre-push (thorough): build, unit tests, integration tests. Runs on every push. Acceptable to be slow.

Confirm both tiers are in scope. If the user wants only one, scaffold only that tier.

Visual / E2E for UI projects (Cypress, Playwright) live in CI, not pre-push. Out of scope.

Step 1 — detect the runner. Read repo signals in this order:

  1. Existing runner. .husky/ → Husky. lefthook.yml or .lefthook.yml → lefthook. .pre-commit-config.yaml → pre-commit. .git/hooks/ with non-sample scripts → native hooks.
  2. Stack signals (if no runner present). package.json → recommend Husky or lefthook. pyproject.toml → recommend pre-commit. go.mod → recommend lefthook. Cargo.toml → recommend lefthook. Multiple stacks → recommend lefthook (cross-language by default).
  3. No signals. Recommend native .git/hooks/ only as fallback. Warn the user that native hooks are not portable across clones.

If multiple runners are present, surface the conflict and ask the user before scaffolding. Never silently pick.

Step 2 — recommend the per-stack commands:

  • Node: lint = npm run lint or npx eslint .; format check = npm run format:check or npx prettier --check .; secret-scan = gitleaks detect --no-banner; build = npm run build (skip if no script); test = npm test.
  • Python: lint = ruff check .; format check = ruff format --check . or black --check .; secret-scan = gitleaks detect --no-banner; test = pytest -q.
  • Go: lint = golangci-lint run; format check = gofmt -d .; secret-scan = gitleaks detect --no-banner; build = go build ./...; test = go test ./....
  • Rust: lint = cargo clippy -- -D warnings; format check = cargo fmt --check; secret-scan = gitleaks detect --no-banner; build = cargo build; test = cargo test.
  • Mixed / other: ask for the per-tier command list. Do not invent.

Offer to swap any default. Confirm before writing.

Step 3 — scaffold the runner config. Write the runner-specific config file:

  • Husky: .husky/pre-commit and .husky/pre-push (shell scripts) + "prepare": "husky" in package.json. Bootstrap: npm install.
  • lefthook: lefthook.yml at the repo root with pre-commit and pre-push commands keyed by stage. Bootstrap: lefthook install.
  • pre-commit: .pre-commit-config.yaml with stack-specific hook references. Bootstrap: pre-commit install and pre-commit install --hook-type pre-push.
  • Native: .git/hooks/pre-commit and .git/hooks/pre-push + a setup-hooks.sh script the user runs after every clone (since .git/ is not committed).

Step 4 — update AGENTS.md Quality Gates. Append or refresh the section with: pre-commit gate list, pre-push gate list, runner name + config path, bootstrap command, CI status if known, no-bypass policy. Honor existing managed markers if ad-bootstrap already wrote Quality Gates.

Step 5 — mirror CI locally. WORKFLOW §11: "CI failure is a local gate gap." Read the CI config and compare:

Show full SKILL.md (314 more words)Show less
  1. Detect CI surface in order: .github/workflows/*.yml, .gitlab-ci.yml, .circleci/config.yml, azure-pipelines.yml, .buildkite/pipeline.yml. If none, note the gap and skip — mirror check has no target.
  2. Extract CI commands from run: / script: steps — test / lint / typecheck / build. Skip checkout, setup, cache, publish.
  3. Extract CI matrix — language versions, OS runners, feature flags. These become pre-push matrix requirements when they change the failure surface.
  4. Diff against pre-push. For each CI command not covered locally, warn: CI runs <cmd> — pre-push does not. Add to pre-push or CI will catch what local won't. For each matrix dimension CI covers that pre-push does not, warn: CI matrix <dim>=<values>, pre-push runs <value>.
  5. Offer to close the gap. Propose specific edits to the runner config; ask the user before writing (matrix mirroring can be expensive).

Step 6 — tell the user the bootstrap command. Output the exact one-line command the user runs. The skill does not execute it. </instructions>

<output_contract> Filesystem changes:

  • The runner's config file (.husky/pre-commit, lefthook.yml, .pre-commit-config.yaml, or .git/hooks/).
  • An updated AGENTS.md Quality Gates section.
  • For native-hooks fallback: a setup-hooks.sh script.

The skill does not execute the runner's install command. The skill does not write CI config. The skill does not configure agent-side hooks (.claude/settings.json) — different surface, deferred.

Documentation discipline rules apply at write time:

  • No emoji anywhere in scaffolded config or AGENTS.md update.
  • No version stamps or DRAFT markers.
  • Quality Gates section opens with the operational rule (gates are deterministic) before listing the gates.
  • One scope: Quality Gates. No duplication of ARCHITECTURE.md or ADR rationale.
  • No commented-out scripts. No orphan TODO / FIXME. </output_contract>

Next

  • Run the runner's bootstrap command (cited in Step 6 — e.g., npm install, lefthook install, pre-commit install).
  • Verify a deliberately-failing edit (e.g., a known lint violation) gets blocked at commit.
  • Add a redundant CI gate so contributors cannot bypass via --no-verify. WORKFLOW §11 binding.
  • /ad-drift periodically to confirm hooks stay wired as the project evolves.

© CorridorTech, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .agents/skills/ad-hooks of CorridorTech/PoseCap.

  • SKILL.md
  • agents/openai.yaml

Open the folder on GitHubat commit 626701b

Compare with similar skills

Ad Hooks next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Ad Hooks compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Ad Hooks this skillCorridorTech/PoseCap220—~1.7kAutomated safety check: PassApache-2.0
Django Verification Loopaffaan-m/ECC274k7 repos~2.9kAutomated safety check: PassMIT
Quality Gatesandymai/brepjs114—~3.2kAutomated safety check: PassApache-2.0
Npx CLIjwynia/agent-skills165—~2.4kAutomated safety check: PassNone
Create Saleor Packagesaleor/apps162—~608Automated safety check: PassCustom licence
Deno Runtime and Package Managerdenoland/skills100—~2.7kAutomated safety check: PassMIT

Similar skills

  • Runs a phased pre-PR and pre-deploy check on a Django project: environment, linting, migrations, tests with coverage, security scans and settings review.

    274k GitHub starsUsed in 7 repos~2.9k tokens
    DevelopmentAuto-check passed
  • Quality Gates

    andymai/brepjs

    This skill should be used when a local brepjs quality gate or npm run validate step fails and the specific rule's fix or escape hatch is needed — ESLint errors like "no-explicit-any" or "Direct .oc…

    114 GitHub stars~3.2k tokensUpdated today
    Testing & QAAuto-check passed
  • Npx CLI

    jwynia/agent-skills

    Build and publish npx-executable CLI tools using Bun as the primary toolchain with npm-compatible output.

    165 GitHub stars~2.4k tokensUpdated 7 mo ago
    DevelopmentAuto-check passed
  • Scaffold a new shared package in the saleor-apps monorepo under ./packages/.

    162 GitHub stars~608 tokensUpdated 6 days ago
    DevelopmentAuto-check passed
  • Official

    Guides writing, running and configuring Deno 2.9+ projects: installing npm and JSR dependencies, permissions, config file precedence and the built-in fmt, lint, test and compile toolchain.

    100 GitHub stars~2.7k tokensUpdated 2 mo ago
    DevelopmentAuto-check passed
  • Keep the repository's linted Markdown passing npm run lint:markdown.

    214 GitHub stars~832 tokensUpdated 7 days ago
    DevelopmentAuto-check passed

More from CorridorTech/PoseCap

All 15 skills in this repo
  • Ad Adr

    CorridorTech/PoseCap

    Draft a new ADR (Architecture Decision Record) at doc/adr/NNNN-<short-title.md, using Michael Nygard's Context/Decision/Consequences/Alternatives pattern.

    220 GitHub stars~1k tokensUpdated today
    Auto-check: notes
  • Ad Architecture

    CorridorTech/PoseCap

    Generate ARCHITECTURE.md at the repo root by scanning the code first, pre-filling layers/patterns/observability/deployment from observed signals, then asking only the genuine gaps.

    220 GitHub stars~1.5k tokensUpdated today
    Auto-check: notes
  • Ad Archive

    CorridorTech/PoseCap

    Hard-delete completed plan files (tasks Status:done, specs Status:shipped, PRDs Status:superseded, ADRs Status:superseded or deprecated) via git rm, leaving git history as the only ledger.

    220 GitHub stars~1.9k tokensUpdated today
    Auto-check: notes
  • Ad Drift

    CorridorTech/PoseCap

    Read-only drift audit — compare AGENTS.md, ARCHITECTURE.md, ADR statuses, feature specs in doc/specs/, and documentation discipline against what the code actually does.

    220 GitHub stars~1.8k tokensUpdated today
    Auto-check: notes
  • Ad Hooks

    CorridorTech/PoseCap

    Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration).

    220 GitHub stars~2.4k tokensUpdated today
    Auto-check: notes
  • Ad Next

    CorridorTech/PoseCap

    Survey the project's state across the six-layer artifact stack and recommend prioritized next actions, modeled on flutter doctor.

    220 GitHub stars~3.3k tokensUpdated today
    Auto-check: notes

Works with

Questions about Ad Hooks

What does Ad Hooks do?

Scaffold deterministic quality gates per WORKFLOW.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration). Ad Hooks is an agent skill from CorridorTech/PoseCap.md §11 — pre-commit (lint, format, secret-scan), pre-push (build, unit, integration).

When should I use Ad Hooks?

Ad Hooks fits situations like: the user wants to wire hooks; configure pre-commit / pre-push; set up quality gates; prevent --no-verify bypass.

How do I install Ad Hooks in Claude Code?

Run `npx skills add CorridorTech/PoseCap --skill ad-hooks -a claude-code`. Or copy the skill folder (.agents/skills/ad-hooks in CorridorTech/PoseCap) into .claude/skills/ad-hooks in your project. Claude Code loads it when a task matches its description.

How do I install Ad Hooks in Codex?

Run `npx skills add CorridorTech/PoseCap --skill ad-hooks -a codex`. Or copy the skill folder (.agents/skills/ad-hooks in CorridorTech/PoseCap) into .agents/skills/ad-hooks in your project. Codex loads it when a task matches its description.

Can I use Ad Hooks in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CorridorTech/PoseCap --skill ad-hooks -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/ad-hooks, .gemini/skills/ad-hooks, .github/skills/ad-hooks and .opencode/skills/ad-hooks in your project.

What does Ad Hooks need to run?

Going by SKILL.md and its folder, Ad Hooks needs the command-line tools its instructions call (npm, gitleaks, cargo, npx, ruff and go). Our summary lists: Node.js.

Does Ad Hooks access the network?

SKILL.md contains no URLs. Its commands use npm and npx, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Ad Hooks safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Ad Hooks use?

Ad Hooks is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Ad Hooks use?

About 1.7k tokens (SKILL.md is roughly 6.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Ad Hooks?

Skills that share tags, products or a category with Ad Hooks: Django Verification Loop (affaan-m/ECC, 274k stars), Quality Gates (andymai/brepjs, 114 stars), Npx CLI (jwynia/agent-skills, 165 stars) and Create Saleor Package (saleor/apps, 162 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Ad Hooks?

CorridorTech (a GitHub organization) maintains it in CorridorTech/PoseCap, which has 220 GitHub stars. The repository holds 15 skills in this directory. The repository was last updated on October 7, 2026.

Source: CorridorTech/PoseCap on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.