본문으로 건너뛰기
cccskills
무료GitHub에 공개

textual

Use when building terminal UI apps with the Textual framework — creating widgets, screens, layouts, handling events, managing reactive attributes, testing with Pilot, snapshot testing with pytest-textual-snapshot, or running background workers. Covers App lifecycle, CSS styling, screen stack, custom messages, actions, bindings, and the Worker API.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md5.7 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Textual Knowledge

Provides patterns, API constraints, and working examples for building terminal applications with the Textual framework.

Scope

Consult python-engineering:standards-for-python-development for the shared rules (architecture, typing, testing, CLI rules).

TRIGGER: Activate when the user asks about Textual — building TUI apps, widgets, CSS styling, reactive attributes, testing, or concurrency.

COVERS:

  • App class, run/exit/suspend, title/subtitle, CSS loading
  • Screen stack (push, pop, switch), modal screens, modes, screen data return
  • Custom widgets, builtins, Line API, compound widgets, data flow
  • Layout types (vertical, horizontal, grid), docking, layers, offsets
  • CSS selectors, pseudo-classes, combinators, specificity, variables, nesting
  • Events, message queue, bubbling, custom messages, @on decorator
  • Actions, action strings, namespaces, bindings, dynamic actions
  • Reactive attributes, smart refresh, validation, watch methods, compute, data binding
  • Testing with run_test, Pilot API (press, click, hover, pause)
  • Snapshot testing with pytest-textual-snapshot
  • Workers (@work, run_worker, thread workers, worker events)

DOES NOT COVER:

  • Rich library internals (see Rich docs)
  • Textual Web deployment
  • Custom CSS parsers or non-Textual terminal frameworks

Workflow

flowchart TD
    Task([Task received]) --> Q1{Task type?}
    Q1 -->|App structure or lifecycle| App[Load app-and-screens.md]
    Q1 -->|Widget creation or builtins| Wid[Load widgets.md]
    Q1 -->|Layout or CSS styling| CSS[Load layout-and-css.md]
    Q1 -->|Events, messages, or actions| Evt[Load events-and-actions.md]
    Q1 -->|Reactive attributes or data binding| React[Load reactivity.md]
    Q1 -->|Testing or background tasks| Test[Load testing-and-workers.md]
    Q1 -->|Multiple concerns| Multi[Load relevant files]

Reference Files

App and Screens

App class basics, run/exit/suspend, CSS loading, screen stack (push/pop/switch), modal screens, returning data from screens, and modes.

Load when the user asks about App setup, screen navigation, modal dialogs, or multi-screen apps.

../python3-cli/references/textual/app-and-screens.md

Widgets

Custom widget creation, Static, Default CSS, focusability, bindings, Rich renderables, Line API, compound widgets, coordinating via messages, and the builtin widget catalog.

Load when the user asks about creating widgets, choosing a builtin widget, or structuring compound UIs.

../python3-cli/references/textual/widgets.md

Layout and CSS

Layout types (vertical, horizontal, grid), utility containers, docking, layers, offsets, CSS selectors, pseudo-classes, combinators, specificity, variables, nested CSS, and the style property reference.

Load when the user asks about arranging widgets, CSS syntax, selectors, or style properties.

../python3-cli/references/textual/layout-and-css.md

Events and Actions

Message queue, event handler naming convention, @on decorator, handler arguments, async handlers, event bubbling, custom messages, preventing messages, actions, action strings, namespaces, key bindings, dynamic actions, and the builtin actions list.

Load when the user asks about handling user input, defining key bindings, creating custom events, or action strings.

../python3-cli/references/textual/events-and-actions.md

Reactivity

Reactive attributes, var, smart refresh, layout-triggering reactives, validation methods, watch methods, dynamic watchers, recompose, compute methods, set_reactive, mutable reactives (mutate_reactive), and data binding.

Load when the user asks about reactive state, auto-refresh, watchers, computed values, or binding parent state to child widgets.

../python3-cli/references/textual/reactivity.md

Testing and Workers

run_test, Pilot API (press, click, hover, pause), terminal size simulation, snapshot testing with pytest-textual-snapshot, run_worker, the @work decorator, worker state lifecycle, thread workers, and worker events.

Load when the user asks about writing tests, simulating input, snapshot comparisons, background HTTP requests, or preventing UI blocking.

../python3-cli/references/textual/testing-and-workers.md

Quick Reference

# Minimal app
from textual.app import App, ComposeResult
from textual.widgets import Label


class MyApp(App):
    CSS = "Screen { align: center middle; }"

    def compose(self) -> ComposeResult:
        yield Label("Hello!")


if __name__ == "__main__":
    MyApp().run()
# Reactive + watch
from textual.reactive import reactive
from textual.widget import Widget


class Counter(Widget):
    count = reactive(0)

    def watch_count(self, value: int) -> None:
        self.refresh()

    def render(self) -> str:
        return str(self.count)
# Worker for background HTTP
from textual import work
import httpx


class MyApp(App):
    @work(exclusive=True)
    async def fetch(self, url: str) -> None:
        async with httpx.AsyncClient() as client:
            response = await client.get(url)
        self.query_one("#result").update(response.text)
# Test with Pilot
async def test_button() -> None:
    app = MyApp()
    async with app.run_test() as pilot:
        await pilot.click("#submit")
        assert app.query_one("#result").renderable == "done"

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Add automated documentation updater to any Claude skill. Creates a Python sync script that downloads upstream docs, processes markdown for AI consumption, and maintains local cache with configurable refresh. Collects template variables, then delegates implementation through 5-phase workflow. Use when adding auto-updating reference documentation to plugins or skills.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

SAM-style feature initiation workflow — discovery through codebase analysis, architecture spec, task decomposition, validation, and context manifest. Use when a user asks to add a feature, plan a feature, or convert an idea into an executable SAM plan.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Browser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Browser automation for AI agents using the agent-browser CLI and Playwright. Use when navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, logging into sites, or automating any browser task. Triggers on "open a website", "fill out a form", "click a button", "scrape data", "test this web app", "automate browser actions", or any programmatic web interaction request.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Runs the description-drift experiment — spawns all Claude Code agents simultaneously to collect self-reported capabilities, then compares them against static frontmatter descriptions to reveal how reliable orchestrator routing based on descriptions actually is. Use when measuring description drift across the agent fleet, re-running the capability collection experiment, analyzing a specific agent's self-reported capabilities, or auditing whether frontmatter descriptions accurately reflect agent behavior.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Create or adapt Claude Code agent definitions. Use when creating an agent, changing subagent configuration, selecting agent scope, or designing a specialized delegation role.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

Jamie-BitFlight/claude_skills672026년 10월 20일 업데이트

Jamie-BitFlight의 스킬 모두 보기

이 스킬의 문제 신고