Introduction¶
When agents interact with AI-powered search engines, whether a page can be correctly crawled and cited depends on structured data, crawlable summary files, and a clear heading hierarchy. In DeepSeek Harness (DSH), developers must manually fetch pages, analyze these elements, and generate llms.txt and JSON-LD files—a cumbersome process that is prone to missing details.
This article introduces a DSH plugin specifically designed to solve this problem: liuhange789/dsh-geo-report-to-fix. With a single call, it handles page fetching, performs a GEO health check with scoring, and directly outputs ready-to-paste fix files, eliminating the need for manual JSON authoring and item-by-item verification.
Plugin Overview¶
This is an online tool-style DSH plugin developed by maintainer liuhange789. It accepts a URL, returns the page’s GEO health score, and generates two files: llms.txt (a site summary file for AI search crawling) and jsonld.html (containing Organization and WebSite JSON-LD structured data). The plugin does not depend on a browser engine; it uses native fetch + regex extraction, with zero third-party dependencies.
Core Features¶
GEO Health Check Scoring¶
The plugin performs 10 checks, each with a fixed weight (totaling 100), and returns a score from 0 to 100 along with a grade (A ≥ 90, B ≥ 75, C ≥ 60, D < 60). The number of passed/failed items and the measured value (detail) for each item are also returned to facilitate subsequent optimization.
The check items and their weights are as follows:
- Title (10): Present and 10–70 characters in length
- Meta description (10): Present and 40–200 characters in length (falls back to
og:description) - Heading structure (10): Exactly 1 H1, at least 2 H2s
- Organization JSON-LD (15): Present with
name+url - WebSite JSON-LD (10): Present
llms.txt(15): Site root returns a non-empty 2xx response- Canonical (5): Present and points to the same site
<html lang>(5): Non-empty- Image alt (10): Coverage ≥ 80% (treated as passed if no images)
- Page-level structured data (5): Article / FAQPage / BreadcrumbList / Product / SoftwareApplication / HowTo
- Indexability (5):
meta robotsdoes not containnoindex/none
Direct Fix File Generation¶
The plugin automatically generates two files that can be pasted directly into a site:
geo-fix-<timestamp>/llms.txt: Place in the website root directorygeo-fix-<timestamp>/jsonld.html: Paste into<head>
llms.txt only includes same-origin links (skipping anchors, mailto:, external links, and login/privacy pages), with a maximum of 10 core pages and 12 H2 sections. The JSON in jsonld.html escapes <, >, and &, making it safe to inline within a <script> tag.
Installation & Activation¶
Declare the dependency in your DSH profile configuration file:
npm install @liuhange/dsh-geo-report-to-fix
{
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-headless",
"@liuhange/dsh-geo-report-to-fix"
]
}
},
"dependencies": {
"@liuhange/dsh-geo-report-to-fix": "0.1.1"
}
}
After restarting the profile, the geo_fix tool is ready to use.
Typical Usage¶
Command Format¶
Model: geo_fix url="https://example.com/pricing"
Parameters:
url: Required, a full URL; onlyhttp/httpsare acceptedoutputDir: Optional, an output directory within the workspace; defaults togeo-fix-<timestamp>
Response Example¶
The return value is an object containing the following fields:
url,finalUrl,title,siteNamescore(0–100),gradepassed,failed(number of passed/failed checks)checks: Each entry includesid/label/weight/passed/detailrecommendations: Fix suggestions sorted by weightstructuredTypes,truncated(whether the page exceeded 2MB and was truncated)llmsTxtPath,jsonLdPathelapsedMs
Runtime Constraints¶
- Page fetching: 6-second timeout, 2MB size limit, automatic redirect following;
/llms.txtprobe has a 3-second timeout; total call duration < 10 seconds - Decoding follows the response header’s
charset(GBK/GB18030 and other Chinese sites will not produce garbled text); falls back to UTF-8 if undeclared or unrecognized - Pages exceeding 2MB are truncated for analysis, with
truncated=truereturned - Only
http/httpsare accepted; non-HTML responses, empty pages, and non-2xx status codes result in immediate errors - The tool writes files and is therefore declared as non-concurrent; it also forwards the host’s cancellation signal, stopping the fetch immediately if the user interrupts
- The output directory must be within the current session’s workspace
- Zero third-party dependencies: native
fetch+ regex extraction
Use Cases & Caveats¶
This plugin is ideal for DSH developers who need to generate AI search–friendly files for a site, particularly those looking to automate the GEO health check and fix workflow.
Please note the following when using it:
- The plugin runs with the permissions of the current DSH process; it is recommended to review the source code and license before installation
- The extractor is a “signal extractor” rather than a full HTML parser: attribute values containing
>may be missed; compressed or client-side rendered (CSR) pages only expose the initial HTML - Pages exceeding 2MB are only analyzed up to the first 2MB, with
truncated=truereturned - It does not parse external sites, perform multi-page crawling, or validate the content quality of
llms.txt; it only checks for existence - The score is an engineering heuristic and does not represent any specific search engine’s official ranking
- When replacing existing scripts, replace rather than append, to avoid ending up with two
Organizationentries
Conclusion¶
With dsh-geo-report-to-fix, you can quickly complete a GEO health check in DSH and obtain ready-to-paste fix files, reducing manual effort and the risk of errors. The plugin relies on a native technology stack, is lightweight to run, and is well-suited for integration into agent workflows.
For more details and source code, visit the plugin’s directory page or the GitHub repository.