Agent Skills: Python Library Analyzer

Analyze any Python library structure, explore modules, classes, and functions with signatures and documentation.

UncategorizedID: shibing624/agentica/python-lib-analyzer

Repository

shibing624License: Apache-2.0
33048

Install this agent skill to your local

pnpm dlx add-skill https://github.com/shibing624/agentica/tree/HEAD/examples/data/skills/python-lib-analyzer

Skill Files

Browse the full folder contents for python-lib-analyzer.

Download Skill

Loading file tree…

examples/data/skills/python-lib-analyzer/SKILL.md

Skill Metadata

Name
python-lib-analyzer
Description
Analyze any Python library structure, explore modules, classes, and functions with signatures and documentation.

Python Library Analyzer

A skill for exploring and analyzing any Python library's structure, including modules, classes, functions, and their documentation.

When to Use

Use this skill when you need to:

  • Explore an unfamiliar Python library's structure
  • Find available classes and functions in a module
  • Get function/method signatures and documentation
  • Understand library architecture before using it

Quick Start

1. View Top-Level Modules

python view_python_module.py --module <library_name>

Example:

python view_python_module.py --module requests
python view_python_module.py --module numpy
python view_python_module.py --module pandas

2. Explore Submodules

python view_python_module.py --module <library>.<submodule>

Example:

python view_python_module.py --module requests.api
python view_python_module.py --module numpy.linalg
python view_python_module.py --module pandas.DataFrame

3. Get Class/Function Details

python view_python_module.py --module <library>.<Class>
python view_python_module.py --module <library>.<function>

Script Location

The view_python_module.py script is located in the same directory as this SKILL.md file.

Workflow

  1. Check if library is installed:

    pip list | grep <library_name>
    
  2. Install if needed (ask user permission first):

    pip install <library_name>
    
  3. Start exploration from top level:

    python view_python_module.py --module <library_name>
    
  4. Drill down into specific modules/classes:

    python view_python_module.py --module <library>.<module>.<Class>
    

Example Session

# Explore requests library
$ python view_python_module.py --module requests
Available submodules in 'requests':
- requests.api: Convenience functions (get, post, put, delete, etc.)
- requests.models: Request and Response classes
- requests.sessions: Session management
- requests.auth: Authentication handlers
...

# Get details on the get function
$ python view_python_module.py --module requests.get
def get(url, params=None, **kwargs):
    """Sends a GET request.

    Args:
        url: URL for the request.
        params: Dictionary of query parameters.
        **kwargs: Optional arguments for request.

    Returns:
        Response object
    """

Tips

  • Start with the library name to see the overall structure
  • Use tab completion in shell for module paths
  • For large libraries, explore section by section
  • Check __all__ exports for public API