Introduction¶
When a site is going live, the things that often trip people up at the end aren’t features, but several very basic issues: a certain internal link returning 404, images uploaded without compression, pages forgetting to write a title, https pages mixing http images, or a certain redirect requiring three hops to reach the destination. Manually clicking through takes half an hour, and missing things is the norm; by the time a user stumbles on it before fixing it, the cost is much higher than checking once before launch.
dsh-site-audit is a plugin made for this purpose. It is integrated into the DSH (DeepSeek Harness) site plugin system. The core idea is not to write another crawler, but to scan out common site issues in one go using a read-only approach, providing conclusions in three tiers: “Block” / “Warning” / “Pass”.
What is it¶
dsh-site-audit (Site Health Check) is a DSH plugin. The repository address is https://github.com/feely0208/dsh-site-audit, maintained by feely0208, and the corresponding npm package name is @deepwhale-cn/dsh-site-audit. It solves the “after generation, before launch” round of checks: whether internal links are reachable, whether images are too large, whether basic SEO components are missing, whether robots.txt and sitemap.xml exist, whether mixed content exists, and whether redirect chains are too long.
The plugin is read-only; it will not send POST requests to the target site, nor will it submit forms, log in, or send data externally.
Installation¶
Install using the official command:
dsh plugin --profile web add @deepwhale-cn/dsh-site-audit
--profile web indicates that it is a plugin running on the web (client) side. After installation, a “Site Health Check” entry will appear in the sidebar; simply enter the URL.
Running the CLI Standalone¶
The plugin comes with a CLI and can be used standalone without installing DSH, provided your local Node.js version is ≥ 18.
node bin/cli.mjs --base https://example.com
This command starts crawling from the homepage, with a default limit of 50 pages, checking for internal links, image size, SEO, robots/sitemap, mixed content, and redirect chains.
To change the crawling scope or turn off external link detection:
node bin/cli.mjs --base https://example.com --max-pages 100 --offline
--max-pages adjusts the crawling limit for internal links, and --offline turns off external link detection entirely.
If the site is a local build artifact, scan the directory directly without sending any network requests:
node bin/cli.mjs --dir ./dist --json --out report.md
--dir specifies the directory, --json outputs JSON, and --out report.md writes the report to the specified file. The --dir mode is read-only for local files and can run even without a network.
Panel Usage¶
The “Site Health Check” entry in the DSH sidebar provides statistics in three tiers and the 5 most severe issues after entering a URL. For scenarios where you just want a quick glance to see if the site has any hard flaws, the panel is sufficient; for full reports or scripting integration, use the CLI above.
Check Rules¶
The rules below come from the README and are the actual content the plugin reports.
- Internal Links: Crawl the homepage plus same-origin direct links, with a default limit of 50 pages, adjustable via
--max-pages; 4xx, 5xx, and timeouts are listed in full with complete URLs. - Image Size: Warning if a single image exceeds 300KB, blocking if it exceeds 1MB; list filenames in descending order of size for easy processing of the largest files.
- Basic SEO: Check page by page for missing or duplicate titles, missing descriptions, and whether the number of H1s is not equal to 1.
- robots.txt / sitemap.xml: In online mode, check if HTTP exists; in local mode, only check for file existence; a separate prompt is given if robots.txt blocks the entire site.
- Mixed Content: Blocking if
http://resources appear on https pages. In local mode, without real HTTP responses, it reports “Will be mixed content after deployment”. - Redirect Chains: Warning if exceeding 2 hops, while also indicating the final destination.
- External Links: Use HEAD probe with 8-second timeout; failures result in warnings only, not blocking;
--offlinecan turn this off entirely.
Output and exit codes are paired: the text report is divided into three tiers (Block / Warning / Pass), supports --json and --out report.md; exit code 0 means no blocking, 1 means blocking, 2 means parameter or parsing failure. It can be used directly before deployment scripts as a gatekeeper.
Boundaries¶
The plugin explicitly does a few things; it is worth knowing before installation:
- Only sends GET and HEAD requests, does not send POST, submit forms, log in, or send data externally.
- Internal links only recurse within the same site; cross-domain links only get a single HEAD probe, without recursing into the other site.
- Default timeout for a single request is 8 seconds, concurrency default is 4, so a slow page won’t stall the entire check; results for the same URL are cached for 60 seconds.
Use Cases and Notes¶
Suitable for use in the release process: scan ./dist after generating the site and clear blocking items before release. You can also use --base to perform a read-only health check on live addresses, provided the target site allows such scanning.
One thing to think through before using: this plugin runs within the current DSH process, and permissions follow the DSH process. Installing to DSH is equivalent to adding a capability to this process; it is recommended to review the source code first to confirm the requests it initiates meet expectations. The license is MIT, and author attribution is Wenzhou Deepwhale Intelligent Technology Co., Ltd. (contact@deepwhale.org.cn).
Additionally, the DSH ecosystem community (e.g., skillhub.cn) is an independent site and has no official affiliation with DeepSeek / Xiaofang; do not interpret it as an official app store. This plugin is a tool provided by the community side, with no further official endorsement information above it.
Related Links¶
- GitHub Repository: https://github.com/feely0208/dsh-site-audit
- Skillhub.cn Directory Page: https://www.skillhub.cn/plugins/feely0208/dsh-site-audit