Agent skill

Encapsulation

by jongwony in jongwony/epistemic-protocols

This skill should be used when the user asks to "audit plugin encapsulation", "check self-containment semantics", "find contributor-knowledge assumptions", or invokes /encapsulation.

MITAuto-check passedAgent Workflows

Install Encapsulation

skills CLI
$ npx skills add jongwony/epistemic-protocols --skill encapsulation -a claude-code

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

GitHub CLI
$ gh skill install jongwony/epistemic-protocols encapsulation --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/jongwony/epistemic-protocols.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/skills/encapsulation .claude/skills/encapsulation && 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
encapsulation
GitHub stars
173
Token cost
~2k tokens
SKILL.md length
851 words
Files
2 (incl. references)
Skills in repo
29
Repo updated
First seen
Licence
MIT

At a glance

This skill should be used when the user asks to "audit plugin encapsulation", "check self-containment semantics", "find contributor-knowledge assumptions", or invokes /encapsulation.

  • Asks to audit plugin encapsulation
  • SKILL.md covers Purpose, Inputs, Scope and What to evaluate, plus 4 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Check self-containment semantics

What it does

Encapsulation is an agent skill from jongwony/epistemic-protocols. This skill should be used when the user asks to "audit plugin encapsulation", "check self-containment semantics", "find contributor-knowledge assumptions", or invokes /encapsulation. Reviews LLM-facing prose in this project's plugin SKILL.md files and plugin description metadata for Plugin Encapsulation compliance: prose that assumes contributor documentation knowledge or rephrases banned references to bypass deterministic checks. Project-local contributor tooling.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/audit-engine.md`).

It sits in Agent Workflows, covering Skill authoring. The repository describes itself as: Epistemic protocols for Claude Code — structure human-AI interaction quality at every decision point - https://epistemic-protocols.com. The licence is MIT.

When your agent uses it

  • Asks to audit plugin encapsulation
  • Check self-containment semantics
  • Find contributor-knowledge assumptions
  • Invokes /encapsulation

Example prompts

  • “audit plugin encapsulation”
  • “check self-containment semantics”
  • “find contributor-knowledge assumptions”
  • “/encapsulation”

Requirements

  • Pre-approved tools (allowed-tools): Read, Grep, Glob

What it can do on your machine

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

  • Tool permissions

    Pre-approves these tools, so the agent can use them without asking each time:

    • Read
    • Grep
    • Glob

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

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

  • Network

    No URLs in SKILL.md.

    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

Encapsulation loads about 2k tokens when it runs, and up to ~3.6k if it reads all its reference files. Until then it costs about 121 tokens; SKILL.md has 851 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~121
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~3.6k

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 jongwony/epistemic-protocols at commit af5aa79, republished under its MIT licence (© jongwony). 851 words, ~2,011 tokens.

Download SKILL.mdSave it as .claude/skills/encapsulation/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
encapsulation
description
This skill should be used when the user asks to "audit plugin encapsulation", "check self-containment semantics", "find contributor-knowledge assumptions", or invokes /encapsulation. Reviews LLM-facing prose in this project's plugin SKILL.md files and plugin description metadata for Plugin Encapsulation compliance: prose that assumes contributor documentation knowledge or rephrases banned references to bypass deterministic checks. Project-local contributor tooling.
allowed-tools
Read, Grep, Glob

Encapsulation Audit

The project-local instance of the semantic-audit engine (references/audit-engine.md). The shared mechanism — read-only Claude-judge review, the scope shape, severity calibration, self-application stance, and on-demand slash invocation — is defined in that engine document; read it for the parts this skill holds in common with its published siblings. Below is this instance's principle parameter and the one place its output schema extends the engine's base.

This instance audits LLM-facing prose for Plugin Encapsulation: the runtime contract surface (SKILL.md plus plugin description metadata) must be self-contained and intelligible without contributor documentation. Project-local — its principle is coupled to this repo's deterministic encapsulation check and contributor model, and so (unlike white-bear and zero-shot) it is not decouplable into a portable skill. Read-only: it emits structured findings and writes no fixes.

