mcp-contrast: Skill for Claude Code

.claude/skills/archunit/SKILL.md

archunit is a skill for Claude Code from Contrast-Security-OSS/mcp-contrast. It costs 58 tokens per session (903 once invoked), scanned A, original, Apache-2.0.

A guide for fixing ArchUnit test failures. ArchUnit checks whether code follows rules about dependencies, layers, and separation between parts of an application.

In plain words
What is it for?
Use it when architecture tests fail, when cleaning up previously accepted violations, or when new code depends on a forbidden part of the system.
Why use it?
It helps remove design violations in the code instead of hiding them or editing the list of accepted failures by hand.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is Contrast-Security-OSS/mcp-contrast's own configuration. It tells Claude Code how to work on mcp-contrast 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 mcp-contrast configures →

Reuse

Borrowing it

Nothing to install: this file belongs to Contrast-Security-OSS/mcp-contrast. 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/Contrast-Security-OSS/mcp-contrast/main/.claude/skills/archunit/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/Contrast-Security-OSS/mcp-contrast

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 archunit

README.md
[![agentmods](https://agentmods.dev/badge/skills/contrast-security-oss/mcp-contrast/archunit.svg)](https://agentmods.dev/skills/contrast-security-oss/mcp-contrast/archunit)
Your own site
<a href="https://agentmods.dev/skills/contrast-security-oss/mcp-contrast/archunit"><img src="https://agentmods.dev/badge/skills/contrast-security-oss/mcp-contrast/archunit.svg" alt="Measured on agentmods" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 903 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00058 $0.00903
Opus 5 $0.00029 $0.00451
Sonnet 5 $0.00012 $0.00181
Haiku 4.5 $0.00006 $0.00090

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

Security

Grade A, and why

archunit 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 7d 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.

.claude/skills/archunit/SKILL.md · 60 lines

How it starts

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

ArchUnit Violation Workflow

ArchUnit rules in ArchitectureTest enforce layering, SDK containment, domain isolation, and conventions. Violations are design feedback. Fix the design, never work around the test.

When this skill applies

  • An ArchUnit test fails during make check or ./gradlew :contrast-mcp-core:test
  • You are fixing a grandfathered violation from the freeze store
  • New code you wrote introduces a dependency the architecture rules forbid

The freeze store

Grandfathered violations live in contrast-mcp-core/src/test/resources/archunit-store/. Each file corresponds to one frozen rule (mapping in stored.rules).

The store is shrink-only by design. -ParchStoreUpdate lets ArchUnit remove stale entries for violations that no longer exist. New violations always fail regardless of any flag. ArchUnit will never auto-add new violations to the store.

Never edit store files manually. Only ./gradlew :contrast-mcp-core:test -ParchStoreUpdate may modify them.

Fix-then-shrink workflow

  1. Fix the code. Change the production code so the violation no longer exists.
  2. Run the store update. ./gradlew :contrast-mcp-core:test -ParchStoreUpdate removes fixed entries.
  3. If tests still fail, the remaining violations need code fixes, not more store entries. Go back to step 1.
  4. Run the full gate. make check must pass.
  5. Commit the shrunken store alongside the code changes.

Fixing SDK containment violations

The rule "Only client and sdkextension may depend on the Contrast SDK directly" means tool classes and result models must not import com.contrastsecurity types.

The fix is always a new abstraction in sdkextension.data. Create a record or class that wraps the SDK type's fields, with a from(SdkType) factory method. Have the caller map through YourType.from(sdkObject) and pass your type downstream.

Do not replace a typed parameter with loose strings. Do not decompose a domain object into primitive arguments. The goal is to move the SDK boundary, not remove the type contract.

Read the full file on GitHub · 60 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. 7d ago First seen · 60 lines · 58 tokens per session scan A 646115e64e07

Subscribe to this mod's changes

archunit is a skill published in the GitHub repository Contrast-Security-OSS/mcp-contrast (23 stars, last pushed 3d ago), licensed Apache-2.0. It adds 58 tokens to every session and 903 once invoked, about $0.0003 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-30.

Related

Other skills, from other repositories

adversarial-reviewer

Adversarial code review that assumes bugs exist and hunts for them. Use when asked to review code, find bugs, audit for correctness, stress-test a PR, or when someone says "tear this apart" or "what's wrong with this". Give no benefit of the doubt — every line is guilty until proven innocent.

emdash-cms/emdash · 71 tokens

gsd-ns-review

Route to the appropriate quality / review skill based on the user's intent. gsd-code-review-fix was absorbed by gsd-code-review --fix in #2790.

open-gsd/gsd-core · 16 tokens

issue

Use when starting a chain from a GitHub issue — turning an issue URL or number into a triaged, planned, dispatched, and reviewed pull request. Classifies the thread (bug → root-cause discipline, feature → plan chain, question → drafted reply), synthesizes a spec from the issue's own acceptance criteria, then runs the…

jeremylongshore/tons-of-skills-marketplace · 115 tokens

gitnexus

A code-graph analysis add-on for examining an existing codebase, including symbols, call paths, execution flows, and effects across repositories. It can query GitNexus through its command-line or MCP interfaces.

hashgraph-online/awesome-codex-plugins · 58 tokens

cleanup-code-inspections

Reduce technical debt and improve code quality by systematically resolving static analysis warnings.

flutter/flutter-intellij · 19 tokens

superlint

This skill describes the mandatory standard operating procedure for using our internal SuperLint tool. Use this when tasks require fixing code quality issues according to corporate standards.

mgechev/skillgrade · 0 tokens