Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

Back to skills

Audit Check

ASecurity

Phase 2: Run mechanical checks and Gemini formatted audit

21 stars
0 votes
0 copies
0 views
Added 9/19/2026
researchpythonrustgobashapi

Works with

terminalapi

Security Analysis

A100/100

Scanned 9/19/2026

Install to Claude Code

$npx -y skills add edwinhu/workflows --skill audit-check --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Audit Check?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Audit Check
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/edwinhu-audit-check/badge)](https://www.skillsdirectory.com/skills/edwinhu-audit-check)

More formats (shields.io, HTML) on the badges page.

Download Zip
Files
SKILL.md
---
name: audit-check
description: "Phase 2: Run mechanical checks and Gemini formatted audit"
user-invocable: false
disable-model-invocation: true
---

# Phase 2: Check (Mechanical + AI Audit)

**What this skill carries** — grep `references/` for any subject the names below miss:
!`d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"`

Two-stage checking: Python mechanical checks catch definite errors; Gemini batch audit catches judgment-call issues.

## Stage 2a: Mechanical Checks (Python)

```bash
uv run python3 "${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/scripts/scan_formatting.py" --docx path/to/file.docx
```

Checks performed on ALL footnotes:
1. **Journal name small caps** - Comprehensive pattern list (law reviews, finance journals, newspapers, periodicals, forums)
2. **Book title small caps** - Detect italic book titles that should be small caps
3. **Id. chain validation** - Rule 4.1 mechanical check (single-source predecessor)
4. **Signal italic consistency** - All signals (see, cf., e.g.) must be italic
5. **Terminal period** - Every footnote must end with a period
6. **Hereinafter consistency** - Defined at first citation, used consistently after
7. **Author name supra format** - Text before `*supra*` should be roman, not italic (unless it's a case name short form). Catches `*Manne, supra*` → should be `Manne, *supra*`
8. **Italic spillover** - Trailing/leading spaces inside italic or small caps runs (e.g., `*supra *` should be `*supra* `). These don't affect Word display but cause Gemini misparses

### Stage 2a-ii: Bibliography drift

```bash
uv run python3 "${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/scripts/bib_gaps.py" \
  --docx path/to/file.docx --bib paper/references/sources.bib --out scratch/bib_additions.bib
```

`make_bib_from_docx.py` bootstraps a bib for a manuscript that has none; this is
the counterpart for every round after the first. It reports article cites present
in the footnotes and absent from the bib, and emits BibTeX for review.

Parsing is deterministic, not model-driven — a fabricated bib entry is worse than
a missing one because it looks answered. A title containing a comma ("The
Millennial Corporation: Strong Stakeholders, Weak Managers") cannot be separated
from an author list positionally, so review the emitted entries before merging.

### NBSP Handling

DOCX uses non-breaking spaces (`\xa0`) in abbreviations. ALL search functions must handle both `\x20` and `\xa0`:
- `No.\xa02106`, `Feb.\xa07`, `Oct.\xa021`
- `Wall St.\xa0J.`, `Corp.\xa0Governance`

## Stage 2b: Gemini Batch Formatted Audit

**Default: Use Gemini Batch API** (50% cheaper, handles all footnotes in one job). Fallback to sync calls if batch is unavailable.

### Step 1: Extract formatted footnotes

```bash
uv run python3 "${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/scripts/gemini_audit.py" --docx path/to/file.docx --extract-only
```

This outputs a JSON file mapping footnote numbers to formatted text with inline markup:
- `*text*` = italic
- `[SC]text[/SC]` = small caps
- Plain text = roman

### Step 2: Submit Gemini Batch Job

Build a JSONL file with one request per footnote, then submit via Batch API:

```python
# Build JSONL (one line per footnote)
for fn_num, formatted_text in footnotes.items():
    request = {
        "custom_id": f"fn-{fn_num}",
        "body": {
            "contents": [{"parts": [{"text": PROMPT.format(fn_num=fn_num, formatted_text=formatted_text)}]}],
            "generationConfig": {"responseMimeType": "application/json", "temperature": 0.1}
        }
    }

# Submit batch job (see /gemini-batch skill for full pattern)
# Use examples/batch_processor.py pattern — DO NOT guess API parameters
```

**IMPORTANT:** Follow the `/gemini-batch` skill's Iron Law — read `examples/batch_processor.py` before writing batch code.

**Fallback (sync):** If batch is unavailable, use:
```bash
uv run python3 "${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/scripts/gemini_audit.py" --docx path/to/file.docx
```

### Gemini Prompt Focuses On:
- Source type classification (case, statute, article, book, newspaper, working paper, hearing, letter, regulation)
- Typeface correctness per Rule 2 (italic vs small caps vs roman)
- Abbreviation correctness per T6/T13
- Short form validity (cases must not use supra)

<EXTREMELY-IMPORTANT>
## Iron Law: Audit ALL Footnotes

The Gemini audit MUST cover every footnote, not a subset. Auditing only "major" or "flagged" footnotes guarantees missed errors.

Previous failure: Auditing 45 of 239 footnotes missed 41 journal names needing small caps.
</EXTREMELY-IMPORTANT>

## Stage 2c: Claude Cross-Footnote Review

**Never trust a single agent.** After Gemini's per-footnote audit, Claude reviews the full set for cross-footnote patterns that per-footnote analysis misses.

Claude receives:
1. ALL formatted footnotes (fits in 1M context at ~20-40K tokens)
2. Gemini's per-footnote findings
3. Mechanical check results

**Claude reviews for:**
- **Supra chain validity** — does `supra note 42` actually point to the right source?
- **Hereinafter consistency** — defined at first citation? Used consistently after?
- **Repeated source type errors** — if Gemini misclassified one SEC release, it likely missed them all
- **Id. chain context** — predecessor footnote analysis that per-footnote Gemini can't see
- **Gemini false positive filtering** — flag Gemini suggestions that are likely wrong (SEC releases, exec orders, working papers)

**Output:** Annotated version of Gemini findings with cross-footnote issues added and false positives flagged.

## Red Flags

- Sending plain text to Gemini → always include inline markup; plain text produces 10-20x false positives without formatting info.
- Auditing a subset of footnotes → audit ALL footnotes; subsets guarantee missed errors.
- Skipping NBSP variants in mechanical checks → always try both space types; NBSPs cause silent search failures.
- Trusting Gemini results without the Claude cross-check → always run Stage 2c; per-footnote review misses cross-footnote patterns.
- Trusting Claude review without mechanical checks → mechanical checks are authoritative for their categories; Claude misses deterministic patterns.
- Skipping any stage → run all three (mechanical → Gemini → Claude); each catches a different error class.

## Merging Three-Layer Findings

**Priority order: Mechanical > Claude cross-review > Gemini per-footnote**

Mechanical checks are authoritative for deterministic rules:
- Signal italic formatting → trust mechanical checker (regex on run-level XML)
- Terminal periods → trust mechanical checker
- Id. chain validation → trust mechanical checker
- Journal/book small caps patterns → trust mechanical checker

Claude cross-review is authoritative for:
- Cross-footnote consistency (supra chains, hereinafter definitions)
- Gemini false positive filtering (source type misclassifications)
- Patterns across footnotes that per-footnote analysis misses

Gemini per-footnote is authoritative for:
- Individual source type classification (when not overridden by Claude)
- Abbreviation correctness (T6/T13 tables)
- Short form validity

**Never drop a mechanical finding because Gemini or Claude didn't flag it.** The mechanical checker catches 100% of signal issues by design.

## Gate: Exit Check

Before proceeding to Report phase:
- [ ] `scratch/audit_findings.json` exists
- [ ] Mechanical check results cover ALL footnotes
- [ ] Gemini audit results cover ALL footnotes (verify count matches extract)
- [ ] Claude cross-footnote review complete
- [ ] Findings merged (mechanical > Claude > Gemini priority)
- [ ] `bib_gaps.py` run FIRST; any emitted entries reviewed and merged
- [ ] `scan_formatting.py`'s journal list reconciled against the bib's `journal`
      values (see below)

Order matters. `bib_gaps.py` is what keeps `sources.bib` current, and the
small-caps check is only as good as the list behind it. Run the gap check first
and the bib supplies the article periodicals; run it last and the small-caps
check is validating against a record that has already fallen behind — which is
how `J. Corp. L.` survived a full audit.

Note what the bib does NOT cover: its `journal` field exists only on `@article`
entries, so newspapers, magazines, blogs and BOOK titles are absent — 23 of this
document's 54 small-capped names. Those stay the name list's job.

## Next Phase

Read `${CLAUDE_SKILL_DIR}/../../../../skills/bluebook-audit/skills/audit-report/SKILL.md` and follow its instructions.

Attribution

edwinhuedwinhu
View sourceMore from edwinhu →
SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Ship a skill? Prove it's safe.

Free 120-pattern security scan, letter grade, and an embeddable README badge.

Submit a skill

Related Skills

Competitor Analysis

This skill provides comprehensive analysis of competitor SEO and GEO strategies, revealing what's working in your market and identifying opportunities to outperform the competition.

1823 votes

Deep Research

Universal deep research agent team. 13-agent pipeline for rigorous academic research on any topic. 7 modes: full research, quick brief, paper review, lit-review, fact-check, Socratic guided research dialogue, and systematic review with optional meta-analysis. Covers research question formulation, Socratic mentoring, methodology design, systematic literature search, source verification, cross-source synthesis, risk of bias assessment, meta-analysis, APA 7.0 report compilation, editorial review...

452202 votes

Paperclip Distill

Use when an operation issue is a Paperclip cursor-window, distill, or backfill — `operationType: "distill"` or `"backfill"` and the body references a Paperclip source bundle for a project or root issue. Turn raw Paperclip activity into a wiki-insightful project page, decisions log, and history note. This skill exists specifically to replace the stiff, datestamp-heavy templated output that the deterministic distiller produces.

798221 votes

Academic Pipeline

Orchestrator for the full academic research pipeline: research -> write -> integrity check -> review -> revise -> re-review -> re-revise -> final integrity check -> finalize. Coordinates deep-research, academic-paper, and academic-paper-reviewer into a seamless 10-stage workflow with mandatory integrity verification, two-stage peer review, and reproducible quality gates. Triggers on: academic pipeline, research to paper, full paper workflow, paper pipeline, end-to-end paper, research-to-publi...

452201 votes

Exa Search

Semantic search, similar content discovery, and structured research using Exa API

304951 votes
View all in research →