py-shiny: Skill for Claude Code

.agents/skills/port-from-bslib/SKILL.md

port-from-bslib is a skill for Claude Code, Codex from posit-dev/py-shiny. It costs 0 tokens per session (5,237 once invoked), scanned A, original, MIT.

A development guide for rebuilding user-interface components from R's bslib package in py-shiny, the Python version of the Shiny web framework.

In plain words
What is it for?
Use it when converting a bslib component into Python code, browser-side bindings, tests, and documentation.
Why use it?
It explains how to keep Python and R versions of Shiny components aligned instead of working out the porting process from scratch.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: installed under .agents/ (shared by several agents).

This is posit-dev/py-shiny's own configuration. It tells Claude Code and Codex how to work on py-shiny itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything py-shiny configures →

About the project

Shiny for Python is a Python framework for building interactive web applications and data visualizations with reactive behavior. Data scientists and Python developers use it for prototypes as well as larger applications. Its bundled agent skills provide coding agents with Shiny documentation so they can create better Shiny applications.

posit-dev/py-shiny · 1,767 stars · on GitHub · shiny.posit.co

Reuse

Borrowing it

Nothing to install: this file belongs to posit-dev/py-shiny. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/posit-dev/py-shiny/main/.agents/skills/port-from-bslib/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/posit-dev/py-shiny

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 port-from-bslib

README.md
[![agentmods](https://agentmods.dev/badge/skills/posit-dev/py-shiny/port-from-bslib/github.svg)](https://agentmods.dev/skills/posit-dev/py-shiny/port-from-bslib)
Your own site
<a href="https://agentmods.dev/skills/posit-dev/py-shiny/port-from-bslib"><img src="https://agentmods.dev/badge/skills/posit-dev/py-shiny/port-from-bslib/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 port-from-bslib

Your own site · 80×15
<a href="https://agentmods.dev/skills/posit-dev/py-shiny/port-from-bslib"><img src="https://agentmods.dev/badge/skills/posit-dev/py-shiny/port-from-bslib.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 5,237 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. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 1 finding, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Excessive Agency · line 236
    Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
    Fix: Set explicit rate limits, timeouts, and resource quotas for API calls, file operations, and compute. Implement circuit breakers for runaway loops.
How audits are shown
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.00000 $0.05237
Opus 5.5 $0.00000 $0.02095
Sonnet 5.5 $0.00000 $0.01047
Haiku 4.5 $0.00000 $0.00524

Measured 1mo ago against content hash 17978a69e613, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

port-from-bslib 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 1mo 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.

.agents/skills/port-from-bslib/SKILL.md · 567 lines

How it starts

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

Porting Components from bslib to py-shiny

This guide explains how to port new UI components from the R bslib package to py-shiny. It assumes you're an experienced developer familiar with Python, R, and JavaScript/TypeScript, but may be new to the specifics of these repositories.

Background

The bslib R package serves as the primary development location for new Bootstrap 5 components in the Shiny ecosystem. Components developed in bslib are then ported to py-shiny to maintain feature parity between Shiny for R and Shiny for Python.

Key relationship: bslib provides both the R implementation and the compiled JavaScript/CSS assets that py-shiny vendors and uses directly.

Overview of the Porting Process

The porting process involves three main phases:

  1. Understanding the source - Study the bslib implementation (R, TypeScript, SCSS)
  2. Implementing the port - Create Python equivalents and add client-side bindings
  3. Testing and documentation - Ensure correctness with unit and end-to-end tests

Phase 1: Understanding the Source Implementation

Step 1.1: Locate the bslib PR

Find the bslib PR that introduced the feature. The py-shiny PR description should reference it (e.g., Related https://github.com/rstudio/bslib/pull/...).

Checklist:

  • Located the bslib PR
  • Reviewed the PR description and any design discussions

Step 1.2: Identify the core source files

In the bslib PR, locate these key files:

  1. R implementation: R/[feature-name].R - The main component function(s)
  2. TypeScript bindings: srcts/src/components/[featureName].ts - Client-side behavior
  3. SCSS styles: inst/components/scss/[feature_name].scss - Component styles
  4. Unit tests: tests/testthat/test-[feature-name].R - R unit tests

Note: Generated files (compiled JS/CSS, documentation) can be ignored - focus on source files.

Checklist:

  • Found the R implementation file(s)
  • Found the TypeScript source file(s)
  • Found the SCSS source file
  • Found the unit test file(s)
  • Reviewed how TypeScript is registered in srcts/src/components/index.ts

Read the full file on GitHub · 567 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. 1mo ago Changed · +3 lines 17978a69e613
  2. 2mo ago First seen · 564 lines · 0 tokens per session scan A a5104aa16fdc

Subscribe to this mod's changes

port-from-bslib is a skill published in the GitHub repository posit-dev/py-shiny (1,767 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 5,237 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.

Related

port-from-bslib compared with skills from other repositories

port-from-bslib next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
port-from-bslibposit-dev/py-shinySkill1.8kyesterdayMITA0Claude Code, Codex
anti-slop-designsickn33/agentic-awesome-skillsSkill49kyesterdayMITA34Claude Code
chakra-ui-builderchakra-ui/chakra-uiSkill41kyesterdayMITA214Claude Code, Codex
visual-ralphYeachan-Heo/oh-my-codexSkill34k3d agoMITA52Codex
open-design-setupcompozy/compozySkill2.8ktodayMITA67Claude Code, Codex
edit-sitemicrosoft/power-platform-skillsSkill1.1ktodayMITA104Claude Code
frontend-visual-qadaymade/claude-code-skillsSkill1.5kyesterdayMITA125Claude Code, Codex