/yka-code:ci-hygienefrom yka-code
[yka-code] CI/CD and DevOps hygiene enforcer. Activates when editing GitHub Actions workflows, Dockerfiles, docker-compose, justfile, deploy scripts, or any CI configuration. Enforces pinned versions, proper Claude Code invocation in CI (--bare, API key not Max sub), secret management, and reproducibility. Fills the DevOps gap — no plugin covers this in the wild.
Ships in yka-code. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Claude Code in CI is a different beast than interactive CC. Different auth, different performance profile, different failure modes. This skill enforces the rules that keep pipelines deterministic, secure, and reproducible.
.github/workflows/*.yml, .gitlab-ci.yml, .circleci/config.yml, other CI configDockerfile, docker-compose.yml, Containerfilejustfile, deploy scripts, release automation| Concern | Tool |
|---|---|
| Check current CI config for anti-patterns | ast-grep (structural scan), Grep for specific patterns (@latest, unpinned tags) |
| Look up current versions of CI actions | docfork MCP (needs DOCFORK_API_KEY) for tool docs |
| Reference similar OSS CI configs | deepwiki MCP |
| Dependency vuln scan of the CI image | snyk_container_scan (snyk MCP) if Dockerfile in scope |
| IaC scan for Terraform/K8s/etc. | snyk_iac_scan |
| Past CI decisions on this repo | /claude-mem:mem-search "CI" |
| Plan a large CI overhaul | /claude-mem:make-plan + /claude-mem:do |
--bareInteractive CC has hooks, LSP, plugin sync, CLAUDE.md auto-discovery, auto-memory, and keychain reads. In CI, all of that is overhead or a security hazard. --bare disables all of it and sets CLAUDE_CODE_SIMPLE=1.
# ✅ Correct
- run: claude --bare -p "Review this PR" --system-prompt-file .github/prompts/review.md
# ❌ Wrong
- run: claude -p "Review this PR"
Since the April 4, 2026 enforcement, using a Max subscription in CI will fail. CI must use a dedicated ANTHROPIC_API_KEY (or Bedrock/Vertex/Foundry equivalent) stored in CI secrets.
# ✅ Correct
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
# ❌ Wrong — relies on interactive OAuth/keychain
No @latest, no @v*, no floating tags. Every GitHub Action, every Docker base image, every tool install gets a concrete version (ideally a SHA for Actions, a digest for containers).
# ✅ Correct
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# ❌ Wrong
uses: actions/checkout@v4
# ✅ Correct
FROM node:22.14.0-bookworm-slim@sha256:...
# ❌ Wrong
FROM node:latest
justfile over raw commands in pipeline yamlDon't hardcode raw bun test, docker build, etc. in the workflow yaml. Put the command in justfile and have the pipeline call just <target>. Keeps the pipeline portable; the developer can run the exact same thing locally.
# ✅ Correct
- run: just test-ci
# ❌ Wrong (duplicates intent across local + CI)
- run: bun install --frozen-lockfile && bun test
Never in env files, never committed, never echoed in logs. Mask them in set -x flows.
Lock files must be committed and CI must install from the lock: bun install --frozen-lockfile, npm ci (not npm install), cargo build --locked, uv sync --frozen, etc.
Every CI job gets a timeout-minutes: (GitHub Actions) or equivalent. Unbounded jobs are a runaway cost risk and obscure infrastructure issues.
If a CI job lets Claude Code or another agent run commands, wrap the agent in container-use (per-agent Docker isolation with git-branch scoping) — do NOT give it raw runner access.
claude-mem in deployed envs binds to 127.0.0.1If any deployment runs claude-mem, confirm it's bound to 127.0.0.1 — never 0.0.0.0 (port 37777 is the risk). This applies mostly to self-hosted dev-container setups.
concurrency: group: ... cancel-in-progress: true on long-running workflows so a new push cancels the stale one. Prevents pipeline backups.
Before editing, read the current file(s). Summarize what's there. Note every line that violates a rule above.
yamllint, or yq eval . as a dry parse)yq eval .jobs roundtrip)snyk_container_scan on the resulting imageact locally if availableCommit message pattern: ci(<scope>): <what> — <why>. Include the rule number(s) being enforced if fixing a violation: ci(workflow): pin actions/checkout to SHA — rule 3.
--bare for CC in CI. Always.justfile wraps commands. Pipeline yaml just calls just <target>.--frozen-lockfile / npm ci / --locked / --frozen. Reproducible installs.security-audit — invoke snyk_container_scan / snyk_iac_scan in new pipelines; CI is where security regressions get caught.test-driven-development — CI pipeline's test step is only meaningful if real tests exist. If the repo has none, route there first.doc-hygiene — README badges, CONTRIBUTING's "required checks" section, CHANGELOG release notes for CI changes.refactor-safely — CI overhauls >5 files follow its workflow (baseline green → simplify → re-verify).What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (youssefkadaouiabbassi/yka-code) — no native marketplace selected
npx claudepluginhub p/youssefkadaouiabbassi-code-tools-setup20 skills in this plugin
/audit-rigor[yka-code] Discipline for audit, review, and technology-comparison tasks. Use when the request is "audit X", "review our stack", "is this the best option", "compare alternatives", "what should we swap / add / drop", or any task that produces prioritized recommendations rather than new code. Enforces a ≥70% confidence threshold, delegate-retrieval-to-subagent pattern, inline citations with ISO dates, MCP-first sourcing, and a fixed output format (SWAP / ADD / DROP / KEEP-BUT-UPGRADE / SURPRISE). Pair with research-first (retrieval discipline) and karpathy-guidelines (surgical scope). Chained from security-audit, onboard-codebase, and any /do route that smells like "is this the best we have"./coding-style[yka-code] Enforce minimalist, self-documenting, defensively-sane coding style. Use ALWAYS when writing, editing, or reviewing ANY code in ANY language — every function, every edit, every diff, no exceptions. Covers five rules: (1) no comments unless critical (WHY only, never WHAT, never history), (2) clean + optimized (no dead code, no speculative abstractions, no stale imports, delete over deprecate), (3) self-documenting names (full words, verbs for functions, nouns for data), (4) smallest surface (one function one concern, extract only on 3rd reuse, validate only at boundaries), (5) no dead defense (no try/catch for impossible cases, no fallbacks for inputs you control, let errors bubble to the right handler). Pair with karpathy-guidelines for behavioral principles (Think Before Coding, Simplicity First, Surgical Changes, Goal-Driven Execution).Other plugins' skills for the same job