✨ Support added for LLM AI asisstants. See details!

Sketchingpy

Creative coding and interactive science everywhere for everyone: web, desktop, mobile, Jupyter, and more. Open source!

LLM AI Assistant Support

Sketchingpy supports llms.txt, an open standard for providing information to AI assistants. This guide explains how to use AI assistants effectively with Sketchingpy.

AI Assistant Use is Optional

Using an AI assistant with Sketchingpy is completely optional. The library is designed to be intuitive and well-documented for direct human use. AI assistants are simply an additional tool that some developers may find helpful for learning or accelerating their creative coding workflow.

llms.txt Standard Support

Sketchingpy implements the llms.txt standard, which provides a structured way for AI assistants to understand the project's documentation and capabilities. This standard helps AI systems provide more accurate and helpful responses about Sketchingpy.

The project provides two key files:

  • llms.txt - A navigation overview of available documentation and resources
  • llms-full.txt - Complete API documentation and installation instructions

If the AI assistant encounters issues with the more compact llms-full.txt file, you can also direct it to the more comprehensive reference.md file available at https://sketchingpy.org/reference.md, which contains the complete API reference with detailed examples and explanations.

Directing AI Assistants

To get the best help from an AI assistant when working with Sketchingpy, direct it to read the llms.txt and/or llms-full.txt files before asking for help. This ensures the AI has current and accurate information about the library.

Here's an example prompt to get started:

Hello! I would like help with working in Sketchingpy. Please read
https://sketchingpy.org/llms-full.txt?v=20250915 and
https://sketchingpy.org/llms.txt?v=20250915 to learn more about
the Python package.

The version number (v=20250915) is optional but recommended as it helps ensure the AI reads the most current version of the documentation.

For AI assistants that do not have internet access, you can provide these documentation files as attachments:

  • llms.txt - Navigation overview of documentation and resources
  • llms-full.txt - Complete API documentation and installation instructions
  • reference.md - Most comprehensive API reference with detailed examples

Simply download and attach these files when working with offline AI assistants to ensure they have access to complete Sketchingpy documentation.

Example Prompts

Once the AI has read the documentation, you can ask for help with specific tasks. Here are some example prompts:
Please make a simple sketch which is 500 by 500 pixels with a
background of #F0F0F0. Then, in its center, please draw an ellipse
with radius of 20 by 20 pixels at the center. This ellipse should
have a fill of #C0C0C0 and a stroke of #000000.
This type of prompt should result in code like:
import sketchingpy

sketch = sketchingpy.Sketch2D(500, 500)

sketch.clear('#F0F0F0')

sketch.set_fill('#C0C0C0')
sketch.set_stroke('#000000')
sketch.set_ellipse_mode('radius')
sketch.draw_ellipse(250, 250, 20, 20)

sketch.show()

Other helpful prompts might include:

  • "Help me create an animated bouncing ball sketch"
  • "Show me how to load and display an image in Sketchingpy"
  • "Create a sketch that responds to mouse clicks"
  • "Help me understand how to use layers in Sketchingpy"

Version Numbers

When referencing the llms.txt or llms-full.txt files, including a version number as a query parameter is optional but recommended. The version number helps ensure you're getting the most current documentation and can help with cache management.

Format: ?v=YYYYMMDD

Example: https://sketchingpy.org/llms-full.txt?v=20250915

The version number typically corresponds to the date the documentation was last updated.

Best Practices

  • Always direct the AI to read the llms-full.txt file first for comprehensive help
  • Be specific in your requests - describe the visual outcome you want
  • Include details about canvas size, colors, and positioning when relevant
  • Ask for explanations if you want to understand the code, not just get working examples
  • Remember that AI-generated code should be reviewed and tested before use