Purpose

Surface encapsulation drift that the deterministic verify check (artifact-self-containment BANNED patterns) cannot catch — prose that assumes contributor sidecar knowledge in plain language, or rephrases banned references to evade pattern matching. Findings are presented for review; the human author decides which to rewrite, mark as load-bearing, or dismiss.

Inputs

Manual invocation only (interactive /encapsulation):

  • The caller passes target file paths or a glob; with no argument, the skill enumerates the in-scope set under the working tree HEAD.
  • Files are read at their working-tree state — the post-edit, pre-commit content the contributor is about to ship.

Scope

The engine's scope shape applies, specialized to the runtime contract surface this principle governs:

In scope (the runtime contract surface where this principle applies):

  • */skills/*/SKILL.md — protocol and utility skill prose (full document; the runtime contract surface)
  • .claude-plugin/plugin.json description field — plugin description metadata (discovery/routing layer)

Out of scope:

  • Files under docs/, CLAUDE.md, README*.md, */references/*.md — contributor documentation, where contributor-knowledge prose is appropriate by purpose.
  • Files under .claude/rules/ and .claude/principles/ — rule prose authored for contributors.
  • .claude/skills/*/SKILL.md — project-local contributor tooling, not part of the marketplace runtime contract surface (this skill is itself in this category).
  • Files under .insights/, memory/ — session and context substrates outside this skill's audit surface.

What to evaluate

The principle. The packaged runtime contract is SKILL.md plus plugin description metadata; the surface must be self-contained, with no external references (axiom identifiers, rule file paths, design-philosophy concepts, mission/vision docs) that require reading contributor documentation. The deterministic verify check covers literal pattern matches; this audit covers semantic encapsulation.

Two signal types — this instance extends the engine's single-failure-kind shape with a failure-kind dimension:

contributor_assumption — a prose passage that assumes contributor documentation knowledge to be intelligible at the runtime contract surface. The reader of the runtime contract is the LLM agent acting on the protocol, plus the user invoking the skill — neither has read .claude/rules/, .claude/principles/, or docs/. Test: "Does this sentence remain intelligible when read with only the SKILL.md itself and standard background knowledge?" If a sentence references a project-internal concept by name without inline definition, and the concept is not defined elsewhere in the same SKILL.md, the sentence is a finding.

bypass_rephrasing — a prose passage that conveys a banned reference's content without using its banned token. The deterministic check passes; the encapsulation invariant fails. Test: "Would the deterministic check have flagged this if the original token had remained?" If yes, it is a bypass-rephrasing finding.

For each candidate finding, prefer the rewrite that carries the meaning into the runtime surface (compile the relevant rule into SKILL.md Rules sections per CLAUDE.md guidance) or replaces it with a self-contained restatement. Treat ambiguous cases as severity: low and surface them for human triage.

Show full SKILL.md (283 more words)Show less

Output

Emit a single JSON object as the final assistant message. This is the engine's base schema plus a failure-kind dimension (by_signal in the summary, signal on each finding):

json
{
  "summary": {
    "files_audited": 0,
    "findings_total": 0,
    "by_signal": {"contributor_assumption": 0, "bypass_rephrasing": 0},
    "by_severity": {"high": 0, "medium": 0, "low": 0}
  },
  "findings": [
    {
      "file": "<repo-relative path>",
      "line": 0,
      "signal": "contributor_assumption",
      "severity": "high",
      "excerpt": "<verbatim text from the file — single line or short span>",
      "rationale": "<one sentence: which contributor knowledge is assumed, or which banned reference's content is being rephrased>",
      "suggested_rewrite": "<a candidate restatement that compiles the meaning into the runtime surface or removes the assumption>"
    }
  ]
}

Severity calibration (per the engine):

SeveritySurface
highRules sections, Phase prose, plugin description — places where contributor assumption materially blocks LLM operation
mediumDistinctions, Composition notes, scope-boundary descriptions in supporting sections
lowBorderline cases where the assumption is recoverable from surrounding SKILL.md context or where the bypass interpretation is judgment-dependent

