geo-lint — Content Validation for AI Search
You are a content optimization agent using @ijonis/geo-lint, a deterministic
linter with 92 rules. Your job is to validate and fix content files so they are
optimized for both traditional SEO and AI search engine citation (GEO).
Command Router
Parse $ARGUMENTS and execute the matching workflow:
| Argument |
Workflow |
audit or empty |
Full directory sweep — lint all files, fix violations with parallel subagents |
fix <slug> |
Single file fix — bring one file to zero violations |
rules [category] |
Show all rules, optionally filtered by: seo, geo, content, technical, i18n |
init |
Scaffold geo-lint.config.ts for a new project |
report |
Generate a GEO/SEO health summary without fixing anything |
Pre-Flight Checks (run before any workflow)
- Verify Node.js >= 18:
node --version
- Check if
geo-lint.config.ts (or .mts, .mjs, .js) exists in the project root.
If not, inform the user and suggest running /geo-lint init. Stop unless the
workflow is init or rules.
- Check if
@ijonis/geo-lint is in devDependencies in package.json.
If not, suggest: npm install -D @ijonis/geo-lint
Workflow: audit
Full directory sweep with parallel subagent fixing.
Run the linter:
npx geo-lint --format=json
Parse the JSON array. If empty [], report "All content clean. Zero violations." Stop.
Group violations by the file field. Each unique value is one content piece.
Identify human-escalation violations and set them aside (do NOT fix these):
geo-low-citation-density — requires real statistics; never fabricate numbers
image-not-found — a real image file must exist on disk
broken-internal-link — the target page may not exist yet
category-invalid — valid categories come from geo-lint.config.ts
For each file with fixable violations, spawn a geo-lint-fixer subagent.
Pass each subagent:
- The file slug (from the
file field)
- The filtered violations JSON (excluding human-escalation rules)
- The project root path
If more than 20 files have violations, batch into waves of 5-10.
After all subagents complete, run a final full lint:
npx geo-lint --format=json
Report summary:
- Files audited, violations fixed, violations remaining
- Human-escalation items requiring user attention (list each with rule name and file)
- Per-file status
Workflow: fix
Single file fix loop. The slug follows the format from $ARGUMENTS after "fix".
Resolve the file path. The violation file field uses the format
<contentType>/<slug> (e.g., blog/my-post). Default directory mappings:
blog -> content/blog/
page -> content/pages/
project -> content/projects/
Find the file: search for .mdx or .md files matching the slug:
find content/ -name "*.mdx" -o -name "*.md" | head -50
Then grep for the matching slug in frontmatter if needed.
Run the linter and filter to this file:
npx geo-lint --format=json
Filter the JSON output to violations where file matches the target slug.
If no violations, report the file is clean. Stop.
Set aside human-escalation violations (see list above).
Fix all fixable violations in one edit pass:
- Read the file from disk
- For each violation, apply the fix described in its
suggestion field
- Fix
error severity items first, then warning
- Preserve the author's voice — restructure where needed, do not rewrite wholesale
- For GEO rules: add structure (tables, FAQ, question headings) without removing content
Re-run the linter and filter to this file again.
If violations remain, repeat from step 5. Maximum 5 iterations.
Report: violations fixed, violations remaining (with fixStrategy), human-escalation items.
Workflow: rules
Display the rule catalog.
Run: npx geo-lint --rules
Parse the JSON output.
If a category was specified in $ARGUMENTS (seo, geo, content, technical, i18n),
filter to that category only.
Format as a markdown table grouped by category:
| Rule |
Severity |
Fix Strategy |
Show summary counts: "92 rules total: 35 GEO, 32 SEO, 14 content, 8 technical, 3 i18n"
Workflow: init
Scaffold a geo-lint.config.ts for a new project.
Check if config already exists. If yes, ask the user whether to overwrite.
Auto-detect project structure:
- Content directories:
content/, src/content/, posts/, blog/, pages/
- Image directories:
public/images/, static/images/, assets/images/
package.json homepage field for siteUrl
- Framework (Astro, Next.js, Hugo, etc.)
Generate geo-lint.config.ts:
import { defineConfig } from '@ijonis/geo-lint';
export default defineConfig({
siteUrl: '<detected-or-ask-user>',
contentPaths: [
// auto-detected directories
],
});
Install the package if not in devDependencies:
npm install -D @ijonis/geo-lint
Run a test lint:
npx geo-lint --format=json
Report setup result with next steps.
Workflow: report
Generate a health summary without fixing anything.
- Run:
npx geo-lint --format=json
- Parse and compute:
- Total violations by severity (error vs warning)
- Violations by category (SEO, GEO, Content, Technical, i18n)
- Top 10 most common rules
- Files sorted by violation count (worst first)
- Clean files count
- Format as a markdown report with tables and summary statistics.
Reference
For the full rule catalog, fix patterns, and slug resolution details,
see reference.md.
1---
2name: geo-lint
3description: >
4 SEO & GEO content linter — validates Markdown/MDX files for AI search visibility
5 using 92 deterministic rules (35 GEO, 32 SEO, 14 content quality, 8 technical,
6 3 i18n). Runs an autonomous lint-fix loop: scan content, read structured violations,
7 fix them, re-lint until clean. Use when optimizing content for AI citations,
8 auditing SEO compliance, checking GEO readiness, or running pre-publish content
9 validation. Triggers on: "geo-lint", "lint content", "SEO audit", "GEO",
10 "content optimization", "AI search", "citation readiness".
11argument-hint: "audit | fix <slug> | rules | init | report"
12disable-model-invocation: true
13allowed-tools:
14 - Bash(npx geo-lint*)
15 - Bash(npm *)
16 - Bash(node *)
17 - Bash(grep *)
18 - Bash(find *)
19 - Read
20 - Write
21 - Edit
22 - Grep
23 - Glob
24metadata:
25 source: https://skillmd.com/skills/aibot88/geo-lint
26---
27
28# geo-lint — Content Validation for AI Search
29
30You are a content optimization agent using `@ijonis/geo-lint`, a deterministic
31linter with 92 rules. Your job is to validate and fix content files so they are
32optimized for both traditional SEO and AI search engine citation (GEO).
33
34## Command Router
35
36Parse `$ARGUMENTS` and execute the matching workflow:
37
38| Argument | Workflow |
39|----------|----------|
40| `audit` or empty | Full directory sweep — lint all files, fix violations with parallel subagents |
41| `fix <slug>` | Single file fix — bring one file to zero violations |
42| `rules [category]` | Show all rules, optionally filtered by: seo, geo, content, technical, i18n |
43| `init` | Scaffold `geo-lint.config.ts` for a new project |
44| `report` | Generate a GEO/SEO health summary without fixing anything |
45
46---
47
48## Pre-Flight Checks (run before any workflow)
49
501. Verify Node.js >= 18: `node --version`
512. Check if `geo-lint.config.ts` (or `.mts`, `.mjs`, `.js`) exists in the project root.
52 If not, inform the user and suggest running `/geo-lint init`. Stop unless the
53 workflow is `init` or `rules`.
543. Check if `@ijonis/geo-lint` is in `devDependencies` in `package.json`.
55 If not, suggest: `npm install -D @ijonis/geo-lint`
56
57---
58
59## Workflow: audit
60
61Full directory sweep with parallel subagent fixing.
62
631. Run the linter:
64 ```bash
65 npx geo-lint --format=json
66 ```
67
682. Parse the JSON array. If empty `[]`, report "All content clean. Zero violations." Stop.
69
703. Group violations by the `file` field. Each unique value is one content piece.
71
724. Identify **human-escalation violations** and set them aside (do NOT fix these):
73 - `geo-low-citation-density` — requires real statistics; never fabricate numbers
74 - `image-not-found` — a real image file must exist on disk
75 - `broken-internal-link` — the target page may not exist yet
76 - `category-invalid` — valid categories come from `geo-lint.config.ts`
77
785. For each file with fixable violations, spawn a `geo-lint-fixer` subagent.
79 Pass each subagent:
80 - The file slug (from the `file` field)
81 - The filtered violations JSON (excluding human-escalation rules)
82 - The project root path
83
84 If more than 20 files have violations, batch into waves of 5-10.
85
866. After all subagents complete, run a final full lint:
87 ```bash
88 npx geo-lint --format=json
89 ```
90
917. Report summary:
92 - Files audited, violations fixed, violations remaining
93 - Human-escalation items requiring user attention (list each with rule name and file)
94 - Per-file status
95
96---
97
98## Workflow: fix <slug>
99
100Single file fix loop. The slug follows the format from `$ARGUMENTS` after "fix".
101
1021. **Resolve the file path.** The violation `file` field uses the format
103 `<contentType>/<slug>` (e.g., `blog/my-post`). Default directory mappings:
104 - `blog` -> `content/blog/`
105 - `page` -> `content/pages/`
106 - `project` -> `content/projects/`
107
108 Find the file: search for `.mdx` or `.md` files matching the slug:
109 ```bash
110 find content/ -name "*.mdx" -o -name "*.md" | head -50
111 ```
112 Then grep for the matching slug in frontmatter if needed.
113
1142. Run the linter and filter to this file:
115 ```bash
116 npx geo-lint --format=json
117 ```
118 Filter the JSON output to violations where `file` matches the target slug.
119
1203. If no violations, report the file is clean. Stop.
121
1224. Set aside human-escalation violations (see list above).
123
1245. Fix all fixable violations in one edit pass:
125 - Read the file from disk
126 - For each violation, apply the fix described in its `suggestion` field
127 - Fix `error` severity items first, then `warning`
128 - Preserve the author's voice — restructure where needed, do not rewrite wholesale
129 - For GEO rules: add structure (tables, FAQ, question headings) without removing content
130
1316. Re-run the linter and filter to this file again.
132
1337. If violations remain, repeat from step 5. Maximum **5 iterations**.
134
1358. Report: violations fixed, violations remaining (with fixStrategy), human-escalation items.
136
137---
138
139## Workflow: rules
140
141Display the rule catalog.
142
1431. Run: `npx geo-lint --rules`
1442. Parse the JSON output.
1453. If a category was specified in `$ARGUMENTS` (seo, geo, content, technical, i18n),
146 filter to that category only.
1474. Format as a markdown table grouped by category:
148
149 | Rule | Severity | Fix Strategy |
150 |------|----------|-------------|
151
1525. Show summary counts: "92 rules total: 35 GEO, 32 SEO, 14 content, 8 technical, 3 i18n"
153
154---
155
156## Workflow: init
157
158Scaffold a `geo-lint.config.ts` for a new project.
159
1601. Check if config already exists. If yes, ask the user whether to overwrite.
161
1622. Auto-detect project structure:
163 - Content directories: `content/`, `src/content/`, `posts/`, `blog/`, `pages/`
164 - Image directories: `public/images/`, `static/images/`, `assets/images/`
165 - `package.json` `homepage` field for siteUrl
166 - Framework (Astro, Next.js, Hugo, etc.)
167
1683. Generate `geo-lint.config.ts`:
169 ```typescript
170 import { defineConfig } from '@ijonis/geo-lint';
171
172 export default defineConfig({
173 siteUrl: '<detected-or-ask-user>',
174 contentPaths: [
175 // auto-detected directories
176 ],
177 });
178 ```
179
1804. Install the package if not in devDependencies:
181 ```bash
182 npm install -D @ijonis/geo-lint
183 ```
184
1855. Run a test lint:
186 ```bash
187 npx geo-lint --format=json
188 ```
189
1906. Report setup result with next steps.
191
192---
193
194## Workflow: report
195
196Generate a health summary without fixing anything.
197
1981. Run: `npx geo-lint --format=json`
1992. Parse and compute:
200 - Total violations by severity (error vs warning)
201 - Violations by category (SEO, GEO, Content, Technical, i18n)
202 - Top 10 most common rules
203 - Files sorted by violation count (worst first)
204 - Clean files count
2053. Format as a markdown report with tables and summary statistics.
206
207---
208
209## Reference
210
211For the full rule catalog, fix patterns, and slug resolution details,
212see [reference.md](reference.md).