context-audit
Audit project context management (CLAUDE.md, rules, knowledge) for progressive disclosure compliance.
Skill by jiahao-shao1
Chalk Labs
Need help deploying context-audit?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jiahao-shao1-context-audit
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security, writing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/context-audit
What's inside
- Skill name
context-audit- Description
- Audit project context management (CLAUDE.md, rules, knowledge) for progressive disclosure compliance. Checks that all knowledge files are reachable from rules, detects stale references, orphaned files, and CLAUDE.md index leakage. Triggers: 'audit context', 'check context', 'context hygiene', 'context audit', '检查 context', '审计上下文', 'knowledge 覆盖检查'. NOT for: code review, rule content correctness, or knowledge content quality.
- License
- MIT
- Instructions
- 239 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Context Audit
Audits the project's three-layer context management system (CLAUDE.md / rules / knowledge) against the **progressive disclosure** architecture:
```
CLAUDE.md (always loaded) — describes architecture, no detailed index
└─ Rules (.claude/rules/) (always loaded) — inline `> 详见` refs to knowledge
└─ Knowledge (docs/knowledge/) — on-demand deep experience
```
## When to Use
- After adding new knowledge files — verify they're indexed from a rule
- After refactoring rules — verify no references broke
- Periodic hygiene check — catch drift over time
- After onboarding a new domain — verify the new rule covers its knowledge files
## Execution
### Phase 1: Discovery
Scan the project to find all context files:
```bash
# Knowledge files
find docs/knowledge/ -name "*.md" -type f 2>/dev/null | sort
# Rule files
find .claude/rules/ -name "*.md" -type f 2>/dev/null | sort
# CLAUDE.md
ls CLAUDE.md 2>/dev/null
```
If `docs/knowledge/` or `.claude/rules/` doesn't exist, report and skip the corresponding checks.
### Phase 2: Cross-Reference Audit
For each knowledge file found in Phase 1:
1. **Grep rule files first** for references to that knowledge file (match `docs/knowledge/<filename>` or bare `<filename>`)
2. **If not found in rules, grep knowledge index files** (`docs/knowledge/*-index.md` or files whose name ends with `-index.md`). An index file that is itself rule-referenced transitively covers the leaves it lists.
3. Record which rule(s) and/or index reference it
4. Mark files as:
- **Directly covered**: referenced from at least one rule
- **Indirectly covered**: referenced from a knowledge index that is itself rule-covered (legal two-tier pattern)
- **Orphaned**: not reachable from any rule, even transitively (action needed)
- **Deprecated**: contains `[DEPRECATED]` marker (info only, no action needed)
For each reference found in rule/AGENTS/CLAUDE files:
1. **Verify target exists**: check the referenced knowledge file actually exists on disk
2. **Skip placeholder examples**: refs that look like syntax illustrations (e.g., `docs/knowledge/xxx.md`, `<filename>.md`, `foo.md`) inside example/format sections are not real refs. Detect by:
- filename matches `xxx`, `foo`, `bar`, `<.*>`, or
- the surrounding line uses template-like wording (e.g., 内联 `详见 docs/knowledge/xxx.md` 引用)
3. Mark real references as:
- **Valid**: target file exists
- **Stale**: target file doesn't exist (action needed)
### Phase 3: CLAUDE.md Compliance
Check that CLAUDE.md follows the architecture principle — it should describe the progressive disclosure system, NOT duplicate the detailed index.
1. **Count direct knowledge references**: grep CLAUDE.md for `docs/knowledge/` patterns
2. **Check architecture description**: look for keywords indicating the architecture is described (e.g., "渐进式披露", "progressive disclosure", "rules", "详见")
3. Flag if CLAUDE.md contains more than **3 direct knowledge file references** (suggests index leakage — the detailed index belongs in rules, not CLAUDE.md)
Exception: a summary table mapping rule files to knowledge domains is acceptable (it's architecture description, not a detailed index).
### Phase 4: Report
Output a structured report:
```
==========================================
CONTEXT AUDIT REPORT
<project-name> | YYYY-MM-DD
==========================================
## Coverage Summary
Knowledge files: N total
- M directly covered (cited from a rule)
- K indirectly covered (cited from a rule-linked knowledge index)
- X orphaned
- Y deprecated
Rule files: N total
Stale references: N (placeholders excluded)
## Orphaned Knowledge Files (not indexed from any rule)
| File | Suggested Rule | Reason |
|------|---------------|--------|
| docs/knowledge/foo.md | rl-training.md | topic overlaps with RL training |
## Stale References (pointing to non-existent files)
| Rule File | Line | Reference | Status |
|-----------|------|-----------|--------|
| .claude/rules/bar.md | 42 | docs/knowledge/removed.md | file not found |
## CLAUDE.md Compliance
- Architecture description: [FOUND / MISSING]
- Direct knowledge refs: N (threshold: <=3)
- Status: [PASS / WARN — index leakage detected]
## Coverage Map
| Rule File | Knowledge Files Referenced |
|-----------|--------------------------|
| rl-training.md | reward, config, verl-integration, ... |
| cluster-ops.md | container-unify, mutagen-sync, ... |
## Deprecated Files
| File | Deprecation Notice |
|------|--------------------|
| docs/knowledge/experiments.md | migrated to experiment-registry |From jiahao-shao1/sjh-skills, MIT.
More from jiahao-shao1/sjh-skills
- 0.660score
session-team
jiahao-shao1
Coordinate Claude Code or Codex sessions on one machine, including messaging an existing CC session from Codex.
SkillAFreshness: A★ 39Claude Code +9 - 0.620score
notion-lifeos
jiahao-shao1
User's personal Notion LifeOS (PARA: tasks, notes, projects, Make Time journals) with pre-configured DB IDs + API access — required for any LifeOS interaction.
SkillBFreshness: B★ 39Claude Code +9 - 0.616score
paper-analyzer
jiahao-shao1
Deep critical analysis of one specific paper — dissect experimental setup, extract numbers, evaluate claims against a hypothesis.
SkillBFreshness: B★ 39Claude Code +9 - 0.610score
sync-docs
jiahao-shao1
Update the project's documentation to match recent code changes, then commit.
SkillBFreshness: B★ 39Claude Code +9 - 0.570score
paper-self-review
jiahao-shao1
Self-review for paper paragraphs — diagnose v1 issues and give a revision direction (intro, abstract, method, related work).
SkillCFreshness: C★ 39Claude Code +9 - 0.565score
experiment-registry
jiahao-shao1
Manage ML experiment lifecycle via structured YAML registry — register, record results, compare runs, track status.
SkillCFreshness: C★ 39Claude Code +9 - 0.564score
init-project
jiahao-shao1
初始化新项目的 Claude Code 配置。用户说"初始化项目"、"init project"、"配置 Claude Code"时触发。
SkillCFreshness: C★ 39Claude Code +9 - 0.505score
daily-summary
jiahao-shao1
Produce daily/yesterday work summary (日报) by aggregating Claude Code sessions, Git commits, and Notion task data — git log alone cannot do this.
SkillDFreshness: D★ 39Claude Code +9 - 0.502score
bibtex-fetch
jiahao-shao1
Fetch BibTeX entries from arXiv / Semantic Scholar.
SkillDFreshness: D★ 39Claude Code +9 - 0.500score
web-fetcher
jiahao-shao1
Fetch any URL as clean markdown.
SkillDFreshness: D★ 39Claude Code +9 - 0.500score
project-review
jiahao-shao1
Strategic project review — auto-discovers strategy docs (vision, roadmap, decisions, notes), produces five-dimension snapshot.
SkillDFreshness: D★ 39Claude Code +9 - 0.499score
handoff
jiahao-shao1
Generate a structured handoff summary for the next session.
SkillDFreshness: D★ 39Claude Code +9
Signals
- Stars
- 39
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- May 1, 2026 (6 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/jiahao-shao1/sjh-skills
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from jiahao-shao1
- 0.660score
session-team
jiahao-shao1
Coordinate Claude Code or Codex sessions on one machine, including messaging an existing CC session from Codex.
SkillAFreshness: A★ 39Claude Code +9 - 0.620score
notion-lifeos
jiahao-shao1
User's personal Notion LifeOS (PARA: tasks, notes, projects, Make Time journals) with pre-configured DB IDs + API access — required for any LifeOS interaction.
SkillBFreshness: B★ 39Claude Code +9 - 0.616score
paper-analyzer
jiahao-shao1
Deep critical analysis of one specific paper — dissect experimental setup, extract numbers, evaluate claims against a hypothesis.
SkillBFreshness: B★ 39Claude Code +9 - 0.610score
sync-docs
jiahao-shao1
Update the project's documentation to match recent code changes, then commit.
SkillBFreshness: B★ 39Claude Code +9 - 0.570score
paper-self-review
jiahao-shao1
Self-review for paper paragraphs — diagnose v1 issues and give a revision direction (intro, abstract, method, related work).
SkillCFreshness: C★ 39Claude Code +9 - 0.565score
experiment-registry
jiahao-shao1
Manage ML experiment lifecycle via structured YAML registry — register, record results, compare runs, track status.
SkillCFreshness: C★ 39Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get context-audit running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
context-audit skill. Agent Mart. https://agentmart.dev/skills/jiahao-shao1-context-audit (last updated 2026-10-24)