add-redirect

add-redirect is a skill for Claude Code, Codex from bishopZ/2026-Boilerplate. It costs 25 tokens per session (456 once invoked), scanned A, original, MIT.

A workflow for adding URL forwarding rules to a server, so an old web address sends visitors to a new one.

In plain words
What is it for?
Use it to add or update a redirect, choose the appropriate HTTP status code, update redirect documentation, and add end-to-end checks.
Why use it?
It helps preserve links after pages are renamed or site navigation changes, while documenting why the forwarding exists and testing it.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to add or update a redirect, choose the appropriate HTTP status code, update redirect documentation, and add end-to-end checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/bishopz/2026-boilerplate/add-redirect
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.

Any agent
npx skills add bishopZ/2026-Boilerplate --skill add-redirect
Clone the repo
git clone --depth 1 https://github.com/bishopZ/2026-Boilerplate

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for add-redirect

README.md
[![agentmods](https://agentmods.dev/badge/skills/bishopz/2026-boilerplate/add-redirect/github.svg)](https://agentmods.dev/skills/bishopz/2026-boilerplate/add-redirect)
Your own site
<a href="https://agentmods.dev/skills/bishopz/2026-boilerplate/add-redirect"><img src="https://agentmods.dev/badge/skills/bishopz/2026-boilerplate/add-redirect/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for add-redirect

Your own site · 80×15
<a href="https://agentmods.dev/skills/bishopz/2026-boilerplate/add-redirect"><img src="https://agentmods.dev/badge/skills/bishopz/2026-boilerplate/add-redirect.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 456 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00025 $0.00456
Opus 5 $0.00013 $0.00228
Sonnet 5 $0.00005 $0.00091
Haiku 4.5 $0.00003 $0.00046

Measured 10d ago against content hash afd9855323d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

add-redirect 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 10d ago.

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.

skills/add-redirect/SKILL.md · 59 lines

What it actually says

Add Redirect

Use this skill when an old route should forward users to a new route after page renames, URL cleanup, or IA changes.

Required Inputs

  • from_path: Legacy URL path (example: /old-page)
  • to_path: Destination URL path (example: /new-page)
  • status_code: One of 301, 302, 307, 308
  • reason: Why the redirect exists (migration note for changelog/docs)

If any input is missing, pause and ask before editing files.

Files To Update

1) src/server/config/redirects.ts

  • Add the new redirect rule to REDIRECT_RULES.
  • Keep from and to as absolute paths beginning with /.
  • Do not duplicate an existing from route; update the existing rule instead.

2) playwright/e2e/routing/redirects.spec.ts

  • Add or update E2E assertions for the redirect behavior.
  • Validate destination path and destination page content.

3) CHANGELOG.md

  • Add an Unreleased entry summarizing redirect additions/changes.

4) docs/REDIRECTS.md (optional but recommended)

  • Update examples or guidance if redirect policy changes.

Status Code Guide

  • 301 — Permanent move (most content migrations)
  • 302 — Temporary move
  • 307 — Temporary, method-preserving
  • 308 — Permanent, method-preserving

Validation Checklist

  • Run npm run lint
  • Run npm run type-check
  • Run npm run test:e2e -- --spec playwright/e2e/routing/redirects.spec.ts
  • Manually verify query-string preservation for at least one redirect (example: /old?a=1 -> /new?a=1)

Done Criteria

  • Redirect rule is added in src/server/config/redirects.ts.
  • E2E test coverage exists for the new redirect.
  • Changelog reflects the redirect change.
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. 10d ago First seen · 59 lines · 25 tokens per session scan A afd9855323d9

Subscribe to this mod's changes

add-redirect is a skill published in the GitHub repository bishopZ/2026-Boilerplate (24 stars, last pushed 1mo ago), licensed MIT. It adds 25 tokens to every session and 456 once invoked, about $0.0001 per session on Opus 5. 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.

Related

Other skills, from other repositories

Express.js Testing Patterns

Express.js API testing with supertest, middleware testing, route handler testing, error handling verification, and authentication testing.

PramodDutta/qaskills · 28 tokens

prisma-8

Comprehensive guide for building with Prisma 8 (Prisma Next), the contract-first data layer. Use whenever working on Prisma code in a project that uses it — authoring or editing the data contract (contract.prisma, PSL, TypeScript builders), migrations, queries (db.orm / db.sql), runtime wiring (db.ts, middleware…

prisma/orm · 220 tokens

playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

VoltAgent/voltagent · 52 tokens

hunt-nodejs

Hunt Node.js specific vulnerabilities — Prototype Pollution → RCE chains (lodash/merge/assign), Express trust proxy misconfiguration, childprocess/eval injection, template engine SSTI (EJS/Pug/Handlebars), path traversal in file servers, require() injection, environment variable exfil via /proc/self/environ. Use when…

uphiago/recon-skills · 87 tokens

api-tester

A tool for creating and checking API tests from the real API contract and implementation. An API is the agreed way that software sends requests and receives responses.

laolaoshiren/claude-code-skills-zh · 86 tokens

backend/testing-guide

A guide for writing backend tests: small unit tests, tests that check connected parts such as an API and database, and end-to-end tests that follow a complete user flow.

echoVic/boss-skill · 30 tokens