remove-doc

A command for safely removing or moving a Sumo Logic documentation page. It creates a 301 redirect, updates links and navigation, removes references, and deletes the old file.

In plain words
What is it for?
Use it when deprecating old documentation, replacing duplicate or outdated pages, or moving a document to a new path.
Why use it?
It helps prevent visitors and search engines from reaching broken URLs after a page is removed or relocated. It also removes the page from related hub pages and site navigation.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/sumologic/sumologic-documentation/remove-doc
Clone the repo
git clone --depth 1 https://github.com/SumoLogic/sumologic-documentation

Made for: Claude Code.

Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,574 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01574
Opus 5 $0.00000 $0.00787
Sonnet 5 $0.00000 $0.00315
Haiku 4.5 $0.00000 $0.00157

Measured yesterday against content hash d8dcc054a96a, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

remove-doc scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/remove-doc.md · 199 lines

How it starts

The opening of the file, as written. The whole thing — 199 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Remove or Move Doc — Safe Deprecation Workflow

Automates the complete workflow for removing or moving a Sumo Logic doc while preventing broken links and maintaining SEO health.

What this command does

When you invoke /remove-doc, Claude will guide you through:

  1. Create 301 redirect. Add redirect mapping to cid-redirects.json.
  2. Update internal links. Find and replace all references to the old URL.
  3. Remove from hub pages. Delete card from parent index.md and Product List.
  4. Delete the doc file. Remove the actual markdown file.
  5. Remove from navigation. Delete entry from sidebars.ts.
  6. Optional steps. Add deprecation notes, hide from search engines.

When to use this command

  • Deprecating legacy docs in favor of new versions.
  • Consolidating duplicate content.
  • Removing outdated documentation.
  • Moving docs to new locations.

Workflow

Step 1: Gather information

Ask the user for:

  • Old doc path: The file path being removed (e.g., docs/integrations/web-servers/nginx-legacy.md).
  • New doc path: The replacement doc path (e.g., docs/integrations/web-servers/nginx.md).
  • Reason: Why the doc is being removed (for context).

Step 2: Create 301 redirect

  1. Read cid-redirects.json.
  2. Convert the old file path to a URL path (remove docs/ prefix, remove .md extension).
  3. Convert the new file path to a URL path.
  4. Add the redirect mapping:
    "/docs/old-path": "/docs/new-path",
    
  5. Validate JSON syntax after adding.

Safety check: Ensure the new doc path actually exists before creating the redirect.

Step 3: Update internal links

  1. Use Grep to search for references to the old URL across all docs:
    • Search for the old file path (without docs/ and .md).
    • Search for relative path variations.
    • Search for useBaseUrl references.
  2. Show the user all files that reference the old URL.
  3. For each file, replace old URL with new URL (one by one, not Find All > Replace All).
  4. Check for references in:
    • Other markdown docs.
    • Parent hub/index pages.
    • Product List (docs/integrations/product-list/).

Read the full file on GitHub · 199 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 199 lines · 0 tokens per session scan A d8dcc054a96a

Subscribe to this mod's changes

remove-doc is a command published in the GitHub repository SumoLogic/sumologic-documentation (42 stars, last pushed 3d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,574 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.