$npx -y skills add yha9806/academic-writing-toolkit --skill auditUse when checking a thesis draft before submission for inconsistent numbers, terminology, cross-references, or citation problems.
| 1 | # /audit — Thesis Consistency Audit Skill |
| 2 | |
| 3 | ## Purpose |
| 4 | |
| 5 | Scan all thesis chapters for internal data consistency issues: contradictory numbers, inconsistent terminology, broken cross-references, and arithmetic errors. This is a pre-submission quality check. |
| 6 | |
| 7 | ## Trigger Words |
| 8 | |
| 9 | This skill activates on: `audit`, `consistency check`, `check numbers`, `/audit`. |
| 10 | |
| 11 | ## Workflow |
| 12 | |
| 13 | 1. **Scan all chapter files** in the `chapters/` directory using Glob. Read each file to extract quantitative claims, terminology, and cross-references. |
| 14 | |
| 15 | 2. **Check the following categories:** |
| 16 | |
| 17 | **A. Numerical consistency** |
| 18 | - The same statistic (e.g., accuracy, sample size, p-value) cited in multiple chapters must have the same value. |
| 19 | - Percentages in a distribution must sum to 100% (with tolerance of +/-1% for rounding). |
| 20 | - Counts (e.g., "42 models") must match between chapters. |
| 21 | |
| 22 | **B. Terminological consistency** |
| 23 | - The same concept must use the same term throughout. Flag cases where synonyms are used inconsistently (e.g., "structured review" vs "systematic review" for the same concept). |
| 24 | - Abbreviations must be defined on first use in each chapter. |
| 25 | |
| 26 | **C. Cross-reference validity** |
| 27 | - References to other sections (e.g., "as discussed in Section 3.2") must point to sections that exist. |
| 28 | - References to tables and figures must match actual table/figure numbers. |
| 29 | - Forward references ("Chapter 6 will show...") must be fulfilled. |
| 30 | |
| 31 | **D. Citation consistency** |
| 32 | |
| 33 | Run `python3 scripts/audit-citations.py --base-dir . --style $(grep -oP '(?<=Citation style: )\S+' CLAUDE.md) --json` and parse the JSON output. The script implements four tiers: |
| 34 | |
| 35 | - **Tier 0** — Source-line lint over `literature/reading_notes/*_NOTES.md`. Flags missing or malformed `**Source**:` lines. Severity `medium` (`notes-source-missing`) or `medium` (`notes-source-malformed`). |
| 36 | - **Tier 1** — Pairing. Every in-text citation must match a `**Source**:` entry; every Source must be cited at least once. Three modes: |
| 37 | - Author-Year (Harvard, APA, Chicago Author-Date, GB/T 7714-2015): pair on `(lastname, year)`. Phantom and unused → severity `high`. |
| 38 | - Author-Page (MLA): pair on `lastname` only. |
| 39 | - Numeric (IEEE, Vancouver): pair on count balance + integer-gap detection. |
| 40 | - **Tier 2** — Style mode detection across all in-text citations. Flags outliers when the manuscript drifts (e.g. mixed `(Smith 2024)` and `(Smith, 2024)`). Severity `medium`. |
| 41 | - **Tier 3** — Per-style format validation against the declared `Citation style:` in `CLAUDE.md`. Flags wrong-comma, et al. threshold violations, wrong multi-author connector. Severity `low`. |
| 42 | |
| 43 | The script's exit code is `0` (no issues), `1` (issues at any tier), or `2` (invalid arguments). Add the script's issues to the `Issues` table below as new rows; severity vocabulary maps directly (`critical | high | medium | low | info`). |
| 44 | |
| 45 | See `docs/skills/06-audit.md` and `python3 scripts/audit-citations.py --help` for the public citation-audit interface and supported styles. |
| 46 | |
| 47 | 3. **Output the audit report** using the format below. |
| 48 | |
| 49 | ## Output Format |
| 50 | |
| 51 | ``` |
| 52 | ## Audit Report -- {YYYY-MM-DD} |
| 53 | |
| 54 | ### Summary |
| 55 | |
| 56 | - **Critical**: {N} issues (contradictory data) |
| 57 | - **High**: {N} issues (broken references, missing definitions) |
| 58 | - **Medium**: {N} issues (terminology inconsistency, minor arithmetic) |
| 59 | |
| 60 | ### Issues |
| 61 | |
| 62 | | # | Severity | Category | Location | Issue | Current | Expected | |
| 63 | |---|----------|----------|----------|-------|---------|----------| |
| 64 | | 1 | Critical | Numerical | Ch3 s3.2, Ch5 s5.4 | Sample size differs | 120 (Ch3) vs 125 (Ch5) | Should be consistent | |
| 65 | | 2 | High | Cross-ref | Ch4 s4.1 | Ref to "Section 3.7" | Section 3.7 | Section does not exist | |
| 66 | |
| 67 | ### Recommendations |
| 68 | |
| 69 | {Grouped by severity, brief notes on how to resolve each issue.} |
| 70 | ``` |
| 71 | |
| 72 | ## Severity Levels |
| 73 | |
| 74 | - **Critical**: The same quantitative claim has different values in different chapters. This directly undermines thesis credibility. |
| 75 | - **High**: Broken cross-references, undefined abbreviations on first use, missing table/figure numbers. |
| 76 | - **Medium**: Inconsistent terminology that does not cause factual error, minor rounding discrepancies within tolerance. |
| 77 | |
| 78 | ## Constraints |
| 79 | |
| 80 | 1. **Never auto-fix.** List all issues for the user to review and decide. The user may choose to fix selectively. |
| 81 | 2. **No emoji** in output. |
| 82 | 3. **Report all instances**, not just the first occurrence. If a statistic appears in 4 chapters with 2 different values, list all 4 locations. |
| 83 | 4. **Be specific** about locations. Provide chapter number, section number, and surrounding context so the user can find the issue quickly. |
| 84 | 5. **Do not flag stylistic issues.** This skill checks data consistency, not prose quality. |