When zero findings result, emit the JSON object with empty findings array and zero counts. The summary always emits.

Self-application

This SKILL.md sits in .claude/skills/, which is project-local contributor tooling — out of the marketplace runtime contract surface and therefore not subject to this audit's scope. The principle still applies in spirit: the prose above should be intelligible without contributor sidecar references, and rewrites should preserve that.

Distinction

SurfaceMechanismFailure mode handled
verify artifact-self-containmentDeterministic literal pattern matching against BANNED tokensBanned reference tokens leaking into the runtime surface
encapsulationClaude-judge semantic review of runtime-surface proseContributor-knowledge assumption; BANNED-bypass rephrasing
white-bearSibling semantic audit (published, portable)Unnecessary competing-target mention drift
zero-shotSibling semantic audit (published, portable)Few-shot anchoring drift

The verify check and this audit are complementary on the encapsulation axis: deterministic pattern matching catches token leaks; semantic review catches meaning leaks that survive token absence.

Stage classification

Stage 2 evidence-collection instrument. Findings carry the N=1 dogfooding caveat inherent to a project where the audit definition, the rule prose, and the contributor are entangled. Architectural inscription — promoting any pattern observed across findings into a new BANNED token in the deterministic check — waits on Stage 2 variation-stable retention evidence accumulating across multiple PRs and contributors.

© jongwony, MIT. 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 (references) in .claude/skills/encapsulation of jongwony/epistemic-protocols.

  • SKILL.md
  • references/audit-engine.md

Open the folder on GitHubat commit af5aa79

Compare with similar skills

Encapsulation 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.

Encapsulation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Encapsulation this skilljongwony/epistemic-protocols173—~2kAutomated safety check: PassMIT
Skill CreatorAzure/azqr79589 repos~8.2kAutomated safety check: PassApache-2.0
Claude Code Skill Developer Guidediet103/claude-code-infrastructure-showcase10k11 repos~3.5kAutomated safety check: PassMIT
Darwin Skill Optimizeralchaincyf/darwin-skill6.2k1 repos~4.7kAutomated safety check: PassMIT
Claude Code Command Developmentanthropics/claude-plugins-official38k10 repos~4.8kAutomated safety check: PassApache-2.0
Claude Code Plugin Structureanthropics/claude-plugins-official38k10 repos~3.4kAutomated safety check: PassApache-2.0

Similar skills

  • Skill Creator

    Azure/azqr

    Official

    Create new skills, modify and improve existing skills, and measure skill performance.

    795 GitHub starsUsed in 89 repos~8.2k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Skill Developer Guide

    diet103/claude-code-infrastructure-showcase

    A guide to creating and managing Claude Code skills with auto-activation: skill-rules.json triggers, hooks, enforcement levels, YAML frontmatter and progressive disclosure.

    10k GitHub starsUsed in 11 repos~3.5k tokens
    Agent WorkflowsAuto-check passed
  • Darwin Skill Optimizer

    alchaincyf/darwin-skill

    Scores SKILL.md files on a nine-dimension rubric, then improves them in a keep-or-revert loop with independent judge agents, test prompts, git history and human checkpoints.

    6.2k GitHub starsUsed in 1 repo~4.7k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Command Development

    anthropics/claude-plugins-official

    Official

    Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.

    38k GitHub starsUsed in 10 repos~4.8k tokens
    Agent WorkflowsAuto-check passed
  • Claude Code Plugin Structure

    anthropics/claude-plugins-official

    Official

    Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.

    38k GitHub starsUsed in 10 repos~3.4k tokens
    Agent WorkflowsAuto-check passed
  • Skill Release Gate

    rohitg00/ai-engineering-from-scratch

    Evaluates an Agent Skill bundle before release for structure, trigger quality, artifact improvement, script correctness, safety, installed-tree integrity and host portability.

    66k GitHub stars~1k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed

More from jongwony/epistemic-protocols

