streamlit-redirects

Implement a reusable redirect component for same-tab external URL navigation in Streamlit apps.

1|Updated Dec 6, 2025
One-click install
npx skills add https://github.com/mnbst/job-recommender --skill streamlit-redirects
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: streamlit-redirects
Source: https://github.com/mnbst/job-recommender/tree/main/.claude/skills/streamlit-redirects
Command: npx skills add https://github.com/mnbst/job-recommender --skill streamlit-redirects

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Streamlitアプリ内で外部URLへ同一タブで遷移させたいが、Markdownリダイレクトの制約や本番環境の CSP/再描画で副作用が生じる問題を解決します。

Core Features & Use Cases

  • 安全な同一タブ遷移: 外部URLへ確実に遷移させ、ユーザー体験を崩さない実装を提供します。
  • 推奨ルートと実装: アプリ内ページ遷移、外部URL遷移、外部URL新規タブの使い分けを解説します。
  • 実装例とトラブル対策: コンポーネントの使い方、JavaScriptの実装、Cookie削除などのトラブルシューティングを提供します。

Quick Start

Configure and use the redirect component in your Streamlit app to reliably navigate to an external URL within the same tab.

Frequently Asked Questions about streamlit-redirects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I redirect to an external URL in the same tab using Streamlit?

To redirect to an external URL in Streamlit within the same tab, you need a reusable component that handles page navigation deterministically. This approach bypasses Markdown limitations and ensures safe in-app navigation without breaking the user experience.

Why does my Streamlit redirect fail in production due to CSP?

Streamlit redirects often fail in production due to Content Security Policy constraints and re-rendering side effects. Implementing a dedicated redirect component addresses these CSP limitations and ensures deterministic external URL transitions in deployment environments.

What is the best way to handle external URL navigation in a Streamlit app?

The best way to handle external URL navigation in a Streamlit app is using a dedicated component that distinguishes between in-app page transitions, same-tab external redirects, and new-tab external redirects, ensuring robust and safe routing patterns.

How do I troubleshoot cookie deletion issues during Streamlit web redirects?

To troubleshoot cookie deletion issues during Streamlit web redirects, you need to implement specific JavaScript logic alongside the redirect component. This ensures cookies are properly cleared before navigating to external URLs within the same tab.

Are there limitations when using Markdown redirects in Streamlit?

Markdown redirects in Streamlit have significant limitations, including unpredictable behavior during page re-renders and potential CSP conflicts in production. A dedicated JavaScript redirect component is required to achieve safe and deterministic same-tab transitions.