self-containment-linter

self-containment-linter is an agent for Claude Code from XRenSiu/claude-code-forge. It costs 0 tokens per session (2,211 once invoked), scanned A, original, MIT.

A self-containment linter scans a generated persona skill for references and paths that point outside its own directory. A linter is a checker that looks for rule violations without running the full program.

In plain words
What is it for?
It checks generated or migrated persona skills for central-system references, outside paths, and missing files needed for independent use.
Why use it?
It catches dependencies that would break if the skill were copied to another machine without the generation system. The workflow can block delivery when such leakage is found.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter.

Not installable: its command points at a path on the author’s own machine, so it runs nowhere else. The line is /Users/xrensiu/....

Part of the persona-distill plugin — 5 skills, 16 agents shipped together

Good fit It checks generated or migrated persona skills for central-system references, outside paths, and missing files needed for independent use.

Compare 6 agents from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add XRenSiu/claude-code-forge
Claude Code
/plugin install persona-distill

Made for: Claude Code.

Or install persona-distill, the plugin that ships this one along with the rest of its 5 skills, 16 agents.

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 self-containment-linter

README.md
[![agentmods](https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/self-containment-linter/github.svg)](https://agentmods.dev/agents/xrensiu/claude-code-forge/self-containment-linter)
Your own site
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/self-containment-linter"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/self-containment-linter/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 self-containment-linter

Your own site · 80×15
<a href="https://agentmods.dev/agents/xrensiu/claude-code-forge/self-containment-linter"><img src="https://agentmods.dev/badge/agents/xrensiu/claude-code-forge/self-containment-linter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,211 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.00000 $0.02211
Opus 5.5 $0.00000 $0.00884
Sonnet 5.5 $0.00000 $0.00442
Haiku 4.5 $0.00000 $0.00221

Measured 1mo ago against content hash d724cdaf1a3c, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

self-containment-linter 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 1mo 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.

plugins/persona-distill/skills/distill-meta/agents/self-containment-linter.md · 177 lines

How it starts

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

Role

The self-containment principle (docs/principles.md §1) says: a generated persona skill's directory, after cp -r to a fresh machine, must load and run without distill-meta being present. The migrator guards this invariant at step 6 with grep -r "distill-meta" . returning zero hits. That grep is necessary but not sufficient.

You run a broader scan covering the leakage patterns the simple grep misses. You're the final gate before Phase 4 hands off to persona-judge, and the last check before migrator declares success.

When to Invoke

  • distill-meta Phase 3.8 (new — between 3.7 execution-profile and 4 judge): after all generation is done and before validation. Block Phase 4 on any failure.
  • migrator step 6 (just before persona-judge re-validation): guarantees the migrated skill still passes. Block the commit swap on any failure.
  • persona-router registration (optional sanity, not blocking): warn if a skill being indexed has lint warnings — user decides whether to trust it.
  • NOT invoked during Phase 0/1/2/2.5/3/3.5/3.7 — those phases are mid-generation; leakage can still be in transit.

Inputs

Input Source Required
{persona-skill-root} Absolute path to the produced skill YES
{skip_large_files} Boolean, default true. Skips files > 2 MB (usually corpus binaries) to keep the scan bounded. optional

The 6 Checks

Check 1 — Forbidden reference grep

grep -rE 'distill-meta|persona-distill-plugin|/references/|/contracts/' \
  {persona-skill-root}/ \
  --include='*.md' --include='*.json' --include='*.yaml' --include='*.py'

Any match → FAIL. Every produced file should either:

  • Not reference the generator at all, OR
  • Reference via a relative path fully contained in {persona-skill-root}/ (which this grep excludes by /references/ — a persona skill does NOT have a references/ subdirectory, only components/).

Exceptions (hard-coded allowlist):

  • consent-attestation.md attestation_version comment referencing contract is allowed — it's a version stamp, not a live link.
  • manifest.json field descriptions in $comment — the manifest references contract for versioning semantics. Allowed.

Read the full file on GitHub · 177 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. 1mo ago First seen · 177 lines · 0 tokens per session scan A d724cdaf1a3c

Subscribe to this mod's changes

self-containment-linter is an agent published in the GitHub repository XRenSiu/claude-code-forge (2 stars, last pushed 29d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,211 tokens. 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.

Related

Other agents, from other repositories

review-obsidian-guidelines

Reviews a diff of obsidian-reminder against Obsidian's community plugin guidelines and directory review rules that ESLint does not already enforce — manifest metadata, command naming, settings UI, styling, mobile compatibility, vault access APIs. Used by the pr-review workflow; read-only.

uphy/obsidian-reminder · 63 tokens

debugger

Diagnoses and fixes failed modules using root-cause analysis, not guessing.

TT-Wang/forge · 17 tokens

debugger

Investigate errors systematically to find root cause before attempting fixes. Gathers evidence, analyzes patterns, and forms testable hypotheses.

bostonaholic/rpikit · 28 tokens

loom-advisor

Read-only advisory agent for debugging and repeated failures. Spawned instead of a blind retry when an implementer has failed twice on the same task, or a bug resists straightforward diagnosis. Returns a root-cause diagnosis plus one concrete next step.

cosmix/loom · 53 tokens

evolve-retrospective

Failure post-mortem agent for the Evolve Loop. Fires only on Auditor FAIL or WARN verdicts. Reads cycle artifacts and produces a structured retrospective + failure-lesson YAML files. READ-ONLY outside the lessons directory.

mickeyyaya/evolve-loop · 51 tokens

runtime-observer

Dynamic observation agent designed to inspect running applications, trace state transitions, log API traffic, and flag race conditions, cache states, or timing issues. Trigger with "start runtime observer", "observe live system", "trace API calls", or during characterization test validation.

richfrem/agent-plugins-skills · 56 tokens