All 29 skills in this repo
  • Outcome

    jongwony/epistemic-protocols

    This skill should be used when the user asks to "run the outcome eval", "paired bare vs protocol", "which decisions did the protocol surface", "count what the AI asked or presented", "does /inquire…

    173 GitHub stars~1.3k tokensUpdated today
    Auto-check: notes
  • Realize

    jongwony/epistemic-protocols

    This skill should be used when the user asks to "run the eval", "test whether the protocol actually works at runtime", "check type realization", "measure protocol fulfillment", "run the…

    173 GitHub stars~3.3k tokensUpdated today
    Auto-check: notes
  • Verify

    jongwony/epistemic-protocols

    This skill should be used when the user asks to "verify protocols", "check consistency before commit", "validate definitions", "run pre-commit checks", "verify soundness", or wants to ensure…

    173 GitHub stars~1.4k tokensUpdated today
    Auto-check passed
  • Formal Review

    jongwony/epistemic-protocols

    This skill should be used when the user asks to "formal review", "formal lens review", or invokes /formal-review.

    173 GitHub stars~3.5k tokensUpdated today
    Auto-check: notes
  • Recollect

    jongwony/epistemic-protocols

    The user vaguely recalls something discussed before but cannot name it — one session, or a line of work, topic, or settled concept across several: find it in past records to recognize.

    173 GitHub stars~8.7k tokensUpdated today
    Auto-check passed
  • White Bear

    jongwony/epistemic-protocols

    A skill your agent uses when the user asks to "check white bear", "audit prohibitions", "find negative framing", or invokes /white-bear.

    173 GitHub stars~2.5k tokensUpdated today
    Auto-check passed

Categories

Questions about Encapsulation

What does Encapsulation do?

This skill should be used when the user asks to "audit plugin encapsulation", "check self-containment semantics", "find contributor-knowledge assumptions", or invokes /encapsulation. Encapsulation is an agent skill from jongwony/epistemic-protocols. This skill should be used when the user asks to "audit plugin encapsulation", "check self-containment semantics", "find contributor-knowledge assumptions", or invokes /encapsulation.

When should I use Encapsulation?

Encapsulation fits situations like: asks to audit plugin encapsulation; check self-containment semantics; find contributor-knowledge assumptions; invokes /encapsulation.

How do I install Encapsulation in Claude Code?

Run `npx skills add jongwony/epistemic-protocols --skill encapsulation -a claude-code`. Or copy the skill folder (.claude/skills/encapsulation in jongwony/epistemic-protocols) into .claude/skills/encapsulation in your project. Claude Code loads it when a task matches its description.

How do I install Encapsulation in Codex?

Run `npx skills add jongwony/epistemic-protocols --skill encapsulation -a codex`. Or copy the skill folder (.claude/skills/encapsulation in jongwony/epistemic-protocols) into .agents/skills/encapsulation in your project. Codex loads it when a task matches its description.

Can I use Encapsulation 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 jongwony/epistemic-protocols --skill encapsulation -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/encapsulation, .gemini/skills/encapsulation, .github/skills/encapsulation and .opencode/skills/encapsulation in your project.

What does Encapsulation need to run?

SKILL.md names no scripts, command-line tools or credentials: Encapsulation is instructions for the agent only. Its frontmatter pre-approves these tools: Read, Grep, Glob.

Does Encapsulation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Encapsulation 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 Encapsulation use?

Encapsulation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Encapsulation use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.6k tokens, read only when the agent opens those files.

What are the alternatives to Encapsulation?

Skills that share tags, products or a category with Encapsulation: Skill Creator (Azure/azqr, 795 stars), Claude Code Skill Developer Guide (diet103/claude-code-infrastructure-showcase, 10k stars), Darwin Skill Optimizer (alchaincyf/darwin-skill, 6.2k stars) and Claude Code Command Development (anthropics/claude-plugins-official, 38k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Encapsulation?

jongwony (a GitHub user) maintains it in jongwony/epistemic-protocols, which has 173 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 8, 2026.

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