hf-l2-agents-md-sync
Detects and fixes drift between AGENTS.md documentation and actual codebase state.
Skill by shynlee04
Chalk Labs
Need help deploying hf-l2-agents-md-sync?
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/shynlee04-hf-l2-agents-md-sync
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: documents, writing, agent-building
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
- Runs as
- Shell scripts
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/hf-l2-agents-md-sync
What's inside
- Skill name
hf-l2-agents-md-sync- Description
- Detects and fixes drift between AGENTS.md documentation and actual codebase state. Scans source files and .opencode/ directories, compares claims against reality, produces a structured drift report, then applies targeted edits. Triggers on: 'sync agents md', 'update AGENTS.md', 'fix agents md drift', 'AGENTS.md out of date', 'check agent instruction drift'. NOT for generic documentation writing or README refreshes.
- License
- MIT
- Metadata
- role: sync · layer: domain-execution · pattern: scan-diff-apply
- Instructions
- 159 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Agent Skills spec issues
- allowed-tools: must be a space-separated string
Files (5)
- SKILL.md
- evals.json · evals/
- rich-gate-scorecard.md · metrics/
- rich-resource-rationale.md · references/
- validate-skill.sh · scripts/
SKILL.md (first lines)
## Overview
Detects and fixes drift between AGENTS.md documentation and actual codebase state. Use when documentation claims don't match reality, after refactoring sprints, or when syncing instructions across platforms. Produces a structured drift report with targeted edits to bring documentation back in line with code.
## The Iron Law
```
SCAN REPORTS FACTS. EDIT FIXES DRIFT. NEVER REGENERATES FROM SCRATCH.
```
This skill reads the codebase, compares claims to reality, and applies targeted edits. It never overwrites entire files, never generates new AGENTS.md files, and never adds sections that don't already exist.
# agents-md-sync
Detects and fixes AGENTS.md drift. Scan → Diff → Apply. Never regenerates from scratch.
## On Load
1. Verify both AGENTS.md targets exist:
- `AGENTS.md` (project root)
- `src/lib/AGENTS.md` (library internals)
2. If either is missing → report the missing file and stop. This skill syncs existing documentation — it does not create new AGENTS.md files. For creation, use the `create-agentsmd` skill instead.
3. Read both files into memory for diff comparison.
## Phase 1: Scan — Gather Ground Truth
Run these scans in sequence. The project is small enough that no parallelism is needed.
### Scan Targets
| Path | Extract | Command |
|------|---------|---------|
| `src/lib/*.ts` | Module names + approximate LOC | `Glob("src/lib/*.ts")` then `Bash("wc -l src/lib/*.ts")` |
| `src/tools/**/*.ts` | Tool file names | `Glob("src/tools/**/*.ts")` |
| `src/hooks/**/*.ts` | Hook file names | `Glob("src/hooks/**/*.ts")` |
| `src/shared/**/*.ts` | Shared utility names | `Glob("src/shared/**/*.ts")` |
| `src/schema-kernel/**/*.ts` | Schema file names | `Glob("src/schema-kernel/**/*.ts")` |
| `.opencode/agents/*.md` | Count + file names | `Glob(".opencode/agents/*.md")` |
| `.opencode/skills/*/SKILL.md` | Count + skill names | `Glob(".opencode/skills/*/SKILL.md")` |
| `.opencode/commands/*.md` | Count + command names | `Glob(".opencode/commands/*.md")` |
| `package.json` | Dependencies, scripts, engines | `Read("package.json")` |
### Extraction Rules
- **Module names**: filename without `.ts` extension (e.g., `concurrency.ts` → `concurrency`)
- **LOC**: `wc -l` per file, rounded to nearest 5 for estimates (e.g., 78 → ~80, 401 → ~400)
- **Counts**: exact integer from glob result array length
- **Names**: sorted alphabetically for stable comparison
- **Export functions**: `Grep("^export (function|async function|const)", path)` per module — only extract if AGENTS.md claims specific exports
## Phase 2: Diff — Compare Claims to Reality
Read each AGENTS.md file and compare every verifiable claim against the scanned ground truth.
### Root AGENTS.md Checks
| Category | What to Check | Typical Location |
|----------|--------------|-----------------|
| Project Structure tree | All directories and files listed match `Glob` reality | `## Project Structure` section |
| `src/lib/` module list | Every `.ts` file appears in tree, no phantom entries | Tree listing under `src/lib/` |
| `src/shared/` presence | Directory exists with correct files | Tree listing |
| `src/schema-kernel/` presence | Directory exists with correct files | Tree listing |
| `.opencode/` agent count | Claimed count matches `Glob` result count | `## OpenCode Integration` section |
| `.opencode/` skill count | Claimed count matches `Glob` result count | `## OpenCode Integration` section |
| `.opencode/` command count | Claimed count matches `Glob` result count | `## OpenCode Integration` section |
| `.opencode/` name lists | Listed names match actual files | `## OpenCode Integration` section |
| "Where to find things" | Every module/directory has a table entry | Table in that section |
| Dependency rules | Module list matches `src/lib/` contents | `### Dependency rules` |
| Runtime features | Feature list matches implemented features | Narrative section |
| Architecture LOC targets | Total LOC claims match current `wc -l` totals | `### Target architecture` |
### src/lib/AGENTS.md Checks
| Category | What to Check |
|----------|--------------|
| MODULE RESPONSIBILITIES table | Every `.ts` file has a row, LOC estimates are current, export lists match `Grep` results |
| DEPENDENCY GRAPH | Every dependency edge still exists, new modules appear |
| "Where to Look" table | Every module has an entry |
| CODE SMELLS | Listed issues still exist (e.g., LOC thresholds still exceeded) |
### Drift Report Format
After comparison, produce a drift report in this exact format before making any edits:
```markdown
## AGENTS.md Drift Report — {YYYY-MM-DD}
### Root AGENTS.md
| # | Section | Claimed | Actual | Fix |
|---|---------|---------|--------|-----|
| 1 | [section name] | [claimed value] | [actual value] | [specific edit description] |
### src/lib/AGENTS.md
| # | Section | Claimed | Actual | Fix |
|---|---------|---------|--------|-----|
| 1 | [section name] | [claimed value] | [actual value] | [specific edit description] |
### Summary
- Total drift items: {N}
- Auto-fixable: {N}
- Manual fixes needed: {N}
```
**Quality gate:** The drift report must contain specific claimed and actual values with the exact edit description before any edits are applied. No fuzzy edits.
## Phase 3: Apply — Edit AGENTS.md Files
For each auto-fixable drift item in the report:
1. **Locate exact text** — Use `Grep` to find the exact claimed value in the target AGENTS.md file. Note the surrounding context to ensure uniqueness.
2. **Edit** — Use `Edit(oldString=<exact-wrong-text>, newString=<correct-text>)`. The `oldString` must be a verbatim copy from the file — character-for-character match.
3. **Verify** — After each edit, `Read` the edited section to confirm the change applied correctly.
4. **Log** — Record the result (success or failure) for the summary.
### Apply Rules
- **Always use Edit tool** — never Write on existing files. Both AGENTS.md files already exist and must be preserved.
- **Never add new sections** — only fix content in existing sections. If a section is missing entirely, flag it as a manual fix.
- **Skip and flag** — if the exact text is not found (perhaps already fixed, or the structure changed), log it as "MANUAL FIX NEEDED" and proceed to the next item.
- **One edit at a time** — each drift item gets its own Edit call. Never batch multiple changes into one edit.From shynlee04/hivemind-plugin, MIT.
More from shynlee04/hivemind-plugin
- 0.578score
hm-l3-synthesis
shynlee04
Compress research findings into actionable artifacts with tiered reduction.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l2-coordinating-loop
shynlee04
Coordinate multi-agent dispatch with validation gates and handoff protocols.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l3-integration-contracts
shynlee04
Formal bidirectional contract authority between skills and agents.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hf-l2-agent-composition
shynlee04
Teaches agents how to compose specialist agents from user intent using XML markup grammar, step protocols, and structured return formats.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hf-l2-skill-synthesis
shynlee04
Use when synthesizing skills from GitHub repos, classifying skill patterns, building template libraries, generating eval frameworks, or creating eval-driven…
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l3-detective
shynlee04
Investigate codebases with SCAN, READ, and DEEP reading modes.
SkillCFreshness: C★ 51Claude Code +9 - 0.574score
hf-l2-command-parser
shynlee04
This skill should be used only when parsing $ARGUMENT propositional commands from OpenCode command strings.
SkillCFreshness: C★ 51Claude Code +9 - 0.574score
hf-l2-skill-router
shynlee04
Maps meta-builder task domains to hf-* skill loading bundles with priority ordering.
SkillCFreshness: C★ 51Claude Code +9 - 0.574score
gate-l3-lifecycle-integration
shynlee04
Internal quality gate that evaluates whether Hivemind harness implementations correctly participate in the runtime lifecycle — covering 9-surface mutation…
SkillCFreshness: C★ 51Claude Code +9 - 0.574score
gate-l3-spec-compliance
shynlee04
Spec compliance gate performing bidirectional traceability, gap detection (4 types), EARS acceptance criteria validation, and anti-pattern scanning.
SkillCFreshness: C★ 51Claude Code +9 - 0.574score
hf-l2-delegation-gates
shynlee04
Enforce pre-delegation authorization gates before agent dispatch.
SkillCFreshness: C★ 51Claude Code +9 - 0.574score
hm-l2-requirements-analysis
shynlee04
Formal requirements diagnosis methodology for detecting gaps, contradictions, missing constraints, and unvalidated assumptions in existing requirements.
SkillCFreshness: C★ 51Claude Code +9
Signals
- Stars
- 51
- Forks
- 16
- Open issues
- 21
- Last commit (this folder)
- May 7, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/shynlee04/hivemind-plugin
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from shynlee04
- 0.578score
hf-l2-agent-composition
shynlee04
Teaches agents how to compose specialist agents from user intent using XML markup grammar, step protocols, and structured return formats.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hf-l2-skill-synthesis
shynlee04
Use when synthesizing skills from GitHub repos, classifying skill patterns, building template libraries, generating eval frameworks, or creating eval-driven…
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l2-coordinating-loop
shynlee04
Coordinate multi-agent dispatch with validation gates and handoff protocols.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l3-detective
shynlee04
Investigate codebases with SCAN, READ, and DEEP reading modes.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l3-integration-contracts
shynlee04
Formal bidirectional contract authority between skills and agents.
SkillCFreshness: C★ 51Claude Code +9 - 0.578score
hm-l3-synthesis
shynlee04
Compress research findings into actionable artifacts with tiered reduction.
SkillCFreshness: C★ 51Claude 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 hf-l2-agents-md-sync 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
hf-l2-agents-md-sync skill. Agent Mart. https://agentmart.dev/skills/shynlee04-hf-l2-agents-md-sync (last updated 2026-10-24)