Agent skill

Nucleus Context Validator

by protect-my-hair in protect-my-hair/nucleus-marketplace

Validates the context file for a Nucleus V2 workflow run, discovers standalone context from explicit input, and writes a blocked result when required context is missing.

MITAuto-check passedAgent Workflows

SKILL.md written in Chinese; this summary is our English description.

Install Nucleus Context Validator

skills CLI
$ npx skills add protect-my-hair/nucleus-marketplace --skill nucleus-context -a claude-code

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

GitHub CLI
$ gh skill install protect-my-hair/nucleus-marketplace nucleus-context --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/protect-my-hair/nucleus-marketplace.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/nucleus/skills/nucleus-context .claude/skills/nucleus-context && 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
nucleus-context
GitHub stars
164
Token cost
~576 tokens
SKILL.md length
90 words
Files
7 (incl. scripts, references, assets)
Skills in repo
18
Repo updated
First seen
Licence
MIT

At a glance

Validates the context file for a Nucleus V2 workflow run, discovers standalone context from explicit input, and writes a blocked result when required context is missing.

  • Validating the Nucleus context file before a workflow continues
  • SKILL.md covers 边界, 子命令, 输出 and 失败策略
  • Runs Python scripts from its folder; calls python3
  • Generating a local context candidate from explicit standalone input

What it does

The SKILL.md is in Chinese. This skill runs inside a coding agent such as Claude Code or Codex and is neither a backend nor a service. It limits process artifacts to the target repository's .nucleus folder, treats docs/requirement as a protected read-only source of requirements, and blocks any planned write to legacy risk paths. Discovery accepts only explicit input, with no free-form language parsing, no deep knowledge base scan and no invented product, repository or run. Without a workflow run ID it may only produce a local diagnostic blocked result.

A Python script, nucleus_context.py, has three subcommands: validate, discover and build-blocked-result. Success writes a validation gate file or a context file with a discovery report. A missing primary feature produces a context candidate and a blocked result, and an unsafe repository root prints a blocked payload with a non-zero exit and writes nothing. Every failure defaults to alert and block, and a natural-language summary never replaces the result package. A candidate template and three reference files are bundled.

When your agent uses it

  • Validating the Nucleus context file before a workflow continues
  • Generating a local context candidate from explicit standalone input
  • Getting a structured blocked result when required context fields are absent
  • Checking that planned writes avoid protected and legacy paths

Example prompts

  • “Validate the Nucleus context file for the current workflow run in this repository.”
  • “Run standalone discovery for this repo using the feature name and goal I give you.”
  • “The context is missing the primary feature; produce the blocked result package.”
  • “Check whether any planned writes in this run touch the legacy paths.”

Requirements

  • Python 3 to run nucleus_context.py
  • A target repository using the .nucleus folder layout

What it can do on your machine

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

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3

    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

Nucleus Context Validator loads about 576 tokens when it runs, and up to ~1.1k if it reads all its reference files. Until then it costs about 57 tokens; SKILL.md has 90 words of instructions outside code blocks.

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

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); the scripts in this folder are not scanned.

SKILL.md

The full file from protect-my-hair/nucleus-marketplace at commit 3c82085, republished under its MIT licence (© protect-my-hair). 90 words, ~576 tokens.

Download SKILL.mdSave it as .claude/skills/nucleus-context/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
nucleus-context
description
Nucleus V2 baseline context validation and explicit standalone context discovery. Use when a workflow needs .nucleus/context validation, local candidate generation, or a blocked result for missing context fields.

Nucleus Context

本 Skill 负责 Nucleus V2 baseline 的 context 入口能力。它安装在 Claude Code / Codex 等 coding agent 内部使用,不是 PMS 后端,也不是独立服务。

