agentleFS
SonghongleiSonghonglei/build-better-skills/skills/glic-check/SKILL.md

glic-check

Skill3 starsChanged 8 days agoMITView on GitHub

Systematic quality check for code, skills, configs, and documents. Two modes — GLIC for internal quality (4 dimensions: Grammar / Logic / Integrity / Containment) and UGLIC adding User Experience (5 dimensions: U + G + L + I + C). Each finding cites file:line; severity is tagged as ERR / WARN / INFO with explicit escalation rules (silent-failure = ERR, 3× repeated WARN → ERR, missing public-param doc = ERR). Use when the user says "GLIC check", "UGLIC check", "do a glic", "systematically review this", "audit my skill", "quality check this code", or any phrasing that asks for a multi-dimension review of code / skills / configs / docs.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 7 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈7

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read all in-scope files before judging — but read intelligently for large targets.

    line 65
  2. Very specific:

    Avoid loading every reference upfront — load each references/*.md only when a dimension check needs it

    line 71
  3. Distinctive:

    GLIC mode: Run G → L → I → C.

    line 78
  4. Distinctive:

    UGLIC mode: Run U → G → L → I → C.

    line 79
  5. Distinctive:

    Never recommend adding env metadata just because code reads an env var — see the four-item evidence rule in dimensions.md (I-skill: Env …

    line 86
  6. Very specific:

    Follow references/output-format.md for consistent structure:

    line 110
  7. Distinctive:

    After report, explicitly ask: ERR items should be fixed first, then WARN items.

    line 122
  8. Distinctive:

    Must cite location: Never say "somewhere in the file" — give file:line.

    line 136
  9. Distinctive:

    Don't nitpick: If a finding doesn't affect function, maintainability, security, or user experience, it's not worth a report line.

    line 138

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

GLIC / UGLIC Check

Systematic quality review for code, skills, configs, and documents.

Modes

ModeTrigger ExamplesDimensions
GLICGLIC check, glic, glic thisG + L + I + C (4 dims)
UGLICUGLIC check, UGLIC verify, uglic thisU + G + L + I + C (5 dims)

Dimensions

DimNameFocus
UUsability & User ExperienceTwo perspectives — Agent: executability, unambiguous instructions, declared dependencies, failure recovery; Human: usability, onboarding success, error communication, interaction efficiency
GGrammarSyntax errors, naming conventions, formatting consistency, YAML/JSON validity
LLogicControl flow correctness, implicit dependencies, edge cases, branch coverage
IIntegrityCompleteness, consistency, boundary handling, documentation-code alignment
CContainmentSide effects, scope boundaries, security, backward compatibility

U is only active in UGLIC mode. GLIC mode skips U entirely.

Workflow

1. Determine Mode & Scope

Detect mode from the user's message — use intent matching, not bare substring matching:

  • Message expresses intent to run UGLIC (e.g., "UGLIC check", "UGLIC this", "uglic verify", "do a uglic on X", "uglic mode") → UGLIC mode (5 dimensions: U + G + L + I + C)
  • Message expresses intent to run GLIC, or asks for a multi-dimension review without specifying mode → GLIC mode (4 dimensions: G + L + I + C)
  • ⚠️ Do not auto-route to UGLIC just because the word UGLIC appears anywhere in the message (e.g., "the UGLIC mode docs say X" is asking about UGLIC, not requesting a UGLIC check). Look for a verb/imperative form: do, run, check, verify, audit.

Then, ask or infer what to check:

  • "this change" / "the diff" → git diff against base branch / last commit
  • "check this skill" → entire skill directory
  • "check this code" → specified file(s)
  • "GLIC/UGLIC verify" → most recent changes (git diff or last touched files)
  • No target specified → ask the user what to check

2. Read Target Content

Read all in-scope files before judging — but read intelligently for large targets.

  • Small target (≤ 500 lines total, ≤ 5 files): read fully top-to-bottom.
  • Large target (> 500 lines total, or > 10 files, or one file > 500 lines):
    1. Structural scan first — file list, frontmatter, headings, function/class signatures, first + last few lines of each long file
    2. Then deep-read sections that match likely-finding patterns: anti-pattern lists, cross-references, error-handling blocks, frontmatter, build-artifact suspects
    3. Avoid loading every reference upfront — load each references/*.md only when a dimension check needs it
  • Do not skim. Skimming = silent miss = wrong report. If a section is too long to read in one go, summarize it before moving on (don't pretend you read it).

3. Execute Dimension Checks

For each active dimension, go through the checklist in references/dimensions.md. Adapt sub-checks to the target type (code / skill / config / document).

GLIC mode: Run G → L → I → C. UGLIC mode: Run U → G → L → I → C.

Key rule: Each finding must cite a specific location (file:line or section heading).

Checker-finding citation discipline (when consuming machine-readable findings from a checker like skill-release-audit JSON):

  • Quote findings with code + location + classification reason intact — never re-summarize into a bare variable list and never drop the classification.
  • ENV_OPTIONAL_OVERRIDE / ENV_RUNTIME_INJECTED / ENV_AMBIENT / ENV_TEST_ONLY findings must NOT be escalated to WARN/ERR unless you find an independent real failure path (document it when escalating).
  • Never recommend adding env metadata just because code reads an env var — see the four-item evidence rule in dimensions.md (I-skill: Env metadata consumption).
  • Report confirmed false-positives / non-user-config separately; do not count them into the WARN total.

4. Assign Severity

TagMeaningAction
❌ ERRFunctional impact, security risk, documentation misaligns with code, user fundamentally cannot complete the core taskMust fix
⚠️ WARNMaintainability, consistency, future-proofing, implicit risk, user friction or confusionShould fix
ℹ️ INFOStyle preference, minor optimization, nice-to-haveOptional

U-dimension severity rules:

  • ERR: Agent cannot reliably execute the core task (ambiguous instructions, unjudgeable conditions, dead-end on failure) or human cannot complete the core task (missing prerequisites, no recovery path, misleading output).
  • WARN: Agent execution has uncertainty but usually succeeds, or human needs extra trial-and-error or unnecessary steps.
  • INFO: Minor wording improvements, interaction polish, nice-to-have clarity.

Severity escalation (all dimensions):

  • A WARN that appears 3+ times within the same check / same target → escalate to ERR (WARNs that recur across multiple separate targets do NOT auto-escalate — they're just an industry-wide pattern worth flagging, not a target-specific failure)
  • An issue that could cause silent failure → always ERR
  • Missing documentation for a public-facing parameter → always ERR

5. Produce Report

Follow references/output-format.md for consistent structure:

  1. Title: ## GLIC Check — [target description] (GLIC mode) or ## UGLIC Check — [target description] (UGLIC mode)
  2. One subsection per active dimension
  3. Each finding numbered (U1, U2, G1, G2, L1, I1, C1...)
  4. Summary table at end with all findings
  5. List ERR items that require fix

Assign new numbers per dimension (reset per check).

6. Offer to Fix

After report, explicitly ask: ERR items should be fixed first, then WARN items. Do not fix automatically — wait for user confirmation.

References

  • dimensions.md — Detailed sub-check criteria for each dimension. Load before starting step 3. Adapt context-specific checklists (code vs skill vs config). The U dimension checklist is at the top.
  • output-format.md — Report structure template with concrete formatting rules. Includes both GLIC and UGLIC variants. Consult when producing the report in step 5.
  • examples.md — Five real-world GLIC and UGLIC check examples (small → mid → large → self-check → high-density). Load for reference when unsure about severity assignment, output style, or proportionality.

Optional helper

  • scripts/grep_antipatterns.sh — Half-automatic pre-scan that surfaces likely findings before you run the full UGLIC checklist (vague directives in CJK/English, SKILL.md length budget, frontmatter field discipline, build-artifact residue, cross-section reference candidates). Run it first on large targets to anchor where to look. The script surfaces, you still judge severity + cite. Usage: bash scripts/grep_antipatterns.sh <target-dir-or-file>.

Principles

  • Must cite location. Never say "somewhere in the file" — give file:line.
  • Be specific, not vague. "Naming inconsistent" is not enough — show the two conflicting names.
  • Don't nitpick. If a finding doesn't affect function, maintainability, security, or user experience, it's not worth a report line.
  • Complexity counts. Complex or fragile workarounds are themselves WARN-worthy, even if they work correctly.
  • Silent failure = ERR. Any condition that could fail without visible error is always ERR.

Part of build-better-skills

This skill belongs to the build-better-skills suite. For the full lifecycle map (Install → Audit → Release → Testing → Sediment), all sibling skills, and their current status, see the Stages table on the suite repo home — kept as the single source of truth (this file does not duplicate it).

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.