ML-MLOps-Portfolio: Skill for Claude Code

.devin/skills/rule-audit/SKILL.md

rule-audit is a skill for Claude Code from DuqueOM/ML-MLOps-Portfolio. It costs 39 tokens per session (2,224 once invoked), scanned A, original, MIT.

A read-only compliance scan that checks a service or repository against 27 rules defined in AGENTS.md.

In plain words
What is it for?
Use it to audit serving setup, deployment configuration, security, and other project conventions after tests and outside active incidents.
Why use it?
It finds structural and configuration violations with file-and-line evidence without changing the code, while leaving fixes for human approval.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions AGENTS.md.

This is DuqueOM/ML-MLOps-Portfolio's own configuration. It tells Claude Code how to work on ML-MLOps-Portfolio itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything ML-MLOps-Portfolio configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DuqueOM/ML-MLOps-Portfolio. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DuqueOM/ML-MLOps-Portfolio/main/.devin/skills/rule-audit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/DuqueOM/ML-MLOps-Portfolio

Made for: Claude Code.

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 rule-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/duqueom/ml-mlops-portfolio/rule-audit.svg)](https://agentmods.dev/skills/duqueom/ml-mlops-portfolio/rule-audit)
Your own site
<a href="https://agentmods.dev/skills/duqueom/ml-mlops-portfolio/rule-audit"><img src="https://agentmods.dev/badge/skills/duqueom/ml-mlops-portfolio/rule-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 39 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,224 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.00039 $0.02224
Opus 5 $0.00019 $0.01112
Sonnet 5 $0.00008 $0.00445
Haiku 4.5 $0.00004 $0.00222

Measured 8d ago against content hash 08bcd66431a5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

rule-audit 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 8d ago.

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.

.devin/skills/rule-audit/SKILL.md · 209 lines

How it starts

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

Rule Audit — Compliance scan against AGENTS.md invariants

This skill is READ-ONLY. It does not modify code. When findings are identified, the agent produces a remediation plan and waits for human approval (CONSULT) before any fix. Template-scaffolder patches require STOP because they affect all future services.

When NOT to use this skill

  • Before running tests — broken tests are a faster signal than structural audits.
  • During active incidents — use /incident or /rollback first. Come back to audit in the post-mortem.
  • On third-party code — this skill is scoped to the template's own conventions.

Invariant catalogue (D-01 → D-27)

The checks below map one-to-one onto the AGENTS.md anti-pattern table. The agent runs the matching query for each ID and records PASS/FAIL + evidence (file:line or metric) per service.

Serving (D-01 → D-05)

ID Check Command
D-01 uvicorn --workers N where N > 1 rg -n "uvicorn.*--workers\s+[2-9]" --glob "**/Dockerfile*" --glob "**/*.sh"
D-02 HPA uses memory metric yq '.spec.metrics[] | select(.resource.name == "memory")' k8s/**/hpa.yaml
D-03 model.predict( inside an async def without run_in_executor rg -n "async def.*:" -A 30 app/ | rg "model\.(predict|predict_proba)\("
D-04 shap.TreeExplainer used with stacking/ensemble wrapper rg -n "TreeExplainer" app/
D-05 == in requirements.txt for ML packages rg -n "^(numpy|scipy|scikit-learn|pandas|xgboost|lightgbm)==" requirements*.txt

Infrastructure + Quality (D-06 → D-12)

ID Check
D-06 Any metric in artifacts/metrics.json ≥ 0.99 — requires ADR
D-07 Fairness DIR < 0.80 or missing
D-08 PSI CronJob reports but no alert routes configured
D-09 Drift CronJob last_run > 48h → heartbeat missing
D-10 terraform.tfstate* tracked in git
D-11 Model artifact present in Dockerfile (COPY *.joblib / *.pkl)
D-12 Promotion pipeline missing a quality-gate script

Read the full file on GitHub · 209 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. 8d ago First seen · 209 lines · 39 tokens per session scan A 08bcd66431a5

Subscribe to this mod's changes

rule-audit is a skill published in the GitHub repository DuqueOM/ML-MLOps-Portfolio (5 stars, last pushed yesterday), licensed MIT. It adds 39 tokens to every session and 2,224 once invoked, about $0.0002 per session on Opus 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-08-31.