agentleFS
LangChainKnown publisherlangchain-ai/deepagents/.agents/skills/textual-screenshot/SKILL.md

textual-screenshot

Skill30k starsChanged 3 months agoMITView on GitHub

Capture a Textual terminal UI as an SVG using its headless test harness. Use when asked to make, attach, or preview a screenshot of deepagents-code/dcode or another Textual app, visually verify a TUI state, or render a modal, screen, or widget without a desktop or browser.

Adopted by

Steady: 0 new projects took it in the last 4 weeks, none the 4 weeks before.thin data

Week of Oct 4: 0 new projectsWeek of Oct 11: 0 new projectsWeek of Oct 18: 0 new projectsWeek of Oct 25: 0 new projectsWeek of Nov 1: 0 new projectsWeek of Nov 8: 0 new projectsWeek of Nov 15: 0 new projectsWeek of Nov 22: 0 new projects
Oct 2026Nov 2026Nov 2026
New projects taking a version of this file each week, over the 8 weeks our latest run read: only 0 in all, so this is a hint, not a trend.

Who's talking about langchain-ai/deepagents

The biggest 5 of 62 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 62

Talked about on GitHub, Bluesky and Hacker News (62 times).

On GitHub · 50

45 more on GitHub

On Bluesky · 10

5 more on Bluesky

On Hacker News · 2

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 6 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈6

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Write a temporary Python script outside the repository.

    line 15
  2. Very specific:

    Start the app with a deterministic terminal size using app.run_test(size=(columns, rows)).

    line 16
  3. Very specific:

    Call await pilot.pause() after startup and after every action that changes visible state.

    line 17
  4. Very specific:

    Call app.save_screenshot(output_path) while the desired state is visible.

    line 18
  5. Distinctive:

    Delete temporary scripts and captures when they are no longer needed.

    line 20
  6. Very specific:

    Run from libs/code so the project environment and editable package resolve:

    line 51
  7. Distinctive:

    Use trusted local application code only.

    line 61
  8. Distinctive:

    Never capture secrets, credentials, private conversation content, or unrelated user data.

    line 62
  9. Very specific:

    Wait for workers, animations, and modal transitions to settle.

    line 64
  10. Distinctive:

    Do not treat a generated SVG as proof that interaction works.

    line 65
  11. Distinctive:

    Do not hand-edit the SVG. Reproduce the intended app state and recapture it.

    line 66

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Textual Screenshot

Render the real app with Textual's headless test harness, drive it to the requested state, and save the composed terminal as SVG. Prefer this over browser automation or OS-level screenshot tools.

Capture workflow

  1. Identify the App class and the shortest trusted local setup that reaches the requested UI.
  2. Write a temporary Python script outside the repository. Keep generated screenshots outside the repository unless the user explicitly requests a committed artifact.
  3. Start the app with a deterministic terminal size using app.run_test(size=(columns, rows)).
  4. Call await pilot.pause() after startup and after every action that changes visible state. Use pilot.press(...) for a realistic interaction path when practical; direct app methods are acceptable for a focused preview.
  5. Call app.save_screenshot(output_path) while the desired state is visible. Use an .svg path.
  6. Inspect the resulting SVG and confirm its file size is reasonable before sharing it.
  7. Delete temporary scripts and captures when they are no longer needed.

Minimal deepagents-code example:

import asyncio
import os
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import AsyncMock, MagicMock, patch


async def main() -> None:
    output = Path("/tmp/dcode-ui.svg")
    with TemporaryDirectory() as profile:
        os.environ["DEEPAGENTS_HOME"] = profile
        from deepagents_code.app import DeepAgentsApp

        app = DeepAgentsApp(agent=MagicMock())
        with patch.object(app, "_post_paint_init", new=AsyncMock()):
            async with app.run_test(size=(110, 36)) as pilot:
                await pilot.pause()
                await app._handle_command("/model")
                await pilot.pause()
                app.save_screenshot(output)
    print(output)


asyncio.run(main())

Run from libs/code so the project environment and editable package resolve:

uv run python /tmp/capture_dcode_ui.py

Adapt only the app constructor and action that opens the target state. For a standalone Textual app, import its App subclass and use the same run_test/save_screenshot sequence.

Reliability and safety

  • Use trusted local application code only. A headless app can still run startup hooks, subprocesses, or network calls. For DeepAgentsApp, set DEEPAGENTS_HOME to a temporary directory before importing deepagents_code, and mock _post_paint_init before mounting; replacing only the agent does not isolate startup side effects.
  • Never capture secrets, credentials, private conversation content, or unrelated user data. Seed only synthetic content needed for the preview.
  • Choose a bounded terminal size; start with (110, 36) and adjust only when the target clips or wastes substantial space.
  • Wait for workers, animations, and modal transitions to settle. Add another await pilot.pause() rather than using arbitrary sleeps.
  • Do not treat a generated SVG as proof that interaction works. Use normal Textual tests for behavior and the screenshot for visual inspection.
  • Do not hand-edit the SVG. Reproduce the intended app state and recapture it.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.