边界

  • 只使用目标仓库 .nucleus/** 作为过程产物路径。
  • docs/requirement/** 是受保护需求事实源;本 Skill 只读引用,不正式写入。
  • .autocode/**、.claude/notepads/**、docs/bugfix/** 是 legacy risk path,命中 plannedWrites 必须阻塞。
  • baseline discover 只接受显式输入,不做自然语言自由解析、不深扫知识库、不伪造 PMS product/repo/run。
  • 缺 workflowRunId 时只能生成 local diagnostic blocked result;不得写 .nucleus/context/<synthetic>.json,不得让后续 workflow 用 synthetic id 继续。

子命令

bash
python3 skills/nucleus-context/scripts/Nucleus_context.py validate \
  --repo-root <target-repo> \
  --context <target-repo>/.nucleus/context/<workflowRunId>.json
bash
python3 skills/nucleus-context/scripts/Nucleus_context.py discover \
  --repo-root <target-repo> \
  --mode standalone-assistant \
  --workflow-run-id <workflowRunId> \
  --workflow-id feature-development-prepare \
  --workflow-step context-validation \
  --provider codex \
  --primary-feature docs/features/<path>/feature.md \
  --requirement-solution docs/requirement/<req>/solution.md
bash
python3 skills/nucleus-context/scripts/Nucleus_context.py build-blocked-result \
  --repo-root <target-repo> \
  --workflow-run-id <workflowRunId> \
  --workflow-id feature-development-prepare \
  --workflow-step context-validation \
  --blocker-code SCHEMA_VALIDATION_FAILED \
  --message "context 缺少必需字段"

输出

  • validate 成功:写 .nucleus/runs/<workflowRunId>/context-validation-gate.json。
  • discover 成功:写 .nucleus/context/<workflowRunId>.json 和 .nucleus/runs/<workflowRunId>/context-discovery-report.json。
  • 缺 primary feature:写 .nucleus/runs/<workflowRunId>/context-candidate.json 和 blocked .nucleus/runs/<workflowRunId>/result.json,不写正式 context。
  • 缺 workflowRunId 且 repo root 安全:写 .nucleus/runs/wf-local-blocked-<timestamp>-<hash>/result.json,contextPath=null。
  • repo root 不安全:stdout 输出 machine-readable blocked payload,非零退出,不写目标仓库。

失败策略

所有失败默认 ALERT_AND_BLOCK。不要用自然语言总结替代 result package。

© protect-my-hair, 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 6 other files (scripts, references, assets) in plugins/nucleus/skills/nucleus-context of protect-my-hair/nucleus-marketplace.

  • SKILL.md
  • agents/openai.yaml
  • assets/context-candidate-template.json
  • references/blocker-matrix.md
  • references/context-contract.md
  • references/mode-policy.md
  • scripts/nucleus_context.py

Open the folder on GitHubat commit 3c82085

Compare with similar skills

Nucleus Context Validator 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.

Nucleus Context Validator compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Nucleus Context Validator this skillprotect-my-hair/nucleus-marketplace164—~576Automated safety check: PassMIT
Claude Statusbarleeguooooo/claude-code-usage-bar378—~2.6kAutomated safety check: PassMIT
Cognee Session Memory and Improvetopoteretes/cognee32k—~3.2kAutomated safety check: PassApache-2.0
MoAI Foundation Coremodu-ai/moai-adk1.2k—~5kAutomated safety check: PassApache-2.0
RlmBowTiedSwan/rlm-skill182—~928Automated safety check: PassNone
File-Based Planning in ArabicOthmanAdi/planning-with-files27k—~3.2kAutomated safety check: NotesMIT

Similar skills

  • Claude Statusbar

    leeguooooo/claude-code-usage-bar

    Manage cs (claude-statusbar) — switch theme/style/density, override severity colors, preview combinations, run doctor, reset config, install, upgrade (cs upgrade — the only supported upgrade path)…

    378 GitHub stars~2.6k tokensUpdated 2 days ago
    Agent WorkflowsAuto-check passed
  • Explains how cognee stores session memory by session_id and bridges it into the permanent graph with improve(), including the stages, results and settings.

    32k GitHub stars~3.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • MoAI Foundation Core

    modu-ai/moai-adk

    Reference for MoAI-ADK's core development principles: TRUST 5 quality gates, SPEC-first domain-driven workflow, agent delegation and token budgeting.

    1.2k GitHub stars~5k tokensUpdated yesterday
    Agent WorkflowsAuto-check passed
  • Rlm

    BowTiedSwan/rlm-skill

    Process large codebases (100 files) using the Recursive Language Model pattern.

    182 GitHub stars~928 tokensUpdated 9 mo ago
    Agent WorkflowsAuto-check passed
  • File-Based Planning in Arabic

    OthmanAdi/planning-with-files

    Arabic edition of a file-based planning skill that keeps task_plan.md, findings.md and progress.md on disk so multi-step agent work survives lost context.

    27k GitHub stars~3.2k tokensUpdated yesterday
    Agent WorkflowsAuto-check: notes
  • Pydantic AI Harness

    pydantic/skills

    Official

    Extend Pydantic AI agents with batteries-included capabilities from pydantic-ai-harness -- Code Mode (collapse many tool calls into one sandboxed Python execution), a filesystem and shell…

    140 GitHub stars~1.9k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed

More from protect-my-hair/nucleus-marketplace

All 18 skills in this repo
  • Nucleus Delivery Evidence Closure

    protect-my-hair/nucleus-marketplace

    Collects prior Nucleus task evidence into a candidate-only delivery closure package and PR/MR draft text, blocking if any feature's design, review or verification evidence is missing.

    164 GitHub stars~1k tokensUpdated 2 mo ago
    Auto-check passed
  • Nucleus Session Binding Report

    protect-my-hair/nucleus-marketplace

    Collects, freezes and validates a Nucleus V2 session binding report that records the native Claude Code or Codex session ID, transcript path and hash.

    164 GitHub stars~477 tokensUpdated 2 mo ago
    Auto-check passed
  • Nucleus Result Package Builder

    protect-my-hair/nucleus-marketplace

    Builds the result.json file for a Nucleus V2 workflow run from its context, gates, blockers and step status, and exits non-zero when the run is blocked.

    164 GitHub stars~414 tokensUpdated 2 mo ago
    Auto-check passed
  • Defect Intake and RCA Candidates

    protect-my-hair/nucleus-marketplace

    Checks whether a defect report has enough context to be accepted, then drafts candidate-only root-cause evidence for human review without confirming causes or changing code.

    164 GitHub stars~745 tokensUpdated 2 mo ago
    Auto-check passed
  • Nucleus Delivery Evidence Finalizer

    protect-my-hair/nucleus-marketplace

    Combines the evidence from completed Nucleus workflow steps into a final evidence report and result package, without scheduling steps, updating trackers or opening pull requests.

    164 GitHub stars~454 tokensUpdated 2 mo ago
    Auto-check passed
  • Feature Doc Design

    protect-my-hair/nucleus-marketplace

    A skill your agent uses when 特性开发需要直接在产品仓库 docs/features 下写可评审的特性文档和邻近设计文档。

    164 GitHub stars~895 tokensUpdated 2 mo ago
    Auto-check passed

Works with

Categories

Questions about Nucleus Context Validator

What does Nucleus Context Validator do?

Validates the context file for a Nucleus V2 workflow run, discovers standalone context from explicit input, and writes a blocked result when required context is missing. md is in Chinese. This skill runs inside a coding agent such as Claude Code or Codex and is neither a backend nor a service.

When should I use Nucleus Context Validator?

Nucleus Context Validator fits situations like: validating the Nucleus context file before a workflow continues; generating a local context candidate from explicit standalone input; getting a structured blocked result when required context fields are absent; checking that planned writes avoid protected and legacy paths.

How do I install Nucleus Context Validator in Claude Code?

Run `npx skills add protect-my-hair/nucleus-marketplace --skill nucleus-context -a claude-code`. Or copy the skill folder (plugins/nucleus/skills/nucleus-context in protect-my-hair/nucleus-marketplace) into .claude/skills/nucleus-context in your project. Claude Code loads it when a task matches its description.

How do I install Nucleus Context Validator in Codex?

Run `npx skills add protect-my-hair/nucleus-marketplace --skill nucleus-context -a codex`. Or copy the skill folder (plugins/nucleus/skills/nucleus-context in protect-my-hair/nucleus-marketplace) into .agents/skills/nucleus-context in your project. Codex loads it when a task matches its description.

Can I use Nucleus Context Validator 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 protect-my-hair/nucleus-marketplace --skill nucleus-context -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nucleus-context, .gemini/skills/nucleus-context, .github/skills/nucleus-context and .opencode/skills/nucleus-context in your project.

What does Nucleus Context Validator need to run?

Going by SKILL.md and its folder, Nucleus Context Validator needs Python for the scripts in its folder and the command-line tools its instructions call (python3). Our summary lists: Python 3 to run nucleus_context.py; A target repository using the .nucleus folder layout.

Does Nucleus Context Validator 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 Nucleus Context Validator 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. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Nucleus Context Validator use?

Nucleus Context Validator 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 Nucleus Context Validator use?

About 576 tokens (SKILL.md is roughly 2.3k 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 493 tokens, read only when the agent opens those files.

What are the alternatives to Nucleus Context Validator?

Skills that share tags, products or a category with Nucleus Context Validator: Claude Statusbar (leeguooooo/claude-code-usage-bar, 378 stars), Cognee Session Memory and Improve (topoteretes/cognee, 32k stars), MoAI Foundation Core (modu-ai/moai-adk, 1.2k stars) and Rlm (BowTiedSwan/rlm-skill, 182 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Nucleus Context Validator?

protect-my-hair (a GitHub user) maintains it in protect-my-hair/nucleus-marketplace, which has 164 GitHub stars. The repository holds 18 skills in this directory. The repository was last updated on July 23, 2026.

Source: protect-my-hair/nucleus-marketplace on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.