exclude-wiki-Codex-md-from-harness-line-limit-hook

Fix false-positive pre-commit failures where workspace-hub's AGENTS.md line-limit hook blocks edits to auto-generated wiki schema files under knowledge/wikis/.

5 stars

Best use case

exclude-wiki-Codex-md-from-harness-line-limit-hook is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Fix false-positive pre-commit failures where workspace-hub's AGENTS.md line-limit hook blocks edits to auto-generated wiki schema files under knowledge/wikis/.

Teams using exclude-wiki-Codex-md-from-harness-line-limit-hook should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/exclude-wiki-claude-md-from-harness-line-limit-hook/SKILL.md --create-dirs "https://raw.githubusercontent.com/vamseeachanta/workspace-hub/main/.agents/skills/workspace-hub/exclude-wiki-claude-md-from-harness-line-limit-hook/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/exclude-wiki-claude-md-from-harness-line-limit-hook/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How exclude-wiki-Codex-md-from-harness-line-limit-hook Compares

Feature / Agentexclude-wiki-Codex-md-from-harness-line-limit-hookStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Fix false-positive pre-commit failures where workspace-hub's AGENTS.md line-limit hook blocks edits to auto-generated wiki schema files under knowledge/wikis/.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Exclude wiki AGENTS.md files from harness line-limit hook

Use this when a commit is blocked by `.Codex/hooks/check-Codex-md-limits.sh` after editing wiki-domain `AGENTS.md` files under `knowledge/wikis/`.

## Problem

Workspace-hub has a hook intended to enforce short harness adapter docs (`AGENTS.md`, `AGENTS.md`, etc.).
The hook pattern is too broad and also matches wiki schema/config files generated by `llm-wiki init`, which are often ~90+ lines.

Typical symptom:
- a commit touching `knowledge/wikis/<domain>/AGENTS.md` fails even for a tiny valid edit
- the hook treats those files like top-level harness adapter files with a strict line cap

## Root cause

In `.Codex/hooks/check-Codex-md-limits.sh`, the staged-file filter matches all `AGENTS.md` paths:

```bash
HARNESS_PATTERN='(^|/)?(Codex|MEMORY|AGENTS|GEMINI)\.md$'
STAGED=$(git diff --cached --name-only --diff-filter=ACMR 2>/dev/null | grep -E "$HARNESS_PATTERN" || true)
```

That unintentionally includes `knowledge/wikis/**/AGENTS.md`.

## Minimal safe fix

Exclude wiki-generated Codex files from the staged-file set:

```bash
STAGED=$(git diff --cached --name-only --diff-filter=ACMR 2>/dev/null | grep -E "$HARNESS_PATTERN" | grep -v '^knowledge/wikis/' || true)
```

## When this fix is appropriate

Apply it when:
1. the blocked files are under `knowledge/wikis/`
2. they are wiki schema/config files, not harness adapter files
3. the commit only needs normal wiki-context updates (for example adding architecture context links)

Do NOT apply this as a blanket exemption for unrelated `AGENTS.md` files elsewhere.

## Recommended workflow

1. Confirm the blocked files are only wiki Codex files.
2. Check what is already staged with `git diff --cached --name-only`.
3. Patch `.Codex/hooks/check-Codex-md-limits.sh` with the exclusion above.
4. Commit carefully:
   - if the wiki files are already staged from the failed attempt, the hook-fix commit may also include those files unless you unstage them first
   - if you want two separate commits, run `git restore --staged <wiki-files>` before committing the hook fix
   - if a bundled commit is acceptable, document that the hook fix and blocked wiki-file cleanup landed together
5. Re-run or finish the intended commit/push flow as needed.
6. Post a short GitHub follow-up comment if the cleanup was tied to a closed issue.

## Why this is reusable

This is not a one-off content bug; it is a structural mismatch between:
- short harness adapter docs
- long wiki schema/config docs generated under `knowledge/wikis/`

Any future edits to wiki `AGENTS.md` files can hit the same false positive unless the hook excludes them.

## Example outcome

This fix was used successfully when closing residual work from #2104, where two wiki `AGENTS.md` files already had the correct architecture-context lines in the working tree but could not be committed because of the false-positive line-limit hook.

Related Skills

llm-wiki-weekly-freshness

5
from vamseeachanta/workspace-hub

Class-level governance workflow for keeping llm-wiki-style markdown knowledge bases current, public-safe, graph/index-valid, and useful for code development. Use when reviewing llm-wiki architecture/content, scanning new LLM concepts, maintaining public knowledge graphs, producing an issue roadmap, or running recurring freshness cadence.

llm-wiki-source-extraction-coverage

5
from vamseeachanta/workspace-hub

Doc-type-aware extraction contract for llm-wiki source ingestion with measurable coverage and source-anchored traceability. Use when (1) ingesting a PDF, DOCX, XLSX, PPTX, HTML, or scanned-image source into a wiki `sources/` page, (2) computing the pre-extraction estimate (what fraction of the source we expect to recover) and post-extraction yield (what fraction we actually recovered), (3) anchoring wiki claims back to specific page / paragraph / cell / slide positions in the source so a reviewer can re-verify or revise against the actual document, (4) deciding whether OCR fallback or manual transcription is needed. Codifies workspace-hub's existing OCR fallback chain and python-docx / openpyxl / trafilatura patterns into a format-specific routing table. Companion to research/llm-wiki-page-shape-contract (Rule 7 input-layer pages) and research/llm-wiki — this skill is the defense against silent extraction failure.

llm-wiki-public-private-routing

5
from vamseeachanta/workspace-hub

Firewall between the public llm-wiki repo (vamseeachanta/llm-wiki, MIT + CC-BY-4.0) and per-client private wikis (vamseeachanta/llm-wiki-<client>, e.g. llm-wiki-mkt-a per #2746). Use when (1) deciding whether a converted wiki page lands in public or private surface, (2) applying the project-name abstraction rule to public-bound content, (3) evaluating the public- availability exception that lets actual project names pass through unmodified, (4) promoting content from private to public after sanitization. Encodes the 2026-05-20 user routing directive verbatim: exact client results → private; abstracted (project-name only) → public; project name + all key data publicly available → exception applies. Companion to research/llm-wiki-page-shape-contract (which calls this skill at Rule 8) and research/llm-wiki-source-extraction-coverage (which produces the source pages this skill decides where to send).

llm-wiki-page-shape-contract

5
from vamseeachanta/workspace-hub

Enforce the page-shape contract when a repo-side document or analysis output gets converted into an llm-wiki page. Use when (1) running `scripts/knowledge/llm_wiki.py ingest`, (2) writing or rewriting a wiki page from docs/reports/*, docs/handoffs/*, scripts/review/results/*, or calc citation outputs, (3) deciding whether a page should be split into a folder of sub-pages, (4) reviewing wiki PRs for length / diagram / divide-and-conquer compliance. Codifies the Karpathy + Astro-Han + lewislulu page rules applied to workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Sibling to research/llm-wiki (which owns the CLI ops) — this skill is the quality gate every converted page must clear before commit.

llm-wiki-cadence-governance

5
from vamseeachanta/workspace-hub

Weekly governance workflow for keeping an llm-wiki repository current, code-development-useful, and connected to actionable GitHub issue planning.

llm-wiki-audit-feedback-loop

5
from vamseeachanta/workspace-hub

Durable feedback loop for correcting llm-wiki pages without losing the correction to chat history. Use when (1) a human notices a wiki page is wrong, outdated, or contradicts a source, (2) processing the `audit/` inbox of a domain wiki, (3) reviewing what feedback has been resolved vs deferred, (4) needing to leave a comment on a specific text range that survives line- number drift. Implements the anchored-text audit file pattern from lewislulu/llm-wiki-skill, adapted for workspace-hub's domain-wiki layout under /mnt/local-analysis/llm-wiki/wikis/<domain>/. Extends the 5-op model (compile/ingest/query/lint) from research/llm-wiki with the missing `audit` op. Never silently delete feedback — rejected audits stay archived with rejection rationale.

teams-meeting-pipeline

5
from vamseeachanta/workspace-hub

Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.

solidworks-to-blender-pipeline

5
from vamseeachanta/workspace-hub

Use when converting SolidWorks .sldprt/.sldasm geometry to Blender for rendering, animation, or visualization, including questions about STEP export settings, FreeCAD as a bridge, or which mesh format (STL/OBJ/GLTF) to choose.

oss-wiki-development-arc

5
from vamseeachanta/workspace-hub

Three-phase methodology (Substrate → Depth → Quality) for building open-source engineering wikis efficiently. Skip 70%+ of empirical iteration cost by pre-loading the pattern.

client-llm-wiki-factory

5
from vamseeachanta/workspace-hub

Operator checklist for instantiating a new per-client private llm-wiki repo under workspace-hub [#2746](https://github.com/vamseeachanta/workspace-hub/issues/2746) + [#2731](https://github.com/vamseeachanta/workspace-hub/issues/2731) D4 (amended) naming convention `llm-wiki-<client>`.

verify-Codex-run-commit-vs-working-tree-before-closing

5
from vamseeachanta/workspace-hub

After a Codex implementation run, verify the claimed file set against the actual commit and working tree before treating the issue as fully complete.

portable-config-baseline-pattern

5
from vamseeachanta/workspace-hub

Extract machine-agnostic settings into portable template files while keeping machine-specific hooks and plugins separate