OpenParable
Skip to content
← Back to skills

Copy Samples

Development
copy-samples

Copy Samples is an Agent Skill for development published in the whitphx/stlite repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Update sharing-editor sample apps from the streamlit/docs repository

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/whitphx/stlite/blob/HEAD/.claude/skills/copy-samples/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/copy-samples, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Update the sharing-editor sample apps by copying from the upstream Streamlit docs repository.

  1. Run the copy-samples script:
    sh packages/sharing-editor/bin/copy-samples.sh $ARGUMENTS
    
  2. If any patch fails, investigate the upstream changes and update the corresponding patch file in packages/sharing-editor/bin/sample-diffs/
  3. Verify the build succeeds:
    make sharing-editor
    
  4. If the build fails due to missing stlite.json manifests for new sample directories, create them. Each stlite.json needs title and entrypoint fields. Check existing samples under packages/sharing-editor/public/samples/ for reference.
  5. Check newly added sample files for file paths referencing python/api-examples-source/ (e.g. open("python/api-examples-source/cat-purr.mp3", ...)). These paths don't exist in the sharing-editor samples layout. For each such file:
    • Ensure the referenced asset is copied into packages/sharing-editor/public/samples/011_component_gallery/pages/ (the copy-samples script or a cp command).
    • Create a patch in packages/sharing-editor/bin/sample-diffs/011_component_gallery/pages/ that rewrites the path to pages/<filename>.
    • Add the cp and patch commands to copy-samples.sh.
    • Apply the patch to the current sample file. See the existing charts.audio-purr.py patch